我正在尝试在DMZ中设置运行Postfix的邮件中继,将所有收到的邮件转发到内部LAN连接的邮件服务器。
我希望能够在网关拒绝不存在的用户的邮件,我认为这是最好的select。
问题是,Postfix仍然接受邮件,即使用户不包括在用户表中。
我的configuration:
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
我有thorougly检查relay_recipient_maps工作(使用relay_recipient_maps postmap -q )。 我试图发送邮件给noone@***与swaks从:
两个尝试都成功(Postfix中继邮件)。
怎么了?
编辑:
日志说(“拒绝连接”的错误是无关紧要的事实,Postfix继电器noone@***是问题):
Aug 3 13:20:44 merlin postfix/smtp[10166]: 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[10171]: connect to xaver.***[10.7.7.21]:25: Connection refused
经过几个小时,读取结果被丢弃了至less八次,我终于意识到,我用来检查用户存在的存储函数返回0,当没有find匹配的条目。 那对Postfix来说意味着用户被find了。