[Dovecot] MANAGESIEVE patch v4 for dovecot 1.0.rc28
Hello dovecot users,
I have updated the MANAGESIEVE patch to fix the currently known small problems with the protocol implementation. It is designed for rc28, but also compiles cleanly with the current cvs branch_1_0.
Change Log V4
- Added managesieve_implementation_string setting to the managesieve configuration. This can be used to customize the default "IMPLEMENTATION" capability response (as requested by John Peacock).
- Denied ANONYMOUS login until proper support is implemented
- Fixed problem with authenticate command regarding continued responses. In V3 only initial response would work. Problem was caused by rc2 -> rc28 upgrade. One of the clear reasons why code duplication is a very bad idea.
- Fixed readlink bug as indicated by Timo: return value of readlink can also be -1.
- Fixed bug in the regular file rescue code, as introduced in the previous version. Used stat instead of lstat. This caused the symlink to be rescued subsequently in the next activation, thus still overwriting the initially rescued script.
This patch still includes (yet another) instance of the CMU Sieve source, as explained in one of my previous e-mails (http://dovecot.org/list/dovecot/2006-July/015016.html).
It can be downloaded at:
http://sinas.rename-it.nl/~sirius/dovecot-1.0.rc28-MANAGESIEVE-v4.diff.gz
A design related README is located at src/managesieve after applying the patch.
Have fun testing the patch. Notify me when there are problems.
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
Stephan Bosch schreef:
Change Log V4
- Denied ANONYMOUS login until proper support is implemented Oops, actually it is only not announced anymore. Anonymous login is still possible. Will be fixed properly in next patch. Shouldn't be awake at this hour...
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stephan Bosch schrieb:
Hello dovecot users,
I have updated the MANAGESIEVE patch to fix the currently known small problems with the protocol implementation. It is designed for rc28, but also compiles cleanly with the current cvs branch_1_0.
Change Log V4
- Added managesieve_implementation_string setting to the managesieve configuration. This can be used to customize the default "IMPLEMENTATION" capability response (as requested by John Peacock).
- Denied ANONYMOUS login until proper support is implemented
- Fixed problem with authenticate command regarding continued responses. In V3 only initial response would work. Problem was caused by rc2 -> rc28 upgrade. One of the clear reasons why code duplication is a very bad idea.
- Fixed readlink bug as indicated by Timo: return value of readlink can also be -1.
- Fixed bug in the regular file rescue code, as introduced in the previous version. Used stat instead of lstat. This caused the symlink to be rescued subsequently in the next activation, thus still overwriting the initially rescued script.
This patch still includes (yet another) instance of the CMU Sieve source, as explained in one of my previous e-mails (http://dovecot.org/list/dovecot/2006-July/015016.html).
It can be downloaded at:
http://sinas.rename-it.nl/~sirius/dovecot-1.0.rc28-MANAGESIEVE-v4.diff.gz
A design related README is located at src/managesieve after applying the patch.
Have fun testing the patch. Notify me when there are problems.
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
Hi Stephan, i have success with patch dovecot with your patch but having problems in understanding how to configure the sieve server in dovecot.conf , do you have some small faqs for me, the readme wasnt enough for me to do this
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGF4BdfGH2AvR16oERAoAEAJ40YWzPARtH9SJA+fksKk5PKX2cDACffURP zMBDPCYmlGS6os33C23r/Gc= =I0O5 -----END PGP SIGNATURE-----
On 13:28:29 2007-04-07 Robert Schetterer <robert@schetterer.org> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stephan Bosch schrieb:
Hello dovecot users,
I have updated the MANAGESIEVE patch to fix the currently known small problems with the protocol implementation. It is designed for rc28, but also compiles cleanly with the current cvs branch_1_0.
Hi Stephan, i have success with patch dovecot with your patch but having problems in understanding how to configure the sieve server in dovecot.conf , do you have some small faqs for me, the readme wasnt enough for me to do this
I needed to do the following: to my protocols line added managesieve protocols = imap managesieve Then added a protocol managesieve with: protocol managesieve { listen = *:2000 login_executable = /usr/libexec/dovecot/managesieve-login mail_executable = /usr/libexec/dovecot/managesieve }
That's what was needde to gt it working here...
-- Andraž "ruskie" Levstik Source Mage GNU/Linux Games grimoire guru Geek/Hacker/Tinker
Hacker FAQ: http://www.plethora.net/%7eseebs/faqs/hacker.html Be sure brain is in gear before engaging mouth.
Key id = F4C1F89C Key fingerprint = 6FF2 8F20 4C9D DB36 B5B6 F134 884D 72CC F4C1 F89C
Andraž 'ruskie' Levstik schrieb:
On 13:28:29 2007-04-07 Robert Schetterer <robert@schetterer.org> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stephan Bosch schrieb:
Hello dovecot users,
I have updated the MANAGESIEVE patch to fix the currently known small problems with the protocol implementation. It is designed for rc28, but also compiles cleanly with the current cvs branch_1_0.
Hi Stephan, i have success with patch dovecot with your patch but having problems in understanding how to configure the sieve server in dovecot.conf , do you have some small faqs for me, the readme wasnt enough for me to do this
I needed to do the following: to my protocols line added managesieve protocols = imap managesieve Then added a protocol managesieve with: protocol managesieve { listen = *:2000 login_executable = /usr/libexec/dovecot/managesieve-login mail_executable = /usr/libexec/dovecot/managesieve }
That's what was needde to gt it working here...
-- Andraž "ruskie" Levstik Source Mage GNU/Linux Games grimoire guru Geek/Hacker/Tinker
Hacker FAQ: http://www.plethora.net/%7eseebs/faqs/hacker.html Be sure brain is in gear before engaging mouth.
Key id = F4C1F89C Key fingerprint = 6FF2 8F20 4C9D DB36 B5B6 F134 884D 72CC F4C1 F89C
Hi Andraž thx i will try that
--
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Robert Schetterer schrieb:
Andraž 'ruskie' Levstik schrieb:
On 13:28:29 2007-04-07 Robert Schetterer <robert@schetterer.org> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stephan Bosch schrieb:
Hello dovecot users,
I have updated the MANAGESIEVE patch to fix the currently known small problems with the protocol implementation. It is designed for rc28, but also compiles cleanly with the current cvs branch_1_0.
Hi Stephan, i have success with patch dovecot with your patch but having problems in understanding how to configure the sieve server in dovecot.conf , do you have some small faqs for me, the readme wasnt enough for me to do this
I needed to do the following: to my protocols line added managesieve protocols = imap managesieve Then added a protocol managesieve with: protocol managesieve { listen = *:2000 login_executable = /usr/libexec/dovecot/managesieve-login mail_executable = /usr/libexec/dovecot/managesieve }
That's what was needde to gt it working here...
-- Andraž "ruskie" Levstik Source Mage GNU/Linux Games grimoire guru Geek/Hacker/Tinker
Hacker FAQ: http://www.plethora.net/%7eseebs/faqs/hacker.html Be sure brain is in gear before engaging mouth.
Key id = F4C1F89C Key fingerprint = 6FF2 8F20 4C9D DB36 B5B6 F134 884D 72CC F4C1 F89C
Hi Andraž thx i will try that
Hi,ok setui above works using avelsieve squirrelmail plugin with managesieve dovecot latest (perhaps i shouldnt use 1.30 rc) as well there may be other problems between suse and quotawarn patches ) please see this just as info to help coders to debug
following problems in logs appear
/var/log/messages
9 04:51:41 suse10-2-vmware kernel: managesieve-log[2326]: segfault at 0000000000000000 rip 0000000000000000 rsp 00007fff8995b938 error 14
i have no idea where this comes from
/var/log/dovcot.info
dovecot: Apr 09 04:55:00 Info: IMAP(tester@example.de): Disconnected: Logged out dovecot: Apr 09 04:55:08 Info: managesieve-login: Login: user=<tester@example.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): Effective uid=1001, gid=1001 dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using active sieve script path: /usr/local/virtual/tester@example.de//.dovecot.sieve
( this line looks strange to me, but it musnt be false )
dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using mail-data: maildir:/usr/local/virtual/tester@example.de/ dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using sieve script storage path: /usr/local/virtual/tester@example.de/ dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Relative path to sieve storage in active link: dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): Disconnected
in squirrlemail avelsieve
C: "IMPLEMENTATION" "dovecot"\r\n C: "SASL" "PLAIN"\r\n C: "SIEVE" "FILEINTO REJECT ENVELOPE VACATION IMAPFLAGS NOTIFY SUBADDRESS RELATIONAL COMPARATOR-I;ASCII-NUMERIC"\r\n C: "STARTTLS"\r\n C: OK "Welcome"\r\n S: STARTTLS\r\n C: OK "Begin TLS negotiation now."\r\n S: CAPABILITY\r\n C: "IMPLEMENTATION" "dovecot"\r\n C: "SASL" "PLAIN"\r\n C: "SIEVE" "FILEINTO REJECT ENVELOPE VACATION IMAPFLAGS NOTIFY SUBADDRESS RELATIONAL COMPARATOR-I;ASCII-NUMERIC"\r\n C: OK "TLS negotiation successful."\r\n S: AUTHENTICATE "PLAIN" {72+}\r\n S: dGVzdGVyQGRhcmtjaGF0cm9vbS5kZQB0ZXN0ZXJAZGFya2NoYXRyb29tLmRlAHRlc3Rlcg==\r\n C: "IMPLEMENTATION" "dovecot"\r\n C: "SASL" "PLAIN"\r\n C: "SIEVE" "FILEINTO REJECT ENVELOPE VACATION IMAPFLAGS NOTIFY SUBADDRESS RELATIONAL COMPARATOR-I;ASCII-NUMERIC"\r\n C: OK "Capability completed."\r\n S: CAPABILITY\r\n C: OK "Logged in."\r\n S: PUTSCRIPT "phpscript" {777+}\r\n# This script has been automatically generated by avelsieve\n# (Sieve Mail Filters Plugin for Squirrelmail)\n# Warning: If you edit this manually, then the changes will not \n# be reflected in the users' front-end\!\n#AVELSIEVE_VERSIONYTo0OntzOjU6Im1ham9yIjtpOjE7czo1OiJtaW5vciI7aTo5O3M6NzoicmVsZWFzZSI7aTo3O3M6Njoic3RyaW5nIjtzOjU6IjEuOS43Ijt9\n#AVELSIEVE_CREATED1176087308\n#AVELSIEVE_MODIFIED1176087308\nrequire [""];\nif\n#START_SIEVE_RULEYTo0OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NDp7czo0OiJ0eXBlIjtzOjY6ImhlYWRlciI7czo2OiJoZWFkZXIiO3M6NjoidG9vcmNjIjtzOjk6Im1hdGNodHlwZSI7czo4OiJjb250YWlucyI7czoxMToiaGVhZGVybWF0Y2giO3M6MzoiKioqIjt9fXM6NDoidHlwZSI7czoxOiIxIjtzOjk6ImNvbmRpdGlvbiI7czozOiJhbmQiO3M6NjoiYWN0aW9uIjtzOjE6IjIiO30%3DEND_SIEVE_RULE\nheader :contains ["to", "cc"] "***"\n{\ndiscard;\n}\r\n C: "IMPLEMENTATION" "dovecot"\r\n C: "SIEVE" "FILEINTO REJECT ENVELOPE VACATION IMAPFLAGS NOTIFY SUBADDRESS RELATIONAL COMPARATOR-I;ASCII-NUMERIC"\r\n C: OK "Capability completed."\r\n S: SETACTIVE "phpscript"\r\n C: NO "line 8: Unsupported features in require line"\r\n
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGGCAkfGH2AvR16oERAoIyAJ4xqLb2nlE3/q9lfvGzLzDpkxViigCghDOj uimQuXxYNNamyoV8i8A27Z8= =ZgQK -----END PGP SIGNATURE-----
Robert Schetterer wrote:
Hi,ok setui above works using avelsieve squirrelmail plugin with managesieve dovecot latest (perhaps i shouldnt use 1.30 rc) as well there may be other problems between suse and quotawarn patches ) please see this just as info to help coders to debug
following problems in logs appear
/var/log/messages
9 04:51:41 suse10-2-vmware kernel: managesieve-log[2326]: segfault at 0000000000000000 rip 0000000000000000 rsp 00007fff8995b938 error 14
i have no idea where this comes from Hmm. That's not good.. what ever happens, dovecot(-managesieve) must never segfault. Maybe you could provide a core-dump. Btw, I don't really know what managesieve-log is supposed to be. Timo, any ideas?
/var/log/dovcot.info
dovecot: Apr 09 04:55:00 Info: IMAP(tester@example.de): Disconnected: Logged out dovecot: Apr 09 04:55:08 Info: managesieve-login: Login: user=<tester@example.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): Effective uid=1001, gid=1001 dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using active sieve script path: /usr/local/virtual/tester@example.de//.dovecot.sieve
( this line looks strange to me, but it musnt be false ) That looks very strange. Assuming you are not using the userdb to specify the SIEVE path (code directly borrowed from dovecot-sieve), 'the problem' seems to be that the home directory of tester@example.de ends in a /. By looking at dovecot's home_expand code I discovered this is not checked while expanding ~/.dovecot.sieve. However, linux/unix/POSIX (?) seems to be handling duplicate slashes as single ones, so it should work properly anyhow. But, maybe Timo is interested in making some cosmetic changes. :)
<snap>protocol transcript</snap>
S: PUTSCRIPT "phpscript" {777+}\r\n# This script has been automatically generated by avelsieve\n# (Sieve Mail Filters Plugin for Squirrelmail)\n# Warning: If you edit this manually, then the changes will not \n# be reflected in the users' front-end\!\n#AVELSIEVE_VERSIONYTo0OntzOjU6Im1ham9yIjtpOjE7czo1OiJtaW5vciI7aTo5O3M6NzoicmVsZWFzZSI7aTo3O3M6Njoic3RyaW5nIjtzOjU6IjEuOS43Ijt9\n#AVELSIEVE_CREATED1176087308\n#AVELSIEVE_MODIFIED1176087308\nrequire [""];\nif\n#START_SIEVE_RULEYTo0OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NDp7czo0OiJ0eXBlIjtzOjY6ImhlYWRlciI7czo2OiJoZWFkZXIiO3M6NjoidG9vcmNjIjtzOjk6Im1hdGNodHlwZSI7czo4OiJjb250YWlucyI7czoxMToiaGVhZGVybWF0Y2giO3M6MzoiKioqIjt9fXM6NDoidHlwZSI7czoxOiIxIjtzOjk6ImNvbmRpdGlvbiI7czozOiJhbmQiO3M6NjoiYWN0aW9uIjtzOjE6IjIiO30%3DEND_SIEVE_RULE\nheader :contains ["to", "cc"] "***"\n{\ndiscard;\n}\r\n C: "IMPLEMENTATION" "dovecot"\r\n C: "SIEVE" "FILEINTO REJECT ENVELOPE VACATION IMAPFLAGS NOTIFY SUBADDRESS RELATIONAL COMPARATOR-I;ASCII-NUMERIC"\r\n C: OK "Capability completed."\r\n S: SETACTIVE "phpscript"\r\n C: NO "line 8: Unsupported features in require line"\r\n This script states: require [""];
This is not valid sieve to my knowledge and it doesn't serve any useful purpose: there is no empty sieve extension, so this seems to be a bug in avelsieve. Lib-CMUSieve correctly reports an error.
Btw, I tested avelsieve myself as well (to test yet another sieve client), but it also caused a syntax error:
NO "line 6: syntax error, unexpected ']', expecting STRING"
I don't yet know what caused this, but I intend to find out as soon as I get to sniff the TCP communication properly.
About the configuration: I will add a small configuration section to the README file. Just like the first version, it is still configured as any other mail protocol and it does not have any special configuration options (apart from the freshly added managesieve_implementation_string option). Simply adding managesieve to the 'protocols' line in dovecot.conf is usually enough, but it also accepts the other common options like 'listen' (to make the deamon listen on a different port for instance).
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
This script states: require [""];
This is not valid sieve to my knowledge and it doesn't serve any useful purpose: there is no empty sieve extension, so this seems to be a bug in avelsieve. Lib-CMUSieve correctly reports an error.
Btw, I tested avelsieve myself as well (to test yet another sieve client), but it also caused a syntax error:
NO "line 6: syntax error, unexpected ']', expecting STRING"
I don't yet know what caused this, but I intend to find out as soon as I get to sniff the TCP communication properly. Found it. Avelsieve incorrectly assumes the SIEVE capabilities to be
Stephan Bosch wrote: listed in lowercase. Dovecot-managesieve lists them in uppercase.
I have written a small patch to avelsieve 1.9.7 (devel branch):
http://sinas.rename-it.nl/~sirius/avelsieve-1.9.7-SIEVECASE.patch
Just apply in the avelsieve directory with -p1. Keep in mind that this only fixes the managesieve.lib.php backend. If you use the PEAR version, I don't know whether this bug exists at all. This bug also exists in avelsieve 1.0.1, but I didn't take time to fix it.
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
Stephan Bosch schreef:
This script states: require [""];
This is not valid sieve to my knowledge and it doesn't serve any useful purpose: there is no empty sieve extension, so this seems to be a bug in avelsieve. Lib-CMUSieve correctly reports an error.
Btw, I tested avelsieve myself as well (to test yet another sieve client), but it also caused a syntax error:
NO "line 6: syntax error, unexpected ']', expecting STRING"
I don't yet know what caused this, but I intend to find out as soon as I get to sniff the TCP communication properly. Found it. Avelsieve incorrectly assumes the SIEVE capabilities to be
Stephan Bosch wrote: listed in lowercase. Dovecot-managesieve lists them in uppercase. Just to be sure I reread the MANAGESIEVE (v07) draft specification. It gives an example of the SIEVE capability response in UPPER CASE (it says nothing explicitly), but it also refers to the SIEVE specification, which says:
Any extensions to this language MUST define a capability string that
uniquely identifies that extension. Capability string are case-
sensitive; for example, "foo" and "FOO" are different capabilities.
If a new version of an extension changes the functionality of a
previously defined extension, it MUST use a different name.
Extensions may register a set of related capabilities by registering
just a unique prefix for them. The "comparator-" prefix is an
example of this. The prefix MUST end with a "-" and MUST NOT overlap
any existing registrations.
So, I seems that I am pretty much wrong in this case. I'll change the code and notify the maintainer of the managesieve specification. Until I publish a new patch, the patch to avelsieve will work however.
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stephan Bosch schrieb:
Stephan Bosch schreef:
This script states: require [""];
This is not valid sieve to my knowledge and it doesn't serve any useful purpose: there is no empty sieve extension, so this seems to be a bug in avelsieve. Lib-CMUSieve correctly reports an error.
Btw, I tested avelsieve myself as well (to test yet another sieve client), but it also caused a syntax error:
NO "line 6: syntax error, unexpected ']', expecting STRING"
I don't yet know what caused this, but I intend to find out as soon as I get to sniff the TCP communication properly. Found it. Avelsieve incorrectly assumes the SIEVE capabilities to be
Stephan Bosch wrote: listed in lowercase. Dovecot-managesieve lists them in uppercase. Just to be sure I reread the MANAGESIEVE (v07) draft specification. It gives an example of the SIEVE capability response in UPPER CASE (it says nothing explicitly), but it also refers to the SIEVE specification, which says:
Any extensions to this language MUST define a capability string that uniquely identifies that extension. Capability string are case- sensitive; for example, "foo" and "FOO" are different capabilities. If a new version of an extension changes the functionality of a previously defined extension, it MUST use a different name. Extensions may register a set of related capabilities by registering just a unique prefix for them. The "comparator-" prefix is an example of this. The prefix MUST end with a "-" and MUST NOT overlap any existing registrations.
So, I seems that I am pretty much wrong in this case. I'll change the code and notify the maintainer of the managesieve specification. Until I publish a new patch, the patch to avelsieve will work however.
Regards,
Ok Stephan, i understand, i will test your avelsieve patch, and your new release if you got it coded
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGGTzdfGH2AvR16oERAtyoAJ0Ra243Hx4Lh7XJUFBATXvAHDY0QACfbsHk UUwtcErvZReuldpN0GGDQ40= =M8C4 -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stephan Bosch schrieb:
This script states: require [""];
This is not valid sieve to my knowledge and it doesn't serve any useful purpose: there is no empty sieve extension, so this seems to be a bug in avelsieve. Lib-CMUSieve correctly reports an error.
Btw, I tested avelsieve myself as well (to test yet another sieve client), but it also caused a syntax error:
NO "line 6: syntax error, unexpected ']', expecting STRING"
I don't yet know what caused this, but I intend to find out as soon as I get to sniff the TCP communication properly. Found it. Avelsieve incorrectly assumes the SIEVE capabilities to be
Stephan Bosch wrote: listed in lowercase. Dovecot-managesieve lists them in uppercase.
I have written a small patch to avelsieve 1.9.7 (devel branch):
http://sinas.rename-it.nl/~sirius/avelsieve-1.9.7-SIEVECASE.patch
Just apply in the avelsieve directory with -p1. Keep in mind that this only fixes the managesieve.lib.php backend. If you use the PEAR version, I don't know whether this bug exists at all. This bug also exists in avelsieve 1.0.1, but I didn't take time to fix it.
Regards,
Hi Stephan, i will try that and send you results thx for coding
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGGTwEfGH2AvR16oERAkKtAJ9Fch7nlcbbldOT0+qjaUZfIYh5gQCfY0t7 1ensh8gNSO8kHfoVWNQ/9Yw= =wJ5E -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Stephan, get my answers trought the mail Stephan Bosch schrieb:
Robert Schetterer wrote:
Hi,ok setui above works using avelsieve squirrelmail plugin with managesieve dovecot latest (perhaps i shouldnt use 1.30 rc) as well there may be other problems between suse and quotawarn patches ) please see this just as info to help coders to debug
following problems in logs appear
/var/log/messages
9 04:51:41 suse10-2-vmware kernel: managesieve-log[2326]: segfault at 0000000000000000 rip 0000000000000000 rsp 00007fff8995b938 error 14
i am willing to help about that, how should i trace this do you have an example
i have no idea where this comes from
Hmm. That's not good.. what ever happens, dovecot(-managesieve) must never segfault. Maybe you could provide a core-dump. Btw, I don't really know what managesieve-log is supposed to be. Timo, any ideas?
/var/log/dovcot.info
dovecot: Apr 09 04:55:00 Info: IMAP(tester@example.de): Disconnected: Logged out dovecot: Apr 09 04:55:08 Info: managesieve-login: Login: user=<tester@example.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): Effective uid=1001, gid=1001 dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using active sieve script path: /usr/local/virtual/tester@example.de//.dovecot.sieve
( this line looks strange to me, but it musnt be false ) That looks very strange. Assuming you are not using the userdb to specify the SIEVE path (code directly borrowed from dovecot-sieve), 'the problem' seems to be that the home directory of tester@example.de ends in a /. By looking at dovecot's home_expand code I discovered this is not checked while expanding ~/.dovecot.sieve. However, linux/unix/POSIX (?) seems to be handling duplicate slashes as single ones, so it should work properly anyhow. But, maybe Timo is interested in making some cosmetic changes. :)
this test mail server setup is like http://wiki.dovecot.org/DovecotLDAPostfixAdminMySQL i agree double slashes should work
<snap>protocol transcript</snap>
S: PUTSCRIPT "phpscript" {777+}\r\n# This script has been automatically generated by avelsieve\n# (Sieve Mail Filters Plugin for Squirrelmail)\n# Warning: If you edit this manually, then the changes will not \n# be reflected in the users' front-end\!\n#AVELSIEVE_VERSIONYTo0OntzOjU6Im1ham9yIjtpOjE7czo1OiJtaW5vciI7aTo5O3M6NzoicmVsZWFzZSI7aTo3O3M6Njoic3RyaW5nIjtzOjU6IjEuOS43Ijt9\n#AVELSIEVE_CREATED1176087308\n#AVELSIEVE_MODIFIED1176087308\nrequire
[""];\nif\n#START_SIEVE_RULEYTo0OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NDp7czo0OiJ0eXBlIjtzOjY6ImhlYWRlciI7czo2OiJoZWFkZXIiO3M6NjoidG9vcmNjIjtzOjk6Im1hdGNodHlwZSI7czo4OiJjb250YWlucyI7czoxMToiaGVhZGVybWF0Y2giO3M6MzoiKioqIjt9fXM6NDoidHlwZSI7czoxOiIxIjtzOjk6ImNvbmRpdGlvbiI7czozOiJhbmQiO3M6NjoiYWN0aW9uIjtzOjE6IjIiO30%3DEND_SIEVE_RULE\nheader
:contains ["to", "cc"] "***"\n{\ndiscard;\n}\r\n C: "IMPLEMENTATION" "dovecot"\r\n C: "SIEVE" "FILEINTO REJECT ENVELOPE VACATION IMAPFLAGS NOTIFY SUBADDRESS RELATIONAL COMPARATOR-I;ASCII-NUMERIC"\r\n C: OK "Capability completed."\r\n S: SETACTIVE "phpscript"\r\n C: NO "line 8: Unsupported features in require line"\r\n This script states: require [""];
This is not valid sieve to my knowledge and it doesn't serve any useful purpose: there is no empty sieve extension, so this seems to be a bug in avelsieve. Lib-CMUSieve correctly reports an error.
Btw, I tested avelsieve myself as well (to test yet another sieve client), but it also caused a syntax error:
NO "line 6: syntax error, unexpected ']', expecting STRING"
I don't yet know what caused this, but I intend to find out as soon as I get to sniff the TCP communication properly.
you may be right avelsieve may include bugs, i noticed that before when tested the python sieve server, but managed it getting to work
About the configuration: I will add a small configuration section to the README file. Just like the first version, it is still configured as any other mail protocol and it does not have any special configuration options (apart from the freshly added managesieve_implementation_string option). Simply adding managesieve to the 'protocols' line in dovecot.conf is usually enough, but it also accepts the other common options like 'listen' (to make the deamon listen on a different port for instance).
this is what i missed in your readme ( or perhaps i overread it *g )
i.e. protocols = imap managesieve protocol managesieve { listen = *:2000 login_executable = /usr/libexec/dovecot/managesieve-login mail_executable = /usr/libexec/dovecot/managesieve }
Regards,
i would very welcome the managesieve server patch to stable dovecot cause its better then every other filter solution ( comparing to maildrop or procmail in my mind), and avelsieve is are very good squirrel plugin, as long thunderbird does not have a sieve editior which can be handeled in an equal easy way, but as i wrote, i dont wanna pressure this, cause i see releasing dovecot stable 1 should be done before including new code which needs to be tested before anyway.
I like using dovecot postfix in an isp setup, and so acl and sieve makes the setup with squirrel very nice to the users, comparing to other possible solutions ( i.e vacation, forward, sharing etc) combining it with amavis,spamass...(in sql) plugins comes near to have what i would call a perfect mailserver setup for multidomain maybe horde will play better as it should be compatible with the thunderbird kolab extension an lightning to have shared folders, calenders and adressbook all in imap, this would be nearly be an opensource solution which would beat i.e exchange
i had equals with cyrus, but i dont like cyrus very much, so i am testing all features which i know they asked by users , and what i had included in other setups with other solutions
anyway thx for coding managesieve, i think bugs will went away as time goes by ( perhaps with new avelsieve etc )
Happy easter
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGGTuZfGH2AvR16oERAiGXAJ44ZWZ8w60qlVoum29aQ8gguh4PWQCcCEYp TAuMGWgD3IZaa7YzfeBagjk= =KMvK -----END PGP SIGNATURE-----
On Sun, 2007-04-08 at 16:10 +0200, Stephan Bosch wrote:
Robert Schetterer wrote:
Hi,ok setui above works using avelsieve squirrelmail plugin with managesieve dovecot latest (perhaps i shouldnt use 1.30 rc) as well there may be other problems between suse and quotawarn patches ) please see this just as info to help coders to debug
following problems in logs appear
/var/log/messages
9 04:51:41 suse10-2-vmware kernel: managesieve-log[2326]: segfault at 0000000000000000 rip 0000000000000000 rsp 00007fff8995b938 error 14
i have no idea where this comes from Hmm. That's not good.. what ever happens, dovecot(-managesieve) must never segfault. Maybe you could provide a core-dump. Btw, I don't really know what managesieve-log is supposed to be. Timo, any ideas?
Truncated managesieve-login most likely. Unfortunately it's really difficult to get login processes to produce core dumps. It's a lot easier to attach gdb into it while it's still running. First set:
login_process_per_connection = no login_processes_count = 1
Then you should have only one managesieve-login process. Then attach gdb into it:
gdb attach pidof managesieve-login
cont
Then wait for it to crash and then give "bt full" command.
/var/log/dovcot.info
dovecot: Apr 09 04:55:00 Info: IMAP(tester@example.de): Disconnected: Logged out dovecot: Apr 09 04:55:08 Info: managesieve-login: Login: user=<tester@example.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): Effective uid=1001, gid=1001 dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using active sieve script path: /usr/local/virtual/tester@example.de//.dovecot.sieve
( this line looks strange to me, but it musnt be false ) That looks very strange. Assuming you are not using the userdb to specify the SIEVE path (code directly borrowed from dovecot-sieve), 'the problem' seems to be that the home directory of tester@example.de ends in a /. By looking at dovecot's home_expand code I discovered this is not checked while expanding ~/.dovecot.sieve. However, linux/unix/POSIX (?) seems to be handling duplicate slashes as single ones, so it should work properly anyhow. But, maybe Timo is interested in making some cosmetic changes. :)
I do remove extra slashes in a couple of places, but here it's easier just to change userdb not to return the extra slashes. :) Anyway, like you said it should cause no problems.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Timo Sirainen schrieb:
On Sun, 2007-04-08 at 16:10 +0200, Stephan Bosch wrote:
Robert Schetterer wrote:
Hi,ok setui above works using avelsieve squirrelmail plugin with managesieve dovecot latest (perhaps i shouldnt use 1.30 rc) as well there may be other problems between suse and quotawarn patches ) please see this just as info to help coders to debug
following problems in logs appear
/var/log/messages
9 04:51:41 suse10-2-vmware kernel: managesieve-log[2326]: segfault at 0000000000000000 rip 0000000000000000 rsp 00007fff8995b938 error 14
i have no idea where this comes from Hmm. That's not good.. what ever happens, dovecot(-managesieve) must never segfault. Maybe you could provide a core-dump. Btw, I don't really know what managesieve-log is supposed to be. Timo, any ideas?
Truncated managesieve-login most likely. Unfortunately it's really difficult to get login processes to produce core dumps. It's a lot easier to attach gdb into it while it's still running. First set:
login_process_per_connection = no login_processes_count = 1
Then you should have only one managesieve-login process. Then attach gdb into it:
gdb attach
pidof managesieve-login
contThen wait for it to crash and then give "bt full" command.
/var/log/dovcot.info
dovecot: Apr 09 04:55:00 Info: IMAP(tester@example.de): Disconnected: Logged out dovecot: Apr 09 04:55:08 Info: managesieve-login: Login: user=<tester@example.de>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): Effective uid=1001, gid=1001 dovecot: Apr 09 04:55:08 Info: MANAGESIEVE(tester@example.de): sieve storage: Using active sieve script path: /usr/local/virtual/tester@example.de//.dovecot.sieve
( this line looks strange to me, but it musnt be false ) That looks very strange. Assuming you are not using the userdb to specify the SIEVE path (code directly borrowed from dovecot-sieve), 'the problem' seems to be that the home directory of tester@example.de ends in a /. By looking at dovecot's home_expand code I discovered this is not checked while expanding ~/.dovecot.sieve. However, linux/unix/POSIX (?) seems to be handling duplicate slashes as single ones, so it should work properly anyhow. But, maybe Timo is interested in making some cosmetic changes. :)
I do remove extra slashes in a couple of places, but here it's easier just to change userdb not to return the extra slashes. :) Anyway, like you said it should cause no problems. Thx Timo, i will wait for the new managesieve patch to do more testings, perhaps version dovecot stable 1 will be out there too
Mit freundlichen Gruessen Best Regards
Robert Schetterer
https://www.schetterer.org Munich/Bavaria/Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGG6pVfGH2AvR16oERAtY9AJ0T6aG4M+fu4d3fRPLRlwuMvs7liwCgiPYp Oj9jj0o/Nfv1ci++VNVu8BA= =bmSF -----END PGP SIGNATURE-----
Stephan Bosch wrote:
Hello dovecot users,
I have updated the MANAGESIEVE patch to fix the currently known small problems with the protocol implementation. It is designed for rc28, but also compiles cleanly with the current cvs branch_1_0.
Have fun testing the patch. Notify me when there are problems.
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
There is problem; after patch dovecot segfaults if you try to dump settings. file: ./src/master/master-stettings.c in "void master_setting_dump ..." const void *sets [4] const char *set_names[4] must be changed to: const void *sets [5] const char *set_names[5] after you added managesieve settings here, settings max count must be increased too:) -------- patch ------- # diff -r -u -N master-settings.c master-settings.c.new --- master-settings.c 2007-04-17 07:48:04.000000000 +0200 +++ master-settings.c.new 2007-04-19 18:33:02.000000000 +0200 @@ -1584,8 +1584,8 @@ void master_settings_dump(struct server_settings *set, bool nondefaults) { - const void *sets[4]; - const char *set_names[4]; + const void *sets[5]; + const char *set_names[5]; unsigned int count; sets[0] = &default_settings; --------------------- Uldis
participants (6)
-
"Andraž 'ruskie' Levstik"
-
Robert Schetterer
-
Stephan Bosch
-
Stephan Bosch
-
Timo Sirainen
-
Uldis Pakuls