• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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 How Switch On Anti Virus For Every Mailbox by Default ?

9musashi

Basic Pleskian
Hello,

I tried :
Code:
/usr/local/psa/bin/mail --update $NEW_MAILNAME -antivirus inout
The specified email address is invalid. Please specify a valid address like [email protected]

Plesk antivirus configuration is always "switch off" by default for every mail account. So we have to enable antivirus PER EMAIL ADDRESS, this is not convenient at all. I dont use spamassassin (turn off) so I dont think it will impact my server performance.

How do I 'switch on' antivirus (drweb) for every mailbox for incoming and outgoing by default in Plesk Onyx 17.5.3 ? So we dont have to enable it for the next created email address.
 
Last edited:
I have tried to use Event Handler for "Mail account Created" event and add command: /usr/local/psa/bin/mail --update <new_mailname> -antivirus inout

But it it just hit & misss / intermittently , for example:
[email protected] >>> ON (antivirus in & out ON)
[email protected] >>> OFF
[email protected] >>> ON
[email protected] >>> OFF

And when I set the priority to HIghest, it still hit & miss:
[email protected] >>> ON (antivirus in & out ON)
[email protected] >>> ON
[email protected] >>> OFF

Why is this happened ? Please help

I could also create a script to cronjob with
"mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -NBe"select m.mail_name, d.name from mail as m left join domains as d on m.dom_id=d.id;" | while read j i; do /usr/local/psa/bin/mail -u $j"@"$i -antivirus inout; done"
but sure its not ideal solution.
 
Last edited:
Hi 9musashi,

the default setting for spamassassin and antivirus are always "off", because the usage is ressource intensive and mass-eMail-account creation could result in a serious performance drop on your server.


Here are some possible ways, how you are still able to achieve your goal:

You could use an EVENT HANDLER ( HOME > Tools & Settings > Event Manager > Add New Event Handler ), choosing the pre-configured event "Mail Account created" using the command:
Code:
/usr/local/psa/bin/mail -u <new_mailname> -antivirus inout

And for existent eMail - accounts, you could use a MySQL - command, as for example:
Code:
for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select concat(mail.mail_name,\"@\",domains.name) as address from mail,domains,accounts where mail.dom_id=domains.id and mail.account_id=accounts.id order by address"`; do /usr/local/psa/bin/mail -u $i -antivirus inout; done
 
Hi 9musashi,

the default setting for spamassassin and antivirus are always "off", because the usage is ressource intensive and mass-eMail-account creation could result in a serious performance drop on your server.


Here are some possible ways, how you are still able to achieve your goal:

You could use an EVENT HANDLER ( HOME > Tools & Settings > Event Manager > Add New Event Handler ), choosing the pre-configured event "Mail Account created" using the command:
Code:
/usr/local/psa/bin/mail -u <new_mailname> -antivirus inout

And for existent eMail - accounts, you could use a MySQL - command, as for example:
Code:
for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select concat(mail.mail_name,\"@\",domains.name) as address from mail,domains,accounts where mail.dom_id=domains.id and mail.account_id=accounts.id order by address"`; do /usr/local/psa/bin/mail -u $i -antivirus inout; done

I have tried to use Event Handler for "Mail account Created" event and add command: /usr/local/psa/bin/mail --update <new_mailname> -antivirus inout

But it it just hit & misss / intermittently , for example:
[email protected] >>> ON (antivirus in & out ON)
[email protected] >>> OFF
[email protected] >>> ON
[email protected] >>> OFF

And when I set the priority to HIghest, it still hit & miss:
[email protected] >>> ON (antivirus in & out ON)
[email protected] >>> ON
[email protected] >>> OFF

Why is this happened ? Thank you.
 
Back
Top