[root@ns6 abc.cadena-it.com]# cat .procmailrc
VERBOSE=off
MAILDIR=$HOME/mail # elm users might use $HOME/Mail instead
DEFAULT=/var/spool/mail/abc.macatung.com
LOGFILE=$HOME/log
CLAMDSCAN=/usr/bin/clamdscan
:0
* ^Subject.*( naked | XXX | sex| Van Tai | Hang Khong | Visa )
/dev/null
:0
* ^From.*(MAILER-DAEMON)
/dev/null
:0
{
RESULT=`$CLAMDSCAN –stdout –no-summary -`
:0 Di
* RESULT ?? FOUND
/dev/null
}
[root@ns6 abc.cadena-it.com]#
general.rc
:0
* ^Cc.*joe@somewhere.org
* ^Cc.*me
{
:0 c
$DEFAULT
:0
SOME_FOLDER
}
:0
* ^Subject.*something-or-other
! another@address.com
lists.rc
:0
* ^From.*redhat.*list.*list.*@
redhat-lists
:0
* ^From.*owner@independence
independence-list
spam.rc
:0
* ^From.*my-buddy
* ^Subject.*(Fwd|Forward|joke)
/dev/null
:0
* !(To|Cc).*my_address # this is my account here
* !(To|Cc).*my_address_2 # I get mail forwarded from here
* !From.*my\.domain\.edu # I trust the locals not to spam
* !From.*list.*@ # don't trash anything from mail lists
* !From.*good-buddy # sometimes Bcc's me person mail to his sig-other
spam
:0
* ^From.*big-jerk
/dev/null
guestbook.rc
Subject:.*Form Posted
| cat&>$HOME/guestmail && \
$HOME/bin/guestscript $HOME/guestmail
Appendix: egrep regular expressions
^ |
matches the beginning of the line |
$ |
matches the end of the line |
. |
Matches any single character |
(character)* |
match arbitrarily many occurences of (character) |
(character)? |
Match 0 or 1 instance of (character) |
[abcdef] |
Match any character enclosed in [] (in this instance, a b c d e or f) ranges of characters such as [a-z] are permitted. The behaviour of this deserves more description. See the page ongrep for more details about the syntax of lists. |
[^abcdef] |
Match any character NOT enclosed in [ ] (in this instance, any character other than a b c d e or f) |
(expression) |
Group operator. Contents of parentheses treated as one character with respect to * , + , ? and | concatenation operators |
\n |
Backreference - matches the contents of the nth set of parentheses |
expression1|expression2 |
Matches expression1 or expression 2. |
This entry was posted
on Friday, November 13th, 2015 at 4:21 pm and is filed under Mẹo vặt của hiếu râu.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.