procmail
[Top] [All Lists]

Re: maildir

2002-04-26 15:43:20
Am I right that I can now remove `all' locking-colons 
(but the one or two that still copy-deliver to a file) 
and need to put a `/' behind all mailbox-names, 
and that is it?

Yes

Is it possible to have a single rc that can do both, 
like:

MailDir="/"
:0
* MailDir ?? "/"
{ Lock=":" }

:0 $Lock
* ^Subject: Make money fast
spam$MailDir

The idea is fine - a couple of the details are wrong.

First, your example is testing to see if $MailDir contains 'doublequote'
'slash' 'doublequote' when it just contains 'slash'.  You don't want
those double quotes on the condition line!

Secondly, and clearly you know this :-), you want to set $Lock to be ':'
only if $MailDir does *NOT* contain a slash!  Your example sets it when
$MailDir does contain a slash.

So you want something like:

    MailDir="/"
    :0
    * ! MailDir ?? /
    { Lock=":" }

    :0 $Lock
    * ^Subject: Make money fast
    spam$MailDir

Hope that helps,
Martin
-- 
Martin McCarthy                 /</    http://procmail.non-prophet.org
    `Procmail Companion'        \>\
     Addison Wesley             /</                  PGP key available
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • maildir, Ruud H.G. van Tol
    • Re: maildir, Martin McCarthy <=