Reputation: 830
One of our datacenters hosts a webapplication written in CFML / Lucee. It sends mails to customers, but the mails have a high X-Barracuda-Spam-Score. Especially on the Message-Id:
pts rule name description
2.60 INVALID_MSGID_2 Message-Id is not valid, according to RFC 2822
The message-Id looks like this:
<844275327.4929.1591341519768.JavaMail."LOCAL SERVICE"@servername>
When reading the RFC, it looks like the quotes are the problem.
The question is: is there a way to alter this "LOCAL SERVICE" part? The cfmail tag does not give any control over the Message-Id, nor do I find any setting in Lucee. Lucee uses JavaMail for sending messages.
The specs of out Lucee server are:
Lucee Versio 5.3.5.92
Tomcat 9.0.31
Java 11.0.6
Windows Server 2016 (10) 64 BIT
One of our customers uses Coldfusion 9,0,0,251028. The Message-Id of their mails looks like:
<170351411.4299.1591215728394.JavaMail.ServerName$@mailrelay.company.local>
Thanks!
Upvotes: 4
Views: 328
Reputation: 11045
The session property mail.from can be used to control the user account name that is encoded in the Message-Id.
If you can't set the from address you can set the session property for mail.user
to change the messageid and use the mail.<protocol>.user
to switch back to the correct userid.
The session also supports a value of user.name
which can be used to change the user name.
Make sure that you are running the latest version of JavaMail as there are some fixes related to this issue. Mainly versions 1.5.3 and newer remove the user name from the message id.
Another option is to subclass MimeMessage to override the messageID computation.
Upvotes: 3