Bug 53104 - procmail is trying to open wrong file.
Summary: procmail is trying to open wrong file.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: procmail
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-03 17:32 UTC by Need Real Name
Modified: 2007-04-18 16:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-09-04 00:07:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-09-03 17:32:29 UTC
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.

Comment 1 Need Real Name 2001-09-03 17:36:38 UTC
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. ------



Comment 2 Philip Guenther 2001-09-04 00:07:28 UTC
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 16:51:39 UTC
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.