[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with ip-spoof protection in Debian



Can you then have procmail to put all the mail that does not go into the
mailing list folders into a default mailbox?

# Put mail for pkirk in its own mailbox
:0:
* ^(From|Cc|To).*
$HOME/mail/patrick

Or would that break all the rule processing?

Speaking of rule processing, I found a dynamic way of setting mailing
list boxes if you can make it work with maildir - apologies for those
who feel this is too long...

##############################
#  Dynamic Mail filters
#
#  I can't remember who I originally found this trick from, but it has
#  made my l
ife much
#  simpler.  The following set of rules use the matching ability of
#  procmail
#  to dynamically filter mail based on parsing one of the possible
#  mailing list
headers.
#  This means you can subscribe to new mailing lists without having to
#  add lines
#  to your procmail filters.  Very Good Thing (tm).
#
#  When I first found this list, I think there were 4 entries.  I am now
#  up to 8
.  I
#  add a new entry every time some new mailing list ends up in my inbox
#  (i.e. it
#  is not covered by the current ruleset.)  Comments appear where I can
#  remember
#  Used by the perl6-all list to break out into seperate mailboxes
:0:
* ^X-Mailing-List-Name: \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

#  Majordomo uses Sender header to tell when it is coming from
:0:
* ^Sender: owner-\/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-BeenThere: \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^Delivered-To: mailing list \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-Mailing-List: <\/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-Loop: \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-List-ID: <\/[^@\.]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-list: \/[^@\.]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'



Reply to: