Alpine EMail Client Configuration
Alpine is a CLI email client for BSD and GNU/Linux. Not a difficult program to learn and use, but setting up multiple accounts can be tricky, and not as obvious as it should be.
Several reasons exist for usage of a CLI tool. One reason is setting up on a remote server that you can have as a hub for all your mail that can be ssh'ed into and have all your accounts setup and ready, along with any special configuration such as macros, etc. This can be especially handy when using portable devices such as a PiTop, PocketChip, etc. This allows for zero config, as your remote system is already good-to-go.
Also, it can be faster than a GUI in many cases. Caveat is, of course, that you must get proficient with the tool (mutt is an alternative).
Whatever is the case for you, here is a quick and dirty primer on getting setup and using Alpine. Happy hacking!
sudo yum -y install alpine
sudo dnf -y install apline
Debian & Ubuntu & derivatives
sudo apt -y install alpine
SETUP IMAPS AND BASIC SMTPS
At the main screen type 's' then 'c' to get to the configuration page
- Set "User Domain" to be the fqdn of your main account. So if you have the account firstname.lastname@example.org, set it to test.com
- Set "SMTP Server" to be your smtp server with the following format to handle users logging in (presuming TLS security, change port as appropriate):
- Type 'e' to exit setup, and save changes when prompted to
- Type 's' then 'l' to enter the incoming accounts (also named Collections by Alpine) area
- Type 'a' to add an account
Fill in the nickname field. Then fill in the server field using the following format (presuming imaps here)
email@example.com 9. You will be prompted for a password for the account, provide it. 10. Type CTL+X to save settings and go back to the account list 11. Repeat as need be to add all accounts you have.
Usage of multiple SMTP servers requires the setup of role(s). The following is a rough guide on how to accomplish this
- Goto the "Setup Role Rules" screen by typing 'm' 's' 'r' 'r'
- Add a role by typing 'a'
- Enter role name in the Nickname field
- Under "Current Folder Type", select "Specific", and fill in the "Folder List" field below it with the incoming nickname(s) you want the role to handle.
Scroll down to "Actions Begin Here" section and fill in the "Set From" field
Desired Display Name <firstname.lastname@example.org>
Go to the "Use SMTP Server" and fill in the field
Go to the "Uses Begin Here" section, and select "Without Confirmation" for each of Reply, Forward, and Compose Use. This will stop Alpine from asking what role you want to use, and instead use the role assigned to the mail folder, as defined by the "Folder List" back at the top of the screen.
MANIPULATION OF MESSAGES
Some of the common commands:
|?||help screen with ALL of the commands available|
Now a tip : when you highlight or enter a message, you can type 's' to "Save" it to another file or move it to another mailbox. On multi-collection setups, you may have the wrong collection pre-selected, so use CTL+N or CTL+P to change the collection. You will see the
Default prompt, with the standard, local, mailbox:
SAVE Msg #1 to folder in <Mail> [saved-messages] :
SAVE Msg #1 to folder in <andrew@andrew...> [saved-messages] :
From here you may type in your new folder you want to plop the message into (such as 'Archive')
SAVE Msg #1 to folder in <andrew@andrew...> [saved-messages] : Archive
- Two factor on GMail will require the use of an app password.
- I gave examples for IMAPS, but IMAP, POP3, POP3S are also supported. As I do not use non SSL/TLS and don't touch POP anymore, I cannot guarantee any example I provide will in the slightest bit be accurate. Google it, try it if you are an anti-SSL or POP heathen.