procmail
[Top] [All Lists]

procmail mailping ( was Re: test)

2004-08-28 13:56:53
antenneX wrote:

Bob: I'd like to see those recipes....
Here it is. It's just a modification of an auto-responder, modified to send back the original message, including headers. The idea is you send a message to mailping(_at_)yourdomain(_dot_)com and "Otto Pinger" replies automatically.

I'd post mine here, but I don't want it to be abused. If anyone would like to try it, just message me off-list and I'll send you the addresses.

- Bob

--- cut here --- cut here ---

#======================================================
# Implement e-mail pingbot
#======================================================
:0
* ^TO(pingbot|mailping)
* !^X-Loop: pingbot
* ^Subject: \/.*
{
       # Get sender (now recipient) address
       FROM_=`formail -rt -xTo: \
       | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
# Save the full message content to a temp file
       :0c:formail.lock
       | cat > return.tmp

       # Send the response message
       :0c:formail.lock
       | (formail -r -I"Subject: Re: $MATCH" \
         -I "Cc: mailings(_at_)ttlexceeded(_dot_)com" \
         -A "X-Loop: pingbot"; \
         echo -e "This is an automated response by PINGBOT."; \
         echo -e "Replies to this message will be ignored!\n"; \
         echo -e "Your message appeared as:"; \
         echo -e "\n--- begin received message ---\n"; \
         cat return.tmp; \
         echo -e "\n--- end received message ---\n"; \
         rm -f return.tmp)\
         | /usr/sbin/sendmail -t -F "Otto Pinger"
}


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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