I set up a Postfix/Dovecot virtual domain mail server on a Centos 7 Droplet. I am running 2 domains we’ll call domain.com and domain.org. My server is domain.com and domain.org is pointed to the same IP I have MX and SPF records as well as a mail CNAME DNS record. I also installed MySQL and Roundcube Web Mail client. I built SSL certificates for my domains but I am using domain.com actually mail.domain.com to serve up smtp and imap using SSL ports 993 and 465. Everything works great except when I send an email to my gmail.com account using domain.org the email goes to junk/spam. Sending an email from domain.com goes to the inbox as expected. I added an SPF record to my domains but that didn’t change anything. I currently use a hosting service for my main domain which is not involved in this exercise and uses a common secure mail server address that is different from my domain and those emails get delivered to my gmail inbox correctly. I am sure there is something I need to configure in Postfix but have not figured it out yet. Hoping someone will recognize the issue and help me out. Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!