How to setup Postfix to send mails using Gmail
Summary
Needed a new SMTP Forward to replace the old one, Windows Workstation, for vCenter Server Appliance (vCenter).
At the same time, could upgrade (free) it to Windows 10.
How-to
On the Ubuntu 18.04 server.
1.
2.
2.3.
2.8.
2.9.
2.1.
Internet site
2.2.
smtp.domain.local
2.3.
2.4.
root@domain.local...
2.5.
No
2.6.
127.0.0.0/8 ...
2.7.
25000000 (25MB)
2.8.
+
2.9.
all (use both IPv4 and IPv6 addresses)
3.
4.
5. Enable “Less secure apps” access: https://www.google.com/settings/security/lesssecureapps
6.
7.
8. Limit what IPs can use the SMTP service.
9. For vCenter:
If not, get:
10.
11.
References
Generate an App Password
https://security.google.com/settings/security/apppasswords
https://support.google.com/accounts/answer/185833?hl=en
Sending email from the VMware vCenter Server Appliance after configuring an SMTP relay gateway fails with the error: stat=Deferred: Connection timed out (2124423)
https://kb.vmware.com/s/article/2124423
Emails are not sent from vCenter Server Appliance 6.5 or 6.7 after an Alert/Event is triggered. (54375)
https://kb.vmware.com/s/article/54375
The sendmail.cf and sendmail.mc Files
https://www.oreilly.com/library/view/linux-network-administrators/1565924002/ch18s04.html
https://security.google.com/settings/security/apppasswords
https://support.google.com/accounts/answer/185833?hl=en
Sending email from the VMware vCenter Server Appliance after configuring an SMTP relay gateway fails with the error: stat=Deferred: Connection timed out (2124423)
https://kb.vmware.com/s/article/2124423
Emails are not sent from vCenter Server Appliance 6.5 or 6.7 after an Alert/Event is triggered. (54375)
https://kb.vmware.com/s/article/54375
The sendmail.cf and sendmail.mc Files
https://www.oreilly.com/library/view/linux-network-administrators/1565924002/ch18s04.html
Configure Postfix to Send Mail Using Gmail and Google Apps on Debian or Ubuntu
Update