General help

email failure

 
Picture of Mahmood Naderan
email failure
 

Hi,

The email feature of the forums were working in the past months. Now I have noticed that no email is sent while I hadn't change the email setting. With the eMail Test plugin, I see this output

2017-09-13 18:56:57	Connection: opening to mail.thesite:25, timeout=300, options=array (
                   	                  )
2017-09-13 18:56:57	Connection: opened
2017-09-13 19:01:57	SMTP -> get_lines(): $data is ""
2017-09-13 19:01:57	SMTP -> get_lines(): $str is  ""
2017-09-13 19:01:57	SMTP -> get_lines(): timed-out (300 sec)
2017-09-13 19:01:57	SERVER -> CLIENT:
2017-09-13 19:01:57	CLIENT -> SERVER: EHLO thesite
2017-09-13 19:06:57	SMTP -> get_lines(): $data is ""
2017-09-13 19:06:57	SMTP -> get_lines(): $str is  ""
2017-09-13 19:06:57	SMTP -> get_lines(): timed-out (300 sec)
2017-09-13 19:06:57	SERVER -> CLIENT:
2017-09-13 19:06:57	SMTP ERROR: EHLO command failed:
2017-09-13 19:06:57	CLIENT -> SERVER: HELO thesite
2017-09-13 19:11:57	SMTP -> get_lines(): $data is ""
2017-09-13 19:11:57	SMTP -> get_lines(): $str is  ""
2017-09-13 19:11:57	SMTP -> get_lines(): timed-out (300 sec)
2017-09-13 19:11:57	SERVER -> CLIENT:
2017-09-13 19:11:57	SMTP ERROR: HELO command failed:
2017-09-13 19:11:57	SMTP Error: Could not authenticate.
2017-09-13 19:11:57	CLIENT -> SERVER: QUIT
2017-09-13 19:16:57	SMTP -> get_lines(): $data is ""
2017-09-13 19:16:57	SMTP -> get_lines(): $str is  ""
2017-09-13 19:16:57	SMTP -> get_lines(): timed-out (300 sec)
2017-09-13 19:16:57	SERVER -> CLIENT:
2017-09-13 19:16:57	SMTP ERROR: QUIT command failed:
2017-09-13 19:16:57	Connection: closed
2017-09-13 19:16:57	SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Is that a sign that the mail server rejects moodle? or there is a problem with the moodle itself?

 
Average of ratings: -
Picture of Ken Task
Re: email failure
Particularly helpful Moodlers

While you might not have changed configuration of the Moodle, doesn't mean there haven't been changes to the SMTP server.   So before chasing a rabbit down a hole thinking it's moodle, understand what the error is saying:

The initial connection failed (HELO command - reference:

http://www.samlogic.net/articles/smtp-commands-reference.htm

which says:

HELO (Hello)
The client sends this command to the SMTP server to identify itself and initiate the SMTP conversation. The domain name or IP address of the SMTP client is usually sent as an argument together with the command (e.g. “HELO client.example.com”). If a domain name is used as an argument with the HELO command, it must be a fully qualified domain name (also called FQDN).

From your moodle server's command line, see if port 25 is opened to your moodle - might have to install nmap to scan that port:

nmap -P0 -p 25 mailserverIPorFQDN

If the port is open, install a text based MTA (like alpine) and configure it to relay mail to the mail server using whatever credentials setup in Moodle.

OR

https://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/

If neither works, then assume it's on the mail server side and contact mail server administrator.

Note: many mail servers now do not use port 25.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Mahmood Naderan
Re: email failure
 
So, the NMAP says it is up.
It seems that there is a problem with the mail server. Thanks for sharing the idea.
 
Average of ratings: -