VestaCP has built-in features to create a Mail Server that you can use to send or receive email at your own domain,to fight spam mail. In this article I will guide you configure the email server on VestaCP.
Recommendation
Manually installing Mail Server is a tedious task, as sometimes the email is still installed in the Spam folder when sent, which is related to the server's IP or ISP. So I do not guarantee the installation instructions in this article will help you send email directly to Inbox. I still encourage you to use external SMTP if you send mail from the website and Google App Business if you need email by domain.
To set up a mail server in VestaCP, you should set up your own DNS and point to VestaCP and set up SSL with Let's Encrypt for the domain to use to send / receive emails.
You can install the Email Server for any domain in VestaCP on any user, but do not set the email address for the hostname because we should not use the hostname on other things except for serverless access.
STEP 1. MAIL AND CLAMAV DISTRIBUTION (CENTOS 7)
Only if you use CentOS 7.
For some reason, by default ClamAV can not create sockets to run on CentOS 7, so you need to give it permission to the directory containing the socket to run with the following command:
chown -R clam: clam / var / run / clamav /
And if you have SSL installed with Let's Encrypt for the admin page, you must reauthorize the folder containing Let's Encrypt's certificate and its symlink at / usr / local / vesta / ssl.
chown -R root: mail /usr/local/vesta/ssl/certificate.crt
chmod -R 755 / usr / local / vesta
chown -R root: mail / etc / letsencrypt / live
chmod -R 755 / etc / letsencrypt
It's done.
STEP 2. CREATE EMAIL ACCOUNT FOR DOMAIN
When adding domain, please remember to mark Email Support to be able to use email domain name offline. Then go to Mail and click Add Account to add a new email address. Note that looking down at DKIM Support must be Yes.
Then enter the user to create and password.
Now that you have an email account, you can login to https: // hostname / webmail to log in and manage. This is where the user @ domain will be entered
Now try to use a gmail or some mail to send a test email to the email address you have just received. If you have your own DNS domain, you will receive it.
CHECK THE DKIM KEY
To make sure the DKIM Key has been updated to DNS then you should go to DNS and press Listing records to the domain to test. If you see two TXT records named domainkey like this, there is a DKIM.
If you do not have that, go to the Mail section, edit the email address you need to update and uncheck DKIM Support and save, then edit again and mark and save it, it will add DKIM to DNS itself.
Note, you must delete the DKIM _domainkey because if there are two DKIM it will not receive. Just keep mail._domainkey.
If there is DKIM in DNS then you should check online at https://www.mail-tester.com/spf-dkim-check website, the Selector you enter is mail and enter the domain to check.
RDNS (REVERSE DNS)
This one can not be self-set up but have to rely on the ISP to set them up. However, most of us can set up rDNS that is when registering VPS we have to set the same hostname that hostname we will use in VestaCP. For example, set your hostname is sv.vnsudo.com, then the hostname on the VPS must also be.
To confirm that you have rDNS, type host-host-IP command, if it is as shown below, there is rDNS.
CHECKING THE LOG OF EXIM
When setting up email, it's best to view the Exim error log at /var/log/exim/main.log. We should use the tail -f command to look directly at the error message when sending email to know what is wrong.
tail -f / var / log / exim / main.log
SPAM TESTING
And to make sure we have set up full email, please check the spam point at https://www.mail-tester.com/, you just go to get the test email address and then use your email just created to send to that address. Note that for accurate checking, you should compose a long email and title as a real email.
When you are done, go back to the mail-tester web site and click on "check your score". Score 10/10 is great, if not then see where the error and fix, often the error is not DKIM is the most.
If it is still spam then fate is due to fate, setting up email is really very tired so if you do not use it then use SMTP if send mail from the website and use Google App Business if you need to email domain. , I still recommend using external email service to save time but not as safe.
Friday, May 4, 2018
[VESTACP - 9] INSTALL EMAIL SERVER TO RECEIVE AND SEND EMAIL
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment