我的设置是我的中央邮件服务器,CM转发到反垃圾邮件服务器,充当SMTP服务器的cacti。 在CM上的电子邮件地址已经收到40个电子邮件显然是从Cacti反弹通知,如下所示:
The mail system *<[email protected]>: mail for cacti.snowbarre.co.za loops back to myself Final-Recipient: rfc822; [email protected] Original-Recipient: rfc822;[email protected] Action: failed Status: 5.4.6 Diagnostic-Code: X-Postfix; mail for cacti.snowbarre.co.za loops back to myself*
即使不发送任何东西,他也会收到这些邮件。 顺便说一下,他开始接受他们的一天,我在Cacti服务器上被垃圾邮件。 垃圾邮件来源已经定位和处理,但是这个客户不断收到这些失败的邮件。
我检查了main.cf和行mydestination = $myhostname, localhost.localdomain, localhost在那里。 这只影响服务器上只有一个电子邮件地址,大约有12000个邮箱,所以它可能不是一个全球性的问题。
root@cacti:~# postconf -n 2bounce_notice_recipient = [email protected] alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no bounce_notice_recipient = [email protected] bounce_template_file = /etc/postfix/bounce.cf broken_sasl_auth_clients = yes config_directory = /etc/postfix debug_peer_level = 6 debug_peer_list = 172.17.243.13 delay_notice_recipient = [email protected] error_notice_recipient = [email protected] header_checks = regexp:/etc/postfix/header_checks mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 message_size_limit = 15000000 mydestination = smtp.snowbarreco.za, localhost.snowbarre.co.za, localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.20.0.0/16 172.16.0.0/16 172.17.0.0/16 196.xx0/24 196.xx0/24 196.xx0/26 192.168.0.0/16 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes
要解决此错误,请将系统FQDN添加到mydestination或relay_domains。 Postfix接受在virtual_mailbox_domains,virtual_alias_domains和parsing为inet_interfaces和proxy_interfaces中列出的IP地址的域中列出的邮件。 使用postconf或编辑main.cf文件更新mydestination:
mydestination = localhost.$mydomain, localhost, mail.example.com service postfix reload