procmail
[Top] [All Lists]

Re: procmail as a delivery agent doesn't like root?

1997-07-17 15:32:00
Randy Schultz <schultz(_at_)cray(_dot_)com> writes:
I'm working on setting up procmail as the local delivery agent and am having
a bit of weirdness happening and was wondering if somebody could explain it.

The specifics:
an SGI running IRIX 6.2, getting passwd and alias info via NIS(it does have
  a small /etc/passwd for things like root, daemon, lp, et.al.).
...
F equate: SElsDFMmou
...
The weirdness:
If I leave out the U equate/set it to 0:0 I get an extra ">From " line right
underneath the real "From ".  If I set U=1:1 the bothersome ">From " goes 
away.  

I believe this is because 6.2 comes with an account "sysadm" that also
has uid 0, that occurs earlier in /etc/passwd than root.  This causes
getpwuid() to return "sysadm" as the account with uid 0.  Since sysadm
isn't on the compiled in TRUSTED_IDS list, procmail inserts the extra
">From " line.  Solution?  Toast the sysadm account, or at least move
it later in /etc/passwd than root's entry.

I'll note that the flags in your F directive are out of date.  Instead of
the 'E' flag you should give procmail the '-Y' argument.  The 'A' flag
has no meaning in current sendmails (though SGI in their madness may have
done so.  Is this a vendor supplied binary?).  You don't want the 'm' or
'o' flags, and probably don't want the 'u' either.  Instead you'll
want the 'P', 'f', 'h', and 'n' flags.  Depending on what version your
sendmail.cf is (is there a "V7" line in it?), you may want a pile of
other flags on the local mailer, but at that point you should throw out
your current sendmail.cf and build a new one from the m4 config files.


...
I had thought about telling sendmail not to generate the "From " and letting
procmail do it but it seems procmail likes to set the username part of the
"From " line to whatever sendmail logs as the ctladdr, which is not who the 
email is from.

Do I need to modify the A equate to something like:
    A=procmail -f $f -a $h -d $u

That's what the 'f' flag is for.  It does that for you.  _Do_ insert the
-Y argument into the A directive.

Your best bet is still probably to generate a new sendmail.cf from the
m4 config files.  That'll allow you to take advantage of all the fixes
they've made in the last dozen versions.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>