procmail
[Top] [All Lists]

RE: Nesting block: deliver to folder AND inbox?

2008-12-12 11:14:29
Klaus Johannes Rusch wrote Friday, December 12, 2008 4:39 PM:

Brett Charbeneau wrote:

:0
* ^List-Id:.*BROWN Alumni
{
        :0
        IN.Brown-Alumni

        :0
        /var/mail/brett
}

Only the first delivery recipe executes, if you want to continue 
processing you need the copy flag:

:0c
IN.Brown-Alumni

Klaus is correct -- but here there is another way I like better.
With directory delivery, procmail allows multiple delivery targets
on the action line.  It links them automatically.  This is cool,
for one because you can use it to create "legacy"-style procmail dirs
without having to ensure the dir existed already first.

bash-3.2$ cat rc
 :0
 foo/ bar


bash-3.2$ procmail -m VERBOSE=y rc < $SPAMPLE 
procmail: [10347] Fri Dec 12 16:48:06 2008
procmail: Assigning "MAILDIR=."
procmail: Rcfile: "rc"
procmail: Assigning "LASTFOLDER=foo/new/1229096886.10347_0.panix5.panix.com"
procmail: Linking to "bar/msg.EeEb"
From 8florenciae(_at_)cpdns(_dot_)net  Sat Nov 15 13:38:07 2008
 Subject: to dman
  Folder: foo/new/1229096886.10347_0.panix5.panix.com bar/msg.EeEb         1690

bash-3.2$ ls -l foo bar
bar:
total 4
-rw-------  2 dman  users  1690 Dec 12 16:48 msg.EeEb

foo:
total 12
drwx------  2 dman  users  4096 Dec 12 16:48 cur
drwx------  2 dman  users  4096 Dec 12 16:48 new
drwx------  2 dman  users  4096 Dec 12 16:48 tmp

Dallman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail