mail: cannot send message: Process exited with a non-zero status

I was setting up Postfix with this tutorial

Upon sending test email got this error message “mail: cannot send message: Process exited with a non-zero status”

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.


In addition to what has already been mentioned, you might also have to define your hostname in /etc/hostname and make sure that the hostname for in /etc/hosts matches that too.



Hi @aecsp2000,

I’ll recommend checking the error log to see the exact reason as to why you are receiving this message. The error log should be located in the ```/var/log/` folder somewhere. The file is usually called /var/log/maillog, /var/log/mail.err or /var/log/mail.

Additionally, you can try to reconfigure Postfix with the following command

sudo dpkg-reconfigure postfix

Just let me know which options are you selecting.