Difference between revisions of "Alpine"

From ArchWiki
Jump to: navigation, search
m (rm gap)
(This is mostly a rewrite because of several reqests. Most changes were to the IMAP section.)
 
(34 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:Email Client]]
+
[[Category:Email clients]]
'''Alpine''' is based on pine, a text-based E-mail and newsclient that was originally released by the university of Washington in 1991. It is an easier to use alternative to [[mutt]], a more lightweight approach to the mail reader concept.
+
[[ja:Alpine]]
  
Right now, this article is just a quick and dirty guide for configuring Alpine to use a remote mailserver with IMAP.
+
[http://www.washington.edu/alpine/ Alpine] is based on pine, a text-based E-mail and newsclient that was originally released by the University of Washington in 1991. It is an easier to use alternative to [[mutt]], a more lightweight approach to the mail reader concept.
  
As of August 26 2008 the development of Alpine seems to have ended. Another fork called [http://www.archlinux.org/packages/?q=re-alpine re-alpine] has been made to continue the project.
+
== Installation ==
  
==Installation==
+
[[Install]] {{AUR|alpine}}. Optionally a spellchecker may be installed. Alpine supports both {{Pkg|aspell}} and {{Pkg|hunspell}}.
  
Alpine is a package in Extra with some light dependencies, libldap, heimdal>=1.2, and gettext but you can grab them all with:
+
== IMAP ==
  
pacman -S re-alpine
+
Launch alpine:
  
You might also want to grab something to check your spelling, like:
+
$ alpine
  
pacman -S aspell
+
Navigate to the config page by pressing {{ic|S}} then {{ic|C}}. Fill in your name, the name of your mailserver in "User Domain", and your SMTP server for sending mail. The format for the SMTP server is as follows:
 
 
==Configuration for use with IMAP==
 
 
 
Alpine can be configured directly from the config file in your home folder called ".pinerc", but it's usually easier to use the in program configuration tools (which are pretty comprehensive anyway).  You can also create a system wide pinerc file if you want to, but that's beyond the scope of this page.
 
 
 
To start alpine call up a console or a terminal emulator and type, you guessed it:
 
 
 
alpine
 
 
 
You will see the main menu for alpine, you can select various sub-menus by moving your cursor with the arrow keys.  You should also note that a
 
list of handy commands is given at the bottom of the screen including "?" for built in help (see below).
 
 
 
To get to the configuration options we want to type "S" for "setup" and then "C" for "config" (or you can select these by using the arrow keys and return). At the top of your screen you will see various lines you can edit by pressing "C", for "change value" (I've pasted an example in below), you'll probably want
 
to fill in your name, the name of your mailserver in "User Domain" (although you might have to override this later, more on
 
that later), your SMTP server for sending mail and, if you want to, the location of things like your saved message folder
 
and postponed message folder. 
 
 
 
Some notes on setting up your SMTP server, as you can see below I've specified my mailserver and which port to connect to,
 
you also need to specify your username on that server (probably your e-mail address) and if you are using some method of encryption ssl or tls note the format:
 
  
 
  mailserver.org:portnumber/user=username/ssl (or tls)
 
  mailserver.org:portnumber/user=username/ssl (or tls)
  
Also note the format for where I've told Alpine to keep my saved and postponed messages, since I want them stored on the mailserver, and not locally, I've added an entry with form:
+
Also note the format for where Alpine is configured to keep saved and postponed messages. This keeps the messages on the mailserver, instead of saving them locally.
  
  {mailserver.org:portnumber/user=username/ssl}/path/to/folder
+
  {mailserver.org}path/to/folder
  
You need to put the full entry you've specified for your SMTP Server into "{}" before the path name to the folder on the mailserver.
+
The following example assumes a mailserver located at mailserver.org that uses STARTTLS, a user named Jim Bob, and common locations for mail folders on the server.
  
 
  Personal Name                    = Jim Bob
 
  Personal Name                    = Jim Bob
 
  User Domain                      = mailserver.org
 
  User Domain                      = mailserver.org
  SMTP Server (for sending)        = mailserver.org:465/user=jimbob123/ssl
+
  SMTP Server (for sending)        = mailserver.org:587/user=jimbob123/tls
 
  NNTP Server (for news)            = <No Value Set>
 
  NNTP Server (for news)            = <No Value Set>
  Inbox Path                        = <No Value Set: using "inbox">
+
  Inbox Path                        = {mailserver.org}Inbox
 
  Incoming Archive Folders          = <No Value Set>
 
  Incoming Archive Folders          = <No Value Set>
 
  Pruned Folders                    = <No Value Set>
 
  Pruned Folders                    = <No Value Set>
  Default Fcc (File carbon copy)    = {mailserver.org:465/user=jimbob123/ssl}~/mail/sent-mail
+
  Default Fcc (File carbon copy)    = {mailserver.org}Sent
  Default Saved Message Folder      = <No Value Set: using "saved-messages">
+
  Default Saved Message Folder      = {mailserver.org}Archives
  Postponed Folder                  = {mailserver.org:465/user=jimbob123/ssl}~/mail/drafts
+
  Postponed Folder                  = {mailserver.org}Drafts
 
  Read Message Folder              = <No Value Set>
 
  Read Message Folder              = <No Value Set>
 
  Form Letter Folder                = <No Value Set>
 
  Form Letter Folder                = <No Value Set>
  Trash Folder                      = <No Value Set: using "Trash">
+
  Trash Folder                      = {mailserver.org}Trash
 
  Literal Signature                = <No Value Set>
 
  Literal Signature                = <No Value Set>
 
  Signature File                    = <No Value Set: using ".signature">
 
  Signature File                    = <No Value Set: using ".signature">
 
  Feature List                      =
 
  Feature List                      =
  
In this day and age, you probably want to set alpine up receive e-mails from another server using IMAP or POP, to do this we need to enable some things, in particular, check the boxes in the section "Folder Preferences" for "Enable Incoming Folders Collection" and "Enable Incoming Folders Checking".  There's a bunch of other fun stuff to configure, but you can come back to that later.
+
Press {{ic|E}} to exit config. From the main menu, navigate the collectionLists page by pressing ({{ic|S}} then {{ic|L}}) to configure folders. Press enter to edit the folders on mailserver.org, and optionall set a nickname. The Server line uses the same fomat as the SMTP Server line above, except that this is for retrieving rather than sending mail. The following example is for an IMAP server:
  
Now from the main menu type "L" to open "Folder List", then select "Incoming Folders".  Now you'll probably see your default inbox, which I'm assuming you'll want to leave alone in case you receive local mail. To add another folder to receive mail from a remote server type "A" to add a folder.
+
  mailserver.org:143/user=jimbob123/tls
  
Alpine prompts you for "name of server to contain folder", enter your mailserver with the format:
+
The Path and View fields can often be left blank.
  
"mailserver.org:993/user=jimbob123/ssl"
+
== Setting the return address ==
  
where mailserver.org is the name of your mailserver, 993 should be replaced by the proper port to connect to, jimbob123 should be replaced by your username (probably your e-mail address) and ssl should be replaced by tls if you are using tls instead of ssl.
+
To set a return address, enter the config page and navigate to the "Customized Headers" field (either use the "Whereis" command to search, or page down a few pages to find this) and change the value to:
  
Now it will prompt you for the name of the folder on you mailserver to use, it's probably "INBOX" and if it isn't hopefully
+
From:  Jim Bob <jimbob123@mailserver.org>
you can find out from your mail provider what it is.
 
  
Then it will ask you for a nickname, type whatever you want to call the folder.  At this point you might get prompted for
+
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>.
your password on the mailserver, enter it and you should be able to read e-mail!
 
  
=== Saving the password ===
+
== What else can you configure? ==
The default version of alpine ({{Ic|re-alpine}}) in the pacman repository is compiled with the {{Ic|--without-passfile}} making it impossible to store the password. Install (or compile from source) {{AUR|re-alpine-passfile}} from AUR, then {{Ic|touch ~/.pine-passfile}}. Restart alpine, enter imap password, send a main to enter smtp-password. The next time alpine is started there is no need to re-enter the password.
 
  
==Setting up other IMAP folders==
+
Almost anything, in particular you can specify which colors to use, (from the main menu press {{ic|S}} for set up, then {{ic|K}} for colors), a browser to open external links (this is in the "Config" setup that we've previously been modifying"), an alternate text editor to use, different folder views, etc.
  
Great, now you can read your INBOX, but what about the REST of your IMAP folders?  We'll fix that know:
+
Pressing {{ic|W}} allows you to quickly search for options. Messages can be listed in localtime by enabling the option "Convert Dates to Localtime". Toggling options can be done using the enter key.
  
Type "E" to exit setup and make sure that you save the changes.  This should put you back at the main menu type "S" again to bring up the setup menu, but this time pick "L" for collectionLists.
+
== Printing from alpine ==
  
Enter your mailserver info below using the format you should be getting used to by now:
+
[[Printing]] from Alpine directly to {{ic|lpr}} does not work with special characters like Germanic umlauts in the Mail to be printed. The {{Pkg|a2ps}} program does help.
 
+
You can then edit {{ic|~/.pinerc}}:
 
+
# Your default printer selection
Nickname  : My Mailserver
+
  printer=''YOURPRINTER'' [] a2ps -q --center-title --footer -P''YOURPRINTER''
Server    : mailserver.org:993/user=jimbob123/ssl
+
Path      : ~/mail/
+
# List of special print commands
View      :
+
personal-print-command=''YOURPRINTER'' [] a2ps -q --center-title --footer -P''YOURPRINTER''
 
+
   
 
+
  # Which category default print command is in
    Fill in the fields above to add a Folder Collection to your
+
  personal-print-category=3
    COLLECTION LIST screen.
+
Replace ''YOURPRINTER'' with the name of your printer. Note that these settings can also be applied in the setup UI of Alpine. See the manpage of {{ic|a2ps}} for more configuration options.
    Use the "^G" command to get help specific to each item, and
 
    use "^X" when finished.
 
 
 
Note that "Path" is the path on the remote server and you DON'T have to write:
 
 
 
  {mailserver.org:993/user=jimbob123/ssl}~/mail/
 
 
 
You only need to give the local path on the mailserver (in this case ~/mail/)
 
 
 
==Setting up a proper return address==
 
 
 
if you've followed the steps above you can read and write e-mails, but you're probably not specifying your return address correctly, in fact, you will specify you return address properly if and only if the user name on the host computer which is run alpine is the same as your e-mail address on the mail server. In order to fix this we edit the configuration again (type "M" for main menu, type "S" for setup, and "C" for configuration). Then find "Customized Headers"  (either use the "Whereis" command to search, or page down a few pages to find this) and change the value to
 
 
 
  From:  Jim Bob <jimbob123@mailserver.org>
 
 
 
Of course, replace Jim Bob with your name and put your proper e-mail address in the <>. While this works, the behavior of alpine with respect to this field is somewhat complex if you want now more use:
 
  
==Built in help==
+
== Remote Configuration ==
  
to see built-in help files on just about anything you can type "?", if you have an item highlighted, this will give you help on that item.
+
From the setup page, press {{ic|Z}} to enter RemoteConfigSetup. You will be prompted to upload your addressbook, signature, and configuration. In order to use the remote configuration on any computer, on the command line, enter:
  
==What else can you configure?==
+
$ alpine -p "{mailserver.org:143/user=jimbob123/tls}remote_pinerc"
  
Almost anything, in particular you can specify which colors to use, (from the main menu "S" for set up "K" for colors ... should be natural for KDE users), a browser to open external links (this is in the "Config" setup that we've previously been modifying"), an alternate text editor to use, different folder views, etc.
+
It may be desirable to make this command an alias in your [https://wiki.archlinux.org/index.php/Bash#Aliases .bashrc].
  
Pressing "W" allows you to quickly search for options. Messages can be listed in localtime by enabling the option "Convert Dates to Localtime". Toggling options can be done using the enter key.
+
== Tips and Tricks ==
  
==External links==
+
There is no direct, or immediately apparent command for arbitrarily invoking an update of the inbox, however, as indirectly referenced in the manual;
 +
New mail checking and notification occurs automatically every 2.5 minutes and after certain commands, e.g. refresh-screen (Ctrl-L).
  
[http://www.washington.edu/alpine/ Official Alpine Page] this page includes links to un-official Alpine pages that have some handy tutorials (argue better than the one I've provided here), hit "C" to open the config menu.
+
== See also ==
  
==Printing from alpine==
+
* http://www.washington.edu/alpine/ - Official Alpine Page. This page includes links to unofficial Alpine pages that have some handy tutorials (arguably better than the one provided here), hit {{ic|C}} to open the config menu.
:"''See also: [[CUPS]]''"
 
printing from Alpine directly to {{Ic|lpr}} does not work with special characters like German Umlauts in the Mail to be printed. The {{Ic|a2ps}} program does help:
 
pacman -S a2ps
 
You can then edit {{Ic|~/.pinerc}}:
 
# Your default printer selection
 
printer=<YOURPRINTER> [] a2ps -q --center-title --footer -P<YOURPRINTER>
 
 
# List of special print commands
 
personal-print-command=<YOURPRINTER> [] a2ps -q --center-title --footer -P<YOURPRINTER>
 
 
# Which category default print command is in
 
personal-print-category=3
 
Replace {{Ic|<YOURPRINTER>}} with the name of your printer. Note that these settings can also be applied in the setup UI of Alpine. See the manpage of {{Ic|a2ps}} for more configuration options.
 

Latest revision as of 17:27, 22 October 2017


Alpine is based on pine, a text-based E-mail and newsclient that was originally released by the University of Washington in 1991. It is an easier to use alternative to mutt, a more lightweight approach to the mail reader concept.

Installation

Install alpineAUR. Optionally a spellchecker may be installed. Alpine supports both aspell and hunspell.

IMAP

Launch alpine:

$ alpine

Navigate to the config page by pressing S then C. Fill in your name, the name of your mailserver in "User Domain", and your SMTP server for sending mail. The format for the SMTP server is as follows:

mailserver.org:portnumber/user=username/ssl (or tls)

Also note the format for where Alpine is configured to keep saved and postponed messages. This keeps the messages on the mailserver, instead of saving them locally.

{mailserver.org}path/to/folder

The following example assumes a mailserver located at mailserver.org that uses STARTTLS, a user named Jim Bob, and common locations for mail folders on the server.

Personal Name                     = Jim Bob
User Domain                       = mailserver.org
SMTP Server (for sending)         = mailserver.org:587/user=jimbob123/tls
NNTP Server (for news)            = <No Value Set>
Inbox Path                        = {mailserver.org}Inbox
Incoming Archive Folders          = <No Value Set>
Pruned Folders                    = <No Value Set>
Default Fcc (File carbon copy)    = {mailserver.org}Sent
Default Saved Message Folder      = {mailserver.org}Archives
Postponed Folder                  = {mailserver.org}Drafts
Read Message Folder               = <No Value Set>
Form Letter Folder                = <No Value Set>
Trash Folder                      = {mailserver.org}Trash
Literal Signature                 = <No Value Set>
Signature File                    = <No Value Set: using ".signature">
Feature List                      =

Press E to exit config. From the main menu, navigate the collectionLists page by pressing (S then L) to configure folders. Press enter to edit the folders on mailserver.org, and optionall set a nickname. The Server line uses the same fomat as the SMTP Server line above, except that this is for retrieving rather than sending mail. The following example is for an IMAP server:

mailserver.org:143/user=jimbob123/tls

The Path and View fields can often be left blank.

Setting the return address

To set a return address, enter the config page and navigate to the "Customized Headers" field (either use the "Whereis" command to search, or page down a few pages to find this) and change the value to:

From:  Jim Bob <jimbob123@mailserver.org>

Of course, replace Jim Bob with your name and put your proper e-mail address in the <>.

What else can you configure?

Almost anything, in particular you can specify which colors to use, (from the main menu press S for set up, then K for colors), a browser to open external links (this is in the "Config" setup that we've previously been modifying"), an alternate text editor to use, different folder views, etc.

Pressing W allows you to quickly search for options. Messages can be listed in localtime by enabling the option "Convert Dates to Localtime". Toggling options can be done using the enter key.

Printing from alpine

Printing from Alpine directly to lpr does not work with special characters like Germanic umlauts in the Mail to be printed. The a2ps program does help. You can then edit ~/.pinerc:

# Your default printer selection
printer=YOURPRINTER [] a2ps -q --center-title --footer -PYOURPRINTER

# List of special print commands
personal-print-command=YOURPRINTER [] a2ps -q --center-title --footer -PYOURPRINTER

# Which category default print command is in
personal-print-category=3

Replace YOURPRINTER with the name of your printer. Note that these settings can also be applied in the setup UI of Alpine. See the manpage of a2ps for more configuration options.

Remote Configuration

From the setup page, press Z to enter RemoteConfigSetup. You will be prompted to upload your addressbook, signature, and configuration. In order to use the remote configuration on any computer, on the command line, enter:

$ alpine -p "{mailserver.org:143/user=jimbob123/tls}remote_pinerc"

It may be desirable to make this command an alias in your .bashrc.

Tips and Tricks

There is no direct, or immediately apparent command for arbitrarily invoking an update of the inbox, however, as indirectly referenced in the manual;

New mail checking and notification occurs automatically every 2.5 minutes and after certain commands, e.g. refresh-screen (Ctrl-L).

See also

  • http://www.washington.edu/alpine/ - Official Alpine Page. This page includes links to unofficial Alpine pages that have some handy tutorials (arguably better than the one provided here), hit C to open the config menu.