I have a centos7 vm running a postfix using gsuite SMTP relay without authentication on port 587. I am able to successfully send email from the server itself. When I try to send email using a client, I am getting the following error:
" host smtp-relay.gmail.com[173.194.208.28] said: 550-5.7.1 Invalid credentials for relay [my public IP]. The IP address you've 550-5.7.1 registered in your G Suite SMTP Relay service doesn't match domain of 550-5.7.1 the account this email is being sent from. If you are trying to relay 550-5.7.1 mail from a domain that isn't registered under your G Suite account 550-5.7.1 or has empty envelope-from, you must configure your mail server 550-5.7.1 either to use SMTP AUTH to identify the sending domain or to present 550-5.7.1 one of your domain names in the HELO or EHLO command. For more 550-5.7.1 information, please visit 550"
After adding the following lines in my /etc/postfix/main.cf file,
smtp_always_send_ehlo = yes
smtp_helo_name = <mydomain.com>
I started getting the "Undelivered mail return to sender" email with the error mentioned above.
I have checked my gsuite admin settings and my IP address is registered. Any help would be greatly appreciated!