Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

If you ask yourself what this was: It was a wrong path in the configuration, because I used %u but I should used %m

share|improve this answer

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.

share|improve this answer
    
I already tried to set the folder to 777 (which didn't help) and I used stat /var/mail/sievescript/ to find it out and it says dovecot was the user who was the last one using this folder. –  plaetzchen Oct 2 '11 at 1:19
    
Then I am not sure, because it shouldn't be running as dovecot, but I don't know your userdatabase configuration so it is hard to say. With the directory set to 777 obviously it shouldn't be a permissions issue. Is there anything different in the log when the permissions are set 777? Perhaps it disallows writing to an other writable directory? –  AFresh1 Oct 2 '11 at 3:01
    
Noe its the exactly same error message if an error occured (Yes with that typo ;) ) –  plaetzchen Oct 2 '11 at 8:17
    
Running as the UID your userdatabase sets for the virtual user are you able to mkdir /var/mail/sievescript/user_scripts successfully? –  AFresh1 Oct 2 '11 at 19:57
    
Yes I can make the directory but even when I create the directory manually I get an error and managesieve kicks me. This is the last debug line: 2011-10-03 13:49:31 MANAGESIEVE(user): Info: Effective uid=5000, gid=5000, home=(none) –  plaetzchen Oct 3 '11 at 11:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.