• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question SpamAssassin Update Cron

fliegerhermi

Regular Pleskian
I am just working on spam-protection in plesk 12.5
I installed a script which generates a list to inform clients about a list of spam mails in the .SPAM-Folder so that they are informed about false positives in case they are using POP3.

Anyway while doing this I wanted to install a cron that runs sa-update (which updates SpamAssassin-Rules) on a regular basis.

I found the following code in /etc/cron.daily/spamassassin
Code:
#!/bin/sh

# This task was disabled by psa-spamassassin package
exit 0

I went trough the docs, but I couldn't figure out why you did this.
If the customer disables Antispam, than the serverwide-rules don't apply anyway or did I get that wrong?
Thank you for your help!
Cheers!
Max
 
Hi fliegerhermi,

the correct way to use "sa-update" as a cronjob would be for example:

Code:
sa-update --nogpg --channel YOUR_SPECIFIC_CHANNEL_THAT_YOU_WANT_TO_USE && /usr/bin/sa-compile --quiet && /etc/init.d/spamassassin reload

If the "psa-spamassassin" - package disabled your task, it might be the case, that you used a command, which is already included in the "daily-maintenance" task from Plesk.
 
Hi, thanks for your quick reply. I never enabled a task since I saw this default message of the plesk dev team. Just wanted to make sure, that I don't break anything.

Thank you

EDIT:
I just found the file /etc/cron.daily/60sa-update

Code:
#!/bin/sh
### Copyright 1999-2015. Parallels IP Holdings GmbH. All Rights Reserved.

sa_update()
{
        /usr/bin/sa-update
        local rc="$?"
        case $rc in
                # Only restart spamd if sa-update returns 0, meaning it updated the rules
                0) env PATH=/opt/psa/admin/sbin:/usr/local/psa/admin/sbin:$PATH spammng --condrestart ;;
                # If sa-update returns 1 then there are no updates
                1) exit 0 ;;
        esac
        return $rc
}

sa_update >> /var/log/sa-update.log 2>&1

I could modify it, but I guess it will be overwritten on a possible plesk update.
Is a developer on the forum to describe how I should proceed to add a custom ruleset from an external provider?

Thanks
 
Last edited:
Just create own Scheduled Task with necessary command - Tools & Settings -> Scheduled Tasks
 
Back
Top