What to do when email stops working in VestaCP

VestaCP is an amazing product of software that brings simplicity in handling servers and related applications. With VestaCP is easy to manage websites, DNS, email services and more, but VestaCP isn’t perfect and sometimes something wrong happens.

Email stopped working in VestaCP. Fully or partially

One of the hardest things to maintain effective in handling your own servers is the part relative at the email server. Really many times it happened that something is broken in email services.

So after a while, my email server has stopped receiving emails from any domain but it can still send emails for some address, but not for all. Another time, it did the reverse thing: I can receive emails, but I can’t send. They are really annoying behaviors.

I did a lot of researches to understand what happened, but I wasn’t able to find the right one.

Dovecot problem: a namespace issue

Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It’s fast, simple to set up, requires no special administration and it uses very little memory. Here the Dovecot website.

I edited /etc/dovecot/dovecot.conf following the instructions here:

$ sudo vi /etc/dovecot/dovecot.conf

Adding the following:

namespace inbox {
inbox = yes
}

ClamAV problem: a permission issue

ClamAV is an open source antivirus engine for detecting Trojans, viruses, malware and other malicious threats. ClamAV includes a multi-threaded scanner daemon, command line utilities for on-demand file scanning and automatic signature updates. ClamAV supports multiple file formats, file and archive unpacking, and multiple signature languages. Take a look at ClamAV official documentation.

Sometimes it happened that ClamAV lost the permissions on some folders, so:

CLAMD = yes$ сhown clam:mail /var/run/clamav/

And restart.

Exim problem: a spam issue

Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet. It is freely available under the terms of the GNU General Public Licence. There is a great deal of flexibility in the way mail can be routed, and there are extensive facilities for checking incoming mail. Exim documentation can be found here.

Many times SPAM rules are too restrictive, so:

$ sudo vi /etc/exim4/exim4.conf.template

And change the SPAM score from 50 to a more permissive 20:

SPAMASSASSIN = yes
# SPAM_SCORE = 50
SPAM_SCORE = 20
CLAMD = yes

VestaCP problem: an update issue

I want to be clear. It is possible that every time VestaCP performs an update, it brings problems to your email server. Really. And the most parts of the time it is caused by a not fully completed update.

So, in case, to solve this issue:

$ sudo /usr/local/vesta/bin/v-update-sys-vesta-all

And restart your server.

 

Apart from these issues, don’t forget to check the official VestaCP documentation and, in particular, the CLI commands page, where you can find all the useful commands to use when you ssh to your servers.

Leave a Reply

Your email address will not be published.