# For info: http://fangor.freeshell.org # Vacation autoreplier MY_EMAIL=(email1\@|email2\@) MY_NAME="" # Default value if not taken from message and assigned TO=email@domain AUTOVAC="Hi, this is an auto-reply message. I'm on vacation right now, so I won't be able to respond to you for a few weeks. You can send me more email and you won't receive this message again, but I thought you should know that I'm not ignoring you. Talk to you soon," # 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 VAC_DB=$MAILDIR/.vac-list ############################## # Be extra careful changing info below here SHELL=/bin/sh PATH COMSAT #VERBOSE=off #LOGABSTRACT=yes #LOGFILE=$MAILDIR/.log/log.`date +%y-%m-%d`.vac # Capture From address :0 * ^^From \/[^ ]+ { FROM=$MATCH } # Autoreplier :0 * $ ! ^X-Loop:${MY_EMAIL} { :0 * $ ^(To|Cc):.*\/${MY_EMAIL}[^,> ]+ { TO=$MATCH } :0 c | ( $FORMAIL -rt -I"To: $FROM" -I"From: $TO" -A"X-Loop: $TO" -I"Subject: On Vacation"; echo "$AUTOVAC"; echo; echo "$MY_NAME" ) | $SENDMAIL -t ; echo $FROM >> $VAC_DB :0: $DEFAULT } # Else deliver normally