Forum OpenACS Development: AcsMailLite - Lost on debugging

Request notifications

Collapse
Posted by Iuri Sampaio on
Hi there,

I've got lost debugging acs-mail-lite pkg. Everything was set up and working just fine. Then, error.log suddenly throws 530 errors.

I'm able to send emails from the command line. ACS-Mail-Lite parameters seems to be properly set up. However, OACS still gets authentication errors.

[10/Jan/2017:00:53:38][29922.b51cab70][-conn:evex:1-] Error: acs-mail-lite::smtp: error 530: authentication required while executing
smtp::sendmessage ::mime::21 -originator mailto:bounce-1700-7E188C75F65547E7AAC58E1F0F07772B4AE38C07-336@evex.co -header {From mailto:contato@evex.co} -header {Reply-To mailto:contato@evex.co} -header {To mailto:iurisampaio@evex.co} -servers smtpout.secureserver.net -ports 25 -username mailto:contato@evex.co -password ErRFR&%/&/%çTFDD
[10/Jan/2017:00:53:38][29922.b51cab70][-conn:evex:1-] Error: 530: authentication required
while executing
"error $errorMsg"
(procedure "::nsf::procs::acs_mail_lite::send_immediately" line 215)
invoked from within
"acs_mail_lite::send_immediately -to_addr $to_addr -cc_addr $cc_addr -bcc_addr $bcc_addr -from_addr $from_addr -reply_to $reply_to -subject $subj..."
(procedure "::nsf::procs::acs_mail_lite::send" line 12)
invoked from within
"acs_mail_lite::send -subject $subject -mime_type "text/html" -body $msg -to_addr "mailto:iurisampaio@evex.co" -from_addr "mailto:contato@evex.co" -send_immedia..."
("uplevel" body line 30)
invoked from within
"uplevel {
ad_page_contract {

@author Iuri Sampaio (mailto:iuri@iurix.com)
@creation-date 2011-12-24
} {
{return_url ""}
{email ""}
{..."
(procedure "code::tcl::/var/www/evex/packages/iurix-mail/www/send-mail" line 2)
invoked from within
"code::tcl::$__adp_stub"
("uplevel" body line 12)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare"
invoked from within
"template::adp_parse [file rootname [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 6)

Collapse
Posted by Benjamin Brink on
Hi Iuri,
I updated a website recently and had similar errors after changing the parameters for Mail Services Lite package.

Verify that SMTPHost and SMTPUser parameters are empty.

cheers,
Ben

Collapse
Posted by Gustaf Neumann on
Your external mail server "smtpout.secureserver.net" replies with the error 530, not OpenACS. Maybe the this server is now more restrictive, accepts other authentication options, maybe there are problems with the provided username/password, etc.
Collapse
Posted by Iuri Sampaio on
It seems smtpout all of sudden stopped to authenticate.

I thought at first it was a parameter issue to amend within acs-mail-lite parameter's section. As Claudio well mentioned. but all seems fine there.

I'm able to send mails from prompt line, within mail command, but not from OACS. Would a DNS setting such as CNAME or PFS record be an issue?

How would I make sure OACS layer is not the guilty.

Best wishes,
Iuri

Collapse
Posted by Benjamin Brink on
Hi Iuri,

The STMP parameters double as a switch.

If SMTP* parameters are not empty, then package only tries via SMTP.

If SMTP* parameters are empty, then package will use ns_sendmail, which should work similar to your test (at prompt line).

cheers,
Ben

Collapse
Posted by Gustaf Neumann on
The exception is raised by the command smtp::sendmessage [1] from tcllib. To sort out the OpenACS dependencies, write a small tcl smt client script (as shown in [1]) to see the results.

The man page [1] mentions as well that smtp servers have recently deactivated SSLv3 because of the POODLE attack. If the simple smtp client essentially doing the same as acs-mail-lite fails, please activate tls1 manually from the smtp client script as indicated on the man page. if this helps, we will find a way to do this automatically from acs-mail.lite

-g

[1] https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/mime/smtp.html

Collapse
Posted by Iuri Sampaio on
Thanks Ben & Gustaf,

I solved the problem by cleaning up SMTP* parameters.

@Gustaf,

a smtp client script would increase my odds. I'd be glad if you guide me trough it.

On another front, acs-mail-lite doesn't have the same essentials than simple SMTP. Otherwise, it would work when ACS-MAIL-LITE->SMTP-* parameters are filled in. Perhaps I didn't understand your statement.

Best wishes,
Iuri

Collapse
Posted by Gustaf Neumann on
In case you did not get the intention of the script:

a) acs-mail-lite uses finally tcllib's smtp package

b) you asked, how to debug smtp without OpenACS interference (your formulation "How would I make sure OACS layer is not the guilty". The answer is to call tcllibs smpt package functions via a small script without OpenACS (as indicated in the man page). You can call this script from the shell with any option (look at the options of .::smtp::sendmessage in the manpage). If find a options combination that works from the script, you can check afterwards, how to pass these options via acs-mail-lite. If you find NO combination of options that work, then acs-mail-lite can't do anything, and you have to debug tcllibs smtp.

But since have have fixed out already you misconfiguration, there is no need for going this way.

Collapse
Posted by Iuri Sampaio on
Thanks Gustaf!