Low-Power Mail Server
For a variety of reasons, I decided to host my own mail server. But I have
enough power hungry, noisy machines already. This machine must be cool, quiet,
- Via Epia-ML6000
- The case is a converted SCSI drive enclosure, with 65W Autec UPS65-1002 power supply.
(My unit is approximately 20 years old, yet I see the same supposed model of power supply at Jameco.
The board layout is similar, but not identical. YMMV.)
- 4GB PATA flash drive (Transcend, industrial grade)
- No fans, no moving parts
For this install, I used Debian 7.11. The main goal of my installation is to
keep the CPU usage low (minimize heat) and disk actively low (minimize flash
- No swap partition
- Filesystem: ext4 (extents may cause less IO)
- Don’t install popularity-contest (one less cron job to run)
- Install nothing besides the base system
- Install some tools:
- Install servers:
- SMTP: postfix, postfix-pcre
- IMAP: dovecot-pop3d, dovecot-imapd (less to configure and faster that courier)
- firmware-linux-nonfree wireless-tools (optional, but for a VT6656 wireless card)
- Dovecot and Postfix configuration:
- This blog post on splitbrain.org
is a good, concise guide to setting up dovecot and postfix.
dovecotpw is now gone. Instead, do
doveadm pw -s SHA1.
- Read the FSM article Filtering spam with Postfix
to further refine the spam blocking. In particular, I added
- Deinstall aptitude (one less cron job to run)
- Deinstall bsdmainutils (kills off 2 cron jobs, but lose man pages… oh well)
/etc/rsyslogd.conf: prepend files by hyphens, to not sync (and run on a UPS)
/etc/rsyslogd.conf: Comment out line mail.log to reduce duplication
debian bug #508376
- The majority of logs come from dovecot, due to the clients checking for mail. These are all at info level, and are easy to discard:
root@mail:~# cat /etc/rsyslog.d/dovecot.conf
root@mail:~# grep local0 /etc/dovecot/dovecot.conf
syslog_facility = local0
/etc/ntp.conf: Ensure logging is off
rm -rf /var/backups so cron jobs stop churning backups (but remember to backup myself!)
- syslog to my desktop machine. Less wear on flash. Dropped logs when desktop is down are not critical.