Re: [exim] how exim parses multiple headers into variables

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Heiko Schlittermann
Data:  
Para: exim-users
Asunto: Re: [exim] how exim parses multiple headers into variables
Hi Marc,

> I have an interesting behavior of exim on Debian regarding multiply
> existing headers - but it also may be something really stupid.


I created two files from your message:

[eml]
> |From: Marc Haber <mh+eximbug201504@???>
> |To: Marc Haber <mh+eximbug201504@???>
> |Subject: Re: subject
> |X-Spam-Score: -4.2
> |X-Spam-Score: -4.4
> |
> |this is the message body


[f]
> |# Exim Filter
> |
> |headers add "${if !eq {$h_x-malware-found:}{}\
> |              {X-torres-Malware-Found: $h_x-malware-found:\n}{}}\
> |             ${if !eq {$h_x-spam-score:}{}\
> |              {X-torres-Spam-Score: $h_x-spam-score:\n}{}}\
> |             ${if !eq {$h_x-spam-report:}{}\
> |              {X-torres-Spam-Report: $h_x-spam-report:\n}{}}\
> |             ${if !eq {$h_x-spam-checker-version:}{}\
> |              {X-torres-Spam-Checker-Version: $h_x-spam-checker-version:\n}{}}\
> |             ${if !eq {$h_x-spam-status:}{}\
> |              {X-torres-Spam-Status: $h_x-spam-status:\n}{}}\
> |             ${if !eq {$h_x-spam-level:}{}\
> |              {X-torres-Spam-Level: $h_x-spam-level:\n}{}}\
> |             "
> |headers remove X-Malware-Found:X-Spam-Score:X-Spam-Report:X-Spam-Checker-Version:X-Spam-Status:X-Spam-Level
> |
> |headers add "${if !eq {$acl_m_malware_name}{}\
> |              {X-Malware-Found: $acl_m_malware_name\n}{}}\
> |             ${if !eq {$acl_m_spam_score}{}\
> |              {X-Spam-Score: $acl_m_spam_score\n}{}}\
> |             ${if !eq {$acl_m_spam_report}{}\
> |              {X-Spam-Report: $acl_m_spam_report\n}{}}\
> |            "


And then I ran

    exim -bF ./f <./eml


The result I got is:

    Exim version 4.80 #17 built 30-Apr-2015 13:48:07
    …
    heiko@jumper:~/src/exim/src$ ./build-Linux-x86_64/exim -C /dev/null -bF /tmp/f </tmp/eml 
    Return-path copied from sender
    Sender      = heiko@???
    Recipient   = heiko@???
    Testing Exim filter file "/tmp/f"


    Headers add "X-torres-Spam-Score: -4.2\n-4.4\n"
    Headers remove "X-Malware-Found:X-Spam-Score:X-Spam-Report:X-Spam-Checker-Version:X-Spam-Status:X-Spam-Level"
    Headers add ""
    Filtering did not set up a significant delivery.
    Normal delivery will occur.


From that perspective it looks as I would have expected it.
How does it look at your system?

    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 ------------ -