How to install MailScanner on Ubuntu Dapper
I would like to have MailScanner on a Ubuntu Dapper server for internal server. There are many receipts including a good one at wiki. Anyway, I add a few modification to make it more easier to debug. Follow me.
-
Install Postfix
sudo apt-get install postfix
-
Add below line to
/etc/postfix/main.cf
header_checks = regexp:/etc/postfix/header_checks
-
Create file
/etc/postfix/header_checks
/^Received:/ HOLD
-
Generate its map
sudo /etc/postfix/header_checks
-
Install MailScanner and companions
sudo apt-get install mailscanner tnef unrar unzip pyzor razor dcc-client
-
Change
/etc/MailScanner/MailScanner.conf
as you need%org-name% = your-site %org-long-name% = your-long-site %web-site% = www.your-site.com Run As User = postfix Run As Group = postfix Incoming Queue Dir = /var/spool/postfix/hold Outcoming Queue Dir = /var/spool/postfix/incoming MTA = postfix Spam Actions = deliver header "X-Spam-Status: Yes" High Scoring Spam Actions = delete Syslog Facility = local0 Log Spam = yes SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
-
Change
/etc/MailScanner/spam.assassin.prefs.conf
bayes_path /var/spool/MailScanner/spamassassin razor_config /var/lib/MailScanner
-
Edit
/etc/default/mailscanner
run_mailscanner=1
-
Create directory and change permission
sudo mkdir /var/spool/MailScanner/spamassassin sudo chown -R postfix:postfix /var/spool/MailScanner sudo chown -R postfix:postfix /var/lib/MailScanner sudo chown -R postfix:postfix /var/run/MailScanner sudo chown -R postfix:postfix /var/lock/subsys/MailScanner
-
Edit
/etc/syslog.conf
local0.* -/var/log/mailscanner.log
-
Restart mailscanner
sudo /etc/init.d/syslogd restart sudo /etc/init.d/mailscanner restart sudo /etc/init.d/postfix restart
All done. If you have questions about postfix, please read the wiki for more details.
Tags: ubuntu, mailscanner, spamassassin
- sugree's blog
- 7791 reads
YHxFmXgQvGmS
Post new comment