Migration Solutions for ColdFusion Applications to ASP.NET
      
New Atlanta Product Forums Profile | Search | Login | RSS
New Topic Reply   Previous Page  Page: 1   Next Page

Thread: cfmail how to set hostname in message-id?
Created on: 05/20/08 06:52 AM Replies: 11
mscherzer


Joined: 05/20/08
Posts: 9
cfmail how to set hostname in message-id?
05/20/08 6:52 AM

Hi,
Mails sent out with the cfmail tag appear to be blacklisted as spam by some providers I think this may have to do with the message-id mail header that bluedragon sets.

How can i modify this mail header, or how can i get the fully qualified hostname to be used?

Using the following cfmailparam tag did not work.
<cfmailparam name="Message-Id" value="<#createUUID()#@mydomain.com>">


Googling turned up this post which addresses the issue in coldfusion however no solution is provided for bluedragon.

http://carehart.org/blog/client/index.cfm/2008/4/8/cfmail_messageid_solution_for_CF6and7

can anyone help me out on this?
Link | Top | Bottom
andywu


Joined: 10/04/07
Posts: 51
RE: cfmail how to set hostname in message-id?
05/21/08 6:15 AM

You could try either of the solutions suggested by Charlie under:

"Solution for 6, 7, or 8: Configuring it at CF Startup"

or

"Solution for 6, 7, or 8: Changing it programatically"

In the first case, edit the BlueDragon startup script adding in the jvm argument.
Andy Wu, New Atlanta
Link | Top | Bottom
mscherzer


Joined: 05/20/08
Posts: 9
RE: cfmail how to set hostname in message-id?
05/21/08 7:42 AM

I tried the following but still bdragon refused to use the full hostname.

I modified the file:
/opt/bluedragon7/bin/StartBlueDragon.sh

So that the option line was set to:
OPTIONS="-Xrs -XX:+UseParallelGC -Dmail.host=myhost.mydomain.com"

Then restarted the server.

I also tried adding the following just before the cfmail tag:


<cfscript>
sysObj = CreateObject("java", "java.lang.System");
// if there is no mail.host set already, this next variable simply won't be created. need to know that for later. oldmailserver = sysObj.getProperty("mail.host");
sysObj.setProperty("mail.host", "myhost.mydomain.com");
</cfscript>

This also has no effect.

I also tried adding the fully qualified hostname to my /etc/hosts file.


Tried sending the mail as a logged in user instead of relaying by using the extra server/password/port attributes.

still bluedragon sets the mail id to just the hostname without the domain part. DOH
Link | Top | Bottom
andywu


Joined: 10/04/07
Posts: 51
RE: cfmail how to set hostname in message-id?
05/21/08 8:24 AM

In your bluedragon.xml try adding the following line to the cfmail section:

<domain>mymaildomain.com</domain>

Restart BlueDragon for that to take effect.
Andy Wu, New Atlanta
Link | Top | Bottom
mscherzer


Joined: 05/20/08
Posts: 9
RE: cfmail how to set hostname in message-id?
05/21/08 10:38 AM

Thanks for the tip but unfortunately still no luck i changed the cfmail section as follows in the file

/bluedragon7/config/bluedragon.xml


<cfmail>
<interval>240</interval>
<smtpserver>192.168.0.45</smtpserver>
<threads>2</threads>
<timeout>60</timeout>
<domain>mydomain.com</domain>
<charset>UTF-8</charset>
<smtpport>25</smtpport>
</cfmail>

I also found the following information in the FAQ to the JavaMail API (not even sure if thats whats used by bluedragon) but maybe someone can use this information to help me find a solution.

http://java.sun.com/products/javamail/FAQ.html#msgid

Another option i am thinking of investigating is just building my mail tag which uses cffile to write the mail to the spool folder.

Is this idea worth pursuing?

Thanks for the help so far.
Link | Top | Bottom
andywu


Joined: 10/04/07
Posts: 51
RE: cfmail how to set hostname in message-id?
05/21/08 11:17 AM

Ok, looking at our code I can see why the mail.host solution didn't work.

It's an issue we can certainly fix.
Andy Wu, New Atlanta
Link | Top | Bottom
mscherzer


Joined: 05/20/08
Posts: 9
RE: cfmail how to set hostname in message-id?
05/21/08 4:39 PM

That sounds promising, does that mean making an unsupprted patch available (fine by me), waiting for the next hotfix or is this a wait until the next version? Either way thanks for looking into this.
Link | Top | Bottom
andywu


Joined: 10/04/07
Posts: 51
RE: cfmail how to set hostname in message-id?
05/22/08 12:59 PM

We can prepare a patch for you. Which edition of BlueDragon are you using?
Andy Wu, New Atlanta
Link | Top | Bottom
mscherzer


Joined: 05/20/08
Posts: 9
RE: cfmail how to set hostname in message-id?
05/22/08 2:20 PM

I am running the production version of "BlueDragon 7.0.1 Server JX for Linux Single Server"

cheers

Marcel
Link | Top | Bottom
mscherzer


Joined: 05/20/08
Posts: 9
RE: cfmail how to set hostname in message-id?
07/07/08 3:29 PM

It's been a couple of weeks since the last post, are there any updates regarding this issue? Or is a hotfix in sight? we are getting close to opening our site to the public so it would be good to know if I should start searching for an alternative to cfmail.

cheers

Marcel
Link | Top | Bottom



Joined:
Posts: 0
RE: cfmail how to set hostname in message-id?
07/07/08 3:48 PM

Hi Marcel,
There is a patch available for this bug:

ftp://ftp.newatlanta.com/public/bluedragon/7_0_1/patches/

patch 361 is the latest patch for BlueDRagon JX and includes the fix for Bug 3054. You will need to replace your current mail.jar with the one included in the patch, along with the BlueDragonJX.jar.

You'll need to edit your bluedragon.xml with the domain tag under the cfmail element:

<domain>thedomain.com</domain>

If you have any questions, you can email me at bluedragon-support@newatlanta.com.
Link | Top | Bottom
mscherzer


Joined: 05/20/08
Posts: 9
RE: cfmail how to set hostname in message-id?
07/08/08 3:18 AM

Most excellent, I will get patching right away.

thanks for the fast reply.

cheers

Marcel
Link | Top | Bottom

New Post
Please login to post a response.


company media information terms of use privacy policy contact us
This page was dynamically built on the BlueDragon CFML Engine