Dovecot

Roundcube 在嘗試使用 managesieve 製作新過濾器時不斷載入

  • June 26, 2017

我正在嘗試使用 Managesieve 為 Roundcube 安裝自動回复器,並且可能做錯了什麼。Roundcube 工作正常,/var/log/roundcube/errors 為空。但是,當我嘗試在 Roundcube 的“設置”區域中創建一個新過濾器時,managesieve 顯示按鈕“過濾器”,並且我嘗試為自動回复器創建一個新過濾器,它會繼續載入。有什麼問題?也許我正在查看錯誤的日誌?

帶有 dovecot debug ‘on’ 的 mail.log 給出:

Jun 23 14:23:44 host dovecot: managesieve-login: Login: user=<info@mydomain.com>, method=PLAIN, rip=95.85.2.99, lip=95.85.2.99, mpid=10827, secured, session=<CVYYrJ9SXK9fVQJj>
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: Added userdb setting: mail=maildir:/var/vmail/mydomain.com/info
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: Added userdb setting: plugin/quota=dirsize:storage=0
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: Effective uid=150, gid=8, home=/var/vmail/mydomain.com/info
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/mydomain.com/info
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: maildir++: root=/var/vmail/mydomain.com/info, index=, indexpvt=, control=, inbox=/var/vmail/mydomain.com/info, alt=
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: Pigeonhole version 0.4.13 (7b14904) initializing
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: include: sieve_global is not set; it is currently not possible to include `:global' scripts.
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: file storage: Using active Sieve script path: /var/customers/mail/sieve/mydomain.com/info/.dovecot.sieve
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: file storage: Using script storage path: /var/customers/mail/sieve/mydomain.com/info
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: file storage: Using permissions from /var/customers/mail/sieve/mydomain.com/info: mode=0700 gid=-1
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: file storage: Relative path to sieve storage in active link:
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: file storage: sync: Synchronization active
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Debug: sieve: file script: Opened script `roundcube' from `/var/customers/mail/sieve/mydomain.com/info/roundcube.sieve'
Jun 23 14:23:44 host dovecot: imap-login: Login: user=<info@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=10829, secured, session=<gv4ZrJ9SzKF/AAAB>
Jun 23 14:23:44 host dovecot: imap(info@mydomain.com): Debug: Added userdb setting: mail=maildir:/var/vmail/mydomain.com/info
Jun 23 14:23:44 host dovecot: imap(info@mydomain.com): Debug: Added userdb setting: plugin/quota=dirsize:storage=0
Jun 23 14:23:44 host dovecot: imap(info@mydomain.com): Debug: Effective uid=150, gid=8, home=/var/vmail/mydomain.com/info
Jun 23 14:23:44 host dovecot: imap(info@mydomain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/mydomain.com/info
Jun 23 14:23:44 host dovecot: imap(info@mydomain.com): Debug: maildir++: root=/var/vmail/mydomain.com/info, index=, indexpvt=, control=, inbox=/var/vmail/mydomain.com/info, alt=
Jun 23 14:23:44 host dovecot: imap(info@mydomain.com): Logged out in=44 out=513
Jun 23 14:23:44 host dovecot: managesieve(info@mydomain.com): Disconnected: Logged out bytes=67/557
Jun 23 14:24:41 host postfix/smtpd[10834]: connect from localhost[127.0.0.1]
Jun 23 14:24:41 host postfix/smtpd[10834]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2
Jun 23 14:24:42 host dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, TLS handshaking: Disconnected, session=<ckKMr59Spux/AAAB>
Jun 23 14:26:02 host postfix/anvil[10756]: statistics: max connection rate 1/60s for (smtp:80.82.77.203) at Jun 23 14:21:17
Jun 23 14:26:02 host postfix/anvil[10756]: statistics: max connection count 1 for (smtp:80.82.77.203) at Jun 23 14:21:17
Jun 23 14:26:02 host postfix/anvil[10756]: statistics: max cache size 1 at Jun 23 14:21:17
Jun 23 14:26:42 host postfix/smtpd[10846]: connect from localhost[127.0.0.1]
Jun 23 14:26:42 host postfix/smtpd[10846]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2
Jun 23 14:26:42 host dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, TLS handshaking: Disconnected, session=<Pq21tp9SuOx/AAAB>
Jun 23 14:26:49 host dovecot: pop3-login: Login: user=<info@mydomain.com>, method=PLAIN, rip=81.206.125.28, lip=95.85.2.99, mpid=10851, TLS, session=<yKIrt59SovZRzn0c>
Jun 23 14:26:49 host dovecot: pop3(info@mydomain.com): Debug: Added userdb setting: mail=maildir:/var/vmail/mydomain.com/info
Jun 23 14:26:49 host dovecot: pop3(info@mydomain.com): Debug: Added userdb setting: plugin/quota=dirsize:storage=0
Jun 23 14:26:49 host dovecot: pop3(info@mydomain.com): Debug: Effective uid=150, gid=8, home=/var/vmail/mydomain.com/info
Jun 23 14:26:49 host dovecot: pop3(info@mydomain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/mydomain.com/info
Jun 23 14:26:49 host dovecot: pop3(info@mydomain.com): Debug: maildir++: root=/var/vmail/mydomain.com/info, index=, indexpvt=, control=, inbox=/var/vmail/mydomain.com/info, alt=
Jun 23 14:26:50 host dovecot: pop3(info@mydomain.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/4, size=64401
Jun 23 14:27:35 host postfix/smtpd[10846]: connect from unknown[80.82.77.203]
Jun 23 14:27:37 host postfix/smtpd[10846]: warning: unknown[80.82.77.203]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 23 14:27:37 host postfix/smtpd[10846]: disconnect from unknown[80.82.77.203] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
Jun 23 14:28:42 host postfix/smtpd[10846]: connect from localhost[127.0.0.1]
Jun 23 14:28:42 host postfix/smtpd[10846]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2

日誌 mail.err 為空

dovecot -n 給出:

# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-79-generic x86_64 Ubuntu 16.04.2 LTS ext4
auth_mechanisms = plain login
first_valid_uid = 150
last_valid_uid = 150
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%n
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace inbox {
 inbox = yes
 location =
 mailbox Drafts {
   special_use = \Drafts
 }
 mailbox Junk {
   special_use = \Junk
 }
 mailbox Sent {
   special_use = \Sent
 }
 mailbox "Sent Messages" {
   special_use = \Sent
 }
 mailbox Trash {
   special_use = \Trash
 }
 prefix =
}
passdb {
 args = /etc/dovecot/dovecot-sql.conf.ext
 driver = sql
}
plugin {
 sieve = /var/customers/mail/sieve/%d/%n/.dovecot.sieve
 sieve_dir = /var/customers/mail/sieve/%d/%n
}
postmaster_address = postmaster@mydomain.com
protocols = " imap sieve pop3 sieve"
service auth {
 unix_listener /var/spool/postfix/private/auth {
   group = postfix
   mode = 0666
   user = postfix
 }
 unix_listener auth-userdb {
   group = mail
   mode = 0666
   user = vmail
 }
}
service managesieve-login {
 inet_listener sieve {
   port = 4190
 }
 process_min_avail = 1
 service_count = 1
 vsz_limit = 64 M
}
ssl_cert = </etc/letsencrypt/live/mydomain.com/fullchain.pem
ssl_cipher_list = ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
ssl_dh_parameters_length = 2048
ssl_key = </etc/letsencrypt/live/mydomain.com/privkey.pem
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
userdb {
 args = /etc/dovecot/dovecot-sql.conf.ext
 driver = sql
}
protocol lda {
 mail_plugins = " quota sieve"
}
protocol sieve {
 mail_plugins =
}

在檢查使用者篩位置上的目錄權限設置是否正確(chmod -R 0700 /var/path/to/sieve)之後,很明顯問題出在 Roundcube 本身,最終似乎從 1.2-beta 升級到 1.2.5 stable 解決了問題。

引用自:https://serverfault.com/questions/856155