procmail
[Top] [All Lists]

mail directory hashing (WAS Re: procmail digest, Vol 1 #171 - 16 msgs )

2000-10-16 16:33:08
On Mon, 16 Oct 2000 guenther+procmail(_at_)gac(_dot_)edu wrote:

jello <jello(_at_)lava(_dot_)net> writes:
Well see the thing is that when I *do* have these values changed
(MAILSPOOLDIR set to /var/mail and MAILSPOOLHASH set to 2), procmail is
attempting to create a file in /var/spool/mail/a/r even though I've
changed the values already.

Really?  Can you show us the output of "procmail -v" for that binary?

Here it is (with snippet of src/authenticate.c following it):

# procmail -v
procmail v3.15 2000/08/25
    Copyright (c) 1990-1999, Stephen R. van den Berg    <srb(_at_)cuci(_dot_)nl>
    Copyright (c) 1999-2000, Philip A. Guenther         
<guenther(_at_)gac(_dot_)edu>

Submit questions/answers to the procmail-related mailinglist by sending
to:
        <procmail-users(_at_)procmail(_dot_)org>

And of course, subscription and information requests for this list to:
        <procmail-users-request(_at_)procmail(_dot_)org>

Locking strategies:     dotlocking, fcntl(), lockf()
Default rcfile:         $HOME/.procmailrc
Your system mailbox:    /var/spool/mail/r/o/root


src/authenticate.c snippet:

#ifndef MAILSPOOLDIR
#define MAILSPOOLDIR    "/var/mail/spool/"           /* watch the trailing
/ */
#endif
#ifndef MAILSPOOLSUFFIX
#define MAILSPOOLSUFFIX ""            /* suffix to force maildir or MH
style */
#endif
#ifndef MAILSPOOLHASH
#define MAILSPOOLHASH   2      /* 2 would deliver to
/var/spool/mail/b/a/bar */
#endif
/*#define MAILSPOOLHOME "/.mail"                      /* watch the leading
/ */
                                                  /* delivers to 
$HOME/.mail */



   procmail: Couldn't create "/var/spool/mail/a/r/arghya"
   procmail: Lock failure on "/var/mail/a/r/arghya.lock"
   procmail: Error while writing to "/var/mail/a/r/arghya" 550 5.0.0
   <arghya(_at_)mail(_dot_)blah(_dot_)com>... Can't create output

Now it *will* deliver to the correct directory if it already exists, but
if ti doesn't (or the permissions or wrong), then I'll get this message.
So why is it telling me that it couldn't create
/var/spool/mail/a/r/arghya, when I don't have that defined anywhere?  It's
potentially confusing.

You don't have an /etc/procmailrc or .procmailrc file that sets the
DEFAULT or ORGMAIL variables, do you?  If so, remove those assignments.

Actually I think it's working *because* I have the DEFAULT variable
defined a certain way:

# cat /home/1/jello/.procmailrc
PATH=$PATH:/bin:/usr/bin:/usr/local/bin 
        MAILDIR=/var/mail      #you'd better make sure it exists 
       DEFAULT=$MAILDIR/`echo $LOGNAME | sed 's;^\(\(.\)\(.\)\);\2/\3/\1;'
# files it away
        LOGFILE=$MAILDIR/from   #recommended

I comment it out and I get the same message as before:

   ----- Transcript of session follows -----
procmail: Couldn't create "/var/spool/mail/j/e/jello"
procmail: Error while writing to "/var/mail/from"
procmail: Lock failure on "/var/spool/mail/j/e/jello.lock"
procmail: Error while writing to "/var/spool/mail/j/e/jello"
550 5.0.0 <jello(_at_)shams(_dot_)vhsi(_dot_)com>... Can't create output


I recompiled (make install) to use /var/mail/ instead of /var/mail/spool/,
but it makes no difference there.  I do not have an /etc/procmailrc file
on the system currently.  The /var/mail/from file is giving me some grief,
but I think that's just a poor permission on it (and therefore not part of
the problem?).

So after the recompile I get:

# procmail -v
procmail v3.15 2000/08/25
    Copyright (c) 1990-1999, Stephen R. van den Berg    <srb(_at_)cuci(_dot_)nl>
    Copyright (c) 1999-2000, Philip A. Guenther         
<guenther(_at_)gac(_dot_)edu>

Submit questions/answers to the procmail-related mailinglist by sending
to:
        <procmail-users(_at_)procmail(_dot_)org>

And of course, subscription and information requests for this list to:
        <procmail-users-request(_at_)procmail(_dot_)org>

Locking strategies:     dotlocking, fcntl(), lockf()
Default rcfile:         $HOME/.procmailrc
Your system mailbox:    /var/spool/mail/r/o/root

(No difference (still /var/spool/mail) even though I've changed the
MAILSPOOLDIR setting to /var/mail/ in src/authenticate.c)

Am I missing something?  (Entirely possible...)

Chris
----

"You know what I'm gonna do?  I'm gonna take my foolish pride, get it on a
southbound freight and let it _ride_."
                                        The incomparable Tom Jones




_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail