Howto enable antivirus for all accounts in Plesk

To enable AntiVirus for all accounts in Plesk you can use the following script:

#!/bin/bash
 
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa<<-EOT
UPDATE mail 
  SET virusfilter = 'any'
  WHERE postbox = 'true' AND virusfilter != 'any'
EOT

You can run it daily from the cron to keep your mailboxes protected.

2 comments ↓

#1 adrians on 07.08.09 at 5:33 pm

when run this script (I have Plesk 9.2.1):

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘EOT’ at line 4

Regards,

#2 Vitalie Cherpec on 07.08.09 at 6:13 pm

Run SQL query without EOT.

Leave a Comment