Small Business Mail Server a.k.a
Postfix + SMTP TLS Auth + Dovecot IMAP, POP3 + Squirrelmail + ClamAV + Anti Spam with bogofilter and procmail
Using this how-to, you can setup a secure mail server on a fresh FreeBSD server using completely free open source software. I used to work in a large software firm in India and as part of my job I consulted for big to very big corporations in a few countries and I found that they all have a pretty snobbish attitude towards open source.
On the otherhand, open source software not only works, but works really well. Small Medium enterprises typically install Exchange Server or Lotus Notes on Windows NT / 2000 servers and then employ an administrator to baby-sit the mailserver. Now this is stupidity born of fear; if you are a small-medium business interested in having a secure mail server (which is the heart of modern business) all you need to do is to lease a dedicated server and install qmail or postfix. This HOW-TO is my own small effort at promoting opensource software to small businesses.. I really have no sympathy for Big B's with several million dollar IT budgets. They have FAT purses and the exercise of buying per-seat licenses can only make them trim! But there is no earthly reason for, say, a hospital or a trading company with 50 users to go for an exchange server! Remember, all glory comes from daring to begin and what have we to lose but our license costs!
Tech note:
This HOW_TO installs postfix, smtp-tls, dovecot imaps & pop3s, clamsmtpd+clamav, procmail, bogofilter, squirrelmail webmail over https for a single domain.User authentication is through /etc/passwd. Entire installation is doen through FreeBSD ports. The domain used is example.com.
Support
This how-to was the result of a week's research using good old Google and RTFM trying to set up postfix. I had no idea of postfix prior to that. If you find any errors or gaping holes in this please mail me at postfix at bsdinn dot com. Any doubts are also welcome to the same mail id. IF sufficient people are interested I will set up a mailing list for this. Paid support for install etc is also available but please check with me first if I can take up the work before ordering. I am quite satisfactorily engaged now.
Disclaimer a.k.a my own CYA ;)
There is no great intellect involved in this for me to claim any intellectual property; that said this guide is released under the BSD License
Prerequisites:
--------------
You should have FreeBSD installed on your server, ports collection installed and connected to the net. Your server should be able to resolve other hosts on the net (test with host google.com & host yahoo.com) and your domain's MX should point to the server's IP (test with www.dnsreport.com and see if the MX returns your server IP). If not, go back and fix these.
0.1 Install cvsup-without-gui
cd /usr/ports/net/cvsup-without-gui
make install clean
0.2 Upgrade relevant ports collections so we dont snafu in between!
mkdir -p /opt/mail
cd /opt/mail
fetch http://bsdinn.com/dl/ports.mailserver
cvsup -g -L 2 ports.mailserver
0.3 upgrade openssl first
cd /usr/ports/security/openssl
make deinstall
make reinstall
1. Postfix Install
cd /usr/ports/mail/postfix
make install clean
Select "SASL2" "SSL & TLS" options
Answer 'y' to all questions
Add this to /etc/rc.conf
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_procname="/usr/local/libexec/postfix/master"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
put this in /etc/periodic.conf
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
Next SB02