I followed the steps outlined here: https://www.reddit.com/r/homelab/comments/5nzmm3/setting_up_the_proxmox_email_alerts/ and these https://forum.proxmox.com/threads/proxmox-setup-for-gmail.13405/ to no avail
I got a 2FA password from google as well and that is included here, but don't worry I've revoked it already. Here is my full setup.
And here is what my logs say is going on.
I got a 2FA password from google as well and that is included here, but don't worry I've revoked it already. Here is my full setup.
Code:
root@TracheServ:~# apt-get install libsasl2-modules
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsasl2-modules is already the newest version (2.1.27+dfsg-1+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@TracheServ:~# cat /etc/postfix/sasl_passwd
smtp.gmail.com myemail@gmail.com:pbscstudmxhrfofz
root@TracheServ:~# postmap hash:/etc/postfix/sasl_passwd
root@TracheServ:~# chmod 600 /etc/postfix/sasl_passwd
root@TracheServ:~#
root@TracheServ:~# cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
compatibility_level = 2
myhostname=TracheServ.TracheNet
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
recipient_delimiter = +
# Adding gmail compatibility
relayhost = smtp.gmail.com:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/Entrust_Root_Certification_Authority.pem
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
smtp_tls_session_cache_timeout = 3600s
root@TracheServ:~# postfix status
postfix/postfix-script: the Postfix mail system is running: PID: 44147
root@TracheServ:~# echo "testing" | mail -s "test message" myemail@gmail.com
And here is what my logs say is going on.
Code:
Nov 28 17:38:05 TracheServ postfix/smtp[20336]: connect to alt4.gmail-smtp-in.l.google.com[66.102.1.27]:25: Connection timed out
Nov 28 17:38:05 TracheServ postfix/smtp[20336]: 7B1FF36AA9: to=<myemail@gmail.com>, relay=none, delay=39302, delays=39151/0.03/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[66.102.1.27]:25: Connection timed out)
Nov 28 17:38:10 TracheServ systemd-logind[2613]: Session 448 logged out. Waiting for processes to exit.
Nov 28 17:38:10 TracheServ systemd[1]: session-448.scope: Succeeded.
Nov 28 17:38:10 TracheServ systemd-logind[2613]: Removed session 448.
Nov 28 17:38:10 TracheServ pvedaemon[40656]: <root@pam> end task UPID:TracheServ:0000499C:07F094BA:5FC2D086:vncshell::root@pam: OK
Nov 28 17:38:19 TracheServ postfix/smtp[24098]: connect to gmail-smtp-in.l.google.com[172.217.215.26]:25: Connection timed out