Re: New Computer

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

 



Thanks!  I'll splice this in tonight and, hopefully, will not have to be part of the captive audience for Karl's infernal surrogate-blog.

On 8/27/07, Todd Zullinger <tmz@xxxxxxxxx> wrote:
Peter Connolly wrote:
> Finally, Todd, since it's obvious that Karl's prattle will never
> end, I'd be interested if you ever got that thread-killer working...

Here's a start, though there are surely still rough edges and broken
parts.  You get both pieces if it breaks.

Stick these recipes somewhere in your procmail config:

:0 W
* ? formail -x"From" -x"From:" -x"Sender:" -x"Reply-To:" -x"Return-Path:" \
    | egrep -is -f $HOME/.procmail/killfile
{
    # add it to the killthread cache if it's not a reply
    :0 Wic: killthread.lock
    * ? formail -c -x 'References' -x 'In-Reply-To' | grep -s .
    | formail -D 40960 $HOME/.procmail/killthread.cache

    :0
    /dev/null
}

# get rid of any threads started by people in the killfile
:0
* ? thread-kill
/dev/null

(You'll want to change /dev/null to a mailbox for testing probably.)

The thread-kill script is just a hackish shell script:

#!/bin/bash

function check_msgid() {
    cat | formail -c -x 'References' -x 'In-Reply-To' | \
    for i in $(awk '{split($0, a); for (i in a) {print a[i]}}'); do
        if grep "$i" ~/.procmail/killthread.cache &>/dev/null; then
            echo 1
            break
        fi
    done
}

[ "`check_msgid`" == "1" ] && exit 0 || exit 1

I'd be happy to hear about any improvements you make make to it.

--
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Every time I close the door on reality, it comes in through the
windows.


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[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