Bug 117034 - strange error message Couldn't create "/var/spool/mail/pat"
strange error message Couldn't create "/var/spool/mail/pat"
Product: Fedora
Classification: Fedora
Component: procmail (Show other bugs)
i586 Linux
medium Severity low
: ---
: ---
Assigned To: Martin Stransky
Depends On:
  Show dependency treegraph
Reported: 2004-02-27 11:50 EST by Patrice Dumas
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-06 06:53:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Patrice Dumas 2004-02-27 11:50:32 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124

Description of problem:
I have a simple mail setup with fetchmail and procmail. procmail 
says that it cannot create a /var/spool/mail/pat (pat is the user
login), but it seems to me that it shouldn't try to make anything in
that file. Maybe it tries to make a lockfile in that directory ?
It is possible that the directories or files don't have the right
(Mail is drwx------)
Here is my files:

.fetchmailrc -rw-------:
poll imap.free.fr with proto imap
user 'pertusus' there with password '.....' is pat here
mda "/usr/bin/procmail -Y -d %T"

.procmailrc -rw-rw-r--:
# add as many INCLUDERC's as you like
# end of .procmailrc
* ^TO_fedora-devel-list
* ^TO_fedora-test-list

Here is the problem: I call fetchmail
[pat@localhost pat]$ fetchmail -d0
fetchmail: 4 messages (3 seen) for pertusus at imap.free.fr.
fetchmail: skipping message pertusus@imap.free.fr:1 not flushed
fetchmail: skipping message pertusus@imap.free.fr:2 not flushed
fetchmail: skipping message pertusus@imap.free.fr:3 not flushed
fetchmail: reading message pertusus@imap.free.fr:4 of 4 (2817 header
octets) ..fetchmail:  (421 body octets) .procmail: Couldn't create
fetchmail:  flushed

See the error message 'procmail: Couldn't create "/var/spool/mail/pat"'

The mail is delivered to the right directory.
Here is what is appended to my .procmail/log (showing everything is
From pat  Fri Feb 27 17:35:42 2004
 Subject: Where does Download Manager save files?
  Folder: fedora-test-list       

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. get mail with fetchmail redirecting to procmail and no

Actual Results:  everything was right, except that procmail said
procmail: Couldn't create "/var/spool/mail/pat"

Expected Results:  no such error message

Additional info:
Comment 1 Jens Petersen 2004-02-27 22:10:48 EST
/var/spool/mail should have permission drwxrwxr-x.
Comment 2 Patrice Dumas 2004-02-28 06:10:44 EST
[pat@localhost pat]$ ls -ld /var/spool/mail/
drwxrwxr-x  2 root mail 4096 fév 16 23:59 /var/spool/mail/
Comment 3 Jens Petersen 2004-06-23 00:05:36 EDT
Is this still a problem?
Comment 4 Patrice Dumas 2004-06-24 13:20:09 EDT
Yes. I have updated with yum, now I have
and still the same problem.
Comment 5 Martin Stransky 2005-01-06 06:53:14 EST
This issue occurs because procmail can't create default mailbox at
FC use procmail without S_ISUID, so you need create default mailbox
(/var/spool/mail/pat) or set rights of /var/spool/mail/ to drwxrwxrwx
or set S_ISUID for /usr/bin/procmail.
Comment 6 Patrice Dumas 2005-01-11 08:56:20 EST
I think this is really a bug, as there is no reason why procmail
should try to create the default mailbox /var/spool/mail/pat with a
setup like mine. Or maybe there is a reason? In my setup I explicitely
define my maildir to be something else than /var/spool/mail/pat:

Comment 7 Martin Stransky 2005-01-11 09:07:23 EST
Ok, I'll check it.
Comment 8 Martin Stransky 2005-01-12 07:26:27 EST
/var/mail/$LOGNAME is $ORGMAIL environment variable used by procmail
(path to system mailbox). It can be overridden, you have to set
$ORGMAIL and use -p and -m command line arguments for procmail.
Comment 9 Patrice Dumas 2005-01-15 05:30:57 EST
I tried to set ORGMAIL to nothing in my .procmailrc, but it doesn't
prevent procmail from trying to create /var/mail/dumas.
It doesn't change if I set it in the environment.
I cannot use -p, as I allready have -d on the command line. Indeed I
call procmail from fetchmail:

mda "/usr/bin/procmail -Y -d %T"

procmail dies with an error if I try to set -p with -d.

Anyway it is documented, from the man page:
                     system mailbox; both the system mailbox and  the
                     immediate  directory  it  is  in will be created
                     every time procmail starts and either one is not

Maybe this is a procmail "feature". I think that it should be possible
to prevent procmail from trying to mess with the system mail directory
when in pure user delivery mode more easily, but it is not a real
problem. Anyway I think it should not be closed as NOTABUG but WONTFIX
 or UPSTREAM. Not a big deal.

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