Created
August 30, 2012 04:50
-
-
Save nikushi/3522486 to your computer and use it in GitHub Desktop.
my maildrop filter
This file contains 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
HOME="/home/nikushi" | |
MAILDIR="$HOME/Maildir" | |
DEFAULT="$MAILDIR/" | |
CONF="$HOME/etc/maildrop" | |
logfile "$HOME/log/maildrop.log" | |
### turn on when debug ### | |
#VERBOSE=5 | |
ME="[email protected]" | |
if ( /^(To|CC):.*${ME}/ ) | |
{ | |
# 自分宛のメールは以後のMLのフィルタを通さず、 | |
# デフォルトのdirに移動させ、すぐ読む。 | |
to $DEFAULT | |
} | |
### filter mails to directory | |
if ( \ | |
/^Subject:\s*\[hogehoge-user / || \ | |
/^Subject:\s*\[fugafua-support/ || \ | |
/^Subject:\s*\[abc-def / \ | |
) | |
{ | |
to "${MAILDIR}/.mydir/" | |
} | |
### to Trash | |
if ( \ | |
/^Subject:\s*\[no-important / || \ | |
/^Subject:\s*\[spam / \ | |
) | |
{ | |
to "${MAILDIR}/.Trash/" | |
# to "/dev/null" | |
} | |
#### all other mails are delivered to $DEFAULT ### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment