Hi! I'm using postfix as a mail gateway, relaying everything to my back-end mail server. I have specified a relay_domain and transport.db have tested that it works perfectly. However, when I try to specify a relay_recipient_maps table it seems to have no effect. Here's what I did: 1. Downloaded the address list from my Active Directory LDAP in the hash format "email-address <whitespace> OK". 2. Did a postmap on that file, creating the .db file. 3. Added the following line to the main.cf: relay_recipient_maps = hash:/etc/postfix/relay_recipients 4. Did a postfix reload. 5. After noticing that this didnt have any effect blocking non-existent recipients, I also did a postfix upgrade-configuration. 6. I restarted the whole server. No effect. What else do I have to do to make postfix block recipients that are not on the list? It seems to be completely ignoring it. This is my main.cf file: Code: smtpd_banner = $myhostname ESMTP $mail_name biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = mailgw.bancoop.com mydomain = bancoop.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $myhostname, localhost.$mydomain, $mydomain relayhost = relay_domains = $mydomain mynetworks = 207.150.243.88/29, 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all append_at_myorigin = no local_recipient_maps = [COLOR="SeaGreen"]relay_recipient_maps = hash:/etc/postfix/relay_recipients[/COLOR] transport_maps = hash:/etc/postfix/transport header_checks = regexp:/etc/postfix/header_checks inet_protocols = all
Ok, I got it working now. Relaying to my back-end mail server's domain wasn't working because it has the same domain name as the postfix server. I tried using the destination tables as local and not as relay and it worked! All I did was comment out both the relay_domains and relay_recipient_maps options and assign the Exchange recipients file to the local_recipient_maps option instead. Now its blocking as it should.
Sorry for reviving this old post but i have the same problem. I know what is the solution in this case, but in my case if i enable the "relay_recipient_maps" the telnet connection disable!!!, i dont know why but is real, this parameter "relay_recipients:maps" work together other parameter? or what? Regards!