[NCLUG] email setup with mutt
Bob Proulx
bob at proulx.com
Mon Oct 9 13:39:54 MDT 2006
Chad Perrin wrote:
> > > ISP-provided webserver
> > Not so useful.
> C'est la vie. I don't host my own domains.
It is still not very useful. If you wanted a web based mailer then
you could always use yahoo, hotmail or any of the other web based mail
systems. Since you are not then I will assume that you don't.
> Is there some place that documents (reasonably well) how one would do
> this, given the multiple accounts and one shell account requirements,
> and the single mutt instance, below? (see below for more detail)
When in mutt press the F1 key. That will bring up the online mutt
documentation. On my Debian system that is also installed in
/usr/share/doc and may be viewed with a pager.
pager /usr/share/doc/mutt/manual.txt.gz
Look for POP and IMAP. In the mutt version that I have installed that
is section 4.11 and 4.12 and 4.13.
4.11 POP3 Support (OPTIONAL)
4.12 IMAP Support (OPTIONAL)
4.12.1 The Folder Browser
4.12.2 Authentication
4.13 Managing multiple IMAP/POP accounts (OPTIONAL)
They are optional because the mutt program can be compiled without
that support built in. But I believe all of the distro versions
distribute it with these enabled.
> "You can specify the username" sounds suspiciously like it has nothing
> to do with what I'm asking. If, for instance, my email account is
> perrin at apotheon.com (as it is for this email), and my account name is
> perhaps perrin+apotheon.com, the fact that I can specify this when
> having fetchmail or mutt retrieve email doesn't tell me anything about
> the facility for handling multiple accounts fairly seamlessly without
> having to start separate mutt instances or, God forbid, change shell
> accounts.
The docs say:
You can also specify different username for each folder, ie:
pop://username@popserver[:port]/.
...
You can also specify different username for each folder, ie:
imap://username@imapserver[:port]/INBOX.
This works for me at work. (Names changed to protect the perps.)
mutt -f imap://rwp@imapserver.example.com/INBOX
But on the outside network you definitely want imaps.
If Mutt was compiled with SSL support (by running the configure script
with the --with-ssl flag), connections to IMAP servers can be
encrypted. This naturally requires that the server supports SSL
encrypted connections. To access a folder with IMAP/SSL, you should
use imaps://[username@]imapserver[:port]/path/to/folder as your folder
path.
So I assume that for you with the info that you supplied that it would
be something like this:
mutt -f imaps://perrin+apotheon.com@imapserver.example.com/mailbox
I am showing that here on the command line but normally you would just
set your spoolfile and mailboxes in your muttrc file.
> > > multiple email accounts sending
> >
> > You can have mutt set the From: address to any of your valid account
> > addresses. Or even invalid ones but those are not so useful. In mutt
> > you can set up hook scripts to automatically set the From: address
> > based upon certain rules such as mailbox or to/from address or other
> > things.
>
> Do you mean I can set all outgoing mail to a single From: address? I
> know the syntax for that. It's pretty easy. On the other hand, I don't
> know how to A) specify one from among several accounts when composing
> outgoing email or B) have the sending address on a reply or forward
> automaticaly set to the same address that received it locally.
> Something tells me how this is accomplished will depend on how one sets
> up the system to receive and handle mail from multiple accounts, anyway.
In the manual is an example:
Here is an example with send-hook and the my_hdr directive:
send-hook . 'unmy_hdr From:'
send-hook ~C'^b at b\.b$' my_hdr From: c at c.c
...
For example, if you wanted to set your return address based upon
sending mail to a specific address, you could do something like:
send-hook '~t ^me at cs\.hmc\.edu$' 'my_hdr From: Mutt User <user at host>'
Basically reset the From: to the default and then for ~C
~C EXPR message is either to: or cc: EXPR
if that matches then set the From: address as specified. Just send
the mail and if your configuration is correct then the correct from
address is used automatically. I always have "edit_headers" set so
that I can see the generated headers and would notice if it was not as
I desired them to be.
By having multiple mailboxes with different accounts and servers
specified then you can receive mail from multiple accounts as multiple
users.
set spoolfile="imaps://perrin+apotheon.com@imapserver.example.com/mailbox"
mailboxes "imaps://perrin+apotheon.com@imapserver.example.com/mailbox"
mailboxes "imaps://chad@imapserver2.example.com/mbox"
I suppose. I did not actually try it and don't use imap mailboxes
myself. But I suppose it works that way. I normally use local disk
maildir format mailboxes.
mailboxes !
mailboxes =vger
mailboxes =austin-group
> > > access all accounts via one standard shell user account
> > If using POP3 then you don't even need a shell account.
> I do if I'm signing into mutt via the shell.
Hmm... I don't seem to need one when I tested this just a few minutes
ago. YMMV. It worked for me and all of those disclaimers.
> > > The preferences are:
> > > access all accounts via one instance of mutt
> > That should work fine.
>
> Details?
As provided above.
> There's no documentation (howtos, help files, manpages, et cetera) that
> provide any kind of human-readable information that would help with
> achieving MUA (and attendant utilities) configuration that satisfies the
> previously specified requirements and preferences.
pager +/imap /usr/share/doc/mutt/manual.txt.gz
Bob
More information about the NCLUG
mailing list