Postfix - telnet 命令上没有问候语

Postfix - telnet 命令上没有问候语

我正在尝试在 CentOS 5 上安装 Postfix、Dovecot 和 MySQL。我是新手,已经为此挣扎了 2 个多星期。我按照这个说明操作https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql-on-centos-5

但是我的 telnet 命令没有得到 220 行。

这是我的 main.cf

sendmail_path = /usr/sbin/sendmail.postfix    
newaliases_path = /usr/bin/newaliases.postfix    
mailq_path = /usr/bin/mailq.postfix    
setgid_group = postdrop    
html_directory = no    
manpage_directory = /usr/share/man    
sample_directory = /usr/share/doc/postfix-2.3.3/samples

readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
myhostname = mail.mobz.ca
mynetworks = 127.0.0.0/8
message_size_limit = 30720000
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

/var/log/maillog 不包含任何错误。

netstat -plnt | grep master 输出

tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      5505/master

我不知道从这里该搬到哪里。请问有什么提示吗?

提前致谢。

更新:

我在我的邮件日志中发现了错误:

Sep  3 19:31:40 vps postfix/smtpd[5512]: warning: premature end-of-input on private/proxymap socket while reading input attribute name
Sep  3 19:31:40 vps postfix/cleanup[5509]: warning: premature end-of-input on private/proxymap socket while reading input attribute name
Sep  3 19:31:40 vps postfix/smtpd[5512]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep  3 19:31:40 vps postfix/cleanup[5509]: warning: private/proxymap socket: service dict_proxy_open: Connection reset by peer
Sep  3 19:31:40 vps postfix/master[5505]: warning: process /usr/libexec/postfix/proxymap pid 10871 exit status 1
Sep  3 19:31:40 vps postfix/master[5505]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling
Sep  3 19:32:40 vps postfix/proxymap[10872]: fatal: /etc/postfix/mysql-virtual_forwardings.cf: bad string length 0 < 1: dbname =
Sep  3 19:32:41 vps postfix/smtpd[5512]: warning: premature end-of-input on private/proxymap socket while reading input attribute name
Sep  3 19:32:41 vps postfix/cleanup[5509]: warning: premature end-of-input on private/proxymap socket while reading input attribute name
Sep  3 19:32:41 vps postfix/cleanup[5509]: warning: private/proxymap socket: service dict_proxy_open: Connection reset by peer
Sep  3 19:32:41 vps postfix/smtpd[5512]: warning: private/proxymap socket: service dict_proxy_open: Success
Sep  3 19:32:41 vps postfix/master[5505]: warning: process /usr/libexec/postfix/proxymap pid 10872 exit status 1
Sep  3 19:32:41 vps postfix/master[5505]: warning: /usr/libexec/postfix/proxymap: bad command startup -- throttling

答案1

关键是致命的邮件日志中的错误消息。错误消息

fatal: /etc/postfix/mysql-virtual_forwardings.cf: bad string length 0 < 1: dbname =

表示你的/etc/postfix/mysql-virtual_forwardings.cf操作有问题。当我查看你遵循的教程(linode 网站)时,证实了这一点。

mysql 映射的格式/etc/postfix/mysql-virtual_forwardings.cf非常非常错误。您不能将多个参数放在一行中。看起来 linode 中的格式化引擎搞乱了教程,或者作者忘记检查语法是否正确。

user = mail_admin password = mail_admin_password dbname = mail query = SELECT destination FROM forwardings WHERE source=’%s’ hosts = 127.0.0.1

要检查正确的格式,请查阅官方文档. 您必须将单独的配置放在单独的行中

user = mail_admin 
password = mail_admin_password 
dbname = mail 
query = SELECT destination FROM forwardings WHERE source='%s'
hosts = 127.0.0.1

并且不要忘记检查所有 mysql 映射的语法是否正确。

相关内容