Postfix - 邮件服务器连接然后断开连接

Postfix - 邮件服务器连接然后断开连接

我无法接收来自安全摄像头的邮件

我的邮件服务器正在运行 postfix 和 dovecot

通过检查/var/log/mail.log输出是这样的

mail postfix/smtpd[1677]: connect from §.tdc.net[§]
mail postfix/smtpd[1677]: match_hostname: §.tdc.net ~? 127.0.0.0/8
mail postfix/smtpd[1677]: match_hostaddr: § ~? 127.0.0.0/8
mail postfix/smtpd[1677]: match_list_match: §.tdc.net: no match
mail postfix/smtpd[1677]: match_list_match: §: no match
mail postfix/smtpd[1677]: send attr request = connect
mail postfix/smtpd[1677]: send attr ident = smtp:§
mail postfix/smtpd[1677]: private/anvil: wanted attribute: status
mail postfix/smtpd[1677]: input attribute name: status
mail postfix/smtpd[1677]: input attribute value: 0
mail postfix/smtpd[1677]: private/anvil: wanted attribute: count
mail postfix/smtpd[1677]: input attribute name: count
mail postfix/smtpd[1677]: input attribute value: 1
mail postfix/smtpd[1677]: private/anvil: wanted attribute: rate
mail postfix/smtpd[1677]: input attribute name: rate
mail postfix/smtpd[1677]: input attribute value: 6
mail postfix/smtpd[1677]: private/anvil: wanted attribute: (list terminator)
mail postfix/smtpd[1677]: input attribute name: (end)
mail postfix/smtpd[1677]: > §.tdc.net[§]: 220 <domain> ESMTP Postfix (Debian/GNU)
mail postfix/smtpd[1677]: watchdog_pat: 0xb84c9470
mail postfix/smtpd[1677]: < §.tdc.net[§]: EHLO localhost
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-<domain>
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-PIPELINING
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-SIZE 10240000
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-VRFY
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-ETRN
mail postfix/smtpd[1677]: match_list_match: §.tdc.net: no match
mail postfix/smtpd[1677]: match_list_match: §: no match
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-STARTTLS
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-ENHANCEDSTATUSCODES
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250-8BITMIME
mail postfix/smtpd[1677]: > §.tdc.net[§]: 250 DSN
mail postfix/smtpd[1677]: watchdog_pat: 0xb84c9470
mail postfix/smtpd[1677]: < §.tdc.net[§]: QUIT
mail postfix/smtpd[1677]: > §.tdc.net[§]: 221 2.0.0 Bye
mail postfix/smtpd[1677]: match_hostname: §.tdc.net ~? 127.0.0.0/8
mail postfix/smtpd[1677]: match_hostaddr: § ~? 127.0.0.0/8
mail postfix/smtpd[1677]: match_list_match: §.tdc.net: no match
mail postfix/smtpd[1677]: match_list_match: §: no match
mail postfix/smtpd[1677]: send attr request = disconnect
mail postfix/smtpd[1677]: send attr ident = smtp:§
mail postfix/smtpd[1677]: private/anvil: wanted attribute: status
mail postfix/smtpd[1677]: input attribute name: status
mail postfix/smtpd[1677]: input attribute value: 0
mail postfix/smtpd[1677]: private/anvil: wanted attribute: (list terminator)
mail postfix/smtpd[1677]: input attribute name: (end)
mail postfix/smtpd[1677]: disconnect from §.tdc.net[§]

IP 被替换为§

结果postconf -n

alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
debug_peer_list = §
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp
mydestination = mail.<domain>, localhost.<domain>, localhost
myhostname = mail.<domain>
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_recipient_maps =
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions =  permit_mynetworks,
                permit_sasl_authenticated,
                reject_unauth_destination,
                reject_unauth_pipelining,
                reject_unknown_recipient_domain,
                reject_rbl_client bl.spamcop.net,
                check_policy_service inet:127.0.0.1:60000
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_use_tls = yes
virtual_alias_domains =
virtual_alias_maps =    mysql:/etc/postfix/mysql-virtual_alias-maps.cf,
            mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

摄像头的设置设置为

SMTP Server Name = mail.<domain>
SMTP Server Port = 25
Secure SSL = No
Authentication = Yes
User name = <My mail address>
Password = *******
Sender mail address = <My mail address>
Receiver mail address = <My mail address (for testing)>
Subject = Alarm from Y-Cam
Message = Testing

答案1

根据您的会话日志,postfix 在 EHLO 之后不提供 AUTH 功能,这可能是您的摄像头立即退出的原因,因为它被配置为执行 SMTP 身份验证。

首先确保您的 postfix sasl auth 配置在没有摄像头的情况下工作,并检查 dovecot 日志。

答案2

看起来你的客户在 EHLO 响应之后立即要求退出:

mail postfix/smtpd[1677]: > §.tdc.net[§]: 250 DSN
mail postfix/smtpd[1677]: watchdog_pat: 0xb84c9470
mail postfix/smtpd[1677]: < §.tdc.net[§]: QUIT
mail postfix/smtpd[1677]: > §.tdc.net[§]: 221 2.0.0 Bye

实际上来自客户端的唯一输入是 EHLO localhost 然后 QUIT。

毫不奇怪,Postfix 是乐于助人的 :)。

相关内容