[Looking for Charlie's main web site?]

Solving CFMAIL failure, "530 5.7.3 Client was not authenticated"

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
I recently had a problem trying to use CFMAIL from my local development laptop pointing to my hosted server (for carehart.org). The mail would never deliver (ending up instead in CF's mail/Undelivr folder). Fortunately, I knew to look in CF's mail.log, and it would show it was failing with "530 5.7.3 Client was not authenticate".

What was so curious was that my local mail client (Outlook) was configured with the exact same servername, username, password, and port, and ran fine from the same laptop on which CF was running. Both were trying to send email via the remote mail server. Why would CFMAIL fail when Outlook would work, both connecting from the same machine to the same SMTP server with the same connection parms?

The short answer: looks like CFMAIL doesn't support Windows Integrated Authentication

I ultimately determined that the mail server (in my case IIS) was set for something other than plain text (basic) authentication. In my case, the properties for the SMTP server in IIS were set to use only "Integrated Windows Authentication". Changing it to also allow Basic Authentication made the problem go away.

Those using other mail servers may find they also offer something other than plain text (Basic) authentication. Hopefully this will still help those folks solve the problem on their systems, too.

So at a minimum, we can say that CFMAIL doesn't seem to support Integrated Windows Authentication. It may be that it doesn't support anything other than plain text (basic) authentication, but I can't confirm that. The docs don't clarify any restriction (they way they do for CFHTTP, which it says also does not support Integrated Windows Auth).

A google search for the error above, with respect to CFMAIL, also didn't find anyone else making this connection, so hopefully this will help. I will add a comment to the livedocs CFMAIL reference page as well.

Some Background:

FWIW, and how this came about, I recently moved to a new hosted, dedicated server (more in a later entry), running my CF, web server, mail server, etc.

While I had long told Outlook to use my network service provider (Comcast cable) SMTP server, even for mail I would send with a "from" address at carehart.org, I feared that some recipient servers might ding the email as spam for not coming from the mail server at carehart.org. So I changed Outlook to send email via my remote server (carehart.org), and that was all fine for some months.

One day recently I decided to change the CF Admin for my local laptop to also use that server (not that I needed to: I obviously don't send email to customers via CF running on my laptop, but I didn't see any reason not to try.) But that's when I got the error. As I said, part of what threw me was that I had been able to successfully send email from Outlook, on the same laptop as the CF trying to send the email, and Outlook was set to use all the same server settings. I could have switched back to my network provider's SMTP server, but I wanted to get to the bottom of this. And I'm glad I did, as this doesn't seem to have been a well-documented problem and solution.

Some other observations

Before solving this I had presented the problem to some fellow CF gurus, one of the first suggestions I got was from the inestimable Dave Watts, who proposed connecting to the SMTP server via telnet from my laptop. When I did that (after finding the commands needed to do that), it reported (in response to Auth Login) "504 5.7.4 Unrecognized authentication type". I had solved the problem by the time I got around to trying that, but it certainly could have been a key clue for me. I offer it here for others to consider. (Another reasonable suggestion, from Russ Michaels, was to look in the server's logs, but there was nothing much in the server's SMTPSVC log that pointed to a solution. It just showed the 530 code as one of the fields on the attempt login.) Thanks anyway, guys, really. We have such a great community.

Also, some may wonder if the CF Admin's "verify mail server config" option (on the Server Settings>Mail page) would have detected the problem. It did not. It would verify, even when the CFMAIL would fail. That tells me that it doesn't actually try to login, which seems a shortcoming.

Finally, going back to my being thrown by Outlook working where CFMAIL did not, I'll add for anyone curious that none of the Outlook account settings (under "more settings", its 4 tabs) showed it using Windows authentication or encryption (yes, I appreciate the risk of that). I guess Outlook uses Windows Auth by default. It was indeed the only authentication that was configured on the mail server. Again, as soon as I changed it to allow basic, the CFMAIL started working.

Hope all this helps someone.

My CF Meetup talk this week: Sessions and Clients and Crashes, Oh My!"

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
This coming Thursday (Apr 16, at noon EDT) I will be presenting a new talk at the Online ColdFusion Meetup. The topic, as listed on the site and below, may on the surface seem something that doesn't affect you. Maybe you don't "use" sessions, and you probably would say you don't "use" client variables. Maybe your server doesn't crash, or at least not because of those things...or so you think.

Before you dismiss the idea outright, consider the description below, and if you have an hour to spare, come check it out. You may learn something very surprising. Some of the things I'll discuss are not often talked about, from my observation. Yet I help a lot of people who are hurt by them.

I'll add, also, that out of nearly 80 sessions I've hosted, I've only spoken a few times. The meetup is definitely not "the Charlie show". Thanks to all the many other speakers who have come out the past couple of years.

My Session Title: Sessions and Clients and Crashes, Oh My!

Description: You may be suffering and not even realize it. As a consultant, I focus on helping people troubleshoot CF problems, and one of the most common (and least appreciated) problems people suffer are those related to having too many active sessions in memory or a high rate of creation/update of client variables (whether in registry or database). EVEN IF YOU'D SAY YOU DON'T USE SESSIONS OR CLIENT VARIABLES, this may impact you.

In this session, veteran CFer Charlie Arehart will explain the problem. Using live demonstrations and offering code you can use yourself for free, he'll show how to identify both the extent of and the cause of the problems, and various solutions. The concepts provided will apply to any version of CF (or BD or Railo).

To RSVP (not required) or to learn more about the meeting, including the URL to attend, see the event page.

Update:The recording for this is available here.

TOMORROW: CFUnited Express in Atlanta, all day. Great content, giveaways, and more @ discount price

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you haven't heard, tomorrow (Wed, April 15) is the all-day CFUnited Express Atlanta event, a sort of mini-preview of the multi-day conference in DC in August. It's a great deal, really, not only for the great day full of CF and Flex/AIR content, but for other valuable benefits.

First, the speaker lineup starts with the ColdFusion Jedi himself, Ray Camden. Beyond that, several past Atlanta CFUG (and CFUnited) speakers will be presenting (on topics not presented at the ACFUG before): Doug Knudsen, John Mason, Andy Powell, and myself (Charlie Arehart). You can see their topic titles and descriptions here: http://express.cfunited.com/go/atlanta/2009/schedule

Second, there will also be giveaways including a free copy of Flex, ColdFusion, a free ticket to CFUnited, and more.

All this for just $149 (use code CFXEB2 to get this early bird price, even at the door). Pre-registration if preferred, of course, to help them plan for the included coffee/donuts, lunch/sodas, and snacks/beverages, but you can get in at the door at that price with that code. Register or get more info at http://express.cfunited.com/go/atlanta/2009.

Third, note that 100% of your Express event payment can be applied towards your attendance at CFUnited 2009. Between the content, the giveaways (at great odds in the smaller venue than the full conference), and the credit toward the full conference, it's really a great deal.

For still other reasons to attend, see the "top 10 reasons" at http://express.cfunited.com/. If you have any last minute questions not answered on the resources above, you can also call the organizer, Liz Frederick, at 410-963-9418.

Finally, for more about the venue, Roundbox Global (across the street from the Kind Plow Arts Center), including parking information, see this blog entry.

Hope to see you there.

PS If you know anyone in the New York City area, there will be an event there also, next week, April 20. More here.

Monitor CF using Nagios: a useful new way

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Nagios is an open source (Linux based) monitoring tool that many organizations use to monitor their IT infrastructure. Here are two resources to help you monitor it with CF, one of which is a new way that may give additional benefit to those already doing Nagios monitoring of CF.

Basic CF Monitoring in Nagios

First let me share that if you've not explored monitoring CF with Nagios at all, here's at least one blog entry from 2005 discussing that. (A more recent one, at http://profec.net/2009/01/12/monitoring-coldfusion-with-nagios/, which I used to list here, is no longer responding, nor could I find it on archive.org.)

Of course, you can easily use Nagios primarily to report whether CF's up or down, but you can also monitor basic statistics such as are provided via CFSTAT (also available on Windows via Perfmon, which also exposes generic stats about all processes), as demonstrated in that blog entry.

But you may have noticed that, if you run the Multiserver (multiple instances) version of CF, those CFSTAT and Windows Perfmon Stats aren't available on that version of CF.

So what to do if you wanted to monitor more about what's going on inside of CF?

FusionReactor Nagios Plug-in

If you're running FusionReactor Enterprise, you can now get that additional information via the free FusionReactor Nagios Plugin. It's a perl app that when implemented will expose certain key statistics in a way that Nagio can process them (and some are things that CFSTAT and the CF Permon stats don't report):

  • Count of current running requests, and total count of all requests run
  • Count of request queued by FusionReactor
  • Average request runtime (since server start), and Recent request runtime (in past 60s, by default)
  • Count of recent slow pages
  • Memory free in bytes and percentage
  • Memory Total and Max
  • Instance and System CPU Use percentage
  • Count of recently completed JDBC requests

Note that this is technically community-contributed feature (from an Intergral employee, David Stockton), not a supported feature.

If you're running or are interested in FusionReactor Enterprise, check it out.

CF Meetup announcements now available via twitter

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
For those who prefer/enjoy twitter, I'm now announcing the CF Meetup events via twitter, via @cfmeetup.

I do have my own twitter account (@carehart), but I decided to keep these announcements separate. For now, I haven't tweeted a peep in my personal account, but thanks to the ~80 people have chosen to follow me anyway. Hope to make it worth your while soon. :-)

Copyright ©2020 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting