migrating from thunderbird to mutt?

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Dec 20 15:53:55 PST 2004


On 2004-12-18 21:48, Nikolas Britton <freebsd at nbritton.org> wrote:
>
> How do I get my old email (from thunderbird, mbox?) into mutt?

I don't know what format thunderbird uses for storing email folders.
If it's a plain, flat text file, in UNIX mbox format, you should be able
to import the messages to Mutt by simply copying the folders from
thunderbird's folder to ~/Mail.

> Can mutt handle um like 5+ email address and have them all separated
> and be able to send from diffrent email accounts?

Yep.  You can configure Mutt to automatically pick the "right" sender
address depending on any number of criteria.  Eg. to set the from
address to something different when you reply to email sent to your
business address, you can use something like:

% reply-hook '~t .'            my_hdr From: keramida at ceid.upatras.gr (Giorgos Keramidas)
% send-hook  '~t .'            my_hdr From: keramida at ceid.upatras.gr (Giorgos Keramidas)
% reply-hook '~t company\.com' my_hdr From: gkeramidas at company.com (George Keramidas)
% send-hook  '~t company\.com' my_hdr From: gkeramidas at company.com (George Keramidas)

This will use keramida at ceid.upatras.gr by default, except for messages
posted to one of the company.com addresses (in which case the second,
more specific match will be used).

Any number of reply-hook and send-hook patterns can be used to tweak the
email address used by Mutt.

If the hooks you have don't work 100% right, you can even edit the
headers of the message *before* posting it, by hitting 'E' (edit-headers)
instead of 'e' (edit) while preparing the message.

> If I remember right mutt is just a mail reader, so how do I get mail
> to and sent from mutt?

The following programs are used in my email setup:

        Sendmail        As a mail transfer agent; the program that gets
                        requests for posting mail and makes sure their
                        addresses are rewritten if necessary, that all
                        messages are forwarded to the proper mail
                        gateway (ISP, corporate, etc).

        fetchmail       This pulls messages from various POP3 or IMAP
                        servers, and stuffs them in the local Sendmail
                        queue for delivery to user mailboxes on my
                        workstation.

        procmail        Filtering of messages delivered by the local
                        Sendmail MTA is done by procmail.  A set of
                        filter 'recipes', as they are called in the
                        procmail language, in my ~/.procmailrc file
                        makes sure that email is delivered to the proper
                        mail folder under ~/Mail/.  I keep separate
                        folders for each list I am subscribed and update
                        this file every time I subscribe to a new list
                        or unsubscribe from one.

        mutt            Mail reading, sending and replying.  The setup
                        of mutt uses /usr/sbin/sendmail to post all
                        outgoing messages through the local Sendmail
                        installation.

The incoming and outgoing email paths are similar to tha diagrams below:

1. INCOMING EMAIL
=================

%       +--------+  +--------+
%       | POP3   |  | IMAP   |
%       | server |  | server |
%       +--------+  +--------+
%            |        |
%            +-----+  |
%                  |  |                        +--------------------+
%    +-------------|--|--+                     |                    |
%    |             |  |  |         +-----------+                    |
%    |             |  +--------->  | localhost |                    |
%    |  fetchmail  |     |         | smtp      |      Sendmail      |
%    |             +------------>  | port      |                    |
%    |                   |         +-----------+                    |
%    +-------------------+                     |                    |
%                                              +-|--|--|---|--------+
%                       +------------------------+  |  |   |
%                       |           +---------------+  |   |
%                       |           |           +------+   |
%                       |           |           |          |
%                       v           v           v          v
%    +--------------------------------------------------------------+
%    |              +--------+  +--------+  +--------+  +--------+  |
%    |  procmail    | filter |  | filter |  | filter |  | filter |  |
%    |              | recipe |  | recipe |  | recipe |  | recipe |  |
%    |              +--------+  +--------+  +--------+  +--------+  |
%    +------------------|-----------|-----------|----------|--------+
%                       |           |           |          |
%                       v           v           v          v
%                   +--------+  +--------+  +--------+  +--------+
%                   | mail   |  | mail   |  | mail   |  | mail   |
%                   | folder |  | folder |  | folder |  | folder |
%                   +--------+  +--------+  +--------+  +--------+

Mutt is configured to read email from the mail folders at the bottom of
this diagram.  The rest of the programs run in the background doing
their work as they see fit.

2. OUTGOING EMAIL
=================

The outgoing messages are handled by an even simpler setup.  Mutt just
forwards all the messages to Sendmail, which handles the rest (i.e. it
forwards all email to my ISP's mail gateway):

%                             +---------------------------+
%    +-----------+            |   +-------------------+   |
%    |  Mutt     |--------------->|  Sendmail submit  |   |
%    +-----------+            |   +-------|-|-|-------+   |
%                             |           v v v           |
%                             |   +-------------------+   |
%                             |   |  Sendmail Queue   |   |
%                             |   |      Runner       |   |
%                             |   +-------|-|-|-------+   |
%                             +-----------|-|-|-----------+
%                                         v v v
%                                 +-------------------+
%                                 |       ISP's       |
%                                 |   mail gateway    |
%                                 +-------------------+

> How does it handle hyperlinks, if I select something will it open up
> in firefox or whatever?

Not sure.  I usually copy/paste the URLs from an xterm running mutt to
an already open Firefox window.

> Message filtering, for example I have all the different freebsd
> mailing lists automatically put into different folders, and junk mail
> sorting?

See (1) above, for procmail :-)

> Speell check?

Mutt doesn't include a built-in editor.  This is a major plus in my
opinion, as you are free to use any sort of editor you want to edit the
messages you post.  I usually set editor="emacs" in my .muttrc file and
use the spell-checking capabilities of GNU Emacs.

> How do I set the thing up, config file help?

The file `/usr/local/share/doc/mutt/manual.txt' is installed along with
the Mutt port.  It is the full Mutt manual.  You should at least kim
through it once, just to get a feel of what features Mutt has.  You will
probably never use all those features: some may be useless to you, some
may be even annoying.  Knowing what the mailer *can* do though, is going
to be very helpful as you are configuring it.

Ideally, Mutt is a zero configuration program.  You just fire it up and
run it without any sort of configuration.  The default options are
usually just fine.

If you do have to add options to your .muttrc file, they will probably
be something short like:

    set from="keramida at ceid.upatras.gr"     # the default From: header address
    alternates "keramida at ceid.upatras.gr|keramida at linux.gr"

Then the tweaking starts!

Mutt has a ton of options to tweak the way it looks and acts.
Apart from the manual in /usr/local/share/doc, which is the definitive
reference for all options, you can find many sample configuration files
online.  Just search a bit in Google and on http://www.mutt.org.

> I have more questions, I just can't think of them at the moment.


More information about the freebsd-questions mailing list