.procmailrc problem
am 21.09.2005 01:02:26 von Geoff Soper
Hi,
I have a recipe in my .procmailrc file which should take messages from
mailers that don't feature the string dave{anything!}@domain where
{anything} is just that and domain is the valid domain, add a X header
line and then forward it to dave.mailer@domain . This recipe is shown
below:
:0
* ^FROM_MAILER
* ! dave.*@domain
{
:0 f
| formail -A"X-Filtered: non-dave mailer "
:0
! dave.mailer@domain
}
However I've found more than one message in dave.mailer@domain as
illustrated below from a mailer but containing a string matching the
one that the recipe should exclude:
To: dave.mathmos@domain
From: mail @ mathmos.com
Subject: Mathmos Eclipse Launched at London Design Week
X-Filtered: non-dave mailer
Can anyone suggest what is wrong with my recipe that is causing it to
let these messages get diverted when they shouldn't?
Thanks,
Geoff
Re: .procmailrc problem
am 21.09.2005 15:45:11 von AK
Geoff Soper wrote:
> Hi,
> I have a recipe in my .procmailrc file which should take messages from
> mailers that don't feature the string dave{anything!}@domain where
> {anything} is just that and domain is the valid domain, add a X header
> line and then forward it to dave.mailer@domain . This recipe is shown
> below:
>
> :0
> * ^FROM_MAILER
> * ! dave.*@domain
> {
> :0 f
> | formail -A"X-Filtered: non-dave mailer "
>
> :0
> ! dave.mailer@domain
> }
>
> However I've found more than one message in dave.mailer@domain as
> illustrated below from a mailer but containing a string matching the
> one that the recipe should exclude:
>
> To: dave.mathmos@domain
> From: mail @ mathmos.com
> Subject: Mathmos Eclipse Launched at London Design Week
> X-Filtered: non-dave mailer
>
> Can anyone suggest what is wrong with my recipe that is causing it to
> let these messages get diverted when they shouldn't?
>
> Thanks,
> Geoff
>
Geoff,
Your recipe does not specifically reference to check only the recipient.
It checks any entry in the header
..* will match anything/everything
Try
:0
* ^FROM_MAILER
* !^TO_dave.+@domain
{
:0 f
| formail -A"X-Filtered: non-dave mailer "
:0
! dave.mailer@domain
}