How can I receive mail on a droplet?

  • Posted July 25, 2014

I am running a CentOS 6.5 x32 droplet in AMS2 and would like to be able to receive mail on the commandline. Sending mail from a SSH session is OK! It arrives properly at the recipient as being from the intended user.

Replying to that mail results in:

This is the mail system at host

I’m sorry to have to inform you that your message could not be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

USER@MYDOMAIN: connect to MYDOMAIN[DROPLET IP]:25: Connection refused

This VPS is not meant to be a mailserver and will not support a lot of (mail)users. Incomaing mails are to be to trigger certain scripts…

Probably missed a step… or two!

Any assistance will be immensly appreciated!


Submit an 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.

Take a look at How To Install and Setup Postfix on Ubuntu 14.04. While it is written for Ubuntu, it should still work fine on CentOS 6.5.

Make sure you run

sudo yum install postfix

instead of

sudo apt-get update
sudo apt-get install postfix

I use the free plan from zoho mail. You just need to set up your users and put the mx records on your server. Easy to configure. :)