At a loss with antispan and imap_sieve

Aki Tuomi aki.tuomi at open-xchange.com
Mon Sep 21 11:21:45 EEST 2020


> On 21/09/2020 11:11 Bernardo Reino <reinob at bbmk.org> wrote:
> 
>  
> On Mon, 21 Sep 2020, Ferenc wrote:
> 
> > Thanks for your quick reply! I tried /tmp/debug.log, world-writeable, 
> > but no dice.
> >
> >> https://doc.dovecot.org/configuration_manual/howto/antispam_with_sieve
> >
> > I followed the setup here. I think it works up until the external script 
> > is called (pipe :copy "sa-learn-ham.sh"). That's why I tried echo hi >> 
> > /tmp/file. I guessed the scripts run as vmail, my virtual mail user, so 
> > I tried sudo -u vmail retrain.sh. This works. I can see the sieve script 
> > run in the log but my guess is the external script never runs. I'd like 
> > to try strace to see where things go when calling the external script 
> > but I don't know where to even start putting strace -o.
> 
> You may want to check your sieve_pipe_bin_dir setting in dovecot.conf.
> AFAIK the program/script you call via "pipe :copy ..." must be located in 
> the directory defined by sieve_pipe_bin_dir.
> 
> At least I remember having issues calling rspamc in my report-ham and 
> report-spam scripts, which was (apparently) solved after I set:
>  	sieve_pipe_bin_dir = /usr/bin
> 
> You can also use "debug_log" to output stuff from your sieve scripts into 
> the syslog (don't forget to require "vnd.dovecot.debug" though..)
> 
> Good luck.

It is not necessarely a good idea to use /usr/bin here... =)

Ferenc, are you using systemd? If so, then you will discover under /tmp some private temporary directories, one of them is for dovecot, and your debug log is probably under there.

If you want to strace, try

strace -ff doveadm exec imap -u username

Aki


More information about the dovecot mailing list