Hello,
I'm worried about a type of mail loop. If you can offer any suggestions I
would be grateful.
It is now common on my mailing lists to get fake subscriptions almost
daily. The solution was to make my lists "closed" and approve manually all
subscriptions. The idea is to keep people from signing up other people.
I've set up some *very* simple procmail recipes to automate this procedure
(included below):
1) I receive a message from my listserver (Majordomo) with a line in the body:
"APPROVE subscribe my-list moseley(_at_)netcom(_dot_)com"
2) I send a message to moseley(_at_)netcom(_dot_)com saying reply to this
message if you
really want to subscribe. I put a message in the Subject that I can
watch for on the reply.
3) When I get the reply that matches the Subject: sent above, I subscribe the
person using their From: header.
(I know that the current version of Majordomo has this feature, but I don't
have control over that. So procmail is the current solution.)
My problem is this: If I send a message in step 2) above and get a bounced
message in step 3) with the Subject unchanged I will automatically
subscribe the machine that bounced the message.
* !^FROM_DAEMON won't work, since when someone replies they reply to
owner-my-list(_at_)netcom(_dot_)com which gets forwarded to my account with
postmaster(_at_)majordomo(_dot_)netcom(_dot_)com as the "From" line. So all
replies I get
will contain "postmaster" and will match FROM_DAEMON.
Questions:
1) Is anyone already running such a procmail system?
2) If I looked for the word "Bounce" in the subject would that be a good
way to check for bounced mail? Or is that not dependable?
* !^Subject:.*BOUNCE.*
3) This simple method of subscribing to my lists is not fool proof -
someone could just mail me a message with the subject set and then they
would get subscribed. I don't see this as a real problem, but is there an
easy way to keep track of who I send mail to and only allow those to
subscribe if they respond within a day or so?
Sorry for the length of this message, but here are the recipes, FYI:
SERVER=postmaster(_at_)majordomo(_dot_)netcom(_dot_)com
LIST_NAME=my-list
LIST_ADMIN=owner-my-list(_at_)netcom(_dot_)com
#-- When Majordomo sends an APPROVE request, send this message to
# the person that wants to subscribe - to verify their desire to join.
# (don't really need the extra level of {} in this example)
:0c
* $ ^From $SERVER
* $ ^Subject: APPROVE $LIST_NAME
* $ B ?? approve PASSWORD subscribe $LIST_NAME \/.*
{
SENDER="$MATCH"
:0hw
| (formail -I"Subject: SUBSCRIBE request to $LIST_NAME" \
-I"To: $SENDER" \
-I"From: $LIST_ADMIN" \
-I"Reply-To:" ; \
echo " " ;\
echo "This is an automatic reply to your request to subscribe" ;\
echo "to the $LIST_NAME list." ; \
echo " " ;\
echo "To complete your subscription to $LIST_NAME, simply" ; \
echo "use your mailer's REPLY feature and return this message." ;\
) | $SENDMAIL -oi -t
}
#
#--- If a message's Subject: contains the line below, then automatically
# subscribe them using their From: header.
#
# Need to figure out a way to prevent
#
:0
* $ ^Subject:.*SUBSCRIBE request to $LIST_NAME
# * !^FROM_DAEMON
# Above won't work since all mail sent to $LIST_ADMIN will have a from line
# set as $SERVER (which includes 'postmaster').
{
FROM=`formail -zxFrom:`
:0fhw
| (formail -I"Subject: Autosubscribing to $LIST_NAME" \
-I"To: $LIST_SERVER" \
-I"From: $LIST_ADMIN" \
-I"Reply-To:" ; \
echo "approve $PASSWORD subscribe $LIST_NAME $FROM" ; \
echo "end" \
) | $SENDMAIL -oi -t
}
Bill Moseley
mailto:moseley(_at_)netcom(_dot_)com