On 15 Mar 2018 at 9:01, Aki Tuomi wrote:
On 15.03.2018 00:43, Jungersen, Danjel - Jungersen Grafisk ApS wrote:
Hi there.
I have set up dovecot and sieve.
I can log in, see, send and receive mails.
I can move files around via imap.
I have set up a sieve script that are supposed to move some files to junk based on a
header from rspamd.
The header is there in the relevant emails, but sieve does not do anything.
I have searched a lot online and the script looks correct.
I cannot see anything in the mail.log file ( or in .warn and .err).
Nothing indicating that sieve is running at all, no errors, no confirmations, not anything.
I have tried to set permissions to "dovecot" and "vmail", same result.
I have "compiled" my .sieve to the .svbin file.
I'm running debian stretch, and have tried to follow the guide here:
Can anyone help me where to start looking?
Best regards
Danjel
> Try setting mail_debug=yes
Already did that :-)
> it should give you idea on what happens.
I found out that I needed to add "sieve" to "mail_plugins" manually.
I got it to work, but had to enable layout=fs, does this have any drawbacks?
My reason for enabling it was that sieve created the subfolders even though layout=fs was
not set.
> Also providing doveconf -n could help.
root@mail:/home/danjel# doveconf -n
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.9.0-6-amd64 x86_64 Debian 9.3 ext4
auth_mechanisms = plain login
mail_location = maildir:/var/vmail/%d/%n:LAYOUT=fs
mail_privileged_group = mail
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 {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_after = /etc/dovecot/sieve-after
}
protocols = imap lmtp
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
mode = 0600
user = vmail
}
user = dovecot
}
service imap-login {
inet_listener imap {
port = 0
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
ssl = required
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = # hidden, use -P to show it
userdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lmtp {
mail_plugins = " sieve"
}
protocol lda {
mail_plugins = " sieve"
}
root@mail:/home/danjel#
> Aki