Can I read /var/mail with a GUI?

lofidevops

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.

Stephen Kitt

Most MUAs available on Unix-style systems still support local mailboxes, but it's not necessarily obvious how to access them.

In Evolution

Create a new mail account. 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

Cancel any email account wizards, then access the account settings (AltE to open the “Edit” menu, then “Account Settings”). From there, click on the “Account Actions” drop-down and select “Add Other Account...”. Check that “Unix Mailspool” is selected and click on “Next”. Fill in an identity — the local part of the email address will be used by default as the spool name (the file in /var/spool/mail which contains the email you want to read) — and click on “Next”. Skip the “Outgoing Server Information” page by clicking on “Next”. Check the account name and click on “Next”. Finally, click on “Finish” and review the account settings. You should then be able to retrieve the email from the local mailbox.

Note

  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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related