Mutt tips

A little post following the setup of Mutt : here are some of the tips I have found for Mutt.

Accents are not displayed

This happens when the charset is not correctly defined. Create the ~/.mailcap file if it does not exist and put the following in it :

text/html; w3m -I %{charset} -T text/html -dump; copiousoutput

Desktop Notification

Everything is great but you cannot have mail notification ? I have tried to used directly notify-send on Gnome, but it does not always work, even when exporting the DISPLAY variable :

    :0 ic:
    | export DISPLAY=:0.0; /usr/bin/notify-send -i 'evolution' \
    "New Mail"

So I used a script done by Miek, somewhat modified. The result is here.
If you want to use it, don’t forget to change the username from “alex” to yours.

Do not include yourself in Group reply

Set alternates in .muttrc. Every mail inside will be remove from the reply.

Forward attachments also

Use the bounce functionnality instead of forward.

Marking all unread mails as read

Select all unread mails with T ~O. Then mark them as read with ;WO.

Note: An unread mail can be tagged with N instead of O, so change the commands accordingly.

Migrating from Thunderbird

If you have been using Thunderbird in the past, chances are that you want to migrate all your mails to Mutt. However Thunderbird uses the mbox format for storing your mails so you will have to convert the folder to the maildir format.
Fortunately, there are several scripts for that. The best I have found (meaning without special librairies) is this one : mb2md. You will find your mail in the .thunderbirdfolder, in an ‘Inbox’ file. The path should look like this :

For some informations about the two formats, see here.

Start fetchmail at boot

I copied my ~/.fetchmailrc to /etc/fetchmailrc. Then edit the permissions with

$ chmod 600 /etc/fetchmailrc

Finally, add to /etc/default/fetchmail the following :


Now you can restart fetchmail with /etc/init.d/fetchmail restart. Beware, this has downloaded all of my emails again !