Bug 53104 - procmail is trying to open wrong file.
procmail is trying to open wrong file.
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: procmail (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-03 13:32 EDT by Need Real Name
Modified: 2007-04-18 12:36 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-03 20:07:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-09-03 13:32:29 EDT
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@gromco.com

The following text was generated during the delivery attempt:

------ pipe to |/usr/bin/procmail
       generated by jorg@gromco.com ------

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.
Comment 1 Need Real Name 2001-09-03 13:36:38 EDT
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@gromco.com

The following text was generated during the delivery attempt:

------ pipe to |/usr/bin/procmail
       generated by jorg@gromco.com ------

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@gromco.com" ; \
    /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@gromco.com" ; \
    /bin/cat /home/jorg/message.txt) | $SENDMAIL -t"
procmail: Unlocking "/home/jorg/Mailbox.lock"
procmail: Notified comsat: "jorg@38709589:/home/jorg/Mailbox"
>From mal@gromco.com 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. ------

Comment 2 Philip Guenther 2001-09-03 20:07:28 EDT
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.
Comment 3 Trond Eivind Glomsrxd 2001-09-05 12:51:39 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.