Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer
    
So I'm leaving that "Other destinations to accept mail for" field blank, because I'm not accepting incoming mail? So the "Root and postmaster mail recipient" email address field is for system emails such as cron jobs and other system related emails? Just making sure I learn what each field/changes are for. Thanks! –  user57697 Oct 20 '10 at 16:10
1  
@leesuilung: Yes, yes, and you're welcome. –  Steven Monday Oct 20 '10 at 17:57

Ok basically you have to create a text file called virtual where you will put the N-user which you want to have on your mail server.

postmaster@yourdomain is the user de-facto about spam complain and stuff like this.

Some providers use postmaster for managing these kind of mail.

After postmaster you have adress1@domain1

It means that address1 will be a user that you can call in any way you want. Repeat this step for n-virtual domains that you want.

After that you have to put in /etc/postfix/main.cf this directive

virtual_alias_maps = hash:/etc/postfix/virtual

so postfix will know where he can retrieve the info about your virtual domain.

The command

postmap /etc/postfix/virtual

is useful for postfix because he have to re-map all the information related to your virtual domain

After that you have just to restart the postfix and that's all at the moment

P.s. sorry for my horrible english ;)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.