procmail
[Top] [All Lists]

Recipie Enhancements Needed

2000-07-18 20:59:25

Oh my gosh I hope someone can help. One part of the solution I
need was sent some months back but just can not find it.  Crisis.

My basic recipe (below) works just fine, but more capability
is required to deal with the new deluge of spam stuff which
results from people FORGING the domain name and making bogus
registrations, mailing list subscriptions, etc.  Many of these
come in with invalid ^FROM or invalid ^TO lines to process on,
but ALWAYS with at least "xx.com" in the 3rd line of the full
header after a big space and the word "for" (See NEED #1 Below)

The other two "NEEDS" are described below as well.  I need to 
cover as many of the bases as possible with one "master" recipe.

Thank you in advance ... MEGA THANK YOU ... I'm being OVERRUN!!!

------- BASIC RECIPE WORKS FINE...IF ^TO contains <somename>@xx.com
:0 hc
* !^FROM_DAEMON
* !^X-Loop: onlynameauthorizedhere(_at_)xx\(_dot_)com
* !^TOonlynameauthorizedhere(_at_)xx\(_dot_)com
* ^TO(_dot_)*(_at_)xx\(_dot_)com
{
:0 fh
| formail -r -A"Precedence: junk" \
   -I"From: xx.com Mailbounce <mailbummer(_at_)xx\(_dot_)com>" \
   -I"Subject: Bummer Mail Address At xx.com" \
   -A"X-Loop: nospam(_at_)xx\(_dot_)com" ; cat $HOME/procmail/rtnxx.txt

:0
| $SENDMAIL -oi -t
}

:0 c:
* !^TOonlynameauthorizedhere(_at_)xx\(_dot_)com
* ^TO(_dot_)*(_at_)xx\(_dot_)com
| formail -rtzxTo: >> $HOME/procmail/rtnxx.log

*** This is where I'd like to stick in the "forwarding" of the
    original e-mail PLUS text message at the top part to one or 
    more predefined !address1 !address2 (or pull the addresses 
    from a separate text file???)

*** This is where I'd like to stick in the EXITCODE = 67 part

:0 a:
/dev/null         (FINAL THRASH OF THE MAIL)
---------

***NEED #1:  To be able to also process on the "for <anyname(_at_)xx(_dot_)com>"
             on the 3rd line from the top off the full header.  Like:

Received: from mia-deb-6.elsitio.com ([200.41.50.9])
        by winery.garlic.com (8.10.0/8.10.0) with ESMTP id e6IBxtl20626
        for <xxxx(_at_)xx(_dot_)com>; Tue, 18 Jul 2000 04:59:56 -0700

        (i.e.) TO BE ABLE to process:
          1. <anynamedesired(_at_)xx(_dot_)com>   (OR)
          2. @xx.com  (ANYTHING on the "for" line to xx.com)

          BUT, can such a ^for (or whatever) be combined with
          various ^TO or ^FROM lines in the same recipe???????

***NEED #2:  In addition to the basic bounce/Reply message which
             is "rtnxx.txt", I want to be able to forward a copy
             of the incoming bogus mail to one or more predefined
             addresses AND...include a "bogusxx.txt" file message
             at the top of the mail to be forwarded (it is a specific
             predefined explanation).  I know how to simply !forward
             mail, but not within a more complex recipe and with
             the text header I would like to add.  Can sendmail
             be utilized more than once within the same overall
             "master" (my term) recipe???

***NEED #3:  I've tried the following in several recipes near
             the end but it always produces some kind of "un-
             expected braces" error in the pmlog

                {
                  EXITCODE = 67
                }

             Not sure what is going on with this...it looks right.

When all is said and done, and the copies forwarded with an explanation
(bogusxx.txt) mail header, or "text" added to the top of the original
e-mail, I want to "EXITCODE = 67" and thrash the mail to:  /dev/null
as the final step in the whole shabang.

THANK YOU VERY, VERY, VERY MUCH for any HELP!  I have a NIGHTMARE here.

Eric



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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