procmail & matching ! addr?

procmail & matching ! addr?

am 25.10.2006 17:53:21 von dkoleary

Hey;

I'm trying to send anything sent to olearycomputers.com that doesn't say
dkoleary@olearycomputers.com to a different mail file. Will this
recipe do what I think it will?

:0
* ^To: .*@olearycomputers.com.*
* !^To: .*dkoleary@olearycomputers.com.*
${Badmin}

I'm hoping that will match anything going to olearycomputers.com AND
anything that doesn't say dkoleary@olearycomputers.com...

Right?

Any info, greatly appreciated.

Doug

--

--------
Senior UNIX Admin
O'Leary Computer Enterprises
dkoleary@olearycomputers.com (w) 630-904-6098 (c) 630-248-2749
resume: http://www.olearycomputers.com/resume.html

Re: procmail & matching ! addr?

am 25.10.2006 23:45:58 von Troy Piggins

* Doug O'Leary wrote:
> Hey;
>
> I'm trying to send anything sent to olearycomputers.com that doesn't say
> dkoleary@olearycomputers.com to a different mail file. Will this
> recipe do what I think it will?
>
> :0

You haven't got a lockfile.

> * ^To: .*@olearycomputers.com.*

No need for the space after ':'; you should escape the '.' before
'.com' strictly speaking, because '.' matches any character and
the above recipe could match
'anything@olearycomputersacomsdlkfjsldkf'; and no need for the
trailing '.*' because that could match
'olearycomputers.comldkfsldjflksj'

> * !^To: .*dkoleary@olearycomputers.com.*

Ditto

> ${Badmin}
>
> I'm hoping that will match anything going to olearycomputers.com AND
> anything that doesn't say dkoleary@olearycomputers.com...

:0:
* ^To:.*@olearycomputers\.com
* !^To:.*dkoleary@olearycomputers\.com
${Badmin}

If you want to cover the situation where recipients are cc'd, use
TO_ macro in lieu of To:

:0:
* ^TO_.*@olearycomputers\.com
* !^TO_.*dkoleary@olearycomputers\.com
${Badmin}

--
Troy Piggins
,-o email address works for a limited time only
o ) Ubuntu linux 6.06 http://ubuntu.com RLU#415538 http://counter.li.org
`-o uptime: 07:39:06 up 22 days,34 min,2 users,load average:0.01,0.00,0.00