我最近关闭了 postfix 配置中的开放中继。各种网络检查器(例如http://www.mailradar.com/openrelay/)确认中继未打开。但是,尽管使用清除队列几次postsuper -d ALL
,新消息仍然出现在队列中,即日志条目看起来像
Sep 14 04:16:30 kozolec postfix/cleanup[28413]: 94E5C460797B: message-id=<[email protected]> Sep 14 04:16:30 kozolec postfix/bounce[28415]: B1E4B4607978: sender non-delivery notification: 94E5C460797B Sep 14 04:16:30 kozolec postfix/qmgr[22082]: 94E5C460797B: from=<>, size=11760, nrcpt=1 (queue active) Sep 14 04:17:00 kozolec postfix/smtp[28414]: 94E5C460797B: to=<[email protected]>, relay=none, delay=30, delays=0/0/30/0, dsn=4.4.1, status=deferred (connect to debbierector.com[69.64.147.33]:25: Connection timed out) Sep 14 04:26:57 kozolec postfix/qmgr[22082]: 94E5C460797B: from=<>, size=11760, nrcpt=1 (queue active) Sep 14 04:27:27 kozolec postfix/smtp[28463]: 94E5C460797B: to=<[email protected]>, relay=none, delay=657, delays=627/0/30/0, dsn=4.4.1, status=deferred (connect to debbierector.com[69.64.147.33]:25: Connection timed out)
...
这些家伙是从哪里来的?我该如何永久摆脱它们?(我通过 grepping mail.log 查找消息 ID 找到了这些mailq
)
这是我的编辑过的 main.cf 的样子(另见第二条评论):
```
# See /usr/share/postfix/main.cf.dist for a commented, more complete
version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
readme_directory = no
# 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:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = kozolec.slosar.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
## virtual domains
virtual_alias_domains = [spaced separated list of domains]
virtual_alias_maps = hash:/etc/postfix/virtual
message_size_limit = 102400000
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
```