Pine

Pine is a program that allows you to access your mail directly on the server via the shell interface.

Update: Many Dreamhost servers no longer offer 'pine' but a nearly identical upgrade named 'alpine' is available. If the command 'pine' stopped working for you (e.g. during the fender upgrade circa July 15, 2012) try 'alpine'. For more, see Wikipedia's article on alpine.

Accessing Pine
Instructions for accessing Pine from a Dreamhost account appear here.

You can only access Pine if you have SSH/Telnet access on your account.

ssh -l yourlogin www.example.com (yourlogin is your FTP or shell login name. www.example.com is your Web site.)
 * Open a Terminal window. Type:


 * Enter your password to login.

pine
 * Once you're logged in, type:


 * Login to Pine with your e-mail login and password.

About Pine on Dreamhost
Pine should NOT* work right off the bat for DreamHost users (* see disclaimer at the top of this page). Since we have the system-wide Pine configuration file setup to use IMAP already, you don't have to do anything. Subfolders are (by default) IMAP folders; you can add or change the folder-collection if you'd like to view / save messages in mbox files in ~/mail/ or somewhere. Note that this type of folder will not show up via IMAP. DreamHost uses Courier IMAP, so what would normally be in mbox folder ~/mail/foo will be a Maildir in ~/Maildir/.foo/.

You can (and should) change the default domain (default will be @mailmachine.dreamhost.com) to your domain in 'Setup' (s from the main menu) and then 'Config' (c from the main menu. If you'd like to do more complex things with your outgoing 'From' header, check out the 'Rules' and 'Roles' - 's','r','r' from the main menu.

Configure Pine to connect to your IMAP mailbox
To connect Pine to an email address you will want to use mail.yourdomain.com to connect to your mailbox using IMAP.

inbox-path={mail.yourdomain.com/user=you@yourdomain.com/novalidate-cert}INBOX
 * To setup pine, edit the .pinerc found in your shell user's home directory and change your "inbox-path" to read:

default-fcc={mail.yourdomain.com/user=you@yourdomain.com/novalidate-cert}INBOX.Sent
 * To copy all mail you send to an the Sent folder in that mailbox you would do a search for "default-fcc" and change it to read:

folder-collections={mail.yourdomain.com/user=you@yourdomain.com/novalidate-cert}INBOX.[]
 * To access the IMAP folders do a search for "folder-collection" and change it to read:

smtp-server=mail.yourdomain.com/user=you@yourdomain.com/novalidate-cert
 * By default Pine will use sendmail on your web server to send mail. The default should work fine, however if you wanted to use mail.yourdomain.com as the SMTP server then you would search for "smtp-server" and change it to read:

Changing Your "From" Address
By default, when you send an e-mail message from Pine, your "From" e-mail address comes up as yourmailbox@dhmachine.dreamhost.com. While people can reply to this e-mail address (and you will receive the mail), using it might lead to confusion if you have another address that you'd prefer people to use (and see).


 * From Pine's [M]AIN MENU, choose [S]etup, then [C]onfig. Move down to the user-domain option. Press Enter, and then type in your domain name. For example, yourdomain.com.


 * Press Return to accept the change, and "E" to exit Setup.

Your address will now appear as yourmailbox@yourdomain.com.

If you want your "From" address to appear to be completely different (different username, different domain), you can manually change the "From:" header.


 * From Pine's [M]AIN MENU, choose [S]etup, then [C]onfig. Move down to the customized-hdrs option. Press "A" to add a value to the customized-hdrs list. Use the format:

From: "My Real Name" 

Note: Changing the "From:" line may not give you the anonymity you desire, since the "Sender:" or "X-Sender:" line may still include your entire email address.

(Source: Pine Information Center)

Passwordless Auth
We're phasing out support for passwordless auth over SSH due to some recent problems with this.

If you'd like, you can create the empty file '.pine_passwd' in your home directory.

touch ~/.pine_passwd

Pine will then ask you if you'd like to save your password next time you login.

Note that this is somewhat insecure since the password file (which is not readable by other users) doesn't use very strong encryption, and so if someone were to gain access to your account, they could crack your password. On the other hand, if they gained access to your account, they could read your mail anyway. It might be a good idea to use a different password for mail and shell users, to minimize possible damage.

Using Pine with VIM
If you have configured Pine to use VIM as your editor, by default VIM sets the textwidth to wrap at 72 characters. Since the directive is sourced from a plug-in after ~/.vimrc has been read, you cannot over-ride this setting in the user initialization file. Executing these commands will remove the annoying text wrap:

mkdir -p ~/.vim/after/ftplugin echo "setlocal tw=0" > ~/.vim/after/ftplugin/mail.vim

Note: the system's /usr/share/vim/vim63/ftplugin/mail.vim sets the textwidth. What we did above was create a fake mail.vim which is read after the system version. Disabling plug-ins would have also fixed the problem. Happy pining away!