On 13.03.2013 16:51, Noel Jones wrote: > An alternative is to put the recipients in an sql table and use a > relay_recipient_maps query that ignores or wildcards the domain name.
Well, I have got my test server relaying with a pcre table for the relay_recipients. It looks ugly but works for mails relayed through smtp. The only problem now are e-mails which are sent from the relay itself via sendmail. Relay checks don't apply and it will accept any address. Which recipient_map applies to e-mails send via sendmail? -Gerald Current config: # postconf -n alias_database = alias_maps = canonical_maps = hash:/etc/postfix/canonical config_directory = /etc/postfix local_header_rewrite_clients = static:all masquerade_classes = envelope_recipient masquerade_domains = example.com mydestination = mynetworks = 127.0.0.0/8 relay_domains = .example.com example.com relay_recipient_maps = pcre:/etc/postfix/relay_recipients.pcre relayhost = transport_maps = hash:/etc/postfix/transport virtual_alias_maps = hash:/etc/postfix/virtual # cat relay_recipients.pcre /^user\@(.*\.)?example\.com$/ OK /^first\.last\@(.*\.)?example\.com$/ OK /^extusername\@(.*\.)?example\.com$/ OK # cat virtual [email protected] [email protected]
