• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

how to enable DrWeb for ALL email at once

N

nickpick

Guest
Since several months there is a new RBL widely used in Holland by the big access provider companies.
This is: virbl.dnsbl.bit.nl
It works great, but there is a downsize.
Many of my clients use mail forwarder to forward their email to email addresses with such a provider.
Some of my clients have switched off (or never switched on) the DrWeb virus scanning for their mailbox. Probably because they just don't care because it is a forwarder. So also the viruses are forwarded.

However, this causes my server to be put on the blacklist repeatedly.
Can't blame the stupid blacklist, though.

So now I want ALL the mailboxes te be scanned by default.
I have already disallowed the clients to be able to switch it off.
In Plesk you can only switch it off on a per-domain basis.

How can I work around this? Plesk support just tells me I need to write a script :(
Can anyone tell what I need to do?
 
Last edited by a moderator:
Ok, since nobody seems to know the solution or nobody else had this problem, I got my lazy *** to work. Here is the solution to enable DrWeb for all mailboxes scanning in and out:

First I disallowed all the clients to manage the antivirus. This can be done with group operations through Plesk.

Then I created the following script as root through SSH:

#!/bin/sh
#drwebon.sh
#query to select mailnames and domains and list them in a file:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e'select m.mail_name, d.name from accounts a, domains d, mail m where m.account_id=a.id and d.id=m.dom_id;' -N > mailadresses.txt

#loop to construct full mail addresses from the list in the previously generated file:
NAMES=`cat mailadresses.txt`
domain="naam"
for a in $NAMES
do
if [ "$domain" = "naam" ]; then
name=$a
domain="adres"
else
address=$a
namecompleet=$name@$address
#Generate file with email addresses; just informational
echo $namecompleet >> completemailaddresses.txt
/usr/local/psa/bin/mail.sh -u $namecompleet -antivirus inout
domain="naam"
fi

done

Then run this nice little script:

sh ./drwebon.sh

Then I noticed lots of zombie drwebd processes...
So I simply restart drweb:

/etc/rc.d/init.d/drwebd restart

That's all folks.

Above counts for RedHat flavours of Linux
 
You are a hero.

See this resource to automatically enable Dr. Web on all new e-mail accounts:

http://kb.odin.com/en/2232
Is there a way to configure Plesk to enable Dr. Web anti-virus checking by default when a mailname is created?
 
Back
Top