On 10-Jun-2010, at 10:16, Daniel Israel wrote:
> 
> I'm not so worried about a complicated script (I'm a programmer).

Then use procmail.

This sorts all my friends into mailboxes

:0
{
  CLEANFROM=|formail -bIReply-To: -rtzxTo:

  WHITELIST=$HOME/.friends
  ISLISTED=`grep -i "^$CLEANFROM " $WHITELIST`

  # [email protected] mailbox.name sorts mail into the maildir mailbox.name
  :0
  * ISLISTED ?? ^[^ ]+[         ]+\/[^  ]+
  .$MATCH/
}

This sorts all the mailing lists:

#unset LISTNAME
LISTNAME
:0
* 9876543210^0 ^(List-Post:[    ]*(<mailto:)?|List-Owner:[      
]*(<mailto:)?owner-)\/[-A-Z0-9_+]+
* 9876543210^0 ^(List-Id:.*<|X-Mailing-List:[   ]*)\/[-A-z0-9_+]+
* 9876543210^0 ^(Sender:[       ]*owner-|X-BeenThere:[  ]*|Delivered-To:[       
]*mailing list )\/[-A-Za-z0-9_+]+
* 9876543210^0 ^Sender:.* List"? <(mailto:)?\/[-A-Z0-9_+]+
{ LISTNAME=$MATCH }

# OK, that didn't work, let's try List-Subscribe
:0E
   * ^List-(un)?Subscribe:.*<mailto:\/[-A-Z0-9_+]+-(digest|on|(un)?subscribe)@
   * MATCH ?? ^^\/.+-
   * MATCH ?? ^^\/.+[^-]
   { LISTNAME = $MATCH }

:0
.$LISTNAME/

OK, to be fair my REAL mailing list sorter is a tad more complicated, but not 
much.

-- 
In the words of one of the founding Igors: 'We belong dead? Ecthcuthe
me? Where doeth it thay "we"?' --The Thief of Time

_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk

Reply via email to