I apologize for what seems should be an easy fix, but after many hours
of tweaking /etc/procmailrc, src/authenticate.h, config.h, etc, as well
as combing the mailing list archives, I'm lost as to a solution to this
problem...
I'd like to provide Maildir-based delivery for all users in
/var/spool/mail/u/s/username. This is to force all mail to be stored on
a single non-/home partition on the mailserver for quota checking and
backup purposes. I'm using the shipped Fedora Core 1 .src.rpm as a
basis, applying my own patch file to modify the files above as needed,
and creating a custom rpm for installation/deployment.
From what I'm able to tell, the appropriate settings in authenticate.c
would be:
#define MAILSPOOLDIR "/var/spool/mail/"
#define MAILSPOOLSUFFIX "/"
#define MAILSPOOLHASH 2
Contents/modes/owners of (hopefully) all relevant:
0770/root:mail - /var/spool/mail/
0755/root:root - /usr/bin/formail
2755/root:mail - /usr/bin/lockfile
0755/root:root - /usr/bin/mailstat
6755/root:mail - /usr/bin/procmail
/etc/procmailrc:
LOGFILE=/tmp/procmail.log
LOG="default is $DEFAULT
orgmail is $ORGMAIL
"
VERBOSE=ON
# send mail through SpamAssassin
:0 fw
* < 256000
| /usr/bin/spamc -f
# end /etc/procmailrc
Results from /tmp/procmail.log: (hostname/domain/username are
substituted as appropriate - extra care taken to ensure trailing
slashes, etc are correct!)
default is /var/spool/mail/u/s/username/
orgmail is /var/spool/mail/u/s/username/
procmail: [1489] Tue Mar 2 22:08:21 2004
procmail: Match on "< 256000"
procmail: Executing "/usr/bin/spamc,-f"
procmail: [1489] Tue Mar 2 22:08:22 2004
procmail: Assigning
"PATH=/home/username/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"
procmail: Unable to treat as directory "/var/spool/mail/u/s/username"
procmail: Locking "/var/spool/mail/u/s/username.lock"
procmail: [1489] Tue Mar 2 22:08:24 2004
procmail: Error while writing to
"/var/spool/mail/u/s/_RX.owURAB.hostname.domain"
procmail: Lock failure on "/var/spool/mail/u/s/username.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/u/s/username/"
procmail: Opening "/var/spool/mail/u/s/username/"
procmail: Error while writing to "/var/spool/mail/u/s/username"
procmail: Notified comsat: "username@:**Requeued**"
From root(_at_)hostname(_dot_)domain Tue Mar 2 22:08:21 2004
Subject: test
Folder:
**Requeued** 0
Messages then are banished to /var/spool/mqueue for periodic redelivery
attempts (and failures).
The process properly creates /var/spool/mail/u/s/username/[new cur tmp],
with ownership username:mail and mode 770. No files appear in those
directories after the delivery attempt.
When the package is compiled with the following defines: (MAILSPOOLDIR
is unchanged from above)
#define MAILSPOOLDIR "/var/spool/mail/"
#define MAILSPOOLSUFFIX ""
#define MAILSPOOLHASH 0
Delivery occurs to the mbox file /var/spool/mail/username with no
problems or errors, using the same /etc/procmailrc.
Thanks for your assistance. I greatly appreciate any insight you can
offer. If there is any useful information that I've left out, please
let me know.
-Phil Hagen
--
Phil Hagen <phil-procmail(_at_)identityvector(_dot_)com>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail