[Exim] Filter, expanding and $return_path?

Top Page
Delete this message
Reply to this message
Author: Marc Haber
Date:  
To: exim-users
Subject: [Exim] Filter, expanding and $return_path?
Hi!

I have the following filter file set up:

|mh-lists@torres[25/82]:/mnt/main6/home/mh-lists$ cat .forward
|# Exim filter <<== do not edit or remove this line!
|
|testprint "return_path == $return_path"
|if $return_path is "<canossa-bounce@???>" then
|        testprint "gf1.lists.canossa"
|        deliver "mh-lists-mbox"
|        save "mailboxes/gf1.lists.canossa"

|else
|        testprint "gf1.lists.unknown"
|        deliver "mh-lists-mbox"
|        save "mailboxes/gf1.lists.unknown"

|endif
|mh-lists@torres[26/83]:/mnt/main6/home/mh-lists$

Given the following message:
|mh-lists@torres[24/81]:/mnt/main6/home/mh-lists$ exim -bf .forward
|Return-path: <canossa-bounce@???>
|Envelope-to: mh-lists@???
|Delivery-date: Tue, 13 Jul 1999 21:30:52 +0200
|Received: from localhost ([127.0.0.1] ident=fetchmail)
|        by torres.gf1.internal with esmtp (Exim 3.02 #1)
|        id 1148GS-0007e8-00
|        for mh-lists@???; Tue, 13 Jul 1999 21:30:52 +0200

|Received: from mail.plannet.de
|        by localhost with POP3 (fetchmail-5.0.3)
|        for mh-lists@??? (single-drop); Tue, 13 Jul 1999 21:30:52 +0200

<snip>
|Message-Id: <199907131917.VAA29665@???>
|From: sender data snipped
|To: some-mailing-list
|
|Testing Exim filter file .forward
|
|Testprint: return_path == <canossa-bounce@???>
|Testprint: gf1.lists.canossa
| Deliver message to: mh-lists-mbox@???
| Save message to: mailboxes/gf1.lists.canossa

|Filter processing ended:
| Filtering set up at least one significant delivery or other action.
| No other deliveries will occur.

|mh-lists@torres[25/82]:/mnt/main6/home/mh-lists$

This looks fine while testing. However, when the message actually came
in (with this filter in place), it was placed into
mailboxes/gf1.lists.unknown instead of mailboxes/gf1.lists.canossa.

Trying "$header_return-path:" instead of "$return_path" doesn't work,
this doesn't expand.

What am I doing wrong?

Any hints will be appreciated.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29