KB / Email

From DreamHost

Jump to: navigation, search

All sorts of email problems solved here!

Contents

Parent Article

Sub-Articles

How do I access other mail folders on the server besides my inbox?

Our mail servers support multiple folders for your email, but if you use POP3 to access your mail, you'll only ever see your INBOX.

If you want to see other folders (maybe sent-mail, or a spam folder you're filtering spam into, or perhaps .old-messages where we sometimes put messages that are filling up a big inbox), you need to access your email via IMAP or WebMail (which is actually just IMAP as well).

Pretty much every email reader in existence has the option of checking mail via POP3 or IMAP, so just change your setting to IMAP. Then, under the settings somewhere there should be an option of "subscribing" to folders.. which basically just means you want to see those folders. That's about it really.. the specifics vary by email reader, but should be not too difficult to figure out!

How do I check my email?

  1. First, make sure that you have set up your email account on our server. [how do I do that?].
  2. Next, make sure that you have set up your email address(es) [[| [how do I do that?]]].
  3. Then make sure you have set up and configured your email program on your computer [how do I do that?]. There are many different email programs, and they're all slightly different. The process for checking your mail will depend on which program you have installed on your computer.
    If you're using Microsoft Outlook, you can read more about it here: Microsoft Outlook FAQ.
    You could also use your webmail, which you can find at: webmail.yourdomain.com
  4. If you've turned on shell access for this account, you can also telnet or SSH to your account and check your mail that way.

How much email am I allowed to store?

The amount of email you store on your account is counted against your overall storage quota.

You can view the storage quotas for each plan on the DreamHost site.

To check how much storage your account is currently using:

  1. Go to the Users section of the Web Panel, then click on the Users sub-section.
  2. Your storage usage is indicated in the first row, sixth column, which is labeled disk used. <img src = "./images/illustrations/diskused.gif">

Setting up form-to-email on your account.

I would like to set up a form that emails me whatever a user enters into it. How do I do it?

With your Dreamhost hosting account, you have access to a script that allows you to have a form on your web page that, once filled out, can send you whatever the user put in it. This allows you to create basic surveys, 'feedback' forms, content submissions, whatever. Best of all, you can even use this script if your account doesn't normally have CGI capability.

The Basics

The first step is to create a form that you wish for your site's visitors to fill out. You do this in the normal fashion, using HTML to create the FORM tag and related inputs. For a very detailed description of forms, you may want to read up on them here:

     http://htmlhelp.com/reference/html40/forms/form.html

Basically, the simplest form you can use must submit to our formmail script, and provide a recipient to send the form to (usually your email address). You will also need a submit button for the user to press once they are finished. The following example is an extremely basic form that will interact with our setup:

<form action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" method="POST">      <input type=hidden name="recipient" value="email@your.host.com">      <input type=submit> </form>

Obviously, you will need to replace 'email@your.host.com' with the email address you wish the form contents to be sent to. This form isn't terribly useful, as there is nothing within the form itself to send - nothing for your visitors to interact with. You will need to create more form inputs, checkboxes, and text areas for people to fill out. This really depends on the degree in which you want to flesh out your form. to do so, simply create more form elements, ensuring that they are within the <FORM></FORM> tag structure.

Optional Items

There are a number of other optional fields you can use to allow you to customize the information that is submitted to you. Adding these optional tags allows you to customize your form to a greater degree.

Formatting Form Email Results

These optional items allow you to better format the manner in which the form is sent to you. Some options allow you to request the visitor's email address or name, or various other pieces of information that are reported back to you.

Provide a (non-editable) subject with which the form submission is titled:      <input type=hidden name="subject" value="Your Subject">

Provide a subject that the web site visitor can edit:      <input type=text name="subject">

Prompt the visitor for his/her email address (which you can reply to):      <input type=text name="email">

Prompt the visitor for their name:      <input type=text name="realname">

Along with the rest of the email, you may request a set of HTTP environment variables that can be sent along with the form values. This allows you to find out, amongst other things, what browser the user is using, their IP address, etc. Any environment variables you wish to have sent along should be specified in the value attribute of the following hidden field:      <input type=hidden name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">

Specify any fields that you wish to be required in order to process the form submission. If the user does not fill in a required field, they will receive an error message with a link back to the form. The input names must be specified as a comma-seperated list in the hidden field's value attribute.      <input type=hidden name="required" value="email,phone">

Sort fields alphabetically before sending to recipient:      <input type=hidden name="sort" value="alphabetic">

Sort fields in a comma-seperated, specified order before sending to recipient:      <input type=hidden name="sort" value="order:name1,name2,etc...">

Print comma-seperated, specified fields in body of message (bypassing default settings):      <input type=hidden name="print_config" value="email,subject">

Blank fields not filled out by default are not mailed. If you wish for blank fields to be sent as well, place this tag in your form:      <input type=hidden name="print_blank_fields" value="1">

Redirection

By default, a predefined page is presented when the user submits the form. However, you can also specify a particular URL on your site that you wish for them to go to instead. However, even if you do not wish to provide a custom page, you can control the color scheme of the default page.

Specify a URL you wish the visitor to go to once the form is submitted:      <input type=hidden name="redirect" value="http://www.domain.com/">

Allow the user to specify a URL they wish to go to upon submission:      <input type=text name="redirect">

Specify title of page if no redirect page is specified:      <input type=hidden name="title" value="Form Results">

Specify page to link back to once form is submitted, if you do not specify a certain page to redirect to:      <input type=hidden name="return_link_url" value="http://yourdomain.com/">

Title of link back to return page (as defined by 'return_link_url').      <input type=hidden name="return_link_title" value="Main Menu">

URL of page to redirect to if a required field is not filled out correctly.      <input type=hidden name="missing_fields_redirect" value="http://yourdomain.com/error.html">

Background image of default form results page:      <input type=hidden name="background" value="http://your.host.xxx/image.gif">

Background color of default form results page (in standard hex format, in this case white):      <input type=hidden name="bgcolor" value="#FFFFFF">

Font color of default form results page (in standard hex format, in this case black):      <input type=hidden name="text_color" value="#000000">

Link color of default form results page (in standard hex format, in this case red):      <input type=hidden name="link_color" value="#FF0000">

Visited link color of default form results page (in standard hex format, in this case blue):      <input type=hidden name="vlink_color" value="#0000FF">

Visited link color of default form results page (in standard hex format, in this case blue):      <input type=hidden name="alink_color" value="#0000FF">

Can I use procmail to filter my mail?

Only some customers can do this. This feature is not available to new customers or new shell accounts.

NOTE: You can not do this with a mailbox user (those m###### accounts) you have to do it with a real user (with shell access).

The new mail system (if you have a directory named 'Maildir' in your home directory, you're on the new mail system) works a bit differently however, and the previous documentation is incorrect. ( Ergo=> Home Directory = the one with the MailDir in it if you are on the new system. )

Procmail isn't used as the LDA anymore, so you will need to pipe your mail through procmail. To do this, create a file (in your home directory) called ".forward.postfix". This file should have the single line (quotes included): "|/usr/bin/procmail" Be very careful not to use an editor that inserts DOS or Mac carriage returns to edit these files; ideally you should create them on the server using a text editor like Pico, vi, or emacs.

Note that procmail can be very picky about permissions. In particular, don't leave any procmail files or directories set to be group or world writable or procmail won't work properly.

You'll need to create a file named ".procmailrc", also in your home directory.

Here are some common variables that go in this file, and our suggestions on how to set them (username refers to your username):

DEFAULT=$HOME/Maildir/
MAILDIR=$HOME/Maildir
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
SHELL=/bin/sh

You may wish to omit the LOGFILE variable unless you need these logs; they can get quite large if you don't remember to remove them periodically.

You can include rc files with this statement:

INCLUDERC=$PMDIR/filters.rc

where filters.rc is the name of the file with your filters (this can be whatever you want).

Advanced users may wish to omit 'DEFAULT', and instead put the following after *all* other recipes:

:0
$HOME/Maildir/

This will avoid using a lockfile.

The new mail system uses a file format called 'Maildir' to store messages, and the Courier IMAP server. A few notes about adapting procmail recipes for use with this format:

1. Lockfiles are not necessary since Maildir uses an individual file for each message. Thus:

:0:

becomes

:0

2. With courier IMAP, folders are stored inside Maildir and are all subfolders of the INBOX folder. Folders begin with a leading period ("."), so:

mail/foo

becomes:

Maildir/.foo/

Your recipes (assuming you have already defined $MAILDIR in .procmailrc) might look something like this:

 
# put any mail from newdream or dreamhost in the folder 'junk' 
# (we don't recommend that you actually use this one, of course) 
:0 
* ^From:.*(newdream\.net|dreamhost\.com) 
.junk/ 
# filter mutt-users list 
# this will create 'mutt' as a subfolder of 'lists', which, in turn is 
# a subfolder of "INBOX" 
:0 
* ^Return-Path: <mutt-users-owner 
.lists.mutt/ 
# Filter mail to or CC my 'spam@example.com' address to "blah" 
:0 
* ^TO_spam@example\.com 
.blah/ 
# Send this jerk straight to the bit-bucket 
:0 
* ^From:.*william@hq\.newdream\.net 
/dev/null 

Note that a '.' will match any character; if you want to match a literal period, you should escape it with a backslash (as in the examples above).

Please contact support via the Account Control Panel if you have any further questions regarding procmail. Use the links below to learn more about procmail:

Personal tools