Mailx sending all mails to spam folder.

  • Posted on November 17, 2013
  • cjfl0resAsked by cjfl0res

Newbie Here,

My goal is to setup email accounts with my domain (ex: and use the SMTP Server I configured in my NodeJS App to send mails to my app’s subscribers.

I followed this tutorial in setting up Postfix and Mailx:

and installed iRedMail following this tutorial:

All is working fine except that all mails from the email accounts are being sent to the spam folder.

I have set up a TXT Record with these values as instructed in the tutorial:

Name: @ Text: v=spf1 ip4:MYSERVERIP_ADDRESS -all

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

Check out <a href=“”>How To use an SPF Record to Prevent Spoofing & Improve E-mail Reliability</a>.

@Kamal Nasser This is the response I get: <br> <br>StartError <br>Context: Failed to query MAIL-FROM <br>ErrorCode: (2) Could not find a valid SPF record <br>Error: No SPF records for ‘’ <br>EndError <br>none

Here’s an example: <br><img src=“ from 2013-11-17 15%3A50%3A39.png” alt=“screenshot” />