I've installed a Postfix relay server (Debian 10) to send mail from Moodle 3.9 to the relay server, and then trough a Gmail account. I do this because sending mail from Moodle directly to a gmail account exceeds the messages daily limit (I need to send between 4,000 and 8,000 daily messages). I followed the discussion of this thread: https://moodle.org/mod/forum/discuss.php?d=390369, and installed the postfix relay server following the instructions of this link: https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay/.
I am able to send mail from the relay server to the gmail account (a G suite account). That is, every mail sent from the relay server is sent to the final destination through the gmail account. However, I am not able to send mail from Moodle to the relay account. Checking /var/log/mail.log I got this:
connect from my.relayserver.domain[myIPaddress]
disconnect from my.relayserver.domain[myIPaddress] ehlo=2 starttls=1 quit=1 commands=4
I've used ports 25 and 587 with same results. I've been searching for a solution for two weeks with no luck.
I'll appreciate any help you can provide, specially if someone uses a similar approach to send mail through a G suite account to avoid the problem caused by the limited number pf messages set per gmail account.