Re: [exim] Problems testing (sieve) filter rules

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Pennock
Datum:  
To: Benjamin Podszun
CC: exim-users
Betreff: Re: [exim] Problems testing (sieve) filter rules
On 2008-02-07 at 21:04 +0100, Benjamin Podszun wrote:
> Okay, got that now. That basically means that I cannot easily test sieve
> rules based on the envelope address though, but I can do it manually
> somehow. Being naive about this stuff I imagined that I could take X
> sample messages from my inbox (which unfortunately differ in envelope to
> as well) and run them through the filter, checking if ben@mydomain ends up
> in another folder than ben@anotherdomain and it still works with putting
> list mails to ben@mydomain in a third folder. Some kind of "fully
> automated" test, asking exim "What would happen if this message would
> come in right now" without additional info.


Which address is the recipient? The one in the To: header? What if you
received it because you were CC'd? What if there are Resent-* headers?

If you had "envelope_to_add" and return_path_add" on the relevant
delivery router when the mail was received, then I'd use formail(1) from
the procmail suite to process the mail folder, extracting each mail in
turn and passing it to an external command ("formail -s") and then have
the relevant command be a short script which extracts the "Envelope_to:"
header, splits on the '@', extracts "Return-Path:", and then invokes
Exim for testing.

-Phil