August 28, 2007

 Conditional Max Recipients

You can create a conditional Max_recipients setting that allows specific users to send as many emails as they want. Just go through the following steps:

- open up /usr/local/atmail/mailserver/configure, and find:

MYSQL_GROUPLOOKUP = select GroupEmail from AbookGroup_shared where GroupName='${quote_mysql:$local_part}'

- add this below:

MYSQL_MAXRCPT = select Account from Users where Account='${quote_mysql:$sender_address}' and NoMaxRcpt = '1'

- then find:

hostlist relay_from_hosts = localhost:mysql;MYSQL_RELAY

- below it, add:

addresslist allowed_maxrcpts = mysql;MYSQL_MAXRCPT

- then find:

  accept  local_parts   = postmaster
          domains       = +local_domains

- below it, add:

  deny  condition = ${if > {$rcpt_count}{[INSERT YOUR PREFERRED VALUE HERE]}}
        senders = !+allowed_maxrcpts
        message = Too many recipients

- where [INSERT YOUR PREFERRED VALUE HERE] is the number that you want to set as your default Max Recipient value.

- login to your MySQL terminal, and execute:

 alter table Users add 'NoMaxRcpt' smallint(1) DEFAULT '0';

- to assign users whitelisted from the Max Recipients value, just execute in MySQL:

 update Users set NoMaxRcpt='1' where Account='user@domain.com';

- where user@domain.com is the user to be whitelisted.


Filed under: Exim — John Contad @ 1:48 am

 

August 8, 2007

 Universal Disclaimer for messages.

You may want to add a disclaimer to messages - even those sent via an external client (say, Outlook or Thunderbird).This can be done by going through the following steps:

1.) Download altermime from: http://www.pldaniels.com/altermime/

2.) Untar, install:

% tar xvfz altermime-0.3.8.tar.gz
% cd altermime-0.3.8
% make; make install

3.) Open up your /usr/local/atmail/mailserver/configure file, and look for the following line:

remote_smtp:
driver = smtp

4.) Change this to:

remote_smtp:

driver = smtp

transport_filter="/usr/local/bin/altermime --multipart-insert --force-into-b64 --disclaimer-html=/usr/local/atmail/mailserver/.dischtml --disclaimer=/usr/local/atmail/mailserver/.discplain --input=- --force-for-bad-html"
5.) Create the files /usr/local/atmail/mailserver/.dischtml and /usr/local/atmail/mailserver/.discplain for HTML and Plaintext disclaimers, respectively.
6.) Restart Exim:
% killall -HUP exim
This will then append the disclaimers for all messages outgoing through your system.

Filed under: Exim, Linux version — info @ 7:00 am

 

August 3, 2007

 Migrating from Surgemail to @Mail

@Mail now supports migrations from the SurgeMail Webmail platform. The migration script can import previous Address-book data, Distribution lists, and Tasks from the flat-file database used by Surgemail.

The migration is seamless and all existing user data is available once logged into @Mail.

To use the migration script download a copy at:

http://atmail.com/attach/migrate-surgemail.tgz

This is provided in @Mail versions 5.08+ and greater by default.

Extract the migration scripts under:

/path/to/atmail/modules/

To execute:

cd /path/to/atmail/modules/
php migrate-surgemail.php /path/to/surgemail.csv

Where surgemail.csv is a list of users and the data directory location of user data.

The format of the CSV the file is:

user@domain.com,/path/to/surgemail/user/

To find the database location of a user under Surgemail you can use the inbuilt function to extract the database location:

cd /path/to/surgemail/
./webmail.cgi -show_path user@domain

Which will return a path similar to:

/var/spool/webmail/workarea/n_y2/a1/user_Pdomain_Icom_Plocalhost/

Use this utility to compile a CSV file for importing into @Mail

---

Once the script is run it will return each record migrated, for example:

# php migrate-surgemail.php /tmp/test.users
...
Migrating ben@domain.com

Reading /var/spool/webmail/workarea/n_y2/a1/user_Pdomain_Icom_Plocalhost/test.abk
        Added 'Max Pradella'
        Added 'Max Comparotto'
        Added 'Marcella Sanna' 

	Adding Group 'TestGroup' > user@domain.com - user@company.com - user@personal.com

Reading /var/spool/webmail/workarea/n_j7/z3/max_Ipradella_Poipaitalia_Icom_Plocalhost//todo.lst
        Added new Task Test migration
        Added new Task Do extra work
        Added new Task In the future todo
        Added new Task A task
...
SurgeMail Migration complete.

Filed under: Migration — Ben Duncan @ 11:02 am