[Dovecot] Deliver die if global sieve script turn on

Timo Sirainen tss at iki.fi
Mon Apr 16 15:34:53 EEST 2007


On Mon, 2007-04-16 at 12:17 +0800, M1 wrote:
> Apr 16 12:11:17 mx postfix/pipe[2588]: C8D9B121BC7: to=<steve at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070416/922d7a11/attachment.pgp 


More information about the dovecot mailing list