(sorry for top-posting. OWA is evil in that way.) Posftinger output: https://gist.github.com/racooper/a560c84080e2ee6c336d508918344f5a
Contents of error_transport (the only defined transport_map): fxgfd.com error:undeliverable yahoo.es.com error:undeliverable site.co error:undeliverable I am not finding anywhere in our configuration where email.site.com is set to use an alternate transport. This is a grep through the postfix config for any entry of our domain. Nothing there stands out as a transport config. # cd /etc/postfix # grep -i site * main.cf:mydomain = syse.site.com main.cf:relayhost = [smtp-relay.site.com]:25 main.cf:virtual_alias_maps = ldap:/etc/postfix/site.ldap main.cf:smtpd_sasl_local_domain = site.com main.cf:smtp_helo_name = relay.site.com main.cf:smtpd_banner = relay.site.com ESMTP ($myhostname) main.cf:smtpd_tls_cert_file = /etc/letsencrypt/live/mail-1p-out-t1.syse.site.com/fullchain.pem main.cf:smtpd_tls_key_file = /etc/letsencrypt/live/mail-1p-out-t1.syse.site.com/privkey.pem smtp_header_checks:/^Received: from .*? \(.+? \[([\.\d:a-f]+)\]\).+\(Authenticated sender: (\w.+)@.*site.com\).+by mail-1p-out-[tw][12].syse.site.com \(Postfix\) .*/m REPLACE X-site-Auth: $2 ($1) smtp_header_checks:/^Received: from .*? \(.+? \[([\.\d:a-f]+)\]\).+\(Authenticated sender: (\w.+)@.*site.com\).+by mail-1p-out-[tw][12].syse.site.com \(Postfix\) .*/m INFO site.ldap:server_host=ldap://mailroute.site.com:389 site.ldap:search_base=ou=mail,dc=sites,dc=com site.ldap:domain=site.com I would appreciate any other insights; I've been over this many times today and have not found any reason that relayhost is being bypassed. RobertC ________________________________ From: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> on behalf of Viktor Dukhovni <postfix-us...@dukhovni.org> Sent: Tuesday, October 26, 2021 12:22 To: postfix-users@postfix.org <postfix-users@postfix.org> Subject: Re: Mail bypassing relayhost configuration This message is from an External Sender This message came from outside your organization ---------------------------------------------------------------------- On Tue, Oct 26, 2021 at 04:22:53PM +0000, Cooper, Robert A wrote: > Howdy! We have noticed that certain email going through our outbound > relay are ignoring the "relayhost = [smtp-relay.site.com]:25". Sorry, that's not possible. The delivery of messages for *all* recipients uses the same transport resolution logic, which defaults remote destinations to relayhost, barring explicit transport table overrides, sender-dependent settings, ... > The condition seems to be when a message has an envelope rewrite based > on LDAP lookup (specifically, from site.com to email.site.com, which > goes to gmail). Then clearly you have explicit transport settings for "email.site.com". > After the lookup and rewrite, Postfix appears to do an MX lookup to > try and send directly to google and ignores the specified relayhost. Because you have a transport entry for the recipient domain. > Is there something else I'm missing? I've verified that there are no > transports designated for mail.site.com that would override the > relayhost. Is it "mail.site.com" or "email.site.com"? In either case, you clearly do have such transport settings, so look harder. https://urldefense.com/v3/__http://www.postfix.org/DEBUG_README.html*mail__;Iw!!KwNVnqRv!VLTy5aV89Fx-Lf1_nhFoiVwAnjprN7L6Ui06_pAx8fsZ5z1CPDebLngjOKuakVW_$ For more detailed help include "postconf -nf" output in your reply (without any rewrapping of lines). Also include one or two log entries for relevant messages, with at most the localparts of email addresses obfuscated. Do not change the domain names, if they are sufficiently sensitive to not posted here, you'll need to find help elsewhere on a commercial basis. -- Viktor.