Help: Setup Outgoing Mail Server Only for Multiple Domains Using Postfix

emailpostfix

I want an outgoing mail server ONLY for multiple domains. I plan to use Postfix as that seems to be the easiest to setup being very new to Ubuntu/Linux.

The setup I plan to have are as follows:

  1. I want to use virtual domain with postfix i.e. my multiple websites must be able to send an email from each their respective domains i.e. email1@domain1.com is sent from my domain1.com website and email2@domain2.com is sent from domain2.com website
  2. This is an outgoing mail server only i.e. I don't want any returned (or otherwise) email sent to my postfix server.
  3. Incoming mail is handled by Google Apps/Gmail and is already setup.
  4. I already set my SPF recording to designate my mx records and postfix server ip as valid email servers i.e. "v=spf1 mx include:mydomain.com -all"

How can I achieve this? I'm frankly a little confused, so some help would be appreciated.

I attempted to follow these guides here, but it doesn't seem right (and it isn't clear what all the settings mean):

How to configure Postfix virtual domains
http://www.sysdesign.ca/guides/postfix_virtual.html

Postfix Installation
***.slicehost.com/2008/7/29/postfix-installation

Basic Postfix settings (main.cf)
***.slicehost.com/2008/7/31/postfix-basic-settings-in-main-cf

I can only post one link, but those articles above can be found by replacing *** with articles in the hyperlink.

Best Answer

Since you're running Ubuntu, you should be able to get a functional postfix setup by running

dpkg-reconfigure postfix

This should run a dialog that asks you a series of questions. One of the questions will be along the lines of "Other destinations to accept mail for", to which you should reply with an empty string (i.e. blank). You should also be certain to give a valid email address (e.g. yours) in answer to the question "Root and postmaster mail recipient", so that mail generated by the system by/for system users gets delivered somewhere.

Related Topic