1

and thank you for reading. I know this question has been asked many times - I've read a ton of different answers, and have tried most of them. None of them have worked so far. I'm pretty new to using postfix and appreciate any assistance you can provide.

I'm using Proxmox 6.1, on Debian buster. I'm attempting to use the email function for failed backups. My domain is using Gsuite mail. I have setup the SMTP relay with both my ipv4 and ipv6 public addresses, and I have verified the credentials are correct and generated new .db each time I made a change.

My sasl_passwd

smtp-relay.gmail.com:587   root@mydomain.com:password

My main.cf (domain & ip have been edited)

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

#myhostname=pve.myisp (auto generated)

myhostname = mydomain.com


#G-Suite relay test
relayhost = smtp-relay.gmail.com:587

# Use tls
smtp_use_tls = yes
smtp_tls_security_level = encrypt
tls_random_source = dev:/dev/urandom

# Use sasl when authenticating to foreign SMTP servers
smtp_sasl_auth_enable = yes

# Path to password map file
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# List of CAs to trust when verifying server certificate
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

# Eliminates default security options which are imcompatible with gmail
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain

compatibility_level = 2

Error logs:

Apr 30 16:45:52 pve postfix/qmgr[34586]: 4B3AD320C9A: from=<root@mydomain.com>, size=396, nrcpt=1 (queue active)
Apr 30 16:45:54 pve postfix/smtp[34617]: 4B3AD320C9A: SASL authentication failed; server smtp-relay.gmail.com[74.125.30.28] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8  https://support.google.com/mail/?p=BadCredentials m33sm110720uad.2 - gsmtp
Apr 30 16:45:54 pve postfix/smtp[34617]: 4B3AD320C9A: to=<mypersonalemail@gmail.com>, relay=smtp-relay.gmail.com[2607:f8b0:4003:c0b::1c]:587, delay=2.6, delays=0.05/0.06/2.4/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp-relay.gmail.com[2607:f8b0:4003:c0b::1c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8  https://support.google.com/mail/?p=BadCredentials v7sm169048ooo.20 - gsmtp)
aus10
  • 21
  • 1
  • 4

1 Answers1

1

I managed to solve my issue.

Ignore any & all gsuite documentation, and use [smtp.gmail.com]:587 instead of smtp-relay.gmail.com:587

aus10
  • 21
  • 1
  • 4