Re: Lockfile / Write error whilst testing

Arthur Dent <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <1346007974.7125.16.camel@localhost>
On Sat, 2012-08-25 at 09:16 -0500, Robert Bonomi wrote:
{snip}

> >
> > What have I messed up?
> 
> wrong thing, wrong place.  <wry grin>
> 
> MAILDIR is where your 'system' inbox is to be found (typically '/var/mail',
> unless your're playing advanced games)  (DEFAULT, if not expliitly set,
> is usually, for mbox deliver, $MAILDIR/$USER)
> 
> DEFAULT is the path (for a -file-, if you're using 'mbox' type delivery)
> where mail is delivered if you fall off the end of .procmailrc.
> 
> It is *NOT* 'prefixed' to explicit delivery file names in the action
> 
> "As specified", procmail will try to deliver to $HOME (or possibly the
> current working directory in testbed runs), and subdirectories -under-
> $HOME  the action is 'dir/file'.
> 
> What you -probably- want to do is declare a variable, say 'DESTDIR'
> that is absolute path to the directory where everything goes -- per
> your example, it would be 'DESTDIR=$HOME/Proctest/Outfiles', and then
> use '$DESTDIR/Mlist/file', for example, in the delivery action.

Hello and thanks for helping!

The $DESTDIR trick certainly works, but I am a little confused. In Sean
B Straw's example sandbox
(http://www.professional.org/procmail/sandbox.html) he states in the
comments:
# IMPORTANT: this dir is different from where your regular procmailrc
# would deliver messages.  Your recipes should always avoid delivering to
# hard-coded paths - define directories using variables so that the paths
# can be changed external to the script.
MAILDIR=$HOME/.procmail/sandbox

This is why I set : MAILDIR=$HOME/Proctest in my sandbox.rc

I agree that DEFAULT should not really be relevant in this case. In
Sean's example sandbox he redefines DEFAULT to /dev/null because he is
not interested in messages that pass through the filters. In my case I
wanted to set it just so that I could see if something was happening (I
have since set it to /dev/null too).

Prior to my system crash I had often used Sean's sandbox for testing new
recipes. I never remember having to explicitly declare the delivery
destination before.

I am sure I have done something wrong - I just can't see it. In the
meantime I will continue to use the $DESTDIR trick in the recipes I am
testing.

Thanks again.

Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.