Mutt

From ThorxWiki
(Difference between revisions)
Jump to: navigation, search
(first seso)

Revision as of 11:45, 13 April 2016

Some notes on my procmail and mutt usage... especially in regard to mailing lists

First up, I have this magic for lists:

######## GENERAL MAILING LIST MAGIC # this is thanks to CrackMonkey :0D * ^(X-list: |Sender: owner-|X-BeenThere: |Delivered-To: mailing list |X-(Mailing-)?List: <|X-Loop: |List-I[dD]: <)\/[-A-Za-z0-9_+]+
.lists.$MATCH/

This identifies a list by it's internal name, and saves to directly to that name.

  • Pro:
    • can subscribe to new lists and not have to setup a new procmail filter for each one.
  • Con:
    • Some lists may have generic names (for instance 'general' or 'linux', both of which I'm subscribed to)
    • Multiple lists may clash (this doesn't happen to me, but it could. Both 'general' and 'linux' are Linux User Group lists in different locations)
    • If a false-negative spam matches these headers, it may create a folder and be additional work to clean up
  • Other notes
    • There may be multiple lists that you wish to conflate into one folder (eg: multiple freecycle). I handle this by symlinks within $MAILDIR


Next up, I have this magic to let me selectively pre-mark messages as "read" (or even deleted) within a Maildir at delivery time. This speeds up reading some folders.

http://stuffphilwrites.com/2011/01/ultimate-procmail-recipe/



Another thing I have is a shell script wrapped around this command:

find ~/Maildir/new ~/Maildir/.*/new -iname \*.\* -not -iname \*:\*T\* -type f -printf "%p\0" | xargs -r -0 realpath | sort | uniq | awk -F / '{print $5}' | uniq -c | sort -gr


This is a very fast method to identify which Maildir folders have messages in 'new', and how many. Effectively being a folder list. It's fast enough that I have a variant of this in my shell *prompt* (variant simply counts how many folders ('|wc -l' instead of '|awk|uniq|sort').


This one-liner strongly assumes .dot.seperated.folders, and will not work on /slash/seperated/folders. A slightly slower version will work on both slash and dot seperated:


find ~/Maildir -name cur -prune -o -name tmp -prune -o -path \*/new/\* -not -name \*:\*T\*  -not -name \.\* -type f -printf '%h\n' | sed -e 's,.*/Maildir/\(.*\)/new,\1,g' | uniq -c | sort -gr
Personal tools
Namespaces

Variants
Actions
Navigation
meta navigation
More thorx
Tools