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 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 m.example-mydomain.com (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 m.example-mydomain.com. The end result, when a mail server such as google, attempts to send an email to XXXX@m.example-mydomain.com, 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/main.cf

virtual_alias_domains = m.example-mydomain.com
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
Djdi-sjsj@m.example-mydomain.com xx.xxxxxx@gmail.com
6f48d939-5060-43bd-9918-e1d368777a18@m.example-mydomain.com xxx.xxxx@gmail.com

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 Djdi-sjsj@m.example-mydomain.com 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[74.125.82.48]
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/trivial-rewrite[11377]: warning: do not list domain m.example-mydomain.com 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[74.125.82.48]
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/cleanup[11378]: 73B6A4D72: message-id=<CACaL_7fcTcxLQmbQFdh0H5N8mea1750FVOFbDyi4s5e=r=ieuw@mail.gmail.com>
Nov 24 12:25:31 domU-12-31-39-0C-1A-72 postfix/qmgr[11309]: 73B6A4D72: from=<xx.xxxxxx@gmail.com>, size=1480, nrcpt=1 (queue active)
Nov 24 12:25:32 domU-12-31-39-0C-1A-72 postfix/smtp[11379]: 73B6A4D72: to=<xx.xxxxxx@gmail.com>, orig_to=<trying@m.example-mydomain.com>, relay=gmail-smtp-in.l.google.com[74.125.115.27]: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[74.125.82.48]

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

share|improve this question

migrated from stackoverflow.com Nov 25 '11 at 22:10

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

add comment

1 Answer

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

Please follow the advice: warning: do not list domain m.example-mydomain.com in BOTH mydestination and virtual_alias_domains

share|improve this answer
add comment

Your Answer

 
discard

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.