我尝试向我的地址发送电子邮件,但找不到任何记录,甚至在日志中也找不到。我可以在服务器上向自己发送电子邮件,一切顺利。当我尝试远程登录到我的服务器时,我得到了以下答案
当我通过 telnet 连接到端口 587 时,它可以按预期工作。
在日志中我得到
warning: unexpected end-of-input from smtp socket while reading input attribute name
smtp socket: wanted attribute: flags
warning: deliver_request_get: error receiving common attributes
这是我的 postconf -M
smtp inet n - n - - smtp -v
submission inet n - n - - smtpd -v -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_tls_cert_file=/etc/let sencrypt/live/gamesleeve.io/fullchain.pem -o smtpd_sasl_auth_enable=yes -o smtpd_reject_unlisted_recipient=no -o smtpd_relay_restrictions=permit_sasl_authenticated,rej ect -o milter_macro_daemon_name=ORIGINATING
pickup unix n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr unix n - n 300 1 qmgr
tlsmgr unix - - y 1000? 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp -o syslog_name=postfix/$service_name
showq unix n - y - - showq
error unix - - y - - error
retry unix - - y - - error
discard unix - - y - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
scache unix - - y - 1 scache
maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
这是 postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = $myhostname,gamesleeve, gamesleeve.io,eiric.com, localhost.members,localhost
mydomain = gamesleeve.io
myhostname = mail.gamesleeve.io
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = gamesleeve.io
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
smtp_sasl_security_options =
smtp_tls_cert_file = /etc/letsencrypt/live/gamesleeve.io/fullchain.pem
smtp_tls_key_file = /etc/letsencrypt/live/gamesleeve.io/privkey.pem
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/letsencrypt/live/gamesleeve.io/chain.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/gamesleeve.io/fullchain.pem
smtpd_tls_ciphers = high
smtpd_tls_key_file = /etc/letsencrypt/live/gamesleeve.io/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains = eiric.com
virtual_alias_maps = hash:/etc/postfix/virtual
我仔细检查了 MX 记录,它指向 mail.gamesleeve.io
答案1
您没有运行 smtp 服务器 ( smtpd
)。您可能在文件的第一个非注释行中输入了拼写错误master.cf
。
在您的情况下它看起来像什么(只查看以 smtp 开头的行):
smtp inet n - n - - smtp -v
smtp unix - - y - - smtp
我的默认设置是 -邮件服务器aemon 应该作为 inet/smtp 服务启动:
smtp inet n - y - - smtpd
smtp unix - - y - - smtp
我怀疑这是在您添加非默认-v
标志时发生的。您的smtpd_banner
计算机表明您正在运行 Ubuntu,您应该在其中找到一个模板,/etc/postfix/master.cf.proto
您可以使用该模板将您编辑的设置与分销商的默认设置进行比较。