Re: [exim] Weirdness when Exim calls SpamAssassin - how to d…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Andrew C Aitchison
Data:  
Para: exim-users
Assunto: Re: [exim] Weirdness when Exim calls SpamAssassin - how to debug?
On Wed, 30 Nov 2022, Adam Nielsen via Exim-users wrote:

> Hi all,
>
> I'm running into an issue with the way Exim 4.94.2 invokes
> SpamAssassin (SA).
>
> I have added some custom rules to SA, however when Exim invokes it, my
> custom rules are ignored.
>
> However if I use the "spamc" command to manually pass an e-mail into SA
> (or if I run SA from the command line) then my custom rules are picked
> up correctly.
>
> I originally thought this was a SA problem, however I am unable to
> reproduce the issue using SA tools, it is only when Exim calls SA that
> I see the problem.
>
> Is there any sort of test mode I can use to see how exactly Exim is
> passing the message to SA so I can further debug the problem? I've had
> a look through the command line docs and I can only see test modes for
> virus scanners, but nothing stands out for the spam checker.
>
> I'm specifying SA in the Exim config as:
>
> spamd_address = 127.0.0.1 783
>
> It runs correctly and the default rules are applied, with the e-mail
> being delivered with newly added spam headers, so everything appears to
> be working fine. I have added many custom rules in the past (with the
> same Exim config) and it has worked fine, it's just the latest custom
> rule I added only gets used when *I* call SA, not when Exim calls it,
> and I haven't been able to work out why.


Could there be something in your environment variables that is not or is
different in those of the exim user (or rather, the user that SA runs as
when started by exim) ?

Exim clears its environment unless you use keep_environment and/or
add_environment:
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html

-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew@???