Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: migrating servers - forwarded emails have recipient changed

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Fri Sep 15 2006 - 09:53:13 CDT

At 09:44 AM 9/15/2006, Tomasz Chmielewski wrote:

>What I want to achieve, is to receive all mails on
>net/SMTP, filter them, and then forward to the IMAP server.
>The filtering part works fine, but forwarding doesn't.
>This is a Postfix log for a mail sent from "mangootest"
>to example user with login "user-001" and email
>postfix/smtpd[9942]: connect from mysql1.dom[]
>postfix/smtpd[9942]: NOQUEUE: client=mysql1.dom[]
>postfix/smtpd[9947]: connect from filter1.dom[]
>postfix/smtpd[9947]: D53089494: client=filter1.dom[]
>postfix/cleanup[9948]: D53089494:
>postfix/qmgr[9901]: D53089494: from=<mangootest>,
>size=804, nrcpt=1 (queue active)
>postfix/smtpd[9947]: disconnect from filter1.dom[]
>postfix/smtp[9949]: D53089494: to=<user-001postfix1.dom>,
>orig_to=<johnexample.com>, relay=[],
>delay=1, status=sent (250 2.6.0 Ok, id=31767-18, from MTA:
>250 Ok: queued as 096C04A9C7)
>So, as we see, the message is forwarded, but not as a mail
>to "johnexample.com" (user's email address), but as
>"user-001postfix1.dom" (user login + server name).
>As a result, the message is not delivered.
>How can I repair this problem?

Don't forward the mail, that changes the recipient. Use a
transport_maps entry to direct mail for the domain to the
proper server.

Noel Jones