procmail
[Top] [All Lists]

Re: Incorrect Resolution of $HOME Variable

2009-03-31 16:54:58
On 31-Mar-2009, at 14:22, James Butler wrote:
Procmail insists on going further by adding a nest of unused directories
within that active Maildir:

/home/user/Maildir/user = 700 <= nothing but Maildir in it
/home/user/Maildir/user/Maildir = 700 <= nothing but empty directories
/home/user/Maildir/user/Maildir/cur = 700 <= has no mail in it
/home/user/Maildir/user/Maildir/new = 700 <= has no mail in it
/home/user/Maildir/user/Maildir/tmp = 700 <= has no mail in it

/home/user on down are owned by user:USERGROUP.

This structure is very much like the output from 'procmail -v':

"Your system mailbox: $HOME/Maildir/user"


so procmail has the wrong system mailbox setting since the system mailbox should be $HOME/Maildir/ and not $HOME/Maildir/user.

You compiled this procmail, right?

you changed the value in both config.h and autoconf.h?

3) config.h:
#define DEFmaildir "$HOME/Maildir"

4) autoconf.h:
#define MAILSPOOLDIR "$HOME/Maildir/"

Why does one have a terminal slash and the other doesn't? Not that it matters, as I recall config.h is an OVERRIDE of autoconf.h. And pretty sure the absolute path needs a terminal /

OTOH, I went in and looked at config.h.  Did you read config.h?

/* This file previously allowed you to define SYSTEM_MBOX.  This has
changed. If you want mail delivery to custom mail-spool-files, edit the src/authenticate.c file and change the content of: auth_mailboxname() (either directly, or through changing the definitions in the same file
   of MAILSPOOLDIR, MAILSPOOLSUFFIX, MAILSPOOLHASH or MAILSPOOLHOME) */

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

So, I would try a compile with the following:

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

and see if that works.


--
I don't believe there's a power in the 'verse can stop
        Kaylee from bein' cheerful. Sometimes you just wanna
        duct-tape her mouth and dump her in the hold for a month.

____________________________________________________________
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