[Dovecot] Deliver die if global sieve script turn on
In my installation "deliver" die if global sieve script turn on. Is there anything I have missed? Thanks..
Flex 2.5.33 Dovecot 1.0.rc29 postfix 2.3.8
In maillog: Apr 3 13:29:58 minigrass postfix/pipe[24691]: CA194121BC5: to=xxx@yyy.com, relay=dovecot, delay=0.24, delays=0.14/0.01/0/0.09 , dsn=5.3.0, status=bounced (Command died with status 2: "/usr/libexec/dovecot/deliver". Command output: input in flex scanner failed )
In master.cf : dovecot unix - n n - - pipe flags=DRhu user=dovecot:dovecot argv=/usr/libexec/dovecot/deliver -d ${recipient} -n
in dovecot.conf: mail_plugins = cmusieve quota global_script_path = /home/mail/sieve/global
in /home/mail/sieve/global/dspam.sieve require "fileinto"; if header :is ""X-DSPAM-Result" "Spam" { fileinto "Spam"; }
Regards
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 3 Apr 2007, M1 wrote:
In my installation "deliver" die if global sieve script turn on. Is there anything I have missed? Thanks..
The error message: "input in flex scanner failed" Your Sieve script is syntactically wrong,
require "fileinto"; if header :is ""X-DSPAM-Result" "Spam" { ^^^^^^^^^^^^^^^^^^^^^ I'd bet here, the two double quotes.
fileinto "Spam"; }
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBRhNPLS9SORjhbDpvAQK++Af/fgcImdUHkm1bEeTtWOkxVmep+oLk2Rd/ DyC4cuY4AwMBhaoeVd9FEGVrfCM63MVH0st2y9OJKqbcBxCxodjNn2G1YMb/vuNv JzLi6gGJVrqRjCjgZMbSf1mj3GzaNPSVBE2ebt9gF+p8AkyOdiqb1WrAW7I+qJLZ X8datms5M8zauz6ecPRXGleA89gRD6NOIi72CQZtsi1peKPZ/+RmpfAcgaxWLRiG 1GQz6gIc9nSVPur4nPTif04nLqCAQjXk89esioPwba6FDNRvzyd4t/KRkkcLZPab o673PYLpNLVue497mPcnFBdk0dw8fCTKq/WYSzKwWuWMHLVVjWRcMQ== =rObG -----END PGP SIGNATURE-----
No. Just typo in the post.
It does not work.
I have change the script to
require "fileinto";
if header :contains "Subject" "[Test]" {fileinto "Spam";}
Regards, Steve
"Steffen Kaiser" skdovecot@smail.inf.fh-bonn-rhein-sieg.de wrote in message news:Pine.LNX.4.64.0704040907100.10570@pc-2m63.inf.fh-bonn-rhein-sieg.de...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 3 Apr 2007, M1 wrote:
In my installation "deliver" die if global sieve script turn on. Is there anything I have missed? Thanks..
The error message: "input in flex scanner failed" Your Sieve script is syntactically wrong,
require "fileinto"; if header :is ""X-DSPAM-Result" "Spam" { ^^^^^^^^^^^^^^^^^^^^^ I'd bet here, the two double quotes.
fileinto "Spam"; }
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBRhNPLS9SORjhbDpvAQK++Af/fgcImdUHkm1bEeTtWOkxVmep+oLk2Rd/ DyC4cuY4AwMBhaoeVd9FEGVrfCM63MVH0st2y9OJKqbcBxCxodjNn2G1YMb/vuNv JzLi6gGJVrqRjCjgZMbSf1mj3GzaNPSVBE2ebt9gF+p8AkyOdiqb1WrAW7I+qJLZ X8datms5M8zauz6ecPRXGleA89gRD6NOIi72CQZtsi1peKPZ/+RmpfAcgaxWLRiG 1GQz6gIc9nSVPur4nPTif04nLqCAQjXk89esioPwba6FDNRvzyd4t/KRkkcLZPab o673PYLpNLVue497mPcnFBdk0dw8fCTKq/WYSzKwWuWMHLVVjWRcMQ== =rObG -----END PGP SIGNATURE-----
My investigation is it happened only if:
- global script is enable and a script file is existed.
- in a virtual user environment, "@" exist in "-d" parameter ("-d aaa@bbb.com") is passed to deliver.
There is no error if no "@" character passed to deliver or no global script in global script directory.
If the script is put in user home directory it works fine. Only if the script is put in global script directory have this problem. And there is no .err file in global script directory.
Regards, Steve
"Steffen Kaiser" skdovecot@smail.inf.fh-bonn-rhein-sieg.de wrote in message news:Pine.LNX.4.64.0704040907100.10570@pc-2m63.inf.fh-bonn-rhein-sieg.de...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 3 Apr 2007, M1 wrote:
In my installation "deliver" die if global sieve script turn on. Is there anything I have missed? Thanks..
The error message: "input in flex scanner failed" Your Sieve script is syntactically wrong,
require "fileinto"; if header :is ""X-DSPAM-Result" "Spam" { ^^^^^^^^^^^^^^^^^^^^^ I'd bet here, the two double quotes.
fileinto "Spam"; }
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBRhNPLS9SORjhbDpvAQK++Af/fgcImdUHkm1bEeTtWOkxVmep+oLk2Rd/ DyC4cuY4AwMBhaoeVd9FEGVrfCM63MVH0st2y9OJKqbcBxCxodjNn2G1YMb/vuNv JzLi6gGJVrqRjCjgZMbSf1mj3GzaNPSVBE2ebt9gF+p8AkyOdiqb1WrAW7I+qJLZ X8datms5M8zauz6ecPRXGleA89gRD6NOIi72CQZtsi1peKPZ/+RmpfAcgaxWLRiG 1GQz6gIc9nSVPur4nPTif04nLqCAQjXk89esioPwba6FDNRvzyd4t/KRkkcLZPab o673PYLpNLVue497mPcnFBdk0dw8fCTKq/WYSzKwWuWMHLVVjWRcMQ== =rObG -----END PGP SIGNATURE-----
On Tue, 2007-04-10 at 17:45 +0800, M1 wrote:
My investigation is it happened only if:
- global script is enable and a script file is existed.
- in a virtual user environment, "@" exist in "-d" parameter ("-d aaa@bbb.com") is passed to deliver.
There is no error if no "@" character passed to deliver or no global script in global script directory.
If the script is put in user home directory it works fine. Only if the script is put in global script directory have this problem. And there is no .err file in global script directory.
Does deliver have permissions to write to the global directory? There should be no difference between global and user scripts.
Hi Tim,
/etc/dovecot/sieve already chmod 777. Will it be possible a "flex" version problem?
Regards, Steve
In my log file....
Apr 16 12:11:17 mx amavis[27275]: (27275-01) FWD via SMTP: steve@abc.com -> steve@xyz.com, 250 2.6.0 Ok, id=27275-01, from MTA([127.0.0.1]:10026): 250 2.0.0 Ok: queued as C8D9B121BC7 Apr 16 12:11:17 mx deliver(steve@xyz.com): Loading modules from directory: /usr/lib64/dovecot/lda Apr 16 12:11:17 mx deliver(steve@xyz.com): Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so Apr 16 12:11:17 mx deliver(steve@xyz.com): Module loaded: /usr/lib64/dovecot/lda/lib90_cmusieve_plugin.so Apr 16 12:11:17 mx dovecot: auth(default): master in: USER 1 steve@xyz.com service=deliver Apr 16 12:11:17 mx dovecot: auth-worker(default): sql(steve@xyz.com): query: SELECT username as user, password, concat('maildir:storage=', quota) AS quota FROM mailbox WHERE username = 'steve@xyz.com' Apr 16 12:11:17 mx amavis[27275]: (27275-01) Passed CLEAN, [127.0.0.1] steve@abc.com -> steve@xyz.com, Message-ID: 20070416041032.F3A7E121BBA@mail.abc.com, mail_id: sKNtIl0ts3Hc, Hits: -, queued_as: C8D9B121BC7, 32341ms Apr 16 12:11:17 mx postfix/smtp[2575]: F3A7E121BBA: to=steve@xyz.com, relay=127.0.0.1[127.0.0.1]:10024, delay=52, delays=20/0.05/0.05/32, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=27275-01, from MTA([127.0.0.1]:10026): 250 2.0.0 Ok: queued as C8D9B121BC7) Apr 16 12:11:17 mx postfix/qmgr[920]: F3A7E121BBA: removed Apr 16 12:11:17 mx dovecot: auth(default): master out: USER 1 steve@xyz.com uid=8 gid=12 home=/home/mail/xyz.com/steve Apr 16 12:11:17 mx deliver(steve@xyz.com): auth input: steve@xyz.com Apr 16 12:11:17 mx deliver(steve@xyz.com): auth input: uid=8 Apr 16 12:11:17 mx deliver(steve@xyz.com): auth input: gid=12 Apr 16 12:11:17 mx deliver(steve@xyz.com): auth input: home=/home/mail/xyz.com/steve Apr 16 12:11:17 mx deliver(steve@xyz.com): maildir: data=/home/mail/xyz.com/steve/mail Apr 16 12:11:17 mx deliver(steve@xyz.com): maildir: root=/home/mail/xyz.com/steve/mail, index=/home/mail/xyz.com/steve/mail, control=, inbox= Apr 16 12:11:17 mx deliver(steve@xyz.com): cmusieve: Using sieve path: /etc/dovecot/sieve Apr 16 12:11:17 mx postfix/pipe[2588]: C8D9B121BC7: to=steve@xyz.com, relay=dovecot, delay=0.12, delays=0.06/0.01/0/0.05, dsn=5.3.0, status=bounced (Command died with status 2: "/usr/libexec/dovecot/deliver". Command output: input in flex scanner failed )
On Mon, 2007-04-16 at 12:17 +0800, M1 wrote:
Apr 16 12:11:17 mx postfix/pipe[2588]: C8D9B121BC7: to=steve@xyz.com, relay=dovecot, delay=0.12, delays=0.06/0.01/0/0.05, dsn=5.3.0, status=bounced (Command died with status 2: "/usr/libexec/dovecot/deliver". Command output: input in flex scanner failed )
I'm not sure if I should hate libsieve, flex or both, but this error message is horrible. I had no idea what it meant before looking at the sources. The code that produces it is in src/libsieve/sieve-lex.c:
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
So fread() fails, but it doesn't bother telling why. You could change the YY_FATAL_ERROR() to something like:
fprintf(stderr, "input in flex scanner failed: %s", strerror(errno));
That could give additional information. Although I've no idea why fread() would fail here.
On Mon, 2007-04-16 at 15:34 +0300, Timo Sirainen wrote:
Apr 16 12:11:17 mx postfix/pipe[2588]: C8D9B121BC7: to=steve@xyz.com, relay=dovecot, delay=0.12, delays=0.06/0.01/0/0.05, dsn=5.3.0, status=bounced (Command died with status 2: "/usr/libexec/dovecot/deliver". Command output: input in flex scanner failed )
I'm not sure if I should hate libsieve, flex or both, but this error message is horrible. I had no idea what it meant before looking at the sources. The code that produces it is in src/libsieve/sieve-lex.c:
Actually I'm guessing it's the one in sieve-lex.c. There's also the exact same code in addr-lex.c. You could put a bit different error string there which also prints the errno.
participants (3)
-
M1
-
Steffen Kaiser
-
Timo Sirainen