Start | Anteckningar | Motorcyklar | Recept | Temperaturer

2020-03-16 - Alpine + one.com (SMTP/IMAP)

Here's a short howto on how I set up alpine to work with SMTP/IMAP on my email provider one.com.

Note that due to connection timeouts, it's often preferable to directly edit the server settings in ~/.pinerc with your favourite editor. Just make sure to close Alpine before editing the file.

Folder Collections

Navigate (M) MAIN MENU -> (S) SETUP -> (L) CollectionLists. Add the nickname, server connection string and path as below:

Nickname  : borken.se
Server    : imap.one.com:993/user=my_username@borken.se/ssl 
Path      : Inbox

You should now be able to see all your remote email folders. Leave Path blank unless you also have the other folders placed inside Inbox.

Server Settings

Go to the (M) MAIN MENU -> (S) SETUP and add your server details. My settings are below, with the comments replaced by my own:

# SMTP server unless sendmail is used. TLS was apparently a no-no here
smtp-server=send.one.com:465/ssl/user=anders@bornas.eu

# Inbox path. IMAP is supposedly not case sensitive, but I had enough trouble
# as it was 
inbox-path={imap.one.com:993/ssl/user=anders@bornas.eu}Inbox

# Sent, Drafts and Trash
# Notice that my whole directory structure is located under Inbox and that
# the path delimiter is not "/" as one would expect, but ".".
default-fcc={imap.one.com:993/ssl/user=anders@bornas.eu}Inbox.Sent
postponed-folder={imap.one.com:993/ssl/user=anders@bornas.eu}Inbox.Drafts
trash-folder={imap.one.com:993/ssl/user=anders@bornas.eu}Inbox.Trash
Main not sent: Error: need MAIL command

Now it worked well reading and moving around email, but sending failed with the error message "[Mail not sent: Error: need MAIL command]", which was resolved by setting a From adress(?):

Go to (S) SETUP -> (C) CONFIG and enable "Allow Changing From". Then scroll down to "Customized Headers" and add a valid From adress:

From: "Anders Bornäs" <anders@bornas.eu>

When directly editing your .pinerc it looks like this:

customized-hdrs=From: "Anders Bornäs" <anders@bornas.eu>