ColdFusion MX: Configuring cfmail to use a Fully Qualified Domain Name
Issue
ColdFusion MX uses the javamail API to send email with the cfmail tag. cfmail sends message-ID headers that contain only the servername instead of a fully qualified domain name (FQDN). The lack of a FQDN in the message-ID can increase the spam rating for emails sent by cfmail.
Reason
The reason this occurs is that ColdFusion MX sets the mail.host property to the machine name and not to the FQDN.
Note: This article refers to cfmail in ColdFusion MX 6.x and ColdFusion MX 7.x. It does not apply to earlier versions of ColdFusion. Also, it is expected that cfmail will use the FQDN in future versions of ColdFusion (after CFMX 7.x).
Solution
The mail.host property can be updated by setting a Java argument in the jvm.config file. This can be done using the Coldfusion Administrator "Java and JVM" settings page.
- Add the argument
-Dmail.host=machineName.domainName.com(for example, -Dmail.host=smtp.adobe.com) to the JVM Arguments section. - Click Submit Changes.
- Restart the Coldfusion MX server.
You can also directly edit the jvm.config file by adding this argument at the end of the java.args line. The jvm.config file is found in cf_root\runtime\bin for server installations. It is found in jrun_root\bin for multi-server installations or J2EE installations on JRun 4.
Caution: Always save a working backup of the jvm.config file outside its normal directory before editting the file. This allows for easy recovery should you make incorrect changes to the file.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
