procmail
[Top] [All Lists]

Re: filtering mail for recipients only within certain domains

1999-09-13 22:13:16
On Mon, 13 Sep 1999, Eric Hagberg wrote:

eh> I've been trying to figure this one out, but can't seem to come up with
eh> a solution. Perhaps someone else out there has done this before...
eh> 
eh> Is there a way to get procmail to filter messages that only contain
eh> addresses in a particlar domain or domains, but not any others. For
eh> example, if I wanted to capture all messages that contained @aol.com or
eh> @hotmail.com, but no other domains in the recipient addresses, is this
eh> possible?
eh> 

  Not sure by what you mean by capturing, do you mean you want to only
receive mail from those addresses or do you want to not receive email from
those addresses?

  If you want to receive only those, try something like the following:

:0
* !^(From.|Received:).*(aol.com|hotmail.com)
/dev/null

  If you don't want to receive them, try the same without the exclamation
mark :/

-- 
     S.Toms - tomas(_at_)primenet(_dot_)com - http://www.primenet.com/~tomas
                S.u.S.E. Linux v6.1+ - Kernel 2.2.11

Human beings were created by water to transport it uphill.