OSAF Hosted Service Email Engineering and Operational Notes
Definitions
- Email account outbound: When a person has the ability to send personalized outbound email through an ISP (usually only in an authenticated manner)
- Email account inbound: When a person has the ability to have email received and stored by the ISP at one or more personalized bob@example.com email aliases
- Email robot: A script that knows how to parse an inbound email and take action as the agent of the end-user or the owner of the robot
Account management use cases
- Create new account (need: account name, domain name, password)
- Remove an account and all of its data
- Change account password
- Reset/remember forgotten account or pasword
- Send authenticated outbound email through ISP servers
- Configure a client to use IMAP for retrieval
- Restore an account's data from backup
- Use web-based email client
- Set up alias pointing to local account
- Set up alias pointing to offsite email address
Most simple model
- Email account inbound and outbound: none
- Email robot: /etc/aliases and a pipe
This model uses a deployment pattern from the Unix world which has been around and well supported for 20 years. One configures the mail daemon (postfix or sendmail) to directly send the full text of all mail destined for a specific email alias (
myrobot@example.com) to a script implementing the robot's logic. This is normally not done in modern systems, as it's important to have some queuing system between inbound email and the possibly-expensive-to-run robot logic.
Regardless of subsequent enhancements to email processing architectures, this "/etc/aliases and a pipe" is the foundational model and pattern for automated mail processing. The contents of an incoming email are represented as text and fed to a processing script which examines the contents for particular email headers, phrases, structure, or really anything that can be automated.
Sophisticated systems integration model
- Postfix as MTA
- Valid list of recipients stored in MySQL? database
- "To" header checks to look up destination based on recipient
This model allows for dynamic, database-backed list of email alias. Web UIs or automated script can maintain (create, delete, update) the list without requiring manual editing of config files.
- Appliance-based MX-proxy spam filtering
Spam attempts are inevitable