Sieve extprograms ?not exexuting?

E.B. emailbuilder88 at yahoo.com
Mon Apr 27 18:55:54 UTC 2015


> > Debug-enabled log give me:
> > Apr 27 04:11:36 mail dovecot: lmtp(test at example.com): Debug:
> > qOGyA0DePHVaOyHEM/SpMA: sieve: action execute: running
> > program: test.sh
> > Apr 27 04:11:36 mail dovecot: lmtp(test at example.com): Debug:
> > waiting for program `/usr/local/etc/dovecot/sieve_globals/test.sh'
> > to finish after 0 seconds
> >
> > So I guess it thinks it is running my script? But simple test script
> > does nothing. Here it is:
> >
> > #!/bin/sh
> > read INPUT
> > INPUT="Hello world: $INPUT"
> > echo "$INPUT" >> /tmp/hello
> > echo "---------------------------" >> /tmp/hello
> >
> > Permissions on this script file for now are rwxrwxrwx
> > But nothing goes to /tmp/hello at all. Script works when I run it
> > manually. I also tried without the "read" but I think that's required
> > isn't it? Anyway, what else can I do to debug this?
> 
> Well, first try with a script that cannot fail (well most likely), e.g.:

I tried your script for fun, same result. Log showing
the script was called, but no output from the script.

I also deleted the script and made sure that debug
log showed that sieve could not find the script. Is it
chrooted or something weird?

I have confirmed it is being run by calling "exit 3" and
seeing in the log that "program ... terminated with
non-zero exit code 3" so problem is in commands
accessing the filesystem I guess. I added this:

echo "HELLO WORLD" 1>&2

And log shows "Error: HELLO WORLD"

So it's working but no filesystem access.
Calling from sieve script with:

execute :input "myinput" "test.sh";

Also tried

execute "test.sh";


More information about the dovecot mailing list