2 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] maildrop regex for ca...
FromSent OnAttachments
Oliver Eales (intern)May 24, 2004 7:20 am 
Robert FlemingMay 24, 2004 1:29 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] maildrop regex for catching all mail from daemons/listsActions...
From:Robert Fleming (ro@flemish.org)
Date:May 24, 2004 1:29:43 pm
List:net.sourceforge.lists.courier-maildrop

--On Monday, May 24, 2004 4:18 PM +0200 Oliver Eales \(intern\) is rumoured to have written:

Hello!

Has anyone a working regular expression to catch all mail coming from a daemon or a list ? procmail has a macro named ^FROM_DAEMON. (man page for procmail)

Here's the one I put together

if \ ( /^Mailing-List:.*contact ![:alnum:]*[\-\_]?[:alnum:]*[\-\_]?[:alnum:]*[\-\_]?[:alnum:]*!-(help|owner)@.*/ \ || /^List-Id:.*<![:alnum:]*\-?[:alnum:]*\-?[:alnum:]*\-?[:alnum:]*!.*>/ \ || /^X-list: ![:alnum:]*/ \ || /^Sender: owner\-![:alnum:]*\-[:alnum:]*!@cyrusoft.com/ \ || /^List-Unsubscribe:.*leave-![:alnum:]*[\-\_]?[:alnum:]*!\-.*@.*/ )

{ #you can use $MATCH2 to sort into mail folders based on the list name exception { to ${MAILDIR}/.${MATCH2}/ } exception { `maildirmake -f list.${MATCH2} ${MAILDIR}` to ${MAILDIR}/.list.${MATCH2}/ } }

Rob