New Email System Docs

Overall Topology

There are four separate servers in the new system:

DNS/Server Names

MX records (email DNS records) point to smtp1/smtp2.nextalarm.com; each has a relative priority of 10, which provide a kind of poor man's round robin.
See http://en.wikipedia.org/wiki/MX_record for more information. The gateway servers then forward the mail to mail.nextalarm.com.

SPF records for all domains should be set to (using DNS TXT records):

This allows outbound email from servers at that domain, as well as from AuthSMTP, as well as the old Rackspace server which incorrectly heads outbound email with the server name "rs3.netmeme.org"

Virtual Domains and Users

The domains (nextalarm.com, voipalarm.com, lasershield.net ...) hosted by the email system, and the actual email accounts or users, are both referred to as 'virtual'. I.e., virtual domains and virtual users. This is simply terminology specific to the email server applications used in this system. Essentially it means that the domains and users serviced are more dynamic than static. For example, the email accounts need not correspond to unix users.

Virtual domain and user management is done at two places - the gateway mail servers and the internal mail server. At the gateway mail servers, virtual domains are maintained in /etc/postfix/relay_domains and /etc/postfix/transport; users are maintained in /etc/postfix/relay_recipients (relay_recipients is the whitelist). At the internal mail server, both domains and users are maintained in a database.

Detailed configuration for virtual domains and users is discussed later in this document.

authsmtp.com

Many ISPs and email administrators by default reject email from Amazon's EC2 server farm. There are several options for sending email reliably from EC2 (i.e., not having it routinely rejected). Probably the simplest is to use a commercial SMTP relay service, which is what we do. We use AuthSMTP (http://authsmtp.com/) for this purpose. To connect to AuthSMTP securely, we use Cyrus SASL over SSL; see below for detailed configuration.

Webmail

Webmail access is provided for convenience. All users that wish webmail access must have IMAP accounts. Webmail can be accessed at https://webmail.nextalarm.com. Currently, RoundCube (http://roundcube.net/) is being tested as a candidate webmail system. Horde (http://www.horde.org/) will also be tested, as it provides several applications in addition to webmail, including calendaring, file storage/management, todo lists, address book/contact management, and several more.

Nagios Monitoring

A new host configuration file (/etc/nagios/conf/hosts-email.cfg) has been added to define the four new systems. Each system has been added to the standard set of host checks (SSH, disk, CPU), and three of the four have been added to the SMTP host check (webmail has not). Also, POP3/IMAP checks have been added for the internal POP3/IMAP server.

Detailed Configuration

The pertinent/important parameters for each section will be discussed; however, each parameter of each area of configuration will not be covered in detail.

Misc