How to set up email to work properly in VestaCP?

Posted February 11, 2015 53k views

I have VestaCP installed on Ubuntu 14.04 x64 and have created multiple email adresses in VestaCP. I was trying to use roundcube mail client for the emails, but I face a problem when sending emails out.

Most of the servers would reject the emails and provide different error messages. Following is a mesagge from gmail:

  • SMTP error from remote mail server after end of data: host []: 550-5.7.1 [ 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 for 550 5.7.1 more information. gp3si2559708wib.60 - gsmtp *

I have not yet sent a single email succesfully, so previous spam is not a problem.

P.S. Receiving emails works as a charm.

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.

Submit an Answer
11 answers

To Fix this issue:

  1. Make sure your droplet name matches your server name.
    a. Power Off droplet.
    b. Click on Server Name, change this to aka:
    c. Go to Networking in Digital Ocean CP. Click on PTR Records.
    d. Add PTR record for aka:
    e. Power On droplet.

  2. Update Settings in VestCP to match.
    a. In VestaCP, click on Server Tab. (Make sure it has a FQ domain) aka:
    b. Under DNS, add an A record for that subdomain.

For all the settings and update to take place, it will take a while for other servers on the net to respond. But once this is done, you will be able to send/receive to pretty much any domain.

Your ip may be on a blacklist with the major isps.

I checked the common blacklist and it does show clean.

One thing I did notice you have no PTR record. You need to rename your droplet so it matches up with you mail settings.

Also make sure you are setting up SPF and DKIM keys this will help mail from being dumped in the spam folders.

If it is indeed a bad ip about the only solution is snapshot the droplet. Then create new droplet from snapshot then kill off the original droplet.

  • Thanks for your response, but I did not understand the the part about having no PTR recored.
    You suggested renaming droplet so it would match with my mail settings.

    Could you please give some more info about it?

  • A PTR record is just a reverse DNS lookup. See

    When you created your droplet if you gave it a FQDN DigitalOcean would have setup the record for you. You will see it in DO control panel under DNS.

    If you didn’t you will need to rename the droplet to match the server. Like Me personally I don’t like to give out what a servers function is so I give them generic names like

    This may not be your problem but I can tell you with my personal mail server it will bounce mail for missing and invalid dns.

Seriously it is the biggest problem with the control panel tried everything and have checked that the server’s ip is not blacklisted installed ubuntu without firewall etc. etc. i was however able to send trough gmail smtp from wordpress but the webmail installed together with vestacp was still not working. And i was not able to make it work tried several setups

Same here. The Roundcube just don’t send with VestaCP

I configured exim to relay outgoing mails to an external provider (like -free 10k mails-). I think this is the secure and better solution.
There are lot of threads on how to do this.

We are facing same issue @ocsnetworks

We have followed all the steps 1 & 2 of your email and they are reflected

Connecting to

220 ESMTP Exim 4.89 Sun, 02 Jul 2017 14:39:52 +0530 [6161 ms]
EHLO Hello []
250-SIZE 52428800
250 HELP [851 ms]
250 OK [851 ms]
550 relay not permitted [1790 ms]

PWS3v2 10770ms

Issue is still there

1) We cannot send email to any domain like google, hotmail, yahoo etc
2) We can receive email perfectly fine

  • After you updated, did you happen to wait a while before testing? I ran the test an it show that everything is configured properly. It may have taken a bit for the other servers to update your PTR record. Let me know if you still have issues. Also in your VestCP you may want to configure faster connect timeout: In VestaCP, Server tab, then find Exim, Configure and find this line: rfc1413querytimeout = 1s … I have set mine to 1s as it was taking to long for others to knock on the door.

Thanks @ocsnetworks !

Our SMTP port was blocked by DO

They un-blocked it and it is working now

I have update the confg change as per your input

Have a Nice Day!

I Need Help. I Have Disabled My MX Record In CloudFlare. But my Email Verification Process Not Working. When I Register New Username With Email Confirmation Link Not Come My InBox.. my Site

If I could find a way to make vestacp work with mailinabox that would be great....

Previous 1 2 Next