Overview
This article explains DreamHost's Sender domain policy, which was created to protect the reputation of DreamHost’s mail servers and provide a stable and reliable service to customers.
Background
DreamHost’s sender domain policy ensures email that is sent from your website is legitimate. This policy requires two things:
- You must use a FROM address that's on the same domain you're sending email from.
- The email must be hosted at DreamHost.
When this policy applies
This policy applies to all DreamHost-hosted emails, including those being sent directly from the web server, most often through a PHP contact form.
When this policy does not apply
If you use SMTP authentication with an external mail provider, this policy DOES NOT apply to you. You can use SMTP authentication in a few ways:
Additionally, this policy does not apply to DreamHost's VPS and Dedicated Servers. Emails sent from a VPS or Dedicated Server using PHP's mail(), Sendmail, or SMTP via localhost, are sent directly through the server's postfix mail system and go out to the recipient without passing through any other DreamHost server.
Examples of FROM addresses
The following specifies email addresses this policy allows, as well as addresses that will be rejected by it.
Acceptable FROM addresses
How the email is sent | FROM address used | Explanation of address |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Blocked FROM email addresses
Emails should not be sent with a FROM address hosted somewhere else. For example:
- user@comcast.net
- user@gmail.com
If you need to use any address not hosted with DreamHost as your FROM address, you must use SMTP authentication.
The list of blocked domains does not include every single domain that does not use the DreamHost mail service. Instead, it's a dynamic list maintained by DreamHost's mail administrators. While you may occasionally be able to send an email using a FROM address with a domain that is not hosted at DreamHost, there is no guarantee it won't be blocked in the future. To ensure your emails will not be blocked, only use a FROM address on a domain that uses DreamHost-hosted mail service.
How to view rejected emails
Blocked emails are returned to the sender as an 'undelivered' bounced email and may be stored in the Maildir/new folder on the web server. You have several options to view this information.
Option 1 — Using FTP
- Log into your server via FTP.
- Confirm you're in your user's directory.
- In the right pane, click into the /Maildir folder.
- Click into the /new folder to view a list of email files.
- Right-click and open a file in a text editor to view its contents and the reason it failed to send.
-
Blocked email displays the following error message:
5.7.1 Sender domain not allowed
-
Blocked email displays the following error message:
Option 2 — Contacting support
DreamHost support can also check the server mail logs for any errors that may have been recorded. When you Contact Support, provide as many details as possible about the email to research. Here are the minimum amount of details support needs to assist:
- Date and time it was sent (including timezone)
- Email addresses it was sent TO
- Email address it was sent FROM
- The website URL for the web form that is not functioning properly
Option 3 — Creating a custom script
Instead of manually checking the folder on your server, you can create a script that automatically emails you whenever an email is rejected. See this article for further details.