outgoing mail configuration Postfix/Dovecot

outgoing mail configuration Postfix/Dovecot

by Tony C -
Number of replies: 4

Hi,

I'm running Moodle 3.9.1 on FreeBSD.

I am trying to get my outgoing mail configuration working. I am wanting to use a SMTP server on a separate server that i admin. it's running Postfix/Dovecot.

I am using settings I use with mail clients successfully. SSL via port 25.  i am receiving the warning "Your site couldn't communicate with your mail server. Please check your outgoing mail configuration"

if i tail -f my mail log on the target SMTP server i don't get much useful info...

Oct  7 03:23:36 brideshead postfix/smtpd[63086]: connect from therapy.pomegranateclinic.com.au[149.28.167.162]
Oct  7 03:23:36 brideshead postfix/smtpd[63086]: lost connection after CONNECT from therapy.pomegranateclinic.com.au[149.28.167.162]
Oct  7 03:23:36 brideshead postfix/smtpd[63086]: disconnect from therapy.pomegranateclinic.com.au[149.28.167.162] commands=0/0
Oct  7 03:24:36 brideshead postfix/smtpd[63086]: connect from therapy.pomegranateclinic.com.au[149.28.167.162]
Oct  7 03:24:36 brideshead postfix/smtpd[63086]: lost connection after CONNECT from therapy.pomegranateclinic.com.au[149.28.167.162]
Oct  7 03:24:36 brideshead postfix/smtpd[63086]: disconnect from therapy.pomegranateclinic.com.au[149.28.167.162] commands=0/0

Average of ratings: -
In reply to Tony C

Re: outgoing mail configuration Postfix/Dovecot

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You might find some hints in these discussions:
- Postfix relay server not accepting Moodle mail https://moodle.org/mod/forum/discuss.php?d=410368
- SMTP connect error with Gmail after upgrade to 3.7 https://moodle.org/mod/forum/discuss.php?d=390369
In reply to Visvanath Ratnaweera

Re: outgoing mail configuration Postfix/Dovecot

by Tony C -
neither are wholly relevant to my situation. I will investigate my postfix configuration.
In reply to Tony C

Re: outgoing mail configuration Postfix/Dovecot

by Tony C -
Issue resolved:
There were two misconfigurations.
Firstly I needed to add the Moodle server domain to postfix's allowed relay_domains.
Secondly I needed to change Moodle's outgoing email configuration to use TLS instead of SSL.
SSL settings working fine for email clients connecting to the server but not for Moodle using my postfix server as a relay.

thanks Visvanath for your assistance.
Average of ratings: Useful (1)
In reply to Tony C

Re: outgoing mail configuration Postfix/Dovecot [RESOLVED]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

Hi

Thanks for reporting back the solution. Not everybody does that.

The error you reported was the typical log in error. Good to know that not allowed domains send the same error. The full hand-shake, like what the plug-in https://moodle.org/plugins/local_mailtest throws, would have helped.