SMTP failed connection

SMTP failed connection

by Farhad Omar -
Number of replies: 4

Hi


I have installed both 3.6 and 3.7 and have the same smtp connection issues. My server port 25, 465, 587 are all open. SMTP services have also been installed. You can even telnet into smarthalal.org.au 25 and get a response. However, when you test configuration within Moodle you get connection not established. Please help.

NB - netstat and ufw shows ports are open and listening.



Attachment Screen Shot 2019-08-02 at 11.16.01 am.png
Average of ratings: -
In reply to Farhad Omar

Re: SMTP failed connection

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Can you post a screenshot of your settings page?
Is noreply@ a valid user on the mail server?
In reply to Farhad Omar

Re: SMTP failed connection

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's highly unlikely that your SMTP server will be accepting connections for authentication over port 25. That's usually (these days) only used for communications from other servers. Make sure - before you do anything else - what port smarthalal.org.au (which I could find nothing about) expects you to connect on and what security protocol should be used. If you're not sure, it saves a lot of time to ask. There's enough variables in getting mail working as it is.
In reply to Farhad Omar

Re: SMTP failed connection

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
To can check the SMTP settings by sending mails independent of Moodle, for example through Thunderbird. If your server allows (non-secure) SMTP it is even simpler: https://mediatemple.net/community/products/dv/204404584/sending-or-viewing-emails-using-telnet.

N.B. In my opinion non-secure SMTP is OK, as long as you have set sufficient precautions, like accepting connections only from localhost.
In reply to Farhad Omar

Re: SMTP failed connection

by Ken Task -
Picture of Particularly helpful Moodlers

Not sure we all understand what you are trying to do.   Moodle doesn't really require an SMTP service on the same server as moodle code.  Moodle, by default, will use phpmailer to send.

You do NOT need to install a full blown mail server that sends and receives mail to run a moodle nor to send mail from a moodle.

Please clarify.

'SoS', Ken