I am trying to setup a mail relay running Postfix in the DMZ to forward all incoming mail to the internal LAN connected mail server.
I would like to be able to refuse incoming mail for non-existent users right at the gateway, which I assume is the best option.
The problem is, Postfix still accepts mail even for users not included in the users table.
append_dot_mydomain = no biff = no config_directory = /etc/postfix inet_interfaces = all local_recipient_maps = local_transport = error:local delivery disabled mydomain = *** myhostname = merlin.*** mynetworks = 127.0.0.0/8 10.7.0.0/16 myorigin = /etc/mailname parent_domain_matches_subdomains = debug_peer_list smtpd_access_maps relay_domains = $transport_maps relay_recipient_maps = mysql:/etc/postfix/mysql-relay_recipient_maps.cf smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) transport_maps = hash:/etc/postfix/transport_maps
I have thorougly checked that the
relay_recipient_maps work (using
postmap -q). I am trying to send mail to
- The local machine (the mailserver itself)
- A host in the 10.7.11.x network
Both attempts succeed (Postfix relays the mail).
The log says (the "connection refused" error is irrelevant; the fact that Postfix relays for
noone@*** is the problem):
Aug 3 13:20:44 merlin postfix/smtp: CE7E2C6E: to=<noone@***>, relay=none, delay=1642, delays=1642/0.01/0/0, dsn=4.4.1, status=deferred (connect to xaver.***[10.7.7.21]:25: Connection refused) Aug 3 13:20:44 merlin postfix/smtp: connect to xaver.***[10.7.7.21]:25: Connection refused