In CFMX7 you can set mail.host as a java property by updating
your JVM arguments with:
-Dmail.host=machine.server.com
ie.:
-Dmail.host=ksmith.adobe.com
Set this in your jvm.config or from the cfadmin java settings
page. Restart cfmx.
My mail creates message-IDs now as:
Message-id:
<11031144.1171396887328.JavaMail.kensmith@kensmith.adobe.com>
It also appears to work if you set the system property on the
template before calling CFMail:
<cfscript>
sysObj = CreateObject("java", "java.lang.System");
sysObj.setProperty("mail.host", "kensmith.adobe.com");
</cfscript>
<CFMail ...
NOTE: As java.lang.System should imply - you are updating a
system property. Therefore all users of cfmail will use this
mail.host. If you are going to use several mail hosts, you will
need to use named cflocks around this code, so you do not have
multiple changes to mail host while it is in use. If you only want
a single mail.host, this will work fine as is.