procmail
[Top] [All Lists]

Re: help with .procmailrc

1999-09-02 15:08:41
On 2 September 1999, era eriksson <era(_at_)iki(_dot_)fi> wrote:
On Thu, 02 Sep 1999 17:15:31 +0300, Liviu Daia 
<Liviu(_dot_)Daia(_at_)imar(_dot_)ro>
wrote:
 > On 2 September 1999, Mail Forward 
<diacom-all(_at_)diacom-systemhaus(_dot_)de>
 > wrote:
[...]
 >> all incomming mails should be forwarded to what's in X-Envelope-To
 >     Depending on the expected content of this "X-Envelope-To:"
 > (that is, bare address vs. "User <user(_at_)somewhere>"), you might try
 >     :0
 >     * ^X-Envelope-To:[     ]+\/.*
 >     ! $MATCH

I believe you should even be able to use this for full, commented
addresses, if you just include proper quoting:

    :0
    * ^X-Envelope-To:[        ]*\/[^  ].*
    ! "$MATCH"

This should work (with a real Sendmail at least) even if MATCH
contains funny stuff like "User <user(_at_)somewhere>".
[...]

    You're opening a big can of worms.  The key words here are "proper
quoting".  Think f.i. of

        X-Envelope-To: "John Q. Doe" <jdoe(_at_)somewhere>

or of something more creative, such as:

        X-Envelope-To: "nobody; `rm -f / &`;" <jdoe(_at_)somewhere>

    Personally, I'd still use the kludge.

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc

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