-
-
Save heartshare/5119832 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Global maildrop filter file | |
DEFAULT="$HOME/MailDir" | |
AUTOREPLYFILE="$HOME/AutoReply" | |
HASAUTOREPLY=`test -e $AUTOREPLYFILE && echo YES` | |
# If the Spam-Flag is set, move the mail to the Junk folder | |
if (/^X-Spam-Flag:.*YES/) | |
{ | |
exception { | |
to $DEFAULT/.Junk/ | |
} | |
} | |
else | |
{ | |
if ("$HASAUTOREPLY" =~ /YES/) | |
{ | |
if (/^To:\s*(.*)/) | |
{ | |
TOADDR=getaddr($MATCH1) | |
} | |
if (/^Subject:\s*(.*)/) | |
{ | |
SUBJECT="$MATCH1" | |
} | |
cc "| mailbot -m $AUTOREPLYFILE -d autoresponsedb -s 'AutoReply: $SUBJECT' /usr/sbin/sendmail -t -f '$TOADDR'" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment