Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Edgar Fuß schreef: Oh yes sorry, indeed ./configure generates dovecot-config.in from dovecot-config.in.in (been a while since I looked at this). Upon executing 'make' it is transformed into the definitive dovecot-config using the following make rule (Makefile.am in top Dovecot source dir): Yes, after (pkgsrc) make build it's there. For compilation of these tools and the testsuite, the fully built sources are needed because the Dovecot static libraries are linked But these are all in .../lib/dovecot (/usr/pkg/lib/dovecot, in my case), aren't they? Normally, the Dovecot libraries are not installed (just compiled in to the various executables). Unless something was changed in the Makefile structure, that is still the case at your end. But, I have no experience with BSD or pkgsrc whatsoever, so I really wouldn't know for sure. If you care only for the Sieve plugin, this should not not matter. I'm mostly after the plugin. BTW, I am wondering: did you do exactly the same for the old cmusieve before? And you didn't encounter any problems? With cmusieve, $dovecotdir pointed to .../lib/dovecot, not the source tree. I have re-enabled the support for compiling dovecot-libsieve against Dovecot headers: http://hg.rename-it.nl/dovecot-libsieve/rev/36e00217bdd2 From what I've understood from you thus far, this should give you the ability to compile it again as you did before with cmusieve. Regards, -- Stephan Bosch [EMAIL PROTECTED]
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
> Oh yes sorry, indeed ./configure generates dovecot-config.in from > dovecot-config.in.in (been a while since I looked at this). Upon > executing 'make' it is transformed into the definitive dovecot-config > using the following make rule (Makefile.am in top Dovecot source dir): Yes, after (pkgsrc) make build it's there. > For compilation of these tools and the testsuite, the fully built sources > are needed because the Dovecot static libraries are linked But these are all in .../lib/dovecot (/usr/pkg/lib/dovecot, in my case), aren't they? > If you care only for the Sieve plugin, this should not not matter. I'm mostly after the plugin. > BTW, I am wondering: did you do exactly the same for the old cmusieve > before? And you didn't encounter any problems? With cmusieve, $dovecotdir pointed to .../lib/dovecot, not the source tree.
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Edgar Fuß wrote: Dovecot needs to be compiled first for this to work. Yes, of course. If Dovecot is compiled, Dovecot's top source directory should contain the dovecot-config file (as explained below). Strange that it is missing at your end. The dovecot-config file is produced upon executing ./configure. Not with me. I get a dovecot-config.in generated from dovecot-config.in.in during configure and a .../lib/dovecot/dovecot-config installed during install. Oh yes sorry, indeed ./configure generates dovecot-config.in from dovecot-config.in.in (been a while since I looked at this). Upon executing 'make' it is transformed into the definitive dovecot-config using the following make rule (Makefile.am in top Dovecot source dir): dovecot-config: dovecot-config.in Makefile cat dovecot-config.in | sed \ -e "s|^moduledir=|moduledir=$(moduledir)|" \ -e "s|^dovecot_incdir=|dovecot_incdir=$(pkgincludedir)|" > dovecot-config So, if you are pointing dovecot-sieve's --with-dovecot to a completely built Dovecot source tree, it should find the dovecot-config file. If it is missing for some reason or you do not want to build dovecot completely, executing 'make dovecot-config' in the dovecot source tree should produce the dovecot-config file. However, as I explain below, a fully built Dovecot source tree is currently necessary to build the Sieve package. This is no different from the old cmusieve plugin. In pkgsrc, this was always built against headers only. I can change this for the next release Would probably be nice. I'll give it a look. Btw: What exactly does your sieve need dovecot sources for? It looks a bit hard to get this done correctly with pkgsrc. Do you just need an unpacked (patched?) source or does it have to be configured? The sources are needed to build the command line tools like sievec, sieved and sieve-test. Also the testsuite needs it. So, if I change the package to allow building against the bare headers, these things cannot be compiled. For compilation of these tools and the testsuite, the fully built sources are needed because the Dovecot static libraries are linked into these binaries. If you care only for the Sieve plugin, this should not not matter. BTW, I am wondering: did you do exactly the same for the old cmusieve before? And you didn't encounter any problems? Regards, Stephan.
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
> Dovecot needs to be compiled first for this to work. Yes, of course. > The dovecot-config file is produced upon executing ./configure. Not with me. I get a dovecot-config.in generated from dovecot-config.in.in during configure and a .../lib/dovecot/dovecot-config installed during install. > This is no different from the old cmusieve plugin. In pkgsrc, this was always built against headers only. > I can change this for the next release Would probably be nice. Btw: What exactly does your sieve need dovecot sources for? It looks a bit hard to get this done correctly with pkgsrc. Do you just need an unpacked (patched?) source or does it have to be configured?
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Edgar Fuß wrote: Finally, after little more than a year, I finished the first release of the new Sieve implementation for Dovecot. Great! I immediately tried to put this into pkgsrc, but ... The compilation procedure is identical to the cmusieve plugin (http://wiki.dovecot.org/LDA/Sieve). I cannot see how this part of configure [SNIP] is supposed to work. Either I point $dovecotdir to the source directory and get a complaint about a missing dovecot-config or I point it to the library directory and get a complaint that it can't compile against headers only. Dovecot needs to be compiled first for this to work. The dovecot-config file is produced upon executing ./configure. This is no different from the old cmusieve plugin. However, it does indeed currently not allow you to build against dovecot headers only. I can change this for the next release, but then the sieve tools and the testsuite will not be compiled. Regards, Stephan
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
> Finally, after little more than a year, I finished the first release of > the new Sieve implementation for Dovecot. Great! I immediately tried to put this into pkgsrc, but ... > The compilation procedure is identical to the cmusieve plugin > (http://wiki.dovecot.org/LDA/Sieve). I cannot see how this part of configure if ! test -f "$dovecotdir/dovecot-config"; then echo echo "dovecot-config not found from $dovecotdir, use --with-dovecot=PATH" echo "to give path to compiled Dovecot sources or to a directory with the" echo "installed dovecot-config file." AC_MSG_ERROR([dovecot-config not found]) fi if test -d "$dovecotdir/src"; then # compiling against sources have_dovecot_libs=yes else # compiling against installed headers echo echo "Cannot compile against the installed headers only." AC_MSG_ERROR([dovecot-source not found]); fi is supposed to work. Either I point $dovecotdir to the source directory and get a complaint about a missing dovecot-config or I point it to the library directory and get a complaint that it can't compile against headers only.
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Thank you Timo, it was my mistake. In 'plugin {}' section line 'sieve = /var/sievescripts/%n/sieve' worked for both cmusieve and sieve plugins. Command 'fileinto "INBOX/foo/bar"' with private namespace configuration you proposed - also worked in both plugins. I suspected that they have different behavior: cmusieve saved message into INBOX/foo/bar, while sieve - into foo/bar as in the deliver log I'm pasting here. But both messages were filed into the same mail folder. Difference in the logging, I think, is not a big problem. --- ls -l Maildir/.foo.bar/new total 8 -rw--- 1 seriv seriv 513 Oct 30 01:57 1225331850.M790093P1351.sisyphus.office.omniti.com,W=526 -rw--- 1 seriv seriv 518 Oct 30 01:59 1225331966.M468658P1400.sisyphus.office.omniti.com,W=531 tail -n 18 /var/log/deliver/dovecot-deliver.log --- deliver(seriv): Oct 30 01:57:30 Info: Loading modules from directory: /usr/lib64/dovecot/modules/lda/ deliver(seriv): Oct 30 01:57:30 Info: Module loaded: /usr/lib64/dovecot/modules/lda//lib90_cmusieve_plugin.so deliver(seriv): Oct 30 01:57:30 Info: Namespace: type=private, prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes deliver(seriv): Oct 30 01:57:30 Info: maildir: root exists (/home/seriv/Maildir) deliver(seriv): Oct 30 01:57:30 Info: maildir++: root=/home/seriv/Maildir, index=, control=, inbox=/home/seriv/Maildir deliver(seriv): Oct 30 01:57:30 Info: cmusieve: Using sieve path: /var/sieve-scripts/seriv.sieve deliver(seriv): Oct 30 01:57:30 Info: cmusieve: Executing script /var/sieve-scripts/seriv.sievec deliver(seriv): Oct 30 01:57:30 Info: Namespace INBOX/: Using permissions from /home/seriv/Maildir: mode=0644 gid=-1 deliver(seriv): Oct 30 01:57:30 Info: msgid=<[EMAIL PROTECTED]>: saved mail to INBOX/foo/bar deliver(seriv): Oct 30 01:59:26 Info: Loading modules from directory: /usr/lib64/dovecot/modules/lda/ deliver(seriv): Oct 30 01:59:26 Info: Module loaded: /usr/lib64/dovecot/modules/lda//lib90_sieve_plugin.so deliver(seriv): Oct 30 01:59:26 Info: Namespace: type=private, prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes deliver(seriv): Oct 30 01:59:26 Info: maildir: root exists (/home/seriv/Maildir) deliver(seriv): Oct 30 01:59:26 Info: maildir++: root=/home/seriv/Maildir, index=, control=, inbox=/home/seriv/Maildir deliver(seriv): Oct 30 01:59:26 Info: sieve: using sieve path: /var/sieve-scripts/seriv.sieve deliver(seriv): Oct 30 01:59:26 Info: sieve: opening script /var/sieve-scripts/seriv.sieve deliver(seriv): Oct 30 01:59:26 Info: sieve: executing compiled script /var/sieve-scripts/seriv.sieve deliver(seriv): Oct 30 01:59:26 Info: sieve: msgid=<[EMAIL PROTECTED]>: stored mail into mailbox 'foo/bar' -- WBR, Sergey Ivanov. - "Timo Sirainen" <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-29 at 20:31 +0100, Stephan Bosch wrote: > > sergey ivanov schreef: > > > Hi Stephan, > > > Thank you for quick fix. I've built it (from changeset > > > 646:747107b816dc) and it looks like working with dovecot-1.2. > > > I'm doing some testing before put it into Sisyphus repository > > > (http://en.altlinux.org). > > > What I saw - it does not recognize lines like: > > > --- > > > sieve = /var/sievescripts/%n/sieve > > Is this inside protocol lda {} or plugin {}? In former it's not > supposed > to be expanded (shouldn't have been with cmusieve either), in latter > it > should be. > > > > where cmusieve did > > > --- > > > fileinto fileinto "Inbox/R/Commits"; > > > --- > > > this new plugin require changing slashes to dots: > > > --- > > > fileinto fileinto "Inbox.R.Commits"; > > With a namespace configuration like: > > namespace private { > separator = / > prefix = INBOX/ > inbox = yes > } > > And a script: > > require ["fileinto"]; > fileinto "INBOX/foo/bar"; > > It seems to work just fine: > > deliver(tss): Oct 30 00:04:36 Info: sieve: msgid=unspecified: stored > mail into mailbox 'foo.bar' > > Although it probably should use the full untranslated INBOX/foo/bar > name > when logging (same with deliver -m INBOX/foo/bar).
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Hi Stephan, I've tried dovecot-sieve cmusieve with at the same place. As I can see, both problems I've though to be in libsieve, actually are that of dovecot. Both plugins do not expand variables like %n, %h, %u. But just filename works, - if I've set --- sieve = sievescript --- then both have used ~/sievescript file, like: --- deliver(seriv): Oct 29 20:14:08 Info: sieve: using sieve path: /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: opening script /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: executing compiled script /home/seriv/sievescript --- Buth implementations don't work wihth slashes. I took a piece of sieve script from working installation of dovecot-1.1.2 with Maildirs, and here on dovecot-1.2-alpha3 I have default mail location with inbox as mbox in /var/spool/log/mail/ and Maildir in /home//Maildir. I should test cmusieve before reporting these as libsieve bugs, I'm sorry.
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Hi Stephan, I've tried dovecot-sieve cmusieve with at the same place. As I can see, both problems I've though to be in libsieve, actually are that of dovecot. Both plugins do not expand variables like %n, %h, %u. But just filename works, - if I've set --- sieve = sievescript --- then both have used ~/sievescript file, like: --- deliver(seriv): Oct 29 20:14:08 Info: sieve: using sieve path: /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: opening script /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: executing compiled script /home/seriv/sievescript --- Buth implementations don't work wihth slashes. I took a piece of sieve script from working installation of dovecot-1.1.2 with Maildirs, and here on dovecot-1.2-alpha3 I have default mail location with inbox as mbox in /var/spool/log/mail/ and Maildir in /home//Maildir. I should test cmusieve before reporting these as libsieve bugs, I'm sorry. -- WBR, Sergey. On Wed, Oct 29, 2008 at 3:31 PM, Stephan Bosch <[EMAIL PROTECTED]> wrote: > sergey ivanov schreef: >> >> Hi Stephan, >> Thank you for quick fix. I've built it (from changeset >> 646:747107b816dc) and it looks like working with dovecot-1.2. >> I'm doing some testing before put it into Sisyphus repository >> (http://en.altlinux.org). >> What I saw - it does not recognize lines like: >> --- >> sieve = /var/sievescripts/%n/sieve >> --- >> as cmusieve did. But it works ok with default .dovecot.sieve files in >> user home directories > > Hmm, I'll look into that. This is not intended and would be a bug. > >> Then, it reports >> --- >> error: failed to store into mailbox 'Inbox/R/Commits': Invalid mailbox >> name. >> --- >> where cmusieve did >> --- >> fileinto fileinto "Inbox/R/Commits"; >> --- >> this new plugin require changing slashes to dots: >> --- >> fileinto fileinto "Inbox.R.Commits"; > > This doesn't look like something that has changed for the Sieve > implementation specifically. Did you try dovecot-sieve-1.1 with dovecot 1.2 > to verify? I'll ask Timo about this. What is the configuration of your mail > store. Did you perhaps migrate from mbox to maildir? > >> I think this changes should be described somewhere. May be, it's >> already needed to create wiki page for libsieve at wiki.dovecot.org? > > Well, first one is probably a bug. The second one I am not sure about yet. > I'll get back to you when I do.
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
On Wed, 2008-10-29 at 20:31 +0100, Stephan Bosch wrote: > sergey ivanov schreef: > > Hi Stephan, > > Thank you for quick fix. I've built it (from changeset > > 646:747107b816dc) and it looks like working with dovecot-1.2. > > I'm doing some testing before put it into Sisyphus repository > > (http://en.altlinux.org). > > What I saw - it does not recognize lines like: > > --- > > sieve = /var/sievescripts/%n/sieve Is this inside protocol lda {} or plugin {}? In former it's not supposed to be expanded (shouldn't have been with cmusieve either), in latter it should be. > > where cmusieve did > > --- > > fileinto fileinto "Inbox/R/Commits"; > > --- > > this new plugin require changing slashes to dots: > > --- > > fileinto fileinto "Inbox.R.Commits"; With a namespace configuration like: namespace private { separator = / prefix = INBOX/ inbox = yes } And a script: require ["fileinto"]; fileinto "INBOX/foo/bar"; It seems to work just fine: deliver(tss): Oct 30 00:04:36 Info: sieve: msgid=unspecified: stored mail into mailbox 'foo.bar' Although it probably should use the full untranslated INBOX/foo/bar name when logging (same with deliver -m INBOX/foo/bar). signature.asc Description: This is a digitally signed message part
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
sergey ivanov schreef: Hi Stephan, Thank you for quick fix. I've built it (from changeset 646:747107b816dc) and it looks like working with dovecot-1.2. I'm doing some testing before put it into Sisyphus repository (http://en.altlinux.org). What I saw - it does not recognize lines like: --- sieve = /var/sievescripts/%n/sieve --- as cmusieve did. But it works ok with default .dovecot.sieve files in user home directories Hmm, I'll look into that. This is not intended and would be a bug. Then, it reports --- error: failed to store into mailbox 'Inbox/R/Commits': Invalid mailbox name. --- where cmusieve did --- fileinto fileinto "Inbox/R/Commits"; --- this new plugin require changing slashes to dots: --- fileinto fileinto "Inbox.R.Commits"; This doesn't look like something that has changed for the Sieve implementation specifically. Did you try dovecot-sieve-1.1 with dovecot 1.2 to verify? I'll ask Timo about this. What is the configuration of your mail store. Did you perhaps migrate from mbox to maildir? I think this changes should be described somewhere. May be, it's already needed to create wiki page for libsieve at wiki.dovecot.org? Well, first one is probably a bug. The second one I am not sure about yet. I'll get back to you when I do. PS: please reply to the mailing list as well. Your problems and solutions may interest others as well. Regards, -- Stephan Bosch [EMAIL PROTECTED]
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
[EMAIL PROTECTED] schreef: Hi Stephan, I had a problem while compiling 0.1.0 libsieve with gcc3.4. --- /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments --- I propose a patch: Hmm, you are right. Not sure why Gcc 4.3 does not complain about this. I also forgot O_TRUNC over there. FIXED: http://hg.rename-it.nl/dovecot-libsieve/rev/8dcba4f38a67 Thnx, -- Stephan Bosch [EMAIL PROTECTED]
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Hi Stephan, I had a problem while compiling 0.1.0 libsieve with gcc3.4. --- /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments --- I propose a patch: $ cat dovecot-1.2-libsieve-gcc34.patch diff -ur dovecot1.2-libsieve-v1.2.orig/src/sieve-bin/bin-common.c dovecot1.2-libsieve-v1.2/src/sieve-bin/bin-common.c --- dovecot1.2-libsieve-v1.2.orig/src/sieve-bin/bin-common.c2008-10-28 21:37:16 + +++ dovecot1.2-libsieve-v1.2/src/sieve-bin/bin-common.c 2008-10-28 21:24:57 + @@ -116,7 +116,7 @@ if ( strcmp(filename, "-") == 0 ) dumpstream = o_stream_create_fd(1, 0, FALSE); else { - if ( (dfd = open(filename, O_WRONLY | O_CREAT)) < 0 ) { + if ( (dfd = open(filename, O_WRONLY | O_CREAT, 0660)) < 0 ) { i_fatal("Failed to open dump-file for writing: %m"); exit(1); } diff -ur dovecot1.2-libsieve-v1.2.orig/src/testsuite/testsuite.c dovecot1.2-libsieve-v1.2/src/testsuite/testsuite.c --- dovecot1.2-libsieve-v1.2.orig/src/testsuite/testsuite.c 2008-10-28 21:37:16 + +++ dovecot1.2-libsieve-v1.2/src/testsuite/testsuite.c 2008-10-28 21:35:18 + @@ -119,7 +119,7 @@ if ( strcmp(filename, "-") == 0 ) dumpstream = o_stream_create_fd(1, 0, FALSE); else { - if ( (dfd = open(filename, O_WRONLY | O_CREAT)) < 0 ) { + if ( (dfd = open(filename, O_WRONLY | O_CREAT, 0660)) < 0 ) { i_fatal("Failed to open dump-file for writing: %m"); exit(1); } -- Sergey Ivanov. - "Stephan Bosch" <[EMAIL PROTECTED]> wrote: > Hello Dovecot users, > > Finally, after little more than a year, I finished the first release > of > the new Sieve implementation for Dovecot. [skip] > Have fun testing the new Sieve plugin. Don't hesitate to notify me > when > there are problems. > > Regards, > > -- > Stephan Bosch > [EMAIL PROTECTED] > IRC: Freenode, #dovecot, S[r]us