去落格博客阅读完整排版的<span lang ="en">Hestia add spamassassin and clamav</span>
So, u installed Hestia as ur control panel. And you gonna use it for your email server. And then you found that there is no spam filter and clamav even you selected the option for them during the installation.
It was bcs the Hestia install script will check ur vps memory, if lower than 4GB (not sure the exact size but) it will skip those two.
Anyway, I m in lightsail and I m planing run small jobs but need those two buddy, I have created swap for it, I just need them to spin up.
sudo apt install spamassassin clamav clamav-daemon
let’s manually install them first.
sudo update-rc.d spamassassin defaults sudo systemctl start spamassassin sudo systemctl enable spamassassin sudo sed -i "s/#CRON=1/CRON=1/" /etc/default/spamassassin
sudo gpasswd -a clamav mail > /dev/null 2>&1 sudo gpasswd -a clamav Debian-exim > /dev/null 2>&1 sudo cp -f /usr/local/hestia/install/deb/clamav/clamd.conf /etc/clamav/ sudo update-rc.d clamav-daemon defaults sudo systemctl start clamav-daemon
Now we have both service ready, let’s add them into Hestia CP!
Edit this file /usr/local/hestia/conf/hestia.conf , add two lines at the top of the file:
ANTISPAM_SYSTEM='spamassassin' ANTIVIRUS_SYSTEM='clamav-daemon'
Now if you back to Hestia, in settings page, you can see those two services in the list.
Just one more thing, find exim4 in the list, edit the config, then make sure following content is at the top of the configs and un-comment.
SPAMASSASSIN = yes SPAM_SCORE = 50 SPAM_REJECT_SCORE = 100 CLAMD = yes
So, here it’s pretty straight forward that we make exim4 enabled those two services. (Or one of them if you like). I want mark bit more for the scores. For SPAM_SCORE , it’s the limit for sa to consider if the new email is spam. In the log /var/log/mail.log it will show as 5.x, e.g., 50 here will be 5.0, and if you change it here, the 5.0 in log wont change…. Just ignore it anyway. A clean, and normal email should be scored below 0, as recommend from sa document, 50 (aka 5.0) is pretty aggressive already, good for individual user, if you are ISP, u might want bit higher in case your client complain lol.
So, for the other one, SPAM_REJECT_SCORE it means nothing if you not tick the box for “reject spam”, however, if you did, any spam higher than the value, will be rejected, the email will not show in your mail box at all. And the sender will likely get an notification of failed to send at their end.
All the cmd from the Hestia official installation script here: https://github.com/hestiacp/hestiacp/blob/main/install/hst-install-ubuntu.sh
And a lot help from this post: https://forum.hestiacp.com/t/add-clamav-spamassassin-after-installation/8456
<span lang ="en">Hestia add spamassassin and clamav</span>,首发于落格博客。