我在CentOS上设置邮件服务器时遇到了一些麻烦,截至目前,根本没有发送任何东西,我也不完全确定为什么,我试了一些指南,但没有一个似乎解释任何东西关于这个问题,我不知道我是否可能在某处input了错误。
我不完全确定什么configuration我需要在这里发布,但如果你需要他们,只要问:)
我使用的服务器是托pipe在我家的CentOS服务器,我们已经设置它从端口1到65556从路由器接收端口,所以所有端口都可用于服务器,应该没有这方面的麻烦。
这是本地用户错误日志:
在/ var /日志/ maillog的:
Mar 2 18:03:12 localhost postfix/smtp[6113]: 4BE3A959E: to=<conner@******.com>, relay=mx1.ovh.net[213.186.33.29]:25, delay=62, delays=0.06/0.01/62/0.08, dsn=5.0.0, status=bounced (host mx1.ovh.net[213.186.33.29] said: 552 sorry, your envelope sender domain must exist (#5.7.1) (in reply to MAIL FROM command)) Mar 2 18:03:12 localhost postfix/smtp[6113]: 4BE3A959E: lost connection with mx1.ovh.net[213.186.33.29] while sending RCPT TO Mar 2 18:03:12 localhost postfix/cleanup[6112]: 3036911153: message-id=<[email protected]> Mar 2 18:03:12 localhost postfix/bounce[6114]: 4BE3A959E: sender non-delivery notification: 3036911153 Mar 2 18:03:12 localhost postfix/qmgr[8477]: 3036911153: from=<>, size=2799, nrcpt=1 (queue active) Mar 2 18:03:12 localhost postfix/qmgr[8477]: 4BE3A959E: removed
postconf -n输出:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 html_directory = no inet_interfaces = localhost inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550
错误日志后build议的答案:
Mar 3 19:55:25 localhost sendmail[2711]: s23JtP5O002711: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:55:26 localhost sendmail[2712]: s23JtPJc002712: [email protected]... User unknown Mar 3 19:55:26 localhost sendmail[2712]: s23JtPJc002712: [email protected], size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Mar 3 19:58:03 localhost sendmail[2756]: s23Jw3lq002756: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:58:04 localhost sendmail[2757]: s23Jw3dS002757: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:58:07 localhost sendmail[2759]: s23Jw7wq002759: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:58:08 localhost sendmail[2760]: s23Jw7kP002760: [email protected]... User unknown Mar 3 19:58:08 localhost sendmail[2760]: s23Jw7kP002760: [email protected], size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Mar 3 19:58:56 localhost sendmail[2764]: s23Jws2r002764: cpc2-sgyl27-2-0-cust995.sgyl.cable.***********.net [82.41.183.228] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:58:56 localhost sendmail[2765]: s23Jwutl002765: cpc2-sgyl27-2-0-cust995.sgyl.cable.***********.net [82.41.183.228] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:59:12 localhost sendmail[2767]: s23JxBSD002767: cpc2-sgyl27-2-0-cust995.sgyl.cable.***********.net [82.41.183.228] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA Mar 3 19:59:14 localhost sendmail[2768]: s23JxCnO002768: conner@***********.com... User unknown Mar 3 19:59:14 localhost sendmail[2768]: s23JxCnO002768: [email protected], size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=cpc2-sgyl27-2-0-cust995.sgyl.cable.virginm.net [82.41.183.228]
新的Postconf -n设置:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 html_directory = no inet_interfaces = localhost inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost mydomain = **********.co.uk myhostname = mail.***********.co.uk myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550
status=bounced (host mx1.ovh.net[213.186.33.29] said: 552 sorry, your envelope sender domain must exist (#5.7.1) (in reply to MAIL FROM command))
正如我从日志中看到的,您尝试从不存在的域发送邮件。 我假设你使用的是localhost或localhost.localdomain。 您应该使用fqdn
将以下行添加到main.cf并重新启动postfix
myhostname = mail.example.net mydomain = example.net myorigin = $mydomain
PS你应该用你的真实域名replaceexample.net