IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Hestia add spamassassin and clamav

    R0uter发表于 2025-01-09 06:23:04
    love 0

    去落格博客阅读完整排版的<span lang ="en">Hestia add spamassassin and clamav</span>

    最近更新:9th 1 月, 2025

    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.

    Config Spamassassin

    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

    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/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

    Something more

    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.

     

    Wrap up

    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>,首发于落格博客。

    其他推荐:
    1. imapsync 邮箱迁移 Plesk 到 Hestia
    2. Hestia CP with Docker app
    3. 迁移 Plesk 到 Hestia
    4. 使用 ClamAV 和 Linux Malware Detection (LMD) 保护你的服务器
    5. Fix apple Mail app slow on start



沪ICP备19023445号-2号
友情链接