Here's the recipe:
# ---------------------------------------------------------
# GLOBENET MISMAIL REPLIES
# ------------------------
# This script returns the sender's original message below the
# autobot form letter message (rtngent.txt), appends the sender's
# e-mail address to the (rtngnet.log) file, and finally files a
# copy of the sender's original message in folder (Abumgnet.IN).
# Special thanks to Stephen, David, Hal, Soren & others for help.
:0 hc
* !^FROM_DAEMON
* !^X-Loop: eric(_at_)garlic\(_dot_)com
* !^TOeric(_at_)globenet\(_dot_)com
* ^TO(_dot_)*(_at_)globenet\(_dot_)com
{
:0 fh
| formail -r -A"Precedence: junk" \
-I"From: Globenet Mailbounce <mailbummer(_at_)globenet\(_dot_)com>" \
-I"Subject: Bummer Mail Address At Globenet" \
-A"X-Loop: eric(_at_)garlic\(_dot_)com" ; cat $HOME/procmail/rtngnet.txt
:0
| $SENDMAIL -oi -t
}
:0 c:
* !^TOeric(_at_)globenet\(_dot_)com
* ^TO(_dot_)*(_at_)globenet\(_dot_)com
| formail -rtzxTo: >> $HOME/procmail/rtngnet.log
:0 a:
Abumgnet.IN
===========
1. I've retweaked it a bit to only allow mail to: eric(_at_)globenet(_dot_)com
while anyothernames(_at_)globenet(_dot_)com get the mail returned with a form
message. The problem has been a flood of bogus mailings to the domain
name, but I'd like to also have the autoreply go to anyone Cc'd in
the original message (at the same time). Not sure how to do this.
2. Since I modified this from the original template, there's no need to
save a copy as the final stroke, but rather /dev/null it. Dumb
question, I guess, but if I stick /dev/null at the end without some
kind of {braces}, will that possibly cause me to lose the mail I
want to go to "eric(_at_)globenet(_dot_)com"? Since I have several domain
names all flowing into one mailbox, I'd hate to inadvertently axe
any of my other legit mail.
3. If I want to send a copy to a 3rd party (like in the case of abuses),
can I stick (example) !abuse(_at_)somewhere(_dot_)com as the 6th line from
the
start of the recipe without it affecting the rest of the stuff?
Ooops...that won't do it, since I need the rtngnet.txt file to
go along as the first part of the message just as with the autoreply.
Hmmm...would another recipe segment *after* the "cat" line and
before the $SENDMAIL -oi -t work...like:
:0 c:
!abuse(_at_)somewhere(_dot_)com (or... can I stick it at:)
:0
!abuse(_at_)somewhere(_dot_)com
| $SENDMAIL -oi -t (in the master recipe at top?)
4. There has been a rash of mail forgery taking place with some of my
other domain names...junk mailings and postings to kinky newsgroups
*and* legit mailing lists. As a result, I get "hate" mail sent to me
since people think I'm the weirdo. I am also the recipient...too much,
of bogus/forged registrations involving several of my domain names.
Is there a tidy way to tweak my template recipe to cull the "From:" or
"from" domain name (master, not including machine names or autobot
send-only registrar names) AND the .com, .net, .org, etc. ... or the
mailing-list name? Then, send a copy (with the auto-explanation text
recipe above and request to be removed) to either (or both) webmaster &
postmaster there? I guess I'll have to be sure and use:
* !^TOalegitname(_at_)mydomain\(_dot_)com
* !^TOblegitname(_at_)mydomain\(_dot_)com
* !^TOclegitname(_at_)mydomain\(_dot_)com
inserts so I don't axe any legit registrations that I have made. In
the case of the known sites I don't want, then I assume I can use:
* ^From:(_dot_)*(_at_)unwanted\(_dot_)com
and use the autoreply recipe processes to request deletion of the bogus
registrations. This seems to make sense, if the above can be tweaked up
to add the postmaster/webmaster addresses AND the reply text to the
top part of any bogus registration mail.
Thank you *very* much for any assistance. Hopefully, others can benefit
from this as well.
Eric