Thank you for your guidance Tjl.
So something like this is correct too?
### Filter Spams to $MAILDIR/spam
:0
* .*(pm0\.net|\
em5000\.net|\
postmasterdirect\.com|\
doubleclick\.net|\
vmware\.m0\.net|\
other\.domain\.com)
$MAILDIR/spam
--Moonshi
-----Original Message-----
From: procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE] On Behalf Of
Timothy J. Luoma
Sent: Wednesday, January 09, 2002 12:11 AM
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Forwarding of mails and keeping a copy locally
I am now advancing to "forward" my emails to another account via
"procmail". Am I right to do it the following way?
## Forward a copy of mails from these domains and keep a copy
locally
:0c:
* .*techtarget\.com|cisco-personal-updates(_at_)cisco\(_dot_)com
! any(_at_)domain(_dot_)com
Well, you defintely need to remove the blank line, and I
would put some header there (Like From: and maybe "return
path") and you need to put the domains in ( ) and I
personally prefer to put them one per line so you can add
other domains more easily, and it is more readable
Your current example does not need a local lockfile (the :
after the :0c).
So I would write it as:
:0c
* ^(From|Return-Path):.*(techtarget\.com|\
someotherdomainhere\.com|\
cisco-personal-updates(_at_)cisco\(_dot_)com)
! any(_at_)domain
If I were then going to put it in a special local folder, say
"ForwardedMessages" I would code it like this
:0
* ^(From|Return-Path):.*(techtarget\.com|\
someotherdomainhere\.com|\
cisco-personal-updates(_at_)cisco\(_dot_)com)
{
# Store a local copy first
:0c:
ForwardedMessages
# Forward
:0
! any(_at_)domain
}
(you could also do this other ways, this is just my
preference. For example I don't like the 'a' flag because I
find it more difficult to scan through my .procmailrc and
look at 'chunks' when I can't see bracketed sections
together. It also lets me comment things how I like to do so)
TjL
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail