我在Debian上设置了postfix / dovecot。我可以在ssl登录并查看来自thunderbird的邮件。但是,当我向测试用户发送邮件(test@blue-lands.com)时,邮件到达并且没有发回错误消息......
这是日志:
Dovecot.log:
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x10, ret=1: before/accept initialization [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: before/accept initialization [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2002, ret=-1: unknown state [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client hello A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write server hello A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write certificate A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write key exchange A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write server done A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 flush data [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2002, ret=-1: SSLv3 read client certificate A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2002, ret=-1: SSLv3 read client certificate A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read client key exchange A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 read finished A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write session ticket A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write change cipher spec A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 write finished A [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2001, ret=1: SSLv3 flush data [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x20, ret=1: SSL negotiation finished successfully [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL: where=0x2002, ret=1: SSL negotiation finished successfully [83.194.107.152]
2013-09-09 21:58:46 pop3-login: Warning: SSL alert: where=0x4008, ret=256: warning close notify [83.194.107.152]
的dovecot-info.log建立:
2013-09-09 21:58:46 pop3-login: Info: Login: user=<test.blue-lands>, method=PLAIN, rip=83.194.107.152, lip=5.39.72.228, mpid=25104, TLS, session=<oaPp0Pjl0ABTwmu2>
2013-09-09 21:58:46 pop3(test.blue-lands): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Postfix conf:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
submission inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
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}
# Dovecot LDA
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -d $recipient
Dovecot.vonf:
## Fichier Configuration - Serveur POP (SSL) / IMAP (SSL) Dovecot
base_dir = /var/run/dovecot/
protocols = imap pop3 imaps pop3s
protocol imap {
listen = 5.39.72.228:143
ssl_listen = 5.39.72.228:993
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
mail_plugin_dir = /usr/lib/dovecot/imap
imap_logout_format = bytes ( in=%i : out=%o )
}
protocol pop3 {
listen = *:110
ssl_listen = *:995
pop3_enable_last = no
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
mail_plugin_dir = /usr/lib/dovecot/pop3
pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
}
protocol managesieve {
listen = *:2000
login_executable = /usr/lib/dovecot/managesieve-login
mail_executable = /usr/lib/dovecot/managesieve
# managesieve_max_line_length = 65536
# managesieve_logout_format = bytes ( in=%i : out=%o )
}
plugin {
sieve=~/.dovecot.sieve
sieve_dir=~/.Sieve
}
disable_plaintext_auth = no
shutdown_clients = yes
auth default {
mechanisms = plain login
passdb pam {
args = failure_show_msg=yes
}
userdb passwd {
args =
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0666
}
client {
path = /var/spool/postfix/private/auth
mode = 0666
user = postfix
group = postfix
}
}
}
##
## Logging
##
log_path = /var/log/dovecot/dovecot.log
info_log_path = /var/log/dovecot/dovecot-info.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
syslog_facility = mail
##
## SSL settings
##
ssl = yes
ssl_cert_file = /etc/dovecot/ssl_keys/imap.crt
ssl_key_file = /etc/dovecot/ssl_keys/imap.key
ssl_ca_file = /etc/dovecot/ssl_keys/ca.crt
ssl_verify_client_cert = no
ssl_cipher_list = ALL:!LOW:!SSLv2
verbose_ssl = yes
mail_location = maildir:~/.Maildir
请问好吗?
答案 0 :(得分:0)
您能否发布 /var/log/mail.log 的输出?
因为据我所知,mail.log会包含类似 的内容“无法连接到/ var / run / dovecot / auth-master:权限被拒绝”
如果是这种情况,那么您所要做的就是更改 / var / run / dovecot / auth-master 的权限,以便 vmail 用户可以访问它。
但是有一个问题。每当重新启动dovecot时,都会恢复权限。您将不得不再次给他们或者您可以编写一个脚本,每次重新启动dovecot或系统时都会为您执行此操作。
如果不是这种情况,请在此处发布日志以获得更多说明。
答案 1 :(得分:0)
检查错误 openssl s_client -connect mail.mydomain.com:995