This article outlines specifically how to use your server to send emails for server administration purposes only . Another term for this is setting up a null client.
For receiving emails and hosting it is recommend to use a dedicated mail server. Non-profits or small businesses should consider the using Google Apps which is free.
Postfix is free and open-source mail transfer agent (MTA) that routes and delivers electronic mail. It is intended as a fast, easier-to-administer, and secure alternative to the widely-used Sendmail MTA.
You will be provided a command line UI to selection some options.
Please select the mail server configuration type that best meets your needs. = Internet Site
The "mail name" is the domain name used to "qualify" _ALL_ mail addresses without a domain name. = (leave default is fine)
At the end,
I then modified the main.cf to add my MX record for mydestination,
When time available write up more on these options, ie how I setup my MX record on my domain server to use Google's email service.
Basics of Postfix
Default installations of Postfix stores all messages in an mbox file. To see what directory it is using use the command,
The newer maildir format is now recommened so follow the next section to change to maildir.
Setup Mail Delivery Account
The overall consensus is to use the maildir format with a mail directory being used for each user.
Backup /etc/postfix/main.cf in case something goes wrong. All the subsequent commands modify main.cf,
The following command will do make the following changes,
- Set emails to the users home directory under a subfolder called Maildir.
- The trailing slash indicating a folder, will configure Postfix to use the maildir format. Note, if you forge the slash, a file called maildir will be generated in mbox format.
In most cases, your system is being used to send email outbound and not receive email or deliver the emails locally to the system.
TBC - This should explain why we would want reverse dns.
Reverse DNS unless delegated is managed by the ISP provider. Generally this means whoever manages the IP address of your server.
Setup spf Records
TBC - This section should be filled out with a general discussion of what spf is for and how to configure within Rackspace or your registrar.
Here is how to send a test email.
First install a simple mail program. In this example we will use mailx,
Next send the email,
The log for a valid send will look something like this,
If you do not see your receive your test email, try looking in your spam folder.
https://help.ubuntu.com/10.04/serverguide/C/postfix.html - How to setup postfix
http://www.linuxmail.info/mbox-maildir-mail-storage-formats/ - Deciding on Mbox vs Maildir
http://www.tummy.com/Products/vpostmaster/recipes/dovecotsasl.html - Syrus vs Dovecot
http://articles.slicehost.com/2010/3/1/barebones-postfix-install-for-ubuntu - Slicehost instructions on postfix, has notes here about reverse dns being needed
http://cloudservers.rackspacecloud.com/index.php/Postfix_-_Basic_Settings_in_main.cf - Rackspace instructions on postfix, the Slicehost actually seems better
http://www.postfix.org/STANDARD_CONFIGURATION_README.html - talks about null client