need help with procmail rule

need help with procmail rule

am 17.05.2006 18:21:47 von Charlie White

I have a email acount that has procmail as the filter. I would like to
make a rule that allows only 2 possible email address to email into that
account. I would like to /dev/null everything else. I have tried a bunch
of things but nothing has been successful.

Any help would be appreciated.

C.A.White

Re: need help with procmail rule

am 17.05.2006 20:41:16 von Alan Clifford

On Wed, 17 May 2006, Charlie White wrote:

CW> I have a email acount that has procmail as the filter. I would like to
CW> make a rule that allows only 2 possible email address to email into that
CW> account. I would like to /dev/null everything else. I have tried a bunch
CW> of things but nothing has been successful.
CW>
CW> Any help would be appreciated.
CW>

:0
* ! ^from:[ ]*(firstaddress@example\.com|secondaddress@somewhere\.exampl e)
/dev/null

Note that it is a space and a tab between the square brackets.

There is a complication. The mail might not be from the address it says
it is from in the "from:" header. Come back if that is a problem

Alternatively, you could use:

:0
* ! ^from:[ ]*firstaddress@example\.com
{
:0
* ! ^from:[ ]*secondaddress@somewhere\.example
/dev/null
}



--
Alan

( If replying by mail, please note that all "sardines" are canned.
There is also a password autoresponder but, unless this a very
old message, a "tuna" will swim right through. )