Re: [exim] Avoid blank lines of the spamassassin spam report

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Heiko Schlittermann
Date:  
À: exim-users
Sujet: Re: [exim] Avoid blank lines of the spamassassin spam report
Jorge Listas via Exim-users <exim-users@???> (Di 28 Jan 2020 16:57:27 CET):
> I have EXIM installed on my server and implemented the control antispam with
> SPAMASSASSIN, but all the spamassassin treatment it is done on an external
> server, so my exim receives the 3 variables with the results of that
> process: $spam_score, $spam_bar, $spam_report
>
> The $spam_report variable contains some blank lines (due to the
> configuration of the 10_default.conf template of the original spamassassin)
>
> the administrator of that system for details.
> -- BLANK LINE--
> Content preview:
> -- BLANK LINE--
> Content analysis details: (-1.0 points, 5.0 required)
> -- BLANK LINE--
> pts rule name description
> ---- ---------------------- ------------------------ --------------------------
> -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
>
> The problem I have is that some mail clients do not interpret correctly
> emails when there are blank lines in your header as in this case.
>
> Since the antispam treatment is done on a server external to mine, I cannot
> modify the template eliminating those blank lines.
>
> As a solution it occurs to me within the exim delete in the variable
> $spam_report blank lines, but ...
> a) I don't know if Exim allows to do it
> b) if exim allows to do it, I don't know how to do it ;(


I think, you'll have a line similar to

    add_header = X-SPAM-Report: $spam_report


Exim allows you to manipulate the report

    … = X-Spam-Report: ${sg{$spam_report}{\N^\s*$\N}{}}


** untested, but that's the way I'd take. See the spec.txt for the "sg"
operator.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -