-1

i tried to test google cloud create an instance with centos 7 and virtualmin and postfix for email.. later I find out that google has blocked port 25 so the emails do not work..I have configure sendgrid to be able to send email and it works fine, but receiving emails does not work, someone could help me I've split my head and I can't find a solution

Report from mxtoolbox:

dmarc   domain.com  DMARC Quarantine/Reject policy not enabled   More Info
mx      domain.com  DMARC Quarantine/Reject policy not enabled   More Info
dns     domain.com  Local NS list does not match Parent NS list      More Info
dns     domain.com  SOA Serial Number Format is Invalid      More Info
dns     domain.com  SOA Expire Value out of recommended range    More Info
smtp    mail.domain.com Reverse DNS is not a valid Hostname 
Max
  • 17
  • 9
  • To receive email you must have port 25 open (ingress) in the Google Firewall and your OS firewall (if one is enabled which some distributions of Centos do have enabled). You also need correct MX records setup at your DNS server. Edit you question with detail on the Google Firewall, your OS firewall and your MX records. Use one of the online Internet tools to validate your email receive configuration: https://mxtoolbox.com/ Advice: Do not host your own email servers unless you have solid experience with mail servers. – John Hanley Aug 26 '20 at 06:26
  • according to this tool I don't have any errors, but I have 6 warning .disable centos firewall to test, also accept everything from google firewall i update the question – Max Aug 26 '20 at 19:37
  • The third warning could be a problem. Your Name Servers must be correct at the Registrar and your DNS server. – John Hanley Aug 26 '20 at 23:35

1 Answers1

0

GCP blocks by default some ports (due to phishing, spam etc) and as you've seen - you have to use 3rd party tools to send emails out and there's no way to open this port for outgoing traffic.

But there's nothing to prevent you from receiving them. Just set up a mail server (just for receiving emails) that will listen on port 25 and create a proper firewall rule (using console or gcloud) to open this port for incoming traffic (by default it's blocked).

Sometimes you will also have to open up port 25 on a system level but that depends on the system you're using.

Smilar case was also discussed here.

Wojtek_B
  • 4,245
  • 1
  • 7
  • 21