<<< Date Index >>>     <<< Thread Index >>>

Re: extract header from current message (to pass to shell)?



Thanks guys,

I wasn't quite sure how to integrate details of Patrick's procmailrc
suggestions, as I'm using mutt locally (combined with offlineimap) and
have procmail filter remotely on the server.

However, I now do use a mutt macro & procmail combo, like this:

in ~/.muttrc:

macro index "I" "<pipe-message>/usr/bin/formail -x Message-ID >> 
~/.mutt/ignorelist<enter><delete-thread>" "ignore thread"

Then, I have set up a cron job to periodically rsync the
.mutt/ignorelist up to the server (I'll add something that also crops
the length of the file).

On the server, in ~/.procmailrc:

IGNORETHREADLIST=cat $HOME/.procmail/ignorelist | tr -d " " | tr "\n" "|" | sed 
's/|$//'

:0:
* $ ^In-Reply-To:.*($IGNORETHREADLIST)
/home/mpromber/.maildir/inbox/.ignored-threads/
                                               
I haven't tested this a lot but it seems to work. 

Non-mutt related question in case someone with server experience would
like to comment:

I'm not directly rsyncing up, but am calling a shell script that first
does one ping to see whether I can reach the server. Would it put
noticeable strain on the server to call this script every 15 (10? 5?)
minutes? I have a free shell account and I don't want to be rude. 

m.