view · edit · print · history


Set up an SMTP + IMAP server with low resource usage.


NSLU2 device has only 32MB memory and it is performance-critical to configure services so that they use the memory as efficiently as possible. Postfix and cyrus imap programs - as efficient as they are on the real servers - require that several daemons are running at all times. The solution described in this document requires only a standard inetd daemon running, other processes are only spawned when needed. If the server is supposed to accept more mail, sendmail can be switched to daemon mode. Therefore, this configuration may be preferred on servers with low and moderate traffic.

Configuration consists of three major steps: user configuration, imap configuration and sendmail configuration.

User configuration

Both UW-imap and sendmail use the standard UNIX user database. This means that the users may be added and removed via the web interface, as well as they can change their passwords there. The only deficiency is that the web tools leave the home directory empty. For user folders to work, the home directory field must be set correctly in /etc/passwd to a directory owned by the user.

IMAP configuration

Configuration of UW imap server is described in ConfigUWImapd HOWTO. For performance reasons, it is strongly recommended to switch the mailbox format to mix (requires at least uw-imap_2006) or mbx.

Sendmail configuration

Install the sendmail package. Insert the list of domains the server is to accept the mail from in /opt/etc/local-host-names. /opt/etc/relay-domains is to contain the list of host names or IP addresses the server is going to relay the mail for. Insert there eg. ip adresses of your desktop computers. Some configurations may require setting the Dj field in sendmail.cf (if the sendmail is not able to figure the host name automatically). Sendmail will deliver mail to user's inbox using procmail. If the server-side filtering is not used, using tmail for direct delivery to INBOX in mix format may be preferred.

And that's it! Now, test your configuration and pay attention to /var/log/messages.

view · edit · print · history · Last edited by pawsa.
Originally by pawsa.
Page last modified on October 29, 2006, at 05:24 AM