Muttprofile

Muttprofile is a utility to choose profiles with the Mutt email client. It is useful at least in the following cases:

Muttprofile was written in Perl. It is distributed under GNU General Public Licence (same as Mutt itself).

Note! (2003-01-11)

It seems that muttprofile is not working correctly in RedHat 8 (with Perl 5.8). Thanks for Marco Fioretti for informing me. The problem seems to be related to 'stty' and the Perl module 'Term::Complete' which is using it for changing terminal characteristics. I'll try to fix it, but at the moment, I don't have too much spare time, nor a working rh8 at my disposal...

Version history

1.0.0 2000-05-10 First public release

Requirements

Muttprofile is a somewhat Unix-oriented tool in its command-line operation. It also makes use of symbolic links. I don't know if it works under other operating systems.

Download

Download muttprofile!

Alternatively, you can go with Rikard Florin's version of muttprofile. He has rewritten muttprofile to include a graphical user interface using the Term::ANSIScreen and Term::ReadKey modules.

Installation

Muttprofile itself requires no special installation but you might want to check the first line of the file (#!/usr/bin/perl -w) and change the path to perl if needed ('which perl' might be useful here :-)

After that you need to tell Mutt how to call muttprofile and load the active profile. Perhaps the easiest way to invoke muttprofile from mutt is to bind a key with mutt macro command. For example, adding this to your muttrc-file


macro	index	<F10>	"!muttprofile\n:source ~/.mutt/profile.active\n" "Call muttprofile and load profile"
binds the function key <F10> to call muttprofile and load the new active profile.

Other examples:


macro	index	<F10>	"!muttprofile\n:source ~/.mutt/profile.active\n^f" "Call muttprofile, load profile and forget PGP passphrase"
binds the function key <F10> to call muttprofile, load the new active profile and tells Mutt to forget the currently active PGP passphrase.


macro	index	<F10>	"!muttprofile\n:source ~/.mutt/profile.active\n^fm" "New message with profile"
binds the function key <F10> to start muttprofile, load the profile, forget the PGP passphrase and start a new message.

In the profile files, you may want to add the following:

# NAME: name for your profile
# DESC: description of you profile, optional

In the interactive mode, muttprofile displays these to help you choose a profile. If they are missing, filename is used instead of the NAME. DESC is optional.

Documentation

Dodumentation is included in POD format. You can read it using perldoc -F muttprofile.

For convenience, you can find the corresponding man page here: Muttprofile man page

Short summary:
muttprofile looks for profile files in your mutt directory, reads NAME and DESC keywords, let's you choose a profile based on those and finally creates a symbolic link that points to that profile file. Thus Mutt only needs to load one profile (the active profile).

Future development

At the moment, muttprofile is what it is and stays that way. If necessary (propably not) I'll try to keep it functional with new versions of Mutt.

It is possible (though very unlikely) that I add some or all of the following features some day:

Acknowledgments

Matti Airas helped me a lot with muttprofile: for example he suggested the idea of using symlinks and to use NAME and DESC keys in the profiles. He also introduced me to Mutt :-)

Rikard Florin for continuing work with muttprofile. He has rewritten muttprofile to include a graphical user interface. His version is available here.

The people in the mutt-users mailing list gave me valuable help with mutt configuration.

See also

Information on (Sender) profiles with Mutt
Martti Rahkila's Mutt Resources


URL: http://www.iki.fi/martti.rahkila/mutt/muttprofile.html
Last update: 2003-01-11
Author: Martti Rahkila