Build a better mail server with NetBSD, part 2
*BSD, Internet, Networking, Open Source 1 Comment »In the first part of this short series, I detailed the reasoning behind my need for a new mail server. In this second part, I’m going to detail my mail architecture as well as the software choices I made and why.
All mail for my various domains is delivered to the primary MX, which is a hosted server sitting in the US running Debian GNU/Linux (unfortunately my hosting provider doesn’t support NetBSD). It runs postfix and makes use of a variety of checks within postfix itself as well as postgrey for greylisting. I use a fairly conservative list of RBLs and, in conjunction with greylisting, they stop most spam from being accepted. Why postfix? Well, I stopped using sendmail over ten years ago, and although I’ve had good results with Exim in the past, these days I’m just most comfortable with postfix and it suits my needs perfectly.
The RBLs I use:
- zen.spamhaus.org
- cbl.abuseat.org
- list.dsbl.org
Once mail has been received by my primary MX, it is delivered to local mailboxes, one per user. None of the users read their mail from the US server, however. All the mail is downloaded to the local mail server via SSL-secured POP3 and accessed here, either locally or via IMAP. The local mail server is a Sun Ultra 2 running NetBSD/sparc64 3.1_STABLE.
Software I’m using on the local mail server:
- postfix
- dovecot for IMAP (over SSL) access. There are a number of IMAP/POP3 servers available, but I chose Dovecot because of its clean design, good security record and flexible support for mail storage, amongst other things.
- amavisd-new with spamassasin (with razor and Bayesian filtering enabled) and clamav for content filtering
- getmail to download mail from the US server
- mailgraph for simple reporting
All of the above are available in pkgsrc. As I have already done any RBL-based checks on the MX, I don’t do any of them locally.


Recent Comments