Re: [exim] unwanted indentation at add_header headers

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil Pennock
Ημερομηνία:  
Προς: Marten Lehmann
Υ/ο: exim users
Αντικείμενο: Re: [exim] unwanted indentation at add_header headers
On 2008-06-16 at 22:32 +0200, Marten Lehmann wrote:
> I have an acl_smtp_data ACL, which looks like this:
>
> warn    spam      = nobody:true
>          message   = $spam_report

>
> The spamd Server behind returns some additional headers, which I need
> for later evaluation within exim. After the ACL is called, the added
> header looks like this:
>
> X-purgate: Clean.AlmostEmpty
>     X-purgate-ID: 150741::080616222426-17C686C0-3F6C2A86/0-0/0-14
>     X-purgate-Ad: For more information about eXpurgate please visit 
> http://www.expurgate.net/

>
> But I want it to look like this:
>
> X-purgate: Clean.AlmostEmpty
> X-purgate-ID: 150741::080616222426-17C686C0-3F6C2A86/0-0/0-14
> X-purgate-Ad: For more information about eXpurgate please visit
> http://www.expurgate.net/
>
> How can I tell exim not to insert any indentations for this ACL?


When the SpamAssassin client code creates the $spam_report variable, it
manually inserts a \t after any \n which it finds. For most people in
most uses, sticking this into one header, this is the DWIM-ly correct
approach.

Try replacing $spam_report with ${sg{$spam_report}{\n\t}{\n}} -- this
should fix it.

Also, please note that since Exim 4.61 the use of "message" with "warn"
to add a header is deprecated as being confusing. The modern way is to
use the "add_header" modifier. Just change "message" to "add_header"
and you should be fine. (Provided that add_header comes after the
condition, as it does in your case).

Regards,
-Phil