In mutt, if want you use multiple sending profiles, you typically create different config files for each profile, and then switch between them by a macro, some program like muttprofile or based on recipient (send-hook) or current folder (folder-hook).
I had different problems with these approaches (mostly due to my laziness):
That's why I wrote the small python program muttlearn, which scans mailboxes that contain outgoing mail, and automatically generates send-hooks. There aren't distinct profiles anymore, but it is learned how you want to write mails based on your prior written emails. Currently, these properties can be learned/generated for a recipient or a group of recipients:
Hey Bob, Regards, Alice
Of course, all this behavior can be customized / switched off partly in the configuration file! Also, muttlearn and the config-file based profiles are not mutually exclusive, they can be used concurrently!
Just get the source from the git repository on github:
git clone https://github.com/weisslj/muttlearn.git
optional (but recommended) dependencies: guess_language, PyMe
for python >= 2.6
python setup.py install --user export PATH=$PATH:~/.local/bin
You can also use
--prefix but you may need to adapt
PYTHONPATH in this case.
for python 2.5:
python setup.py install --prefix ~/.local export PYTHONPATH=~/.local/lib/python2.5/site-packages export PATH=$PATH:~/.local/bin
For removal, just delete all installed files, e.g.:
rm -rvf ~/.local/bin/muttlearn ~/.local/lib/python*/*-packages/muttlearn*
~/.muttlearnrc. The most important settings are
muttlearn --verbose --progress
~/.muttrc, for example by appending this line at the bottom:
$editorduring runtime, change
~/.muttrcfor some variables. All these variables (
config.py) can also be set in the muttlearn config!