所以, 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.
1 |
sudo apt install spamassassin clamav clamav-daemon |
let’s manually install them first.
Config Spamassassin
1 2 3 4 |
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 |
Config CalmAV
1 2 3 4 5 |
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 |
Config Hestia
Now we have both service ready, let’s add them into Hestia CP!
Edit this file /USR/本地/赫斯提亞/CONF/赫斯提亞.CONF , add two lines at the top of the file:
1 2 |
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.
1 2 3 4 |
SPAMASSASSIN = yes SPAM_SCORE = 50 SPAM_REJECT_SCORE = 100 CLAMD = yes |
Something more
所以, 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 /是/日誌/郵件.日誌 it will show as 5.x, 例如, 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 (又名 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.
所以, for the other one, SPAM_REJECT_SCORE it means nothing if you not tick the box for “reject spam”, 然而, 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
本文由 落格博客 原創撰寫:落格博客 » 赫斯提亞添加 spamassassin 和 clamav
轉載請保留出處和原文鏈接:https://www.logcg.com/archives/3876.html