You also know it’s going to be tricky, as mutt is a command-line program, and command line programs are like appliances that refuse to die. They work well but don’t match your cupboards from IKEA made from particle board. Still, mutt has a nice trick up its sleeve: It can process mailto arguments on the command line.
There is only one problem: Mutt is unable to process every mailto attribute and fails on attributes it does not recongize (like Body).
[The above mailto link is taken directly from the official mutt mailing list page. Mutt’s fleas have a good sense of irony.]
The solution is to wrap mutt in a script that parses mailto links. Using a whitelist of valid attributes has an added benefit of heightening security, as potentially malicious attributes are automatically discarded.
Use that script in a desktop file.
> [Desktop Entry]
> Name=Mutt Mailto Handler
> Comment=Supposedly sucks less.
Inform the desktop environment.
Make it stick.
xdg-mime default mutt-mailto.desktop x-scheme-handler/mailto
Now you’re cooking with gas.