Muse reader Eric Cobb, whose CFgears blog is an great read, made an excellent point regarding my statement that the designated server for a CFMAIL tag should be a full qualified domain name instead of just an IP address.
Eric wrote:
To me, this seems like it would be a problem with your mail server, not CF. The mail server is responsible for telling the world the FQDN the email is coming from, not CF. All the mail server settings in the CF Administrator do is tell CF who to pass the mail to so it can be sent, right? The mail server does the actual sending of the mail, and should have everything set up to report its FQDN. So if you specify the mail server's IP address in the CF Administrator, that should be fine since the mail server itself is the one actually sending the email. All CF needs to know is which machine to pass the mail to so it can be sent.
I may have a misunderstanding of how things work, but CF isn't a mail server, it just connects to one and lets it do its job, right?
I got to thinking about this and I wanted to be sure - so I ran a test. Here's what I found.
I set up a test by sending 2 mail messages through the same relay. One I sent using the IP address and the other using a fully qualified domain name. Both were exactly the same.
When the 2 emails arrived I took some time to examine the headers of each of them. I wanted to see if that IP address shows up anywhere in the header information. I suspect that Eric is right and that the email server reports it's own FLQDN, but that doesn't mean the IP doesn't show up right? And if it shows up anywhere I'm guessing it's a tipoff to a spam filter some how. Here are the 2 headers (with some stuff removed):
Hmmm... it looks as if Eric is correct. The mail server identied itself as "internalrelay" on lines 5 and line 9. So yes, the relay server is writing into the header the information to correctly identify the origin. But take a look at line 14.
1: Authentication-Results: ...
2: DomainKey-Status: ...
3: Authentication-Results: ...
4: Return-Path: <*muse email*>
5: Received: from internalrelay.cfwebtools.com [10.4.2.18]
6: by mail.cfwebtools.com with SMTP;
7: ...
8: Received: from web-dev3.cfwebtools.com (web-dev3 [10.4.2.211])
9: by internalrelay (8.13.1/8.13.8) with ESMTP id n1DK4tKs028292
10: for <*muse email*>; Fri, 13 Feb 2009 14:04:55 -0600
11: Date: Fri, 13 Feb 2009 14:04:55 -0600 (CST)
12: From: *muse email*
13: To: *muse email*
14: Message-ID: <5097026....@10.4.2.18>
15: Subject: test from ip address
16: MIME-Version: 1.0
17: Content-Type: text/plain; charset=UTF-8
18: Content-Transfer-Encoding: 7bit
19: X-Mailer: ColdFusion 8 Application Server
Perhaps what Declude is clued into is the messageID (a sort of unique signature used by mail servers). The message ID seems to source the message by the IP address of the mail server instead of its FLQDN. If I examine the other message - the one sent using the FLQDN - I'm betting that line will look different, right?
14: Message-ID: <5097026....@10.4.2.18>
1: Authentication-Results: ...
2: DomainKey-Status: ...
3: Authentication-Results: ...
4: Return-Path: <*muse email*>
5: Received: from internalrelay.cfwebtools.com [10.4.2.18]
6: by mail.cfwebtools.com with SMTP;
7: ...
8: Received: from web-dev3.cfwebtools.com (web-dev3 [10.4.2.211])
9: by internalrelay (8.13.1/8.13.8) with ESMTP id n1DK4tKs028292
10: for <*muse email*>; Fri, 13 Feb 2009 14:04:55 -0600
11: Date: Fri, 13 Feb 2009 14:04:55 -0600 (CST)
12: From: *muse email*
13: To: *muse email*
14: Message-ID: <54313234....@web-dev3.cfwebtools.com>
15: Subject: test from ip address
16: MIME-Version: 1.0
17: Content-Type: text/plain; charset=UTF-8
18: Content-Transfer-Encoding: 7bit
19: X-Mailer: ColdFusion 8 Application Server
Now since this is news to me I would love for some savvy Muse Readers to set me straight on what is actually going on here. If you have a clue please fire away.