Item9613: Foswiki::Net does not detect authentication failure sending mail with authenticated Net::SMTP
Priority: Normal
Current State: Closed
Released In: 1.0.10
Target Release: patch
Applies To: Engine
Component: Net
Branches:
Someone has very recently added this error in configure
Error:
Authen::SASL:
Not installed. Required for SMTP Authentication
I have been using SMTP authentication since TWiki 4.0 so why does this error suddenly show up?
There is no dependency on Authen::SASL to authenticate SMTP!
And if there is someone added it in the past 1-2 weeks. And if so, please revert because adding a new dependency of none-standard CPAN lib is wrong and silly when we have been living happily for at least 4 years without such dependency and still had a working SMTP auth.
I downgrade this to Normal.
--
KennethLavrsen - 03 Sep 2010
Kenneth,
Actually this exposed an error in
Foswiki::Net
- Net::SMTP does indeed require Authen::SASL in the
->auth(user,pass)
call. However
Foswiki::Net
does not check the status of the auth attempt, and proceeds to send anyway.
If your SMTP server is configured to permit local networks without authentication, the email is probably going through anyway.
I'll hijack this task to report that
Foswiki::Net
does not detect and report SMTP Authentication failures. I'll add a log message to report that SMTP Authentication failed and that Foswiki will attempt to send the message without authentication.
--
GeorgeClark - 03 Sep 2010
Also committed the error handling to 1.0.10 and set Waiting For Release. Changed the title so that it makes more sense in the release notes.
--
GeorgeClark - 03 Sep 2010
To be complete, should Authen::SASL be added as an optional dependency to the DEPENDENCIES file?
--
GeorgeClark - 03 Sep 2010
I think so
--
GilmarSantosJr - 03 Sep 2010
I already said this on mailing list but for the record in case we come back to this in a couple of years.
It turned out that the smtp server I use in my Foswiki config is the old one my ISP had before they introduced a new one which requires smtp authentication. This means that the smtp server I use never used the username and password I had defined. I just assumed for years that it authenticated. So my initial report was false. George has redefined the headline to match the additional checks he adds so a guy like me has a chance to root cause smtp auth issues.
--
KennethLavrsen - 03 Sep 2010