Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had a problem setting up PostFix only for aliases use. Let me first explain what I did:

1) I went to the domain name control panel where our DNS is hosted, and created a new sub domain called it (and i pointed it to the server IP), then went to the MX records (Mail records) and then, there I created a new sub domain, pointed it to The end result, when a mail server such as google, attempts to send an email to, it will be looked up in our DNS and will be redirected to the proper IP address.

2) I logged in to the machine and installed postfix using apt-get.

3) edited the main postfix setting file with the following lines at the end /etc/postfix/

virtual_alias_domains =
virtual_alias_maps = hash:/etc/postfix/virtual

4) created a new file /etc/postfix/virtual and inside the file I created the forwarders e.g

cat /etc/postfix/virtual

5) then I added an entry inside virtual file, you must run the command

postmap /etc/postfix/virtual

I tried to send an email to so it will forward to the alias but here is what I got in the log files.

Nov 24 12:25:30 domU-12-31-39-0C-1A-72 postfix/smtpd[11373]: connect from unknown[]
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/trivial-rewrite[11377]: warning: do not list domain in BOTH mydestination and virtual_alias_domains
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/smtpd[11373]: 73B6A4D72: client=unknown[]
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/cleanup[11378]: 73B6A4D72: message-id=<>
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/qmgr[11309]: 73B6A4D72: from=<>, size=1480, nrcpt=1 (queue active)
Nov 24 12:25:32 domU-12-31-39-0C-1A-72 postfix/smtp[11379]: 73B6A4D72: to=<>, orig_to=<>,[]:25, delay=0.89, delays=0.28/0.01/0.18/0.41, dsn=2.0.0, status=sent (250 2.0.0 OK 1322137866 u18si4183976vcq.63)
Nov 24 12:25:32 domU-12-31-39-0C-1A-72 postfix/qmgr[11309]: 73B6A4D72: removed
Nov 24 12:26:01 domU-12-31-39-0C-1A-72 postfix/smtpd[11373]: disconnect from unknown[]

please advise on how i can make the Postfix works in redirection?

share|improve this question

migrated from Nov 25 '11 at 22:10

This question came from our site for professional and enthusiast programmers.

As you see, it worked. So where is your problem?

Please follow the advice: warning: do not list domain in BOTH mydestination and virtual_alias_domains

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.