At 16:19 -0700 02 Mar 2000, Benjamin Korvemaker <[EMAIL PROTECTED]> wrote:
> [delurk]
> err. I just saw a complex answer that made my head spin. Mine's a bit
> easier. I'm assuming you've got procmail already setup (or can figure
> it out).
> 
> #################################################################
> ### Wherever you normal re-direct non-spool mail.
> MAILDIR=Mail
> XXX=`date +%s`.$$.`hostname`

You should be able to use $HOST instead of `hostname`.

> # Set up a maildir for mutt
> MUTT=IN.mutt/new/$XXX
> :0:

Why are you having procmail use a lockfile?  Not having to use lockfiles
is one of the major benefits to maildir.  Besides, basically nothing
else will be using locking so it doesn't help.

> * ^TO_.*mutt
> $MUTT

This will do the writing directly to the new subdirectory, which is bad.
In most cases there won't be a problem, but it could cause lost mail in
some situations.  It's possible for procmail to be suspended between the
time it opens the file, and when it actually writes the message.  If
some other program tries to read the message during this time it will
see an empty file (or possibly just part of the message).  This is why
messages are supposed to be created in the tmp subdirectory, and moved
into new only after the whole message has been written.

-- 
Aaron Schrab     [EMAIL PROTECTED]      http://www.execpc.com/~aarons/
 You can bring any calculator you like to the midterm, as
 long as it doesn't dim the lights when you turn it on.
    -- Hepler, Systems Design 182

Reply via email to