Hello I'm trying to get Postfix (DMZ) to relay only users listed in the relay_recipients to an internal Exchange server and if not in file look for a local account /etc/passwd then drop.
I can get it to try and forward with the main.cf below but it will not look local if not in relay_recipients. I know it has to do with the local_recipient_maps but I can't seem to find out how to check one then other. I also read that I should have $mydomain removed from mydestination but then the system does not accept any mail. Thanks Mark main.cf mydomain = example.com myorigin = $mydomain mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, mail1.$mydomain #local_recipient_maps = mynetworks = 192.168.1.0/24, 216.223.127.11, 127.0.0.0/8, 172.16.0.0/16 #relay_domains = #relayhost = relay_recipient_maps = hash:/etc/postfix/relay_recipients alias_maps = hash:/etc/mail/aliases alias_database = hash:/etc/mail/aliases #fallback_transport = transport_maps = hash:/etc/postfix/transport less /etc/postfix/relay_recipients us...@example.com OK /etc/postfix/transport example.com smtp:[172.16.2.2]