我正在嘗試讓鴿舍+鴿子篩在 ubuntu 14.04 上工作。
從我讀過的所有內容來看,這似乎應該非常簡單,但我似乎無法讓它發揮作用。
我已經安裝並配置了 dovecot,一切正常。現在我正在嘗試讓鴿子洞用於過濾。
我從儲存庫安裝了鴿子洞:
apt-get install -y dovecot-sieve dovecot-managesieved
這是我的 dovecot.conf:
disable_plaintext_auth = no
mail_privileged_group = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
userdb {
driver = prefetch
}
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocols = imap lmtp
protocol imap {
mail_plugins = " autocreate"
disable_plaintext_auth = no
}
plugin {
autocreate = Trash
autocreate2 = Sent
autosubscribe = Trash
autosubscribe2 = Sent
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
protocol lmtp {
[email protected]
hostname=irn.cc
mail_plugins = $mail_plugins sieve
}
protocol sieve {
}
ssl=required
ssl_cert = </etc/ssl/certs/mailcert.pem
ssl_key = </etc/ssl/private/mail.key
根據我的理解,啟動 dovecot 也應該啟動 sieve 守護程式。然而,4190 上似乎沒有任何監聽。
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 241/master
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 1706/dovecot
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 241/master
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 1706/dovecot
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::993 :::* LISTEN 1706/dovecot
tcp6 0 0 :::143 :::* LISTEN 1706/dovecot
tcp6 0 0 :::80 :::* LISTEN 420/apache2
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::5432 :::* LISTEN -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 172.17.42.1:123 0.0.0.0:* -
udp 0 0 10.0.8.15:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp 0 0 0.0.0.0:59800 0.0.0.0:* -
udp 0 0 0.0.0.0:35789 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp6 0 0 fe80::5484:7aff:fef:123 :::* -
udp6 0 0 fe80::250:56ff:fe81:123 :::* -
udp6 0 0 ::1:123 :::* -
udp6 0 0 :::123 :::* -
udp6 0 0 :::58320 :::* -
我在這裡缺少啟動步驟嗎?日誌似乎沒有顯示任何錯誤,也沒有任何跡象表明它看到了這些設定。我所看到的只是鴿舍進程的啟動。
Jun 22 17:10:51 castle dovecot: master: Dovecot v2.2.9 starting up
答案1
sieve
一般來說,您必須啟用:
protocols = imap sieve
然後你必須啟用deliver
LDA 的 sieve 呼叫:
protocol lda {
mail_plugins = sieve
. . . . .
}
現在您必須配置插件本身:
plugin {
sieve_before = /etc/dovecot/common.sieve
sieve_dir = ~/sieve/
sieve = ~/user.sieve
. . . . .
}
最後一步 - 您必須設定managesieve
守護程式:
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
答案2
像往常一樣,我在發布問題後立即找到答案。
對於將來遇到此問題的任何人,我必須sieve
添加protocols
:
protocols = imap lmtp sieve