0

Debian で lasts 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 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

何かアイデアはありますか?

4

2 に答える 2

0

/var/log/mail.logの出力を投稿していただけますか?

私が思う限り、mail.logには「/var/run/dovecot/auth-masterに接続できませんでした:許可が拒否されました」のようなものが含まれていると思います。

この場合、vmailユーザーがアクセスできるように/var/run/dovecot/auth-masterのパーミッションを変更するだけです。

しかし、それには落とし穴があります。dovecot が再起動されるたびに、パーミッションは元に戻されます。再度指定する必要があります。または、dovecot またはシステムが再起動されるたびにそれを実行するスクリプトを作成することもできます。

そうでない場合は、ここにログを投稿して詳細を確認してください。

于 2013-09-26T16:25:55.807 に答える