procmail
[Top] [All Lists]

Trying to redefine the system-wide mailbox

2004-09-28 08:35:32
Greetings.

This is a slightly different problem than what I can find in the list archives so please bear with me.

I am installing a new mail server for our group that is running RH Enterprise and uses procmail 3.22 as the local delivery agent. Procmail is compiled as usual to use /var/spool/mail as the system DEFAULT.

Our local setup, however, uses a mail spool that is in AFS. (Please, let's not get into whether that is a good thing or not. I would change it if I could. I don't think that it should make any difference for the purposes of this discussion).

The path to the users' mail spool is:

/afs/@cell/common/spool/mail/MailDirs/$logname/$logname

This means that I need DEFAULT set to:

/afs/@cell/common/spool/mail/MailDirs/$logname/

From what I have seen in the list archives and in the docs, there are two ways to do this:

- Set the value of DEFAULT in /etc/procmailrc (the "easy way");

- Recompile procmail with the correct path (the "safe, preferred way").

I tried the easy way first putting the following in /etc/procmailrc:

DEFAULT=/afs/@cell/common/spool/mail/MailDirs/$LOGNAME/
VERBOSE=on
LOGFILE=/tmp/procmail.log
LOG="Default reset"

[The last three lines for testing purposes]

I discovered that nothing went to the log file and procmail attempted to deliver to /var/mail/spool. It appears that procmail is ignoring this file. So, the first question is:

- Does procmail not process the /etc/procmailrc file when it is acting as the LDA?

Next I tried to recompile procmail. I downloaded the source from RH and after a bit of playing around with the values in autoconf and authenticate.c, I got the DEFAULT path set to /afs/@cell/common/spool/mail/MailDirs/. 'procmail -v' gives me:

procmail v3.22 2001/09/10
    Copyright (c) 1990-2001, Stephen R. van den Berg    <srb(_at_)cuci(_dot_)nl>
    Copyright (c) 1997-2001, Philip A. Guenther         
<guenther(_at_)sendmail(_dot_)com>

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()
Default rcfile:         $HOME/.procmailrc
        It may be writable by your primary group
Your system mailbox:    /afs/@cell/common/spool/mail/MailDirs/dsteiner

This almost works but I still need to add "/$logname". So, this leads me to the next question:

- Is there a way to make this happen using autoconf or by a "simple" modification of the code (I assume in authenticate.c)? Hacking the code on my own is a bit tough since my C skills are practically non-existent.

Any help or insights on this would be greatly appreciated.

-David-
--
David R. Steiner                               
david(_dot_)r(_dot_)steiner(_at_)dartmouth(_dot_)edu
UNIX System Manager                            Phone:  603.646.3127
Dartmouth College                              Fax:     603.646.1041

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>