Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Relay host configuration and null envelope senders

29 views
Skip to first unread message

dmnhen...@gmail.com

unread,
Sep 26, 2016, 7:01:31 PM9/26/16
to
Hi,

We have, maybe, a bit of an unusual setup for office365 customers we deliver email to through our spam/AV scanners on specific ports. The relay works fine for senders when the envelope sender address is not null. We do a relay_domains select from a postgres database using @domain to match addresses from domains that we allow the relay to happen for, then using that we select a transport that is a server:port entry in the table.

Relevent postfix config lines:

relay_domains = pgsql:/etc/postfix/pgsql/relay_domains.cf
sender_dependent_default_transport_maps = pgsql:/etc/postfix/pgsql/relay_transport.cf

The default_transport is discard and the problem is that when we get an envelope sender address = <> we, of course, discard the message. We have a feature request to now check the header sender address and perform the same action using that instead of the envelope address and that is where I am failing.

If anyone has any pointers here or wants more config or log messages let me know and I would appreciate greatly any help on the issue.

dmnhen...@gmail.com

unread,
Sep 29, 2016, 6:09:36 PM9/29/16
to
In order to fix this issue I changed the line(in main.cf):

sender_dependent_default_transport_maps = pgsql:/etc/postfix/pgsql/relay_transport.cf

to

header_checks = pgsql:/etc/postfix/pgsql/relay_transport.cf

and used this query in relay_transport.cf to select the relay host entry:

query = SELECT 'FILTER ' || host FROM portoffice365s WHERE domainname like '%%@%d'
0 new messages