• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

SpamAssasin Enable

K

kieranjones

Guest
I've had a browse and search around the forums and couldn't find anything that specifically answered this so I've posted a new topic.

It seems that Plesk has not been automatically enabling spam assasin on mailboxes. I have no set it up to do this using the event manager.

Question is, how can I easily go through and enable spam assasin on all the mailboxes that don't have it already enabled?

Your help is appreciated :)
 
First of all you can use 'Group Operations' on domains and enable Spamassassin support with help of it: Domains -> domain.tld -> Mail, check all accounts and click on 'Group Operations'. The you will be able to enable Spamassassin support and make some other configurations for mail names on domain.

Plesk also has a functional set of CLI utilities in /usr/local/psa/bin directory including utility spamassassin.sh which allows to change spamassassin settings for specific mailname. To use it in batch mode for all mailnames at once you should put it in some kind of cycle, e.g.:

echo "select concat(m.mail_name,'@',d.name) from domains d, mail m where m.dom_id=d.id" | \
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -Ns | while read mailname ; do \
/usr/local/psa/bin/spamassassin.sh --update $mailname -action del -hits 4.0 ; done

For more options for spamassassin.sh check it's help page:

/usr/local/psa/spamassassin.sh --help

Hope it helps..On Debian server you should user /opt/psa/bin/spamassassin.sh script.
 
Oh..sorry, if you wish to enable only you need to use following command:

echo "select concat(m.mail_name,'@',d.name) from domains d, mail m where m.dom_id=d.id" | \
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -Ns | while read mailname ; do \
/usr/local/psa/bin/spamassassin.sh --update $mailname -status true ; done
 
Thank you! You're a genius, haha.

I love it when someone like you can just post a simple easy to understand and execute answer to a problem like that :)
 
Back
Top