Re: anyone knowing procmail very good?

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

 



Christoph Höger wrote:
> Hi,
>
> I have the following in .procmailrc:
> (on a pretty bad administrated solaris box running procmail v3.22
> 2001/09/10)
>
> #fedora-devel
> :0
> * ^Sender:.*fedora-devel-list-bounces@xxxxxxxxxx
> * ^TO_fedora-devel-list@xxxxxxxxxx
> fedora-devel
>
>
> This works well in nearly all cases except for some announcements (e.g.
> the "The fonts SIG irregular status report" mail from today)
>
> Somehow those messages (although they contain Sender:
> fedora-devel-list-bounces@xxxxxxxxxx) slip through that rule.
>
> Why?

Without directly answering that question, I have found that using the
List-Id header is much nicer.  And, it can be used to automatically
filter a lot of lists with one rule, rather than having separate rules
for each list.  Here's an example to illustrate:

# automagically handle nice standards conforming mailing lists.
# taken from http://spacepants.org/conf/dot.procmailrc,
# where it was attributed to Jeff Waugh
:0
* ^List-Id: +\/.*
{
    LISTID=$MATCH

    :0
    * LISTID ?? ^.*[<]\/[^@>\.]*
    lists/$MATCH/

    # the ^ * seems ineffective at removing spaces, best to be sure
    # the initial pattern does this (e.g.: ^List-Id: +\/.*)
    :0
    * LISTID ?? ^ *\/[^@\.]*
    lists/$MATCH/
}

# try to match List-Post headers
:0
* ^List-Post: *[<]mailto:\/.*
{
    LISTPOST=$MATCH

    :0
    * LISTPOST ?? ^ *\/[^@]*
    lists/$MATCH/
}

This handles most of my lists.  Only a few that I want filtered into
mailboxes that don't match the name used in the List-Id or that don't
use a List-{Id,Post} header need explicit rules.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Internet treats censorship as a malfunction and routes around it.
    -- John Perry Barlow

Attachment: pgpSfxPU0XuxP.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux