By default it’s not possible to auto enable spam and virus filter for new inboxes. Plesk provides an event management system where we are able to execute tasks after predefined events. In this case we want to execute a shell command after a user created an inbox.

In the plesk section Tools and Settings there is a menu item called Event-Manager. Create a new event handler with the source event “Mail Account created”. Fill in the following command to the textarea:

/usr/local/psa/bin/mail — update $NEW_MAILNAME -antivirus inout

Save the handler and thats it. You can test your event handler by creating a test inbox and checking the virus tab.

It’s also possible to enable the virus checker only for inbound or outbound messages. Adapt the inout property to in or out for only inbound or outbound virus checking.


Linus Hstge

Enterprise Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store