Introduction
MailScanner scans all e-mail for viruses, spam and attacks against security vulnerabilities. It is not tied to any particular virus scanner, but can be used with any combination of 14 different virus scanners, allowing sites to choose the "best of breed" virus scanner. MailScanner has been developed in a world-leading Electronics and Computer Science Department at the University of Southampton, and is distributed for *FREE* under the GNU Public Licence.
Scans e-mail for viruses using any combination of up to 14 different virus scanners
Automatically updates all installed virus scanners every hour, by default
Identifies over 95% of spam using several techniques, including highly advanced heuristics
Spam can be tagged, rejected, discarded, archived or forwarded to other addresses for inspection by administrators
Pornographic spam can be stripped of all graphical content, protecting users from obscene content
Scans e-mail for attacks against known and unknown security vulnerabilities in popular e-mail applications, automatically correcting messages "on the fly" whenever possible and quarantining dangerous sections of other messages
Highly scalable: 1 PC can process over 1.5 million e-mail messages per day
Robust: Protects itself against "Denial of Service" attacks and operating system resource leaks
Highly configurable, providing ISP's and ASP's with the possibility of using thousands of different rules and configurations for any combination of users or domains
Easy to set up as all configuration options are supplied with "sensible" defaults
To find out more, visit the web site at www.mailscanner.info or contact the team directly at [email protected].
Install and configure the email server (Postfix):
Install the postfix package.
-
Run “sudo dpkg-reconfigure postfix”
-
Choose “Internet”
(Note: If you use Comcast, you should choose "Internet with smarthost". The SMTP relay host will be "smtp.comcast.net".)
User to receive root mail: “myusername” (Enter your username)
Mail name: “mydomain.com” (Enter your domain name)
Local networks: “127.0.0.1/8” (Add any of your networks with users who need to send email)
If not specified above, choose the default setting
-
Run "sudo /etc/init.d/postfix restart"
This will listen on TCP port 25 (SMTP).
Install SPAM protection for an email server (MailScanner/Spamassassin):
-
Edit “/etc/postfix/main.cf” and add this line:
header_checks = regexp:/etc/postfix/header_checks
-
Create file “/etc/postfix/header_checks” and add this line:
/^Received:/ HOLD
Run “sudo apt-get install mailscanner”
-
Edit these settings in “/etc/MailScanner/MailScanner.conf”
Run As User = postfix
Run As Group = postfix
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
MTA = postfix
-
Add to “/etc/MailScanner/spam.assassin.prefs.conf”
razor_config /var/lib/MailScanner
Install the following packages: pyzor razor dcc-client
Optionally install the package bind (Optional, but increases speed of SPAM filtering)
-
Edit this setting in “/etc/default/mailscanner”
run_mailscanner = 1
-
Run these commands
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/
sudo /etc/init.d/mailscanner restart
Install a Virus Scanner for an email server (ClamAV):
Install the package clamav
-
Edit “/etc/MailScanner/MailScanner.conf”
Add "clamav" to the "Virus Scanners" setting (Remove the "none" setting)
Example: “Virus Scanners = clamav”
Note: You can use multiple virus scanners at the same time.
Run “sudo /etc/init.d/mailscanner restart”
Install a Virus Scanner for an email server (F-Prot: Non-commercial use only)
Run “wget http://debian.logiclinux.com/pool/contrib/f/f-prot-installer/f-prot-installer_0.5.14_i386.deb”
Run “sudo dpkg -i f-prot-installer_0.5.14_i386.deb”
Run “sudo apt-get install libwww-perl”
Run “sudo apt-get -f install“
-
Edit “/etc/MailScanner/MailScanner.conf”
Add "f-prot" to the "Virus Scanners" setting (Remove the "none" setting) Example: “Virus Scanners = f-prot” Note: You can use multiple virus scanners at the same time.
Run “sudo /etc/init.d/mailscanner restart”
Install a Virus Scanner for an email server (Bitdefender: Non-commercial use only)
Download Bitdefender
wget -c ftp://ftp.bitdefender.com/pub/linux/free/bitdefender-console/en/BitDefender-Console-Antivirus-7.1-3.linux-gcc3x.i586.deb
Install the deb file via dpkg:
sudo dpkg -i BitDefender-Console-Antivirus-7.1-3.linux-gcc3x.i586.deb
-
Edit “/etc/MailScanner/MailScanner.conf”
Add "bitdefender" to the "Virus Scanners" setting (Remove the "none" setting)
Example: “Virus Scanners = bidefender”
Note: You can use multiple virus scanners at the same time.
Run “sudo /etc/init.d/mailscanner restart”
Install a POP3(s) server to retrieve email:
Install the dovecot-pop3d package.
This will listen on TCP port 110 (standard) and TCP port 995 (SSL secured)
Install an IMAP(s) server to retrieve email:
Install the dovecot-imapd package.
This will listen on TCP port 143 (standard) and TCP port 993 (SSL secured)
Install web-based server administration (Webmin):
Install the webmin package.
Run "sudo /usr/share/webmin/changepass.pl /etc/webmin root mypassword"
Run "sudo /etc/init.d/webmin restart"
-
Using a web-browser, connect to " https://localhost:10000/";
Login as "root" use the password created above. (Example: mypassword)