# For info: http://fangor.freeshell.org # Vacation autoreplier MY_EMAIL=(email1\@|email2\@) MY_NAME="Fangor" # Default value if not taken from message and assigned TO=email1@domain SUBJECT="your message" AUTOVAC="My Dear Friend, I am sick of email. I find it a vile method of communicating between friends. So, I have decided not to bother with it very much anymore. I will check it from time to time, but if you would like to get in touch with me, why not give me a call: Home: Cell: The cell number is good except when I am at home - reception can be rather bad. This message was automatic, and you will only receive it this once. If you would like it sent to you again in the future, so that you may have my phone numbers for instance, simply send me a message with 'friend wants to know' in the subject line. Hope to hear from you soon. Take care," # Customize these if they're not right on your system: FORMAIL=/usr/pkg/bin/formail GREP=/usr/bin/grep HEAD=/usr/bin/head SENDMAIL=/usr/sbin/sendmail LS=/bin/ls TR=/usr/bin/tr PROCMAIL=/usr/pkg/bin/procmail # Customize these for your system DEFAULT=/mail/fangor MAILDIR=$HOME/mail FRIEND_DB=$MAILDIR/.friend-list FRICHK_DB=$MAILDIR/.frichk-list ############################## # Be extra careful changing info below here SHELL=/bin/sh PATH COMSAT #VERBOSE=on #LOGABSTRACT=yes #LOGFILE=$MAILDIR/.log/log.`date +%y-%m-%d`.friend # Capture From address :0 * ^^From \/[^ ]+ { FROM=$MATCH } # Autoreplier :0 * ! ? $GREP -i ^$FROM $FRICHK_DB { :0 * $ ^(To|Cc):.*\/${MY_EMAIL}[^,> ]+ { TO=$MATCH } :0 * $ ^Subject: .*\/.+ { SUBJECT=$MATCH } :0 c | ( $FORMAIL -rt -I"To: $FROM" -I"From: Fangor <$TO>" -A"X-Loop: $TO" -I"Subject: Re: $SUBJECT"; echo "$AUTOVAC"; echo; echo "$MY_NAME" ) | $SENDMAIL -t ; echo $FROM >> $FRICHK_DB :0: $DEFAULT } # Autoreplier :0 * ^Subject: friend wants to know { :0 * $ ^(To|Cc):.*\/${MY_EMAIL}[^,> ]+ { TO=$MATCH } :0 | ( $FORMAIL -rt -I"To: $FROM" -I"From: Fangor <$TO>" -A"X-Loop: $TO" -I"Subject: Friendly Reply"; echo "$AUTOVAC"; echo; echo "$MY_NAME" ) | $SENDMAIL -t } # Else deliver normally