Hello!
How do I set the location of sievescripts in roundcube?
Kind regards
Andreas
Andreas Meyer skrev den 2017-09-14 15:18:
How do I set the location of sievescripts in roundcube?
roundcube use server side sieve locations for scripts via sieve protocol just like imap protocol, so it makes no sense to have local sieve scripts location in roundcube, same way as roundcube is not a email storage like pop3 client :=)
if you need more help with managesieve plugin in roundcube ask for this so
cc since i like to know if none recieve my postings on maillist, becourse kolabsys breaks dkim :(
Hello!
Benny Pedersen me@junc.eu schrieb am 14.09.17 um 15:47:54 Uhr:
Andreas Meyer skrev den 2017-09-14 15:18:
How do I set the location of sievescripts in roundcube?
roundcube use server side sieve locations for scripts via sieve protocol just like imap protocol, so it makes no sense to have local sieve scripts location in roundcube, same way as roundcube is not a email storage like pop3 client :=)
if you need more help with managesieve plugin in roundcube ask for this so
cc since i like to know if none recieve my postings on maillist, becourse kolabsys breaks dkim :(
This is the 90-sieve.conf
plugin { sieve = ~/Maildir/.dovecot.sieve sieve_dir = ~/Maildir/sieve }
# ls -l /home/andreas/Maildir insgesamt 80 drwx------ 2 andreas andreas 66 14. Sep 16:18 cur -rw------- 1 andreas andreas 244 12. Sep 21:54 dovecot.index -rw------- 1 andreas andreas 2660 14. Sep 16:18 dovecot.index.cache -rw------- 1 andreas andreas 19108 14. Sep 16:19 dovecot.index.log -rw------- 1 andreas andreas 32784 12. Sep 21:54 dovecot.index.log.2 -rw------- 1 andreas andreas 96 9. Sep 23:43 dovecot.mailbox.log -rw------- 1 andreas andreas 107 14. Sep 16:18 dovecot-uidlist -rw------- 1 andreas andreas 8 9. Sep 23:51 dovecot-uidvalidity -r--r--r-- 1 andreas andreas 0 9. Sep 23:41 dovecot-uidvalidity.59b46010 drwx------ 2 andreas andreas 6 14. Sep 16:18 new drwx------ 3 andreas andreas 81 14. Sep 16:16 sieve -rw------- 1 andreas andreas 24 9. Sep 23:43 subscriptions drwx------ 2 andreas andreas 6 14. Sep 15:51 tmp
# ls -l /home/andreas/Maildir/sieve insgesamt 8 -rw------- 1 andreas andreas 97 14. Sep 16:16 erste_sieve-regel_zum_testen.sieve -rw------- 1 andreas andreas 483 14. Sep 13:27 managesieve.sieve drwx------ 2 andreas andreas 6 14. Sep 16:16 tmp
Connected to amimanera.de. Escape character is '^]'. "IMPLEMENTATION" "Dovecot Pigeonhole" "SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave" "NOTIFY" "mailto" "SASL" "PLAIN" "STARTTLS" "VERSION" "1.0" OK "Dovecot ready." AUTHENTICATE "PLAIN" "AGFuZHxXxXMAIWFuPw==" OK "Logged in." listscripts "erste_sieve-regel_zum_testen" "managesieve" OK "Listscripts completed." PUTSCRIPT "erste_sieve-regel_zum_testen" {97+} if header :comparator "i;ascii-casemap" :contains "Subject" "p0rn" { discard; stop; } OK "PUTSCRIPT completed."
But when i loggin to roundcube and choose preferences/filer, it creates a new folder Maildir with contents
# ls -al insgesamt 4 drwx------ 3 andreas andreas 39 14. Sep 16:29 . drwx------ 11 andreas andreas 4096 14. Sep 16:29 .. lrwxrwxrwx 1 andreas andreas 23 14. Sep 16:29 .dovecot.sieve -> sieve/managesieve.sieve drwx------ 3 andreas andreas 40 14. Sep 16:29 sieve
It's not clear to me, why the settings in 90-sieve.conf are ok for telneting to the server and not for roundcube.
It must be a thing with the relative paths.
Greetings
Andreas
# ls -l /home/andreas/Maildir insgesamt 80 drwx------ 2 andreas andreas 66 14. Sep 16:18 cur -rw------- 1 andreas andreas 244 12. Sep 21:54 dovecot.index -rw------- 1 andreas andreas 2660 14. Sep 16:18 dovecot.index.cache -rw------- 1 andreas andreas 19108 14. Sep 16:19 dovecot.index.log -rw------- 1 andreas andreas 32784 12. Sep 21:54 dovecot.index.log.2 -rw------- 1 andreas andreas 96 9. Sep 23:43 dovecot.mailbox.log -rw------- 1 andreas andreas 107 14. Sep 16:18 dovecot-uidlist -rw------- 1 andreas andreas 8 9. Sep 23:51 dovecot-uidvalidity -r--r--r-- 1 andreas andreas 0 9. Sep 23:41 dovecot-uidvalidity.59b46010 drwx------ 2 andreas andreas 6 14. Sep 16:18 new drwx------ 3 andreas andreas 81 14. Sep 16:16 sieve -rw------- 1 andreas andreas 24 9. Sep 23:43 subscriptions drwx------ 2 andreas andreas 6 14. Sep 15:51 tmp
of course
# ls -al /home/andreas/Maildir insgesamt 88 drwx------ 11 andreas andreas 4096 14. Sep 16:29 . drwx------. 4 andreas andreas 4096 14. Sep 14:15 .. drwx------ 2 andreas andreas 66 14. Sep 16:18 cur -rw------- 1 andreas andreas 244 12. Sep 21:54 dovecot.index -rw------- 1 andreas andreas 2660 14. Sep 16:18 dovecot.index.cache -rw------- 1 andreas andreas 19428 14. Sep 16:35 dovecot.index.log -rw------- 1 andreas andreas 32784 12. Sep 21:54 dovecot.index.log.2 -rw------- 1 andreas andreas 96 9. Sep 23:43 dovecot.mailbox.log lrwxrwxrwx 1 root root 45 14. Sep 16:14 .dovecot.sieve -> /home/andreas/Maildir/sieve/managesieve.sieve -rw------- 1 andreas andreas 107 14. Sep 16:18 dovecot-uidlist -rw------- 1 andreas andreas 8 9. Sep 23:51 dovecot-uidvalidity -r--r--r-- 1 andreas andreas 0 9. Sep 23:41 dovecot-uidvalidity.59b46010 drwx------ 5 andreas andreas 102 9. Sep 23:51 .Drafts drwx------ 3 andreas andreas 18 14. Sep 16:35 Maildir drwx------ 2 andreas andreas 6 14. Sep 16:18 new drwx------ 5 andreas andreas 128 13. Sep 13:07 .Queue drwx------ 5 andreas andreas 128 13. Sep 13:07 .Sent drwx------ 3 andreas andreas 81 14. Sep 16:16 sieve -rw------- 1 andreas andreas 24 9. Sep 23:43 subscriptions drwx------ 2 andreas andreas 6 14. Sep 15:51 tmp drwx------ 5 andreas andreas 128 14. Sep 15:06 .Trash
One sees the folder Maildir created by roundcube in Maildir.
Andreas
Andreas Meyer skrev den 2017-09-14 16:42:
One sees the folder Maildir created by roundcube in Maildir.
yep, remove sieve protocol storage from imap protocol maildir
so make the maildir storage a subdir to HOME and make sieve a subdir to HOME
so HOME have it all as subdirs, not write on same dir storages pr protocol, this should be a faq on how not to make it :=)
Benny Pedersen me@junc.eu schrieb am 14.09.17 um 17:16:51 Uhr:
Andreas Meyer skrev den 2017-09-14 16:42:
One sees the folder Maildir created by roundcube in Maildir.
yep, remove sieve protocol storage from imap protocol maildir
so make the maildir storage a subdir to HOME and make sieve a subdir to HOME
plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/.sieve }
but roundcube creates a folder .sieve and @.dovecot.sieve -> .sieve/managesieve.sieve in /home/andreas/Maildir and stores the sievescript there.
And telneting the server shows
"IMPLEMENTATION" "Dovecot Pigeonhole"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave"
"NOTIFY" "mailto"
"SASL" "PLAIN"
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot ready."
AUTHENTICATE "PLAIN" "AGFuZHJlYxerdMAIWFuPw=="
OK "Logged in."
listscripts
OK "Listscripts completed."
and shows no scripts. It looks in /home/andreas presumable.
Don't understand it.
so HOME have it all as subdirs, not write on same dir storages pr protocol, this should be a faq on how not to make it :=)
yeah, it's always the same with me ;)
Andreas
Please delete this email adrrss
Op 14 sep. 2017, om 16:42 heeft Andreas Meyer a.meyer@nimmini.de het volgende geschreven:
# ls -l /home/andreas/Maildir insgesamt 80 drwx------ 2 andreas andreas 66 14. Sep 16:18 cur -rw------- 1 andreas andreas 244 12. Sep 21:54 dovecot.index -rw------- 1 andreas andreas 2660 14. Sep 16:18 dovecot.index.cache -rw------- 1 andreas andreas 19108 14. Sep 16:19 dovecot.index.log -rw------- 1 andreas andreas 32784 12. Sep 21:54 dovecot.index.log.2 -rw------- 1 andreas andreas 96 9. Sep 23:43 dovecot.mailbox.log -rw------- 1 andreas andreas 107 14. Sep 16:18 dovecot-uidlist -rw------- 1 andreas andreas 8 9. Sep 23:51 dovecot-uidvalidity -r--r--r-- 1 andreas andreas 0 9. Sep 23:41 dovecot-uidvalidity.59b46010 drwx------ 2 andreas andreas 6 14. Sep 16:18 new drwx------ 3 andreas andreas 81 14. Sep 16:16 sieve -rw------- 1 andreas andreas 24 9. Sep 23:43 subscriptions drwx------ 2 andreas andreas 6 14. Sep 15:51 tmp
of course
# ls -al /home/andreas/Maildir insgesamt 88 drwx------ 11 andreas andreas 4096 14. Sep 16:29 . drwx------. 4 andreas andreas 4096 14. Sep 14:15 .. drwx------ 2 andreas andreas 66 14. Sep 16:18 cur -rw------- 1 andreas andreas 244 12. Sep 21:54 dovecot.index -rw------- 1 andreas andreas 2660 14. Sep 16:18 dovecot.index.cache -rw------- 1 andreas andreas 19428 14. Sep 16:35 dovecot.index.log -rw------- 1 andreas andreas 32784 12. Sep 21:54 dovecot.index.log.2 -rw------- 1 andreas andreas 96 9. Sep 23:43 dovecot.mailbox.log lrwxrwxrwx 1 root root 45 14. Sep 16:14 .dovecot.sieve -> /home/andreas/Maildir/sieve/managesieve.sieve -rw------- 1 andreas andreas 107 14. Sep 16:18 dovecot-uidlist -rw------- 1 andreas andreas 8 9. Sep 23:51 dovecot-uidvalidity -r--r--r-- 1 andreas andreas 0 9. Sep 23:41 dovecot-uidvalidity.59b46010 drwx------ 5 andreas andreas 102 9. Sep 23:51 .Drafts drwx------ 3 andreas andreas 18 14. Sep 16:35 Maildir drwx------ 2 andreas andreas 6 14. Sep 16:18 new drwx------ 5 andreas andreas 128 13. Sep 13:07 .Queue drwx------ 5 andreas andreas 128 13. Sep 13:07 .Sent drwx------ 3 andreas andreas 81 14. Sep 16:16 sieve -rw------- 1 andreas andreas 24 9. Sep 23:43 subscriptions drwx------ 2 andreas andreas 6 14. Sep 15:51 tmp drwx------ 5 andreas andreas 128 14. Sep 15:06 .Trash
One sees the folder Maildir created by roundcube in Maildir.
Andreas
Roundcube Users mailing list users@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/users
Ismael | Starline Design ismael@starlinedesign.nl schrieb am 14.09.17 um 16:45:11 Uhr:
Please delete this email adrrss
What do you mean with that!
Andreas
Andreas Meyer skrev den 2017-09-14 18:43:
plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/.sieve }
plugin { sieve = /home/vmail/%d/%u/.dovecot.sieve sieve_dir = /home/vmail/%d/%u/.sieve }
have you set HOME correct ?
note i do not use home here in my config, but direct path
maildir is in /home/vmail/%d/%u/.maildir
Benny Pedersen me@junc.eu schrieb am 14.09.17 um 19:36:34 Uhr:
Andreas Meyer skrev den 2017-09-14 18:43:
plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/.sieve }
plugin { sieve = /home/vmail/%d/%u/.dovecot.sieve sieve_dir = /home/vmail/%d/%u/.sieve }
have you set HOME correct ?
note i do not use home here in my config, but direct path
maildir is in /home/vmail/%d/%u/.maildir
I now tried with
plugin { #sieve = ~/.dovecot.sieve sieve = /home/%u/.dovecot.sieve sieve_dir = /home/%u/.sieve }
but no success.
In the debug.log I see entries since this afternoon while I'm trying to get the thing work like this:
Sep 14 21:07:05 managesieve-login: Info: Login: user=<andreas>, method=PLAIN, rip=62.227.79.208, lip=195.62.121.239, mpid=29836, session=<gyRu+ypZZAA+40/Q> Sep 14 21:07:44 managesieve(andreas): Warning: sieve-storage: Active sieve script symlink /home/andreas/.dovecot.sieve is broken: invalid/unknown path to storage (points to /home/andreas/. sieve/managesieve.sieve).
# ls -al /home/andreas insgesamt 887 drwx------. 5 andreas andreas 4096 14. Sep 18:51 . drwxr-xr-x. 5 root root 44 14. Sep 15:48 .. -rw-------. 1 andreas andreas 87 12. Sep 22:25 .bash_history -rw-r--r--. 1 andreas andreas 18 7. Dez 2016 .bash_logout -rw-r--r--. 1 andreas andreas 193 7. Dez 2016 .bash_profile -rw-r--r--. 1 andreas andreas 231 7. Dez 2016 .bashrc lrwxrwxrwx 1 root root 38 14. Sep 18:51 .dovecot.sieve -> /home/andreas/.sieve/managesieve.sieve drwx------ 9 andreas andreas 4096 14. Sep 20:58 Maildir drwx------ 3 andreas andreas 40 14. Sep 18:51 .sieve drwx------ 2 andreas andreas 6 12. Sep 22:24 .ssh
# ls -al /home/andreas/.sieve insgesamt 8 drwx------ 3 andreas andreas 40 14. Sep 18:51 . drwx------. 5 andreas andreas 4096 14. Sep 18:51 .. -rw------- 1 andreas andreas 483 14. Sep 13:27 managesieve.sieve drwx------ 2 andreas andreas 6 14. Sep 18:38 tmp
Why does dovecot say the symlink is broken?
# doveconf -n |grep -i home sieve = /home/%u/.dovecot.sieve sieve_dir = /home/%u/.sieve
# doveconf mail_home mail_home =
# doveconf -n mail_home has no output
Andreas
On 14 Sep 2017, at 21:19, Andreas Meyer a.meyer@nimmini.de wrote:
Benny Pedersen me@junc.eu schrieb am 14.09.17 um 19:36:34 Uhr:
Andreas Meyer skrev den 2017-09-14 18:43:
plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/.sieve }
plugin { sieve = /home/vmail/%d/%u/.dovecot.sieve sieve_dir = /home/vmail/%d/%u/.sieve }
have you set HOME correct ?
note i do not use home here in my config, but direct path
maildir is in /home/vmail/%d/%u/.maildir
I now tried with
plugin { #sieve = ~/.dovecot.sieve sieve = /home/%u/.dovecot.sieve sieve_dir = /home/%u/.sieve }
but no success.
In the debug.log I see entries since this afternoon while I'm trying to get the thing work like this:
Sep 14 21:07:05 managesieve-login: Info: Login: user=<andreas>, method=PLAIN, rip=62.227.79.208, lip=195.62.121.239, mpid=29836, session=<gyRu+ypZZAA+40/Q> Sep 14 21:07:44 managesieve(andreas): Warning: sieve-storage: Active sieve script symlink /home/andreas/.dovecot.sieve is broken: invalid/unknown path to storage (points to /home/andreas/. sieve/managesieve.sieve).
# ls -al /home/andreas insgesamt 887 drwx------. 5 andreas andreas 4096 14. Sep 18:51 . drwxr-xr-x. 5 root root 44 14. Sep 15:48 .. -rw-------. 1 andreas andreas 87 12. Sep 22:25 .bash_history -rw-r--r--. 1 andreas andreas 18 7. Dez 2016 .bash_logout -rw-r--r--. 1 andreas andreas 193 7. Dez 2016 .bash_profile -rw-r--r--. 1 andreas andreas 231 7. Dez 2016 .bashrc lrwxrwxrwx 1 root root 38 14. Sep 18:51 .dovecot.sieve -> /home/andreas/.sieve/managesieve.sieve drwx------ 9 andreas andreas 4096 14. Sep 20:58 Maildir drwx------ 3 andreas andreas 40 14. Sep 18:51 .sieve drwx------ 2 andreas andreas 6 12. Sep 22:24 .ssh
# ls -al /home/andreas/.sieve insgesamt 8 drwx------ 3 andreas andreas 40 14. Sep 18:51 . drwx------. 5 andreas andreas 4096 14. Sep 18:51 .. -rw------- 1 andreas andreas 483 14. Sep 13:27 managesieve.sieve drwx------ 2 andreas andreas 6 14. Sep 18:38 tmp
Why does dovecot say the symlink is broken?
When using managaesieve you need to have 2 locations configured.
Your main problem is that the symlink is owned by root. It should be owned by the user andreas as managesieve will run under user permissions and wants to set that symlink to point to your active filter script.
Cor
cor@xs4all.nl schrieb am 14.09.17 um 21:53:41 Uhr:
Why does dovecot say the symlink is broken?
When using managaesieve you need to have 2 locations configured.
- sieve= this is the location of the primary sieve script. You dont need to set it. Managesieve uses it to create a symlink to the active filter you set in roundcube
- sieve_dir= this is where managesieve stores all the filters you create in roundcube. One of them is the script that is symlinked from 1.
Your main problem is that the symlink is owned by root. It should be owned by the user andreas as managesieve will run under user permissions and wants to set that symlink to point to your active filter script.
Thank you! This seems to have fixed this problem.
Andreas
Andreas Meyer skrev den 2017-09-14 21:19:
Why does dovecot say the symlink is broken?
delete the symlink, and edit sieve in roundcube, if it still fails, search more on how you configured $HOME in auth backend, if it contains maildir bugger :=)
env home is not the same as maildir for mail storage, if you use ~ path's its env home, not what you want if its maildir storage dir
dovecot -n does not help me, but make sure env home is correct in auth backend
if all fails i cant help more
Benny Pedersen me@junc.eu schrieb am 14.09.17 um 22:56:36 Uhr:
Andreas Meyer skrev den 2017-09-14 21:19:
Why does dovecot say the symlink is broken?
delete the symlink, and edit sieve in roundcube, if it still fails, search more on how you configured $HOME in auth backend, if it contains maildir bugger :=)
env home is not the same as maildir for mail storage, if you use ~ path's its env home, not what you want if its maildir storage dir
dovecot -n does not help me, but make sure env home is correct in auth backend
if all fails i cant help more
It seems after I activated lmtp in postfix to deliver to dovecot all this relativ paths problems are gone. Telneting to the server and roundcube too are using the same path now to the sievescripts. Don't know why, but sieve is working as expected.
Thank you everybody for you patience!
Andreas