I got a call this morning that Master Gardener’s system is not sending emails. So now I’m in troubleshooting mode. I first logged onto the server and checked the Simple Mail Transfer Protocol (SMTP) service. It’s running. I then went into the application and sent out a test message. Did not receive it. I then went into SqlServer Management Studio (SSMS) and logged into prod. Clicked on Management. Then right clicked Database Mail and selected Send Test E-Mail. I sent a test email out from there. I did not receive the email. I then right-clicked and selected View Database Mail Log. There are many errors being displayed. The error message follows:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 20 (2010-04-28T09:37:27). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for [email recipient]).)
I remember this issue in the past. I had mail being relayed to smtp-relay.tamu.edu. TAMU stopped allowing this, so I had to change it to email directly from hcmga.tamu.edu.
Opened up the event viewer. Didn’t see anything related. Opened up IIS6 Manager by going to Administrative Tools | Internet Information Services 6.0. Used 64bit session. Right-clicked SMTP Virtual Server then chose properties. I Enabled logging for W3C Extended Log File Format. Selected all the fields to log and reset new file monthly. Under Access Tab, Clicked Authentication. Changed from Anonymous access to Integrated Windows Authentication. Clicked Connection. Granted access to only server IP address. Clicked on Relay. No entries were found. Added IP address of server to grant relay from server. De-selected ‘Allow all computers which successfully authenticate to relay, regardless of the list above.’ since I really only want this server sending out emails originating on this server. Clicked Apply and closed windows. Restarted SMTP service.
Went back into SSMS and attempted to send another email. Email not sent. The log error message follows:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 20 (2010-04-28T10:34:59). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.3 Client was not authenticated).)
Since I’m tightening up security, I need to change the way SqlServer Database Mail logs into the SMTP Mail service. Right Click on Database Mail in SSMS. Choose Manage Database Mail accounts and profiles. Choose View, change, or delete an existing account. Using first profile, change from Anonymous authentication to Windows Authentication using Database Engine service credentials. Sent another test message from SSMS Database Mail. Success! It works! Now change the remaining profile to update security.
My next task of the morning is to install AWStats on the Harris County Master Gardener website. See my post here, for more details on installation. The main problem I ran into was that the log was not outputting sc-bytes. So, to get AWStats to run, I substituted it for s-port, which is the only numeric field available. I plan to shut down the web site, regenerate the stats, then move the log files, then change the output format to include sc-bytes, then change the config file, then start up the web site and regenerate. This should allow me to keep my historical stats and start getting more accurate transfer data.
Another thing I looked into today was an open source CMS system called WordPress.org. My initial thoughts are very positive about this software. It’s written with a totally open source technology stack (i.e. PHP, MySQL, Apache). I’m definitely going to install it and play around with it in the very near future.
Also, I’m a bit frustrated that my DotNetNuke site isn’t getting the traffic that the BlogEngine.Net site on port 81. So I ran the IIS7 Site Analysis Tool on my site. To run this, open up IIS7, click on the website root, then double-click on Search Engine Optimization under Management. At first, I clicked on my website root and opened up the SEO, but I couldn’t properly run the analysis as it wouldn’t allow me to enter the URL directly.