procmail
[Top] [All Lists]

Re: .forward if procmail is the LDA

1998-09-03 14:28:49
"David W. Tamkin" <dattier(_at_)Mcs(_dot_)Net> writes:
This is something I've always wondered about but never had the means to see
for myself, as I've always invoked procmail from .forward and never been on
a site where it was the LDA.

If procmail is the LDA, it reads /etc/procmailrc if it exists; drops
privileges if it hasn't already been told to; then reads
/etc/procmailrcs/$LOGNAME if that exists; and finally reads the recipient's
$HOME/.procmailrc if it exists or delivers to the user's $ORGMAIL if it
doesn't.  Yes?  (I guess it doesn't exactly drop privs at that point ... it
changes to those of the owner of /etc/procmailrcs/$LOGNAME and then, unless
told to do so sooner, drops them totally before reading $HOME/.procmailrc.)

Scratch the bit about /etc/procmailrcs/$LOGNAME.  You're mixing up
procmail -d with procmail -m.  After reading /etc/procmailrc, procmail
drops privs and reads $HOME/.procmailrc, stopping in either of those if
it hits a delivering recipe without the 'c' flag.  If it falls off the
end of the $HOME/.procmailrc, then it performs the equivalent of:

        :0:
        $DEFAULT

        :0:
        * ORGMAIL ?? ^^$\DEFAULT^^
        $ORGMAIL
        

Now, where does $HOME/.forward fit into this?  If the user has no .procmailrc
but does have a .forward, does procmail as LDA pay any attention to it?

$HOME/.forward is handled by sendmail.  If you have a .forward, then
sendmail rewrites attempts to deliver to you into attempts to deliver
to the addresses listed in the .forward file.  Addresses that begin
with a '|' are given to the prog mailer which will invoke the program
(or maybe not, if sendmail was configured to use smrsh to restrict what
the prog mailer can do).  If you escape the login part of a user's
address (e.e., "\guenther(_at_)gac(_dot_)edu") then sendmail will not perform
.forward expansion when it goes to deliver to the user.


Philip Guenther

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