[Exim] filter problem

Pàgina inicial
Delete this message
Reply to this message
Autor: Paul Slootman
Data:  
A: exim-users
Assumpte: [Exim] filter problem
I had a message slip through my mailing lists filter (which separates
out the mailing list messages from my personal mail). I can't understand
why the filter doesn't do the right thing here. This is my filter
(minimized with some extra's to demonstrate):

----------------------------------------------------------------------
# Exim filter

if foranyaddress $header_x-mailing-list ( $thisaddress contains "debian-policy" )
then
    save Mail/debian-policy-A
elif foranyaddress $h_to ( $thisaddress contains "bugs.debian.org" )
then
    save Mail/bugs
else
    pipe /usr/bin/procmail
endif
----------------------------------------------------------------------


This is a message that demonstrates the problem:
----------------------------------------------------------------------
Subject: Bug#45561: PROPOSAL] tech-ctte: /usr/share/doc
X-Loop: owner@???
To: 45561@???
Date: Fri, 24 Sep 1999 01:16:18 +0100 (BST)
Message-Id: <E11UJ2A-0002Ab-00@polya>
From: Julian Gilbey <J.D.Gilbey@???>
X-Mailing-List: <debian-policy@???> archive/latest/6194
X-Loop: debian-policy@???

blabla
----------------------------------------------------------------------

This is what `exim -bf testfilter < message shows:
----------------------------------------------------------------------
Save message to: Mail/bugs
Filter processing ended:
Filtering set up at least one significant delivery or other action.
No other deliveries will occur.
----------------------------------------------------------------------

I would have expected it to have saved the message to
Mail/debian-policy-A as the X-Mailing-List header contains
"debian-policy"... (I know that the foranyaddress construct is overkill
here, but in the original I was matching also against To and Cc).

I put in the test for "bugs.debian.org" to demonstrate that the method
itself works, only not in this case... I used to match against X-Loop,
but for some reason this message has two X-Loop headers and exim
apparently matched against the first one.

Any ideas?

Paul Slootman
-- 
home:       paul@??? http://www.wurtel.demon.nl/
work:       paul@???       http://www.murphy.nl/
debian:     paul@???      http://www.debian.org/
isdn4linux: paul@???   http://www.isdn4linux.de/