Shell-linked E-mail

From DreamHost
Jump to: navigation, search
The instructions provided in this article or section require shell access unless otherwise stated.

You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X.
Your account must be configured for shell access in the Control Panel.
More information may be available on the article's talk page.


In the past (prior to April 2008), e-mail addresses were (or could optionally be) linked to shell accounts, meaning that messages could be delivered to and stored in a spoolfile on a shell account, and that programs such as procmail and a local copy of SpamAssassin could be run on incoming messages.

As of April 2008, new e-mail addresses are not linked to shell accounts, being instead IMAP/POP-only, and on Server Moves formerly linked accounts become IMAP/POP only, possibly breaking your e-mail configuration.

You are able to forward to a shell account, capturing most of the effects of shell-linked e-mail, but the shell spoolfile and the IMAP/POP INBOX will not be shared.

The below details:

  • how to setup forwarding to a shell account, and
  • what to do if you previously had shell-linked e-mail and lost it due to a server move.

Dealing with a server move

If you have an account from the stone age (or “paleolithic”, if you prefer), you may have some email addresses which are linked to a shell account. On a server move, these now become IMAP/POP-only accounts, so email will no longer be delivered to shell accounts, nor processed by procmail or your local copy of SpamAssassin or whatever other Rube Goldberg wizardry you’ve configured.

Your options are:

  • add a filter to forward mail to a shell account
    This allows you to use your existing setup, but the messages will only be delivered to your shell account, and will not be available via webmail or other IMAP (or POP) clients, because the shell and IMAP/POP are no longer linked.
  • move to using IMAP/POP + web filters only
    You can get with the times and ditch procmail, using the hopefully good-enough web filters.

Forward to a shell account

NOTE: THIS FEATURE SHOULD ONLY BE USED ON A PRIVATE SERVER WITH COURIER ENABLED FOR LOCAL MAIL CHECKING TO AVOID THE CUMBERSOME AND OFTEN FAILING RE-FORWARD

You can add a filter to “Forward mail to a shell account” at:

Note that forwarding to a shell account is not available at Mailbox Manager, though other filters are.

This allows you to use your existing setup, but the messages will only be delivered to your shell account, and will not be available via webmail or other IMAP (or POP) clients, because the shell and IMAP/POP are no longer linked.

This will send all mail to that shell user to be processed further by a script or delivered to your shell users inbox spoolfile. Doing this will prevent you from accessing mail via webmail or an email client though.

As noted above, you can only check mail using your shell user if you upgrade to VPS and enable IMAP/POP on it. When you do, you will be able to check mail using your shell username in the username@ps#####.dreamhost.com format, and using your servername as mail server, such as ps#####.dreamhost.com.


Re-forwarding

NOTE: WE ARE UNABLE TO OFFER SUPPORT FOR TROUBLESHOOTING THIS PART, USE AT YOUR OWN RISK


You may wish to re-forward messages – forward them first to a shell account, and then back to the e-mail address (either as a copy or after processing), or even to a different e-mail address.

If you forward it back to the e-mail address, you should:

  • have procmail add a custom header, such as X-yourdomainname-procmailified: True and
  • add a filter in the panel above the “Forward to shell account” filter to check for this header and deliver such messages to the IMAP/POP inbox, rather than re-forwarding to the shell account (yielding a loop).

Some users like forwarding via a 3rd party, such as Gmail, as at Double-Pass Spam Filtering with Gmail. This may be useful, but can become quite baroque and hard to debug, and one should proceed with caution.

Move to IMAP/POP + web filters

To ditch shell delivery, you should:

Configure clients
Configure any of your email clients to use IMAP (or POP, if that’s how you roll), in case you’ve been using mutt or Pine on DreamHost servers to read your mail from a spool file on a shell account.
Meanwhile, you can get your email fix at WebMail – SquirrelMail – which is an IMAP client, so it should work until you get your own client set up.
Configure filters
Bereft of procmail and other such abominations, you’ll instead need to use the simple-but-hopefully-good-enough filters on the web, at:

Some filtering (such as SpamAssassin whitelists) will be automatically migrated, but you will want to check them.

See also