Bug 190055 - procmail barks - Couldn't rename bogus "/var/mail/user" into "/var/mail/BOGUS.user.ifv
procmail barks - Couldn't rename bogus "/var/mail/user" into "/var/mail/BOGUS...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: procmail (Show other bugs)
5
All Linux
medium Severity high
: ---
: ---
Assigned To: Miroslav Lichvar
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-27 01:32 EDT by Doug Maxey
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-30 07:19:16 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)
procmail-use-real-fc-spool-dir.patch (385 bytes, patch)
2006-04-27 01:32 EDT, Doug Maxey
no flags Details | Diff

  None (edit)
Description Doug Maxey 2006-04-27 01:32:45 EDT
Description of problem:
For _every_ mail processed procmail now outputs a line the maillog
...Couldn't rename bogus "/var/mail/user" into "/var/mail/BOGUS.user.ifv

Apparently something has changed in procmail - AFAIK, all FC have used the
symlink from /var/mail -> /var/spool/mail without a hitch.

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

How reproducible:
100%

Steps to Reproduce:
1. setup .forward to call procmail
2. have any recipes in .procmailrc
3.
  
Actual results:


Expected results:
No error message.

Additional info:
Comment 1 Doug Maxey 2006-04-27 01:32:45 EDT
Created attachment 128284 [details]
procmail-use-real-fc-spool-dir.patch
Comment 2 Doug Maxey 2006-04-27 01:39:24 EDT
One other detail - This is with selinux disabled.  Which will be the subject of
another bug. 
Comment 3 Peter Vrabec 2006-05-11 08:33:58 EDT
Could you send your .forward and .procmailrc. 
Comment 4 Doug Maxey 2006-05-25 11:18:21 EDT
dunno, not much of interest in the config files.

Without the patch, _every_ time a message is received, and procmail is run, the
error message is emitted.  procmail on open looks at the path before other
processing.

=================================
==> /home/dwm/.forward <==
# $Id: .forward,v 1.1.1.1 2004/07/28 18:58:41 dwm Exp $
#
"|exec /usr/bin/procmail"

==> /home/dwm/.procmailrc <==
# -*-sh-*-
# $Revision: 1.134 $
# $Date: 2006/05/17 18:41:08 $
#
# NOTE: when dropping into a folder without rcvstore, i.e., foo/.
#       locking must _not_ be used!
#
###################################################################
# To use procmail, put the next line in .forward
# "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #coleman"
# The double quotes should not be removed.
# Your .forward needs to be world-readable, but not world-writable.
###################################################################
# This .procmailrc is written for use with mh/xmh/exmh
###################################################################
# rules are case insenitive unless D flag set.
###################################################################
# emacs regex to find missing '+' on refiles
# |\s-+$r\s-+[^+]
###########
# VARIABLES
###########
# VERBOSE = 'on'
SHELL     = '/bin/sh'
PATH      =
'/bin:/usr/bin:/usr/local/share:/usr/local/bin:/usr/local/nmh/lib:/usr/lib/nmh'
MAILDIR   = "$HOME/Mail"
LOGFILE   = "$MAILDIR/.logs/procmail.log"

notify = '/usr/lib/nmh/rcvtty'
r      = '/usr/lib/nmh/rcvstore'
f      = '/usr/bin/formail'

#
# discard dups.
# #
:0 Wh: msgid.lock
| $f -D 819200 msgid.cache

# # run vacation from here without marking as delivered. with null sender.
# :0 Wch: vacat.lock
...
| $r +HOT

#
# default -      + ? inbox
#
# and finally, if no other match...

:0 w: new-mail/$LOCKEXT
| $r +new-mail
==========================================
$ ll ~/.{forward,procmailrc}
-rw-r--r--  1 dwm dwm    84 Jul 28  2004 /home/dwm/.forward
-rw-r--r--  1 dwm dwm 22450 May 17 13:43 /home/dwm/.procmailrc
Comment 5 Miroslav Lichvar 2006-10-24 09:59:08 EDT
Is this still an issue? What are the permissions of /var/mail/user?
Comment 6 Doug Maxey 2006-10-24 13:13:57 EDT
(In reply to comment #5)
> Is this still an issue? What are the permissions of /var/mail/user?

After patching procmail, it's not an issue.

Have never touched the directory perms.

$ ll -d /var/mail
lrwxrwxrwx 1 root root 10 Mar 27  2006 /var/mail -> spool/mail/
$ ll -d /var/spool/mail
drwxrwxr-x 2 root mail 4096 Oct 24 04:02 /var/spool/mail/
le or directory
$ ll /var/spool/mail
total 1152
-rw-rw---- 1 dwm   mail      0 Mar 28  2006 BOGUS.dwm.Sfv
-rw------- 1 dwm   mail 215607 Mar 28  2006 BOGUS.dwm.Ufv
-rw------- 1 dwm   mail      0 Apr 20  2006 BOGUS.dwm.Yfv
-rw------- 1 brian mail   1179 Jul 18 10:21 brian
-rw------- 1 dwm   mail 114817 Apr 24  2006 dwm
-rw------- 1 root  root 805002 Oct 24 04:02 root

And with the context -
$ ll -dZ /var/mail
lrwxrwxrwx  root root system_u:object_r:mail_spool_t:s0 /var/mail
$ ll -dZ /var/spool/mail
drwxrwxr-x  root mail system_u:object_r:mail_spool_t:s0 /var/spool/mail/
$ ll -Z /var/spool/mail
-rw-rw----  dwm   mail system_u:object_r:mail_spool_t:s0 BOGUS.dwm.Sfv
-rw-------  dwm   mail system_u:object_r:mail_spool_t:s0 BOGUS.dwm.Ufv
-rw-------  dwm   mail system_u:object_r:mail_spool_t:s0 BOGUS.dwm.Yfv
-rw-------  brian mail                                  brian
-rw-------  dwm   mail system_u:object_r:mail_spool_t:s0 dwm
-rw-------  root  root root:object_r:mail_spool_t:s0    root
$

Comment 7 Miroslav Lichvar 2006-10-24 13:30:46 EDT
Hm, the permissions look ok.

Can you please send me strace of the original procmail?
Just change .forward to something like "|exec strace -o/tmp/procmail.strace
/usr/bin/procmail" and add a link to /etc/smrsh.
Comment 8 Miroslav Lichvar 2007-08-30 07:19:16 EDT
Ok, the path is changed to /var/spool/mail since Fedora 7. I'm still not sure
how this could be related to the error messages, but closing for now.

Please reopen if you still get the error messages.
Comment 9 Doug Maxey 2007-09-15 13:55:05 EDT
Yup, it seems to be fixed.

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