Morning all,
While it's sitting at the top of my head, I have a couple of mutt and
procmail tips I thought a few SLUGgers could make use of, plus a couple of
queries thrown in.
Tip 1: Lotsa lists? Got mailfolders?
------------------------------------
I find it irritating to have to enter in all the mailboxes I have, and all
the lists I subscribe to. For non-mutt users, I'll explain why these are
useful to define: The list of mailboxes lets mutt tell you where new mail
has been delivered (obviously useful with procmail), and the list of lists
gives you the exceptional 'reply to list' feature. The syntax for both:
lists list1 list2 list3 list4
mailboxes folder1 folder2 folder3 folder4
But you have to remember to type them all out, and I don't have a computer
doing my dirty work just so that I have to do the housekeeping. Enter
'find':
mailboxes `find ~/Mail -type f ! -regex ".*Sent$" ! -regex ".*/\..*" !
-regex ".*zOld.*" -printf "%p "`
Okay, the backticks are to let mutt know you're bringing in the output of an
executable (usual UNIXy parlance).
'-type f' tells find to return files only, not directories or named pipes or
anything daft like that.
'! -regex ".*Sent$"' tells find not to return my Sent mailbox (! == not)
'! -regex ".*/\..*" tells find to ignore dotfiles
'! -regex ".*zOld.*" tells find to ignore my zOld folder
'-printf "%p "' tells find to return a space delimited list
If you procmail well, you can do the same thing for your lists lines. Most
of my lists go into the Lists folder, so this works quite well for me - I
only have to manually specify the exceptions.
Tip 2: List those Mailboxes!
----------------------------
Now that you've specified your mailboxes, you can go to the mailbox view in
mutt. From your mail list, type "c?". That gets you to the browser, which is
only good for navigating them like files. That shits me, so I found
something more useful.
Hit tab. There's your list! If you have any new mails, the boxes will be
marked with N's. If you're like me, and have a lot of procmail delivered
mail to different folders, this is very useful.
If you are a lot like me, pressing c?<tab> will shit you to tears. Fix it.
In your .muttrc, add the following line:
macro index <left> "c?<toggle-mailboxes>" "Mailboxes"
Now, whilst you're browsing your mail, you can hit the left cursor key, and
be bounced back to your *proper* all-seeing, all-knowing mailbox list. This
little key customisation works well with the following:
bind index <right> display-message
macro index I "c!\n" "Inbox"
macro pager I "c!\n" "Inbox"
bind pager <up> previous-line
bind pager <down> next-line
bind pager <left> previous-entry
bind pager <right> next-entry
bind attach <left> exit
bind attach <right> view-attach
bind browser <right> select-entry
bind browser <left> exit
[ I just find these consistent and intuitive. Old-timers will brand me a
heretic. Gus probably will too. ]
Tip 3: Maildir, mutt and procmail
---------------------------------
I like Maildirs now, but they don't play nice with mutt, because most emails
don't come in with a Lines: header. There's a hack in the mutt FAQ that
bears repeating:
# Add Lines header for mutt with Maildirs
:0 Bfh
* H ?? !^Lines:
* -1^0
* 1^1 ^.*$
| formail -A "Lines: $="
Dirty! Hackish! SWOIT!
I've yet to find a GUI mailer that can be customised as nicely as mutt, but
also be as elegant.
Oh, and don't thank me for this email - thank Michael Elkins, the author of
mutt. Send him an email or a box of magic beans or something: [EMAIL PROTECTED]
- Jeff
-- [EMAIL PROTECTED] ------------------------------- http://linux.conf.au/ --
- What inspired you to become a bus driver?
- Linus Torvalds.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug