[Dovecot] A little assistance with Sieve
With all the mess that my email has become, it makes sense for me to try to make use of Sieve, but I'm having quite the time finding out how to make it work. I'm running 1.0.13 on a Debian machine. Sieve appears to be compiled with it. I can access managesieve, and I have set up dovecot.conf with lda. I do not get a NO response when I PUTSCRIPI, but LISTSCRIPTS produces no result, so I assume it's not working properly, though if I try with a non-existent script I get an error message.
Questions:
- Is anyone else seeing this, or am I doing something wrong?
- I have seen through Googling some dovecot.conf examples that suggest I should be using managesieve instead of lda (or in addition? - it's not clear), as in protocol managesieve { ...
Any advice will be gratefully received.
Thank you
Cam
-- Cam Ellison, PhD RPsych (BC #01417) Cam Ellison & Associates Ltd. 3446 Beach Avenue Roberts Creek BC V0N 2W2 Phone 604.885.4806 Fax 694.885.4809 Cell 604.989.0635
cam@ellisonpsychology.ca wrote:
First of all, could you provide us with the output of 'dovecot -n' and, since you are talking ManageSieve manually to the server already, a listing of a protocol session (i.e. commands and responses)? And, if you enable mail_debug for the managesieve protocol, you will get messages in your logfile indicating where the sieve storage directory is located. This gives you the ability to check whether the scripts are actually stored as expected.
About the relation with lda: the 'protocol managesieve' section is for the managesieve server and the 'protocol lda' section is for Dovecot's 'deliver' LDA. Deliver is what actually executes the Sieve script (using the Sieve plugin) and delivers the message accordingly. So, managesieve does not substitude the lda; it is run in addition to it.
Recently, I've started to write a wiki page for the managesieve daemon:
http://wiki.dovecot.org/ManageSieve
That should provide enough information for the configuration of the managesieve daemon, so you might be able to find the cause of your problem there already. The dovecot configuration example (which is installed as the default configuration in Debian) also contains some configuration documentation regarding managesieve.
Regards,
Stephan.
OK. I've put that in.
Here's the latest managesieve session: OK "Logged in." CAPABILITY "IMPLEMENTATION" "dovecot" "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex" OK "Capability completed." PUTSCRIPT ".dovecot.sieve" {2049+} LOGOUT
BYE "Server shutting down." imap(root): Info: Server shutting down imap(root): Error: sieve-storage: o_stream_send_istream(/home/cam/sieve/tmp/.dovecot.sieve-1207578536.P26366Q0M617889.treehouse.sieve) failed: Success
I got it to shut down with Ctrl-C I do not understand the last message.
Recently, I've started to write a wiki page for the managesieve daemon:
That's where I went - very helpful indeed - and I copied what you have there almost verbatim.
Here are the relevant bits of dovecot.conf:
protocol imap { listen = * ssl_listen = * ssl_disable = no login_executable = /usr/lib/dovecot/imap-login mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_plugin_dir = /usr/lib/dovecot/modules/imap log_path = /var/log/dovecot/imaplog info_log_path = /var/log/dovecot/imaplog } protocol lda { postmaster_address = postmaster@ellisonpsychology.ca sieve_global_path = /var/mail/.global.sieve script_path = ~/.dovecot.sieve mail_plugin_dir = /usr/lib/dovecot/modules/lda mail_plugins = cmusieve mail_debug = yes log_path = /var/log/dovecot/deliverlog info_log_path = /var/log/dovecot/deliverlog
} protocol managesieve { listen = *:2000 login_executable = /usr/lib/dovecot/managesieve-login mail_executable = /usr/lib/dovecot/managesieve sieve = ~/.dovecot.sieve sieve_storage = ~/sieve mail_debug = yes log_path = /var/log/dovecot/managesievelog info_log_path = /var/log/dovecot/managesievelog }
Thank you very much for the help.
Cam
-- Cam Ellison, PhD RPsych (BC #01417) Cam Ellison & Associates Ltd. 3446 Beach Avenue Roberts Creek BC V0N 2W2 Phone 604.885.4806 Fax 694.885.4809 Cell 604.989.0635
There are no entries in any of the logs related to lda or managesieve.
I did run managesieve again (after creating the relevant logfiles), and got this:
OK "Logged in." LISTSCRIPTS imap(root): Warning: Active sieve script symlink /home/cam/.dovecot.sieve is no symlink. OK "Listscripts completed." LOGOUT imap(root): Info: Disconnected: Logged out OK "Logout completed."
I presume the warning is just that - only a warning - but it mystifies me.
Cheers
Cam
-- Cam Ellison, PhD RPsych (BC #01417) Cam Ellison & Associates Ltd. 3446 Beach Avenue Roberts Creek BC V0N 2W2 Phone 604.885.4806 Fax 694.885.4809 Cell 604.989.0635
(Forgot to CC to the mailinglist)
cam@ellisonpsychology.ca schreef:
The following similar protocol session should show how it is done with a trivially small script:
OK "Logged in." CAPABILITY "IMPLEMENTATION" "dovecot" "SIEVE" "comparator-i;ascii-numeric fileinto reject vacation imapflags notify include envelope body relational regex subaddress copy" OK "Capability completed." PUTSCRIPT "hotseflots" {6+} keep; OK "Putscript completed." GETSCRIPT "hotseflots" {6} keep; OK "Getscript completed. SETACTIVE "hotseflots" OK "Setactive completed." LISTSCRIPTS "phpscript" "hotseflots" ACTIVE "frop" "ingo" "fruts" OK "Listscripts completed."
BTW, it is not useful to upload a script called .dovecot.sieve on the server. For managesieve, the .dovecot.sieve script (as looked for by the Sieve plugin) is a symbolic link that points to the actual active script in the sieve storage directory. That also explains the warning in your follow-up e-mail, indicating that a normal file is still in place. When you upload and activate a new script, the situation is resolved. The regular file previously called .dovecot.sieve is moved to the sieve directory as dovecot-orig.sieve (and listed as dovecot-orig). However, if you consider your current sieve script to be important you are advised to back it up before uploading and activating a script through managesieve.
I hope this solves your issue.
Regards,
Stephan
participants (2)
-
cam@ellisonpsychology.ca
-
Stephan Bosch