我正在尝试使用Postfix + Dovecot + mySQL设置一个支持多域的邮件服务器。 我正在遵循这个指南 。
我似乎有一切设置和服务器发送dovecot SSL证书(抛出一个证书exception对话框在我的客户端),但邮件不发送或接收。
/ var / log / mail_err返回这个postfix错误:
连接到私人/身份validation失败:连接被拒绝
/var/log/mail.log正在返回更多的细节:
Sep 25 19:33:58 localhost postfix/postscreen[11483]: CONNECT from [MYIPADDRESS]:58837 to [MYSERVERIPADDRESS]:25 Sep 25 19:33:58 localhost postfix/postscreen[11483]: PASS OLD [MYIPADDRESS]:58837 Sep 25 19:34:01 localhost postfix/smtpd[11486]: connect from MYHOSTMASK[MYIPADDRESS] Sep 25 19:34:01 localhost postfix/smtpd[11486]: warning: SASL: Connect to private/auth failed: Connection refused Sep 25 19:34:01 localhost postfix/smtpd[11486]: fatal: no SASL authentication mechanisms Sep 25 19:34:02 localhost postfix/master[4556]: warning: process /usr/lib/postfix/smtpd pid 11486 exit status 1 Sep 25 19:34:02 localhost postfix/master[4556]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling Sep 25 19:34:02 localhost postfix/postscreen[11483]: CONNECT from [MYIPADDRESS]:58839 to [MYSERVERIPADDRESS]:25 Sep 25 19:34:02 localhost postfix/postscreen[11483]: PASS OLD [MYIPADDRESS]:58839 Sep 25 19:35:02 localhost postfix/smtpd[11780]: connect from MYHOSTMASK[MYIPADDRESS] Sep 25 19:35:49 localhost dovecot: auth-worker: mysql(127.0.0.1): Connected to database mailserver Sep 25 19:35:49 localhost dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=MYIPADDRESS, lip=MYSERVERIPADDRESS, mpid=11804, TLS Sep 25 19:38:07 localhost postfix/anvil[11379]: statistics: max connection rate 1/60s for (submission:MYIPADDRESS) at Sep 25 19:28:57 Sep 25 19:38:07 localhost postfix/anvil[11379]: statistics: max connection count 1 for (submission:MYIPADDRESS) at Sep 25 19:28:57 Sep 25 19:38:07 localhost postfix/anvil[11379]: statistics: max cache size 2 at Sep 25 19:28:57 Sep 25 19:39:02 localhost postfix/smtpd[11780]: lost connection after UNKNOWN from MYHOSTMASK[MYIPADDRESS] Sep 25 19:39:02 localhost postfix/smtpd[11780]: disconnect from MYHOSTMASK[MYIPADDRESS] Sep 25 19:39:02 localhost postfix/smtpd[11945]: connect from MYHOSTMASK[MYIPADDRESS] Sep 25 19:39:03 localhost postfix/smtpd[11945]: warning: SASL: Connect to private/auth failed: Connection refused Sep 25 19:39:03 localhost postfix/smtpd[11945]: fatal: no SASL authentication mechanisms Sep 25 19:39:04 localhost postfix/master[4556]: warning: process /usr/lib/postfix/smtpd pid 11945 exit status 1
再次,我没有收到或能够发送邮件。 它似乎是后缀崩溃,过早退出什么。 我出来的想法,我真的不想抹去一切,并重新开始设置。 有什么想法吗? 这是在Ubuntu 12.04上运行的VPS
编辑
postconf -n输出:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix inet_interfaces = all inet_protocols = ipv4 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 mydestination = localhost myhostname = lightningcoders.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination 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/dovecot.pem smtpd_tls_key_file = /etc/ssl/private/dovecot.pem smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = lmtp:unix:private/dovecot-lmtp
后缀主配置:
root@orion:~# cat /etc/postfix/master.cf | grep ^smtp smtp inet n - - - - smtpd smtp inet n - - - 1 postscreen smtpd pass - - - - - smtpd smtp unix - - - - - smtp
编辑2:
root@orion:/home/jknipp# ls -ld /var/spool/postfix/private/auth srw-rw-rw- 1 postfix postfix 0 Sep 25 02:38 /var/spool/postfix/private/auth
至于鸽子configuration:
2.0.19: /etc/dovecot/dovecot.conf # OS: Linux 3.9.3-x86_64-linode33 x86_64 Ubuntu 12.04.3 LTS ext3 auth_mechanisms = plain login mail_location = maildir:/var/mail/vhosts/%d/%n mail_privileged_group = mail passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocols = imap pop3 lmtp ssl = required ssl_cert = </etc/ssl/certs/dovecot.pem ssl_key = </etc/ssl/private/dovecot.pem userdb { args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n driver = static }
我的同事build立了一些非常严格的初始防火墙规则,这只是打开需要的端口。 目前这些端口是开放的:22,10000,25,587,993,143,110,465,21,80,443,6667。我需要打开一个特定的端口吗?
根据您的编辑,我没有看到您已经configuration了Dovecot的auth套接字侦听器。 在你指导的Dovecot部分是34和35号。
如果您使用conf.d目录结构(如指南中所build议的那样),请确保所有相关的部分(如conf.d/10-master.conf
都包含在内,并且应该在哪里。
修复或添加这些之后,重新启动Dovecot, doveconf -n
应包含以下某处:
... unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix } ...
您不需要在您的防火墙上打开任何特殊的端口,因为Postfix和Dovecot在同一台机器上,Postfix通过上述指令configuration的套接字侦听器与Dovecot对话。