procmail
[Top] [All Lists]

Re: DROPPRIVs for procmail from mailertable

1997-12-17 17:41:27
"Eli's Procmail Stuff" <procmail(_at_)qz(_dot_)to> writes:
Philip Guenther <guenther(_at_)gac(_dot_)edu> replied to me:
...
     the rcfile specified is located under /etc/procmailrcs/ without
                     backwards references ("/../"s)

Ugh. Would a symlink so that /etc/procmailrcs points to /home/procmail/
work or will I have to fix this at compile time? What security is
gained by that anyway? Any full path with no world writable directories,
symlinks, or backwards references should be as secure as
"/etc/procmailrcs/", no?

The symlink should work, and with the listed condition it should be
secure, though I would probably change config.h next time you compile
procmail.


...
:r! grep ^HX /etc/sendmail.cf
HX-QZ-To: $u

I know the multiple Bcc problems with that sort of thing. The mail is
all going to me though, and chances are anything Bcc'ed to more than
one of the addresses is something destined for the junk mail pile
anyway. So it fails into 'good enough for now'. (That is deliberately
in a form that ^TO and ^TO_ will not match.)

Well, since you know what you're getting yourself into (and you have plans
to solve it eventually), go ahead.  I would suggest that your rcfiles
start by extracting that header into some variable, and then doing the
checks on the variable instead of matching against the header, i.e.:

        # Set FROM to the envelope sender and RCPT to the envelope recipient.
        # This first recipe assumes that the procmail mailer has the 'P' flag
        # (i.e., F=P....).
        :0
        * ^Return-Path: +\/[^ ].*
        { FROM = $MATCH }
        :0
        * ^X-QZ-To: +\/[^ ].*
        { RCPT = $MATCH }

        # Once we move to 3.11*
        # FROM = $1
        # RCPT = $2

        # mail to bob(_at_)virtual(_dot_)domain gets forwarded to Big Bob:
        :0
        * RCPT ?? ^^bob@
        ! -f"$FROM" bigbob(_at_)some(_dot_)where(_dot_)else


That'll a) be faster than always matching against the header, and b) be
easily convertable when you upgrade.


Philip Guenther

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