Guys, thank you all very much for your support and help. I've got some good changes on my end. Finally, I was able to set everything up and I can successfully send emails!!! Hooray!
So, first of all, I've noticed that my VM does not have Postfix installed. No clue how I didn't notice it anywhere in the manual, but I had to get it installed and was able to configure the ports 25 to 2525.
Here is the link to the Postfix installation instruction and settings:
https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid#centos_4
I have to say that I had to register a remote SMTP account with SendGrid. After I've got an account with them (free of charge for the first 10K emails), I had to configure API to connect to my server, it won't work with username and password, instead, you have to use the API key provided by SendGrid.
Here is the link to set up SendGrid API keys:
https://docs.sendgrid.com/for-developers/sending-email/integrating-with-the-smtp-api
Don't forget to add port 2525 to the CSF, it's not there by default.
-------------------------
I have the next problems and questions.
I'm able to send emails via the main domain of the host: webhostmost.com (
[email protected]). It's not working if I have CSF enabled though. Why? I've set port 2525 on TCP as In and Out for IPV4.
Once CSF is enabled, when I'm sending an email, it's giving me the error SMTP -1 and won't send anything. If I turn it Off, works like a charm.
My next problem is the following.
I've created a second user with a different domain (po4ki.net). If I register an email, such as
[email protected], the email couldn't be sent.
It's giving me this error right away:
SMTP Error: [550] The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit
https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements
If I'm checking logs, It's saying that I have authentication problems. How do I fix that?
What type of DNS do I have to set for the new user with a different domain?
Please, help!