DragonFly BSD
DragonFly users List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

procmail recipe


From: "George Georgalis" <george@xxxxxxxxx>
Date: Sun, 6 Mar 2005 15:16:01 -0500

I've tried working out a procmail recipe, but this one is tough. I think
it requires a separate program to do the second check but I'd like to
figure a way to do it on a (procmail) command line. Either way someone
what to give a shot?

Plan: deliver list postings from specific addresses to a special
maildir, and also deliver any list postings that are replies to those
address to the special maildir.

Catching posts from the addresses (and building the msgid database) is
not so hard (per the duplicate example in man procmailex), but capturing
the messages with references or in-reply-to headers that have a match in
the special.cache is going to require a specialized program, I think.

My (non-working) attempts are commented below:

:0 Whc:special.lock
* ^From:.*(user31@xxxxxxxxxx|user2@xxxxxxxxxx|user1@xxxxxxxxxx)
|formail -D 8192 special.cache
:0 aWhc:special.lock
|formail -D 8192 special.cache
:0 a
* ^Sender:.*dragonflybsd.org
|safecat special special/new
#:0
#* ^Sender:.*dragonflybsd.org
#|formail -zcx references |sed -e '$!N;s/\n/ /' -e 's/ /|/g' -e 's/[<>]//g' -e 's/@/\\@/g' | grep -qe   "`sed -e 's/</|/g' -e 's/>//g' -e 's/<//g' -e 's/@/\\@/g' -e 's/^|//'`" special.cache
#|formail -zcx references |sed -e 's/ /\n/g' -e 's/@/\\@/g' | while read m ; do grep -e $m special.cache ; done


Any ideas?

Oh, BTW, I use that safecat invocation so my maildirs can be sorted
in the order they had mail delivered, otherwise it's functionally
equivalent to a procmail "maildir/" delivery.

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george@xxxxxxxxx



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