Author Topic: SOLVED: SMTP Issues After Upgrading From LWC v.2.10  (Read 3186 times)

jlewis8

  • Calm
  • *
  • Posts: 2
  • Station Details: Davis Vantage Pro-2 Wireless - Wireless DataLogger
SOLVED: SMTP Issues After Upgrading From LWC v.2.10
« on: June 03, 2013, 04:15:45 PM »
I have an interesting issue.  I have been running LWC v.2.10 for a long time now with no issues but made the decision to move to WeatherCat v.1.15 Build 25 to support the development effort and to stay current.  I have been sending email alerts (admin and user) by connecting LWC to a local SMTP server offered by a Kerio MailServer instance running on the same server LWC (and now WeatherCat) are installed.  LWC behaved and still behaves flawlessly with no issues connecting via SMTP.  However if I use the same config (server address, port, etc.) WeatherCat complains of a connection timeout.  I see in my mailserver logs when LWC connects, but never see an entry for WeatherCat - good or bad.  Any ideas? 

Alan

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2987
    • CW9739
    • IIBSTO2
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, extra temp stations, no U.V. WeatherLinkLive.
Re: SMTP Issues After Upgrading From LWC v.2.10
« Reply #1 on: June 03, 2013, 05:23:59 PM »
Hi Alan,
LWC used EDMessage to send email (now very old and very unsupported) whereas WeatherCat uses Python's SMTPLib to be able to support attachments and correct character encoding. Various versions of Python have been shipped by Apple over the years (and some have been a bit buggy especially with regards to honouring timeouts) so I'd suggest checking for any updates for your OS that might include Python updates to see if that helps. If not you may have to play around with the mail settings - the error you're getting suggests either it isn't finding the server or some port/firewall issue.

jlewis8

  • Calm
  • *
  • Posts: 2
  • Station Details: Davis Vantage Pro-2 Wireless - Wireless DataLogger
Re: SMTP Issues After Upgrading From LWC v.2.10
« Reply #2 on: June 03, 2013, 09:06:48 PM »
Thanks for your response as I took your comments on Python and figured out my issue.  Short story was I needed to manually install a newer release of Python (v.2.7) that actually had the SMTPLib class/function.  Once done and configured the SMTP feature works as designed. 

But for the benefit of the forum, here is the longer answer.  Upon receiving the response to my post, I realized I was running on an unsupported system (OS X 10.5.8 which has Python 2.5.1).  The reason it wasn't generating SMTP traffic (or email errors) was that Python 2.5.1 doesn't support the SMTPLib function.  That's why when they say OS X 10.6.8 is the minimum OS for WeatherCat, having a workable Python release is one reason.

I can't go to OS X 10.6.8 (Snow Leopard) on this Mac Mini, so I risked trying a Python upgrade.  To compile the new Python binaries for OS X 10.5.8, you must first download and install the correct version XCode development toolkit from Apple so you can get makefile, gcc, kernel libraries, etc..  I chose version 3.1 which was in line for the OS X version I was running and the download took a while given the 1.04GB dmg file size.   Once the XCode was installed, I then downloaded and installed PythonBrew which allows one to manage your Python distros on OS X.  I used PythonBrew to download and install Python 2.7.  Once installed I used PythonBrew to switch the default Python version from 2.5.1 to the newer 2.7 release.  All worked well, except for the /usr/local/bin Python and Python config symbolic links which I corrected at the command line.  Once done, I reloaded WeatherCat and tried my SMTP settings again.  Worked straight away with a suitable version of Python.

Thanks everyone!

Alan