Procmail filtering mailing list traffic, by magic

A few people have commented recently that I should blog about my procmail filtering rules. Basically, I subscribe to quite a few mailing lists, and have for a long time. I used to add a procmail rule for each list as I joined to filter the list traffic into a folder. I stopped doing that a year or two ago, and I now run these procmail rules:

    ##########################################################################
    # Mailman
    
    :0:
    * List-Id:.*<\/[^>]*
    $MATCH
    
    :0:
    * List-Post: ]*
    $MATCH
    
    ##########################################################################
    # Majordomo lists (sometimes don't have <>'s around the address
    
    :0:
    * X-Mailing-List:.*<\/[^>]*
    $MATCH
    
    :0:
    * X-Mailing-List:.*\/.*
    $MATCH
    
    ##########################################################################
    # Ezmlm
    
    :0:
    * Mailing-List: .* \/[^ ;]*
    $MATCH
    

These rules basically handle all mailman, ezmlm and majordomo lists I have encountered and filter them into a folder with the same name as the mailing list. Hopefully someone out there finds these useful as well.

[tags: procmail smtp mail filter folder]