Hi, that was a tough nut. SUSE (in SLES 11 SP3) decided it is wise to act contrary to the documentation. They inject mail from Amavis to Postfix through a master.cf entry containing (among others):
receive_override_options=no_address_mappings although the documentation states "This is typically specified BEFORE an external content filter." So when Amavis sends mail to postmas...@mydomain.info then /etc/postfix/virtual gets ignored (as configured). My workaround is to send mail from Amavis as rdahlem@internal.domain. I will open a case with SUSE and ask them to move no_address_mappings to the master.cf entry sending the mail to amavis. Kind regards, Robert On 30.07.2015 16:21, Robert Dahlem wrote: > Hi, > > I would like to divert mail for postmas...@mydomain.info from the usual > Exchange server to my account on some other internal server: > > # postconf | grep "^mydomain" > mydomain = mydomain.info > > /etc/postfix/virtual: > --------------------- > postmaster rdahlem@internal.domain > > /etc/postfix/transport: > ----------------------- > internal.domain smtp:[someserver.mydomain.info] > .internal.domain smtp:[someserver.mydomain.info] > mydomain.info smtp:[exchange.mydomain.info] > .mydomain.info smtp:[exchange.mydomain.info] > > For mail from external sources that works: > > postfix/smtpd[12040]: BFC6AA6606: > client=unknown[212.227.15.19] > postfix/cleanup[12045]: BFC6AA6606: > message-id=<55ba23cf.6000...@gmx.net> > postfix/qmgr[29471]: BFC6AA6606: > from=<robert.dah...@gmx.net>, size=2044, nrcpt=1 (queue active) > postfix/smtp[12046]: BFC6AA6606: > to=<rdahlem@internal.domain>, > orig_to=<postmas...@mydomain.info>, > relay=127.0.0.1[127.0.0.1]:10024, delay=3.7, > delays=3.2/0/0.01/0.51, dsn=2.0.0, status=sent > (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): > 250 2.0.0 Ok: queued as 4ECCDA661A) > postfix/qmgr[29471]: BFC6AA6606: removed > > Mail gets sent to Amavis after being re-addressed. Then: > > postfix/smtpd[12058]: 4ECCDA661A: > client=localhost[127.0.0.1], > orig_queue_id=BFC6AA6606, orig_client=unknown[212.227.15.19] > postfix/cleanup[12045]: 4ECCDA661A: > message-id=<55ba23cf.6000...@gmx.net> > postfix/qmgr[29471]: 4ECCDA661A: > from=<robert.dah...@gmx.net>, size=2697, nrcpt=1 (queue active) > postfix/smtp[12059]: 4ECCDA661A: > to=<rdahlem@internal.domain>, > relay=someserver.mydomain.info[10.4.5.6]:25, > delay=0.11, delays=0.03/0.01/0.01/0.07, dsn=2.0.0, status=sent > (250 2.0.0 t6UDGwQb007363 Message accepted for delivery) > postfix/qmgr[29471]: 4ECCDA661A: removed > > But in the case of mail originating from Amavis for > postmas...@mydomain.info that does not work: > > postfix/smtpd[22114]: BD772A661A: > client=localhost[127.0.0.1] > postfix/cleanup[22101]: BD772A661A: > message-id=<vazxbm1egsc...@mx1.mydomain.info> > postfix/qmgr[4567]: BD772A661A: > from=<postmas...@mydomain.info>, > size=2591, nrcpt=1 (queue active) > postfix/smtp[22115]: BD772A661A: > to=<postmas...@mydomain.info>, > relay=exchange.mydomain.info[10.1.2.3]:25, > delay=5.2, delays=0.07/0.01/0.08/5.1, dsn=5.1.1, > status=bounced (host exchange.mydomain.info[10.1.2.3] said: > 550 5.1.1 User unknown (in reply to RCPT TO command)) > postfix/bounce[22117]: BD772A661A: > sender non-delivery notification: E897EA675D > postfix/qmgr[4567]: BD772A661A: removed > > Why is /etc/postfix/virtual ignored in the second case and what should I > do about that? > > Kind regards, > Robert > -- Mit freundlichen Grüßen / Best regards ______________________________________ Robert Dahlem System & Network Services Fidelity Information Services KORDOBA GmbH Königsberger Straße 29 • 60487 Frankfurt Tel.: +49 69 13829-2180 Fax.: +49 69 13829-5-2180 <mailto:robert.dah...@kordoba.de> <http://www.kordoba.de> Fidelity Information Services KORDOBA GmbH • Barthstr. 18 • 80339 München Registergericht: München, HRB 153784; Geschäftsführer: Bernard Green _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.