VMware Images:
|
Virtual Users And Domains With Postfix, MailScanner, Mailwatch & MySQL On CentOS 5.1 - Page 3
8 Cronjobs8.1 MailScanner Quarantinevi /etc/cron.daily/clean.quarantine Make sure that it's disabled - the corresponding line should look like this: $disabled = 1;
8.2 Mailwatch Quarantinevi /tmp/mailwatch-1.0.4/tools/db_clean.php Change the first line that it looks like this: #!/usr/bin/php -q cp /tmp/mailwatch-1.0.4/tools/quarantine_maint.php /usr/local/bin/
8.3 Mail Queue WatcherFirst copy the mail queue watcher script. cp /tmp/mailwatch-1.0.4/mailq.php /usr/local/bin/ Afterwards we create a new cronjob. crontab -e Add the following line: 0-59 * * * * /usr/local/bin/mailq.php
9 Quarantine Release FixIn order that a released email is not checked again (it would be quarantined again) we have to add/modify some rules.
9.1 WhiteList SQL DatabaseConnect to phpmyadmin (%server_ip%/phpmyadmin) and log in as mailwatch. Afterwards select the database "mailscanner" and then the table "whitelist". Create a new record: to_address = default
9.2 MailScanner RulesNote that the entries in all lines of the following files have to be separated with tabs! cd /etc/MailScanner/ vi filename.rules From: 127.0.0.1 /etc/MailScanner/filename.rules.allowall.conf FromOrTo: default /etc/MailScanner/filename.rules.conf vi filetype.rules From: 127.0.0.1 /etc/MailScanner/filetype.rules.allowall.conf FromOrTo: default /etc/MailScanner/filetype.rules.conf vi filename.rules.allowall.conf allow .* - - vi filetype.rules.allowall.conf allow .* - - vi rules/content.scanning.rules From: 127.0.0.1 no FromOrTo: default yes Now adjust the permissions for the quarantine directory. chown -R postfix:apache /var/spool/MailScanner/quarantine/ Note: The needed MailScanner settings were already included in step 4.
10 Startchkconfig --level 2345 MailScanner on You should see lines like the following in the output: Mar 6 07:33:21 server1 MailScanner[8594]: Config: calling custom init function SQLBlacklist
11 Remaining Configurationhttp://www.howtoforge.com/virtual-users-and-domains-postfix-courier-mysql-centos5.1 from step 14 till the end. Keep in mind that the commands to start, stop or restart postfix have changed! To start MailScanner & Postfix: service MailScanner start To restart MailScanner & Postfix: service MailScanner restart To stop MailScanner & Postfix: service MailScanner stop
12 Mailwatch WebinterfaceNow you can access the mailwatch webinterface via http://mailwatch.example.com. Log in with the username & password that you created in step 7.4 . First you should update the SpamAssassin rule descriptions and the GeoIP database. You'll find both options when you click on the "Tools/Links" button.
13 Links
VMThe attached VM is configured as follows.
|







Recent comments
1 day 12 min ago
1 day 5 hours ago
1 day 9 hours ago
1 day 12 hours ago
1 day 12 hours ago
1 day 12 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 19 hours ago
2 days 2 hours ago