procmail
[Top] [All Lists]

RE: Bypassing procmail for some emails

2009-04-09 06:32:16
Phill Edwards wrote Thursday, April 09, 2009 8:15:

[Dallman Ross wrote:   # please do not leave off attributions!]

 DROPPRIVS = y  # if run from /etc/procmailrc
 :0:
 * ^^From (_dot_)*(_at_)$HOST
 $DEFAULT

Ahhh...I may have a problem here. My procmail recipes deliver the
incoming emails to different folders under ONE account (which is
called maildb on my server) - and I set $DEFAULT to
/home/maildb/Maildir/. So if I use this recipe won't it just deliver
to maildb rather than, for example, root?


First of all, it's just a template recipe.  Change it as you desire.
Before we get into that, I hope you saw David Tamkin's correction to
my syntax, because it won't work without the dollar sign I left
off the condition line.  Should have been:

  * $ ^^From (_dot_)*(_at_)$HOST

(And the wish to nip in the bud continued propagation of such
errors is one of many reasons it's important not to leave out 
attributions when you quote text.)

By the way, now that I'm improving things, let's quote the var
in the condition:

  * $ ^^From (_dot_)*(_at_)$\HOST

That way if your host were named "inte.com" (which does exist, and pardon
the usage here), but somebody wrote to "intercom.com" (ditto),
there wouldn't be a mismatch.

We could go further and put a space boundary at the end:

  * $ ^^From (_dot_)*(_at_)$\HOST ()

(This is the From_ line that we're matching, so think of its syntax.)


Okay, now to your question.   I personally would not set DEFAULT
to the wrong place for individual users.  Why not create a var
called, e.g., BASEDEFAULT?  But using your situation, just tack
on whatever you want at the end.

 :0   # no lockfile; assumes directory-style delivery
 * $ ^^From (_dot_)*(_at_)$\HOST ()
 $DEFAULT/$USER


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