0

i am trying to setup exim system filter, it should be skipped for certain recipients, but condition always fails:

Filter looks like:

# Exim filter
if foranyaddress $h_to: ( $thisaddress contains "lists.example.loc" )
    then
        finish
    elif $h_X-SIGN-ADDED: is not contains "yes"
    then
        headers add "X-SIGN-ADDED: yes"
        seen pipe "/etc/mailsystem/sign/sign.py $sender_address $recipients"
endif

my test.msg is

Message-ID: <[email protected]>
Date: Mon, 25 Jun 2012 12:39:18 +0400
From: Hikaru <[email protected]>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0
MIME-Version: 1.0
To: <[email protected]>
 Subject: 1
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 7bit

 1

And command to run testing is:

exim -bF exim.filter -f [email protected] -bfd lists.example.loc <test.msg

Why it always runs pipe to script? Thanks in advance

1 Answer 1

0

Seems to me, I found why it won't work: "foranyaddress" condition waits for list of addresses and won't work if there is only one recipient. So, if "To:" header will be expanded to several addresses everything would work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .