I want to use managesieve in my dovecot server which uses virtual users and a ldap for the users. This is in my dovecot.conf:
plugin {
sieve_dir=/var/mail/sievescript/%u_scripts
sieve_extensions = +imapflags
}
protocol managesieve {
login_executable = /usr/lib/dovecot/managesieve-login
mail_executable = /usr/lib/dovecot/managesieve
managesieve_max_line_length = 65536
managesieve_logout_format = bytes=%i/%o
listen = *:2000
}
If I try to talk to managesieve with telnet this happens:
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "dovecot"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator- i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date imapflags"
"SASL" "PLAIN LOGIN"
"STARTTLS"
"NOTIFY" "mailto"
"VERSION" "1.0"
OK "Dovecot ready."
AUTHENTICATE "PLAIN" "xxxxxxxxxxxxx"
BYE "Internal error occured. Refer to server log for more information. [2011-10-02 00:48:09]"
Connection closed by foreign host.
The Dovecot Log says:
2011-10-02 00:48:09 MANAGESIEVE(user): Fatal: Failed to create sieve storage with data: /var/mail/sievescript/user_scripts
The sievescirpt folder is owned by dovecot:dovecot. Can someone help please?
Thank you.
If you ask yourself what this was: It was a wrong path in the configuration, because I used %u but I should used %m
Dovecot doesn't access mail or sieve scripts as the dovecot user which is explained in the VirtualUsers documentation so most likely you need to figure out what UserID Dovecot is using for that virtual user as assigned from your user database.