There is a bug in procmail-3.21-0.71 (RedHat) The MTA is configured to delivered mail into ~/Mailbox instead of /var/spool/mail/user_name .procmailrc has ORGMAIL=$HOME/Mailbox DEFAULT=$ORGMAIL set for this. The MTA is setup to start procmail with user's uid and groupid. When the file /var/spool/mail/user_name exists everything is OK, mail is delivered to ~/Mailbox and autoreply is sent. The file /var/spool/mail/user_name has 0 size. The problem is: when the file /var/spool/mail/user_name does not exist everything works OK (mail delivered and autoreply is sent), but an error message like this ================================================= This message was created automatically by mail delivery software (Exim). A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/usr/bin/procmail generated by jorg The following text was generated during the delivery attempt: ------ pipe to |/usr/bin/procmail generated by jorg ------ procmail: Couldn't create "/var/spool/mail/jorg" ------ This is a copy of the message, including all the headers. ------ =============================================== is sent. Everything is OK, mail is delivered, no any problem, but procmail because of some unknown reason still trying to open /var/spool/mail/user_name which it should not because of the configuration settings in .procmailrc Creation of 0 size file /var/spool/mail/user_name fixes the problem. This file stays 0 size because the mail is delivered to ~/Mailbox Nobody uses the file /var/spool/mail/user_name only because of some bug procmail is trying to open it. This seems to be a procmail bug related to some procmail's sanity checking on mailbox existence and permissions.
Extended log (with VERBOSE=on) This message was created automatically by mail delivery software (Exim). A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/usr/bin/procmail generated by jorg The following text was generated during the delivery attempt: ------ pipe to |/usr/bin/procmail generated by jorg ------ procmail: Couldn't create "/var/spool/mail/jorg" procmail: [5088] Mon Sep 3 13:49:00 2001 procmail: Match on ! "(^(Mailing-List:|Precedence:.*(junk|bulk|list)|To: Multiple recipients of |(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )([^>]*[^(.%@a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|m(mdf|ajordomo)|n?uucp|LIST(SERV|proc)|NETSERV|o(wner|ps)|r(e(quest|sponse)|oot)|b(ounce|bs\.smtp)|echo|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR|utoanswer))(([^).!:a-z0-9][-_a-z0-9]*)?[%@> ][^<)]*(\(.*\).*)?)?$([^>]|$)))" procmail: Match on ! "^X-Loop: jorg@gromco\.com" procmail: Match on ! "^From: .*nextcard\.com" procmail: Match on ! "^From: .*info@hoovers\.ymc0\.net" procmail: Assigning "LASTFOLDER= (/usr/bin/formail -rt \ -A"X-Loop: jorg" ; \ /bin/cat /home/jorg/message.txt) | $SENDMAIL -t" procmail: Locking "/home/jorg/Mailbox.lock" procmail: Assigning "LASTFOLDER=/home/jorg/Mailbox" procmail: Opening "/home/jorg/Mailbox" procmail: Acquiring kernel-lock procmail: Executing " (/usr/bin/formail -rt \ -A"X-Loop: jorg" ; \ /bin/cat /home/jorg/message.txt) | $SENDMAIL -t" procmail: Unlocking "/home/jorg/Mailbox.lock" procmail: Notified comsat: "jorg@38709589:/home/jorg/Mailbox" >From mal Mon Sep 03 13:49:00 2001 Subject: TEST2 Folder: /home/jorg/Mailbox 625 ------ This is a copy of the message, including all the headers. ------
At this time, the *ONLY* way to completely and correctly change procmail's idea if where users' mailspools are is to recompile procmail with the correct values. There are plans in works for changing that, but even then it won't be via the /etc/procmailrc file. For now, you'll need to download the source RPM and add the line #define MAILSPOOLHOME "/Mailbox" to either the config.h or src/authenticate.c file, then recompile and reinstall.
DEFAULT=/home/foo/bar/Mailbox works for me, although a complete solution will require a recompile as stated by the author. This will hopefully be changed in a later version of procmail, which we will innclude when ready.