10

I can set up local-only mail accounts using sendmail or postfix, and messages will be stored in /var/mail/USERNAME and readable in a terminal window using mutt.

I tried setting up a couple of MUA GUIs to read from this mailbox, but they all expect SMTP or IMAP details. (Tried Evolution, Geary and Thunderbird.) Is there any way to access a local mailbox with a GUI, without having to configure a local SMTP or IMAP server? I don't mind using a dedicated GUI.

1

1 Answer 1

11

It used to be common for MUAs available on Unix-style systems to support local mailboxes, but that’s no longer the case; and in those that do, it’s not necessarily obvious how to access them.

In Evolution

Create a new mail account (hamburger menu > Edit > Preferences > Mail Accounts > Add). Set your email address as USERNAME@localhost. Disable “Look up mail server details based on entered email address”. Under “Receiving email” set your server type to “Standard Unix mbox spool file” and set the file location to /var/mail/USERNAME. Under “Sending email” set your server type to “None”.

In Geary

Geary does not currently support mboxes. It requires that every mail account has an associated SMTP and IMAP server, so you will have to configure these locally.

In Thunderbird

Thunderbird used to support local mailboxes, but no longer does.

Accessing local mail through IMAP

You specifically mentioned not wanting to set up a local server, but since it's been some years and your requirements may have changed, and I’ll just briefly describe the process. There are three basic steps. First, configure your mail delivery system (such as exim4) to use Maildir format from now on. Second, convert the /var/mail mailbox to Maildir format. Third and finally, install the lightweight Dovecot IMAP server. This will properly read and deliver the Maildir mail locally in a format a modern MUA like Thunderbird can work with. Now you can add a standard IMAP account in your chosen MUA, use localhost as the server, and it should pick everything right up.

Notes

  1. In many cases, MUAs will move email from local mailboxes to their preferred storage, which means you won’t be able to read email using another MUA afterwards. mutt can be told not to do this, I’m not sure about Thunderbird & co.

  2. To test, you can send a local email with mail USERNAME@localhost. Fill in the prompts as follows

     $ mail USERNAME@localhost
     Cc: <leave blank, hit enter>
     Subject: test subject
     test body <hit enter>
     <hit Ctrl-D>
    

You can confirm the mail has been received by typing mail. Hit Q to quit the text-based mail client. Now check your inbox via your preferred MUA GUI.

3
  • 7
    This didn't work (doesn't seem possible) in Thunderbird 60.4.0. Commented Jan 24, 2019 at 23:56
  • 4
    mailspool support removed in Thunderbird 91.0 thunderbird.net/en-US/thunderbird/91.0/releasenotes Commented Oct 2, 2022 at 18:52
  • Using Evolution still works in 2025. Commented Jan 5 at 22:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.