> On Apr 25, 2017, at 11:52 PM, Viktor Dukhovni wrote: > > You made the incoming stmpd(8) verbose, but all the interesting stuff happens > in the outgoing smtp(8), for which the logs have only: > > Apr 25 23:00:19 srv-rewr01 postfix/smtp[20290]: > Untrusted TLS connection established to 10.0.0.8[10.0.0.8]:25: > TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits) > Apr 25 23:00:19 srv-rewr01 postfix/smtp[20290]: 34DE4AE307: > to=<test.tester...@oldcorp1.com>, orig_to=<test.tester...@newcorp.com>, > relay=10.0.0.8[10.0.0.8]:25, delay=0.52, delays=0.08/0/0.04/0.4, > dsn=2.6.0, status=sent (250 2.6.0 > > <am5pr0402mb278530d3d61fc0e224ad6466c3...@am5pr0402mb2785.eurprd04.prod.outlook.com> > [InternalId=2486786064455] Queued mail for delivery) > > The rewriting upstream of smtp(8) happened exactly as I understood you to > have said you wanted upthread. > > That is *not* how Exchange works. It does not care at all about the content > of the message headers. > The delivery is based entirely on the message envelope recipient address. In > this case <test.tester...@oldcorp1.com>. > That address is matched (after prepending "smtp:") against the LDAP > proxyAddresses attribute in Active Directory. > > What proxyAddresses in Exchange are associated with "test.testersen"? > Report the "mail", "SAMAccountName" and "proxyAddresses" attributes of the > relevant user object.
The samAccountName of this user is "ttestersen" and he does only have "test.tester...@oldcorp1.com" associated as proxyaddress/reply-to. I thought if I use "recipient_canonical_maps" and tell it with "recipient_canonical_classes" it should change the "envelope_recipient" AND "envelope_header", the postfix would RCPT TO the message to the new address and not the old one. From my perspective it is only rewriting the header and not the envelope, or do I get something in the message processing completely wrong? >> <generic_rewrite_outgoing><postconf_Mf.txt><postconf_n.txt><recipient_canonical><transport_rules> > >These looked mostly ok. You should not use or need "recipient_canonical" >mappings. You did not post the relevant entries from the virtual_alias table. In my last tests I used the "virtual" table only for unqualified addresses like root and postmaster on my GW machine. I have now added those lines to it: postmaster postmas...@oldcorp1.com abuse postmas...@oldcorp1.com double-bounce postmas...@oldcorp1.com root postmas...@oldcorp1.com test.tester...@newcorp.com test.tester...@oldcorp1.com test.testb...@newcorp.com test.testb...@oldcorp2.com Same result, the mail does not get a new address in the envelope, just the header "To" is rewritten and the mail is looped back to the GW by my Exchange server. Logfile with additional activated verbose output on "smtp" and "relay": http://webertec.net/fileshare/maillog_26042017_1126.txt Do I get this log the right way, that I rewrite the incoming "To" field and write it back with "generic" when the mail is relayed to my internal servers? Or can you see another source for my errors? With best regards Dennis Weber