On Tue, Dec 21, 2004 at 07:17:12AM +0100, Ruud H.G. van Tol wrote:
Toen wij Adam Bogacki kietelden, kwam er dit uit:
I've put DROPPRIVS at the top of both
/etc/procmailrc and $HOME/.procmailrc and
tried both
DROPPRIVS is only useful in /etc/procmailrc,
because in the user's .procmailrc only the
user's rights count (special circumstances
ignored).
One such special circumstance being, what if the
user with elevated privs specifically calls the regular
user's rcfile as an INCLUDERC or SWITCHRC?
(And I'm not sure if elevated privs endure past a
SWITCHRC command, though I am sure they do for
INCLUDERC.)
This is just an aside not to do with Adam's case.
LOGFILE=$MAILDIR/.procmaillog
LOGFILE=$HOME/procmail.log
These are different. The first (starting with a dot,
so don't forget to use -a with ls when you look
for it) is in ~/Mail/, the second in ~/.
That may well be why he didn't find it. Good thinking.
You could put a
LOG = "$_ u:$LOGNAME h:$HOME m:$MAILDIR$NL"
early (but after setting LOGFILE) in both .etc/procmailrc
and ~/.procmailrc, to create some log-output.
Here's something else to try.
Create an rcfile, which you can call "diags.rc" or whatever you want.
Here's what's in mine, which I put in /var/tmp/diag.rc:
---------------- cut here ----------------
save_LOGFILE = "$LOGFILE"
INCLUDERC = /etc/procmailrc
save_DEFAULT = "$DEFAULT"
DEFAULT = /dev/null # don't deliver our test messages to the real $DEFAULT
DUMMY=`env > /dev/tty`
---------------- cut here ----------------
Now run it, and watch the screen for the output. The line used
to run it is this:
procmail /var/tmp/diags.rc < /dev/null
I'll paste in my screen with output:
1:47pm [/var/tmp] 523[0]> procmail /var/tmp/diags.rc < /dev/null
TZ=Europe/Berlin
LOGNAME=dman
SHELL=/usr/local/bin/tcsh
HOME=/net/u/1/d/dman
PROCMAIL_VERSION=3.23pre+
SENDMAILFLAGS=-oi
SENDMAIL=/usr/sbin/sendmail
SHELLFLAGS=-c
MSGPREFIX=msg.
LOCKEXT=.lock
SHELLMETAS=&|<>~;?*[
HOST=panix5.panix.com
PATH=/net/u/1/d/dman/bin:/net/u/1/d/dman/bin:/bin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:.:/usr/local/contrib/bin
MAILDIR=/net/u/1/d/dman
save_LOGFILE=
INCLUDERC=/etc/procmailrc
TRASH=/dev/null
LINEBUF=16384
COMSAT=no
SADEFER=no
ORGMAIL=/net/u/1/d/dman/.maildir/
MSRETURN=0
save_DEFAULT=/net/u/1/d/dman/.maildir/
DEFAULT=/dev/null
HOSTTYPE=NetBSD
VENDOR=intel
OSTYPE=NetBSD
MACHTYPE=i386
SHLVL=1
PWD=/net/u/1/d/dman
USER=dman
GROUP=users
MAIL=/net/u/1/d/dman/.maildir/
ISP_PATH=/net/u/1/d/dman/bin:/bin:/usr/local/bin:/usr/bin
Notice the two save_WHATEVER values. One shows the system-set
$DEFAULT (which ought to match the value shown from running
"procmail -v" on the command line, unless your /etc/procmailrc
is resetting $DEFAULT). The other shows where your LOGFILE is.
I stuck that $save_LOGFILE in because the /etc/procmailrc here
doesn't set a logfile, so without my addition, we wouldn't
see anything representing the location of the logfile -- there
is none. (On systems where /etc/procmailrc sets a $LOGFILE,
that value will show up in the env list without the help
from $save_LOGFILE .)
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail