• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Event Manager - Mail account created problem

srobin

New Pleskian
I'm trying to enable antivirus and SpamAssassin through the event manager right after a new mail account is created, but it is simply not working. My settings:

Event: Mail account created
Priority: highest(100)
User: root
Command: /usr/local/psa/bin/mail --update $NEW_MAILNAME -antivirus inout

Parallels Plesk Panel's Version is 11.0.9 Update #32.

Additional tests:
- Tried the same settings with an existing user instead of $NEW_MAILNAME -> working.
- Tried the same settings with the future mailadress -> NOT working.
- Tried ${NEW_MAILNAME} instead of $NEW_MAILNAME -> no change.

Can anybody help me?

Best regards
Robin
 
Hello Robin,

I experienced exactly the same problem with Plesk Panel 11.
I found out, that ${NEW_MAILNAME} is resolved correctly, but spamassassin update isn't working.

I solved it in another way. Just configured the spamassassin defaults on the server.

/opt/psa/bin/spamassassin --update-server -status true -personal-conf false -hits 7.0 -action move -modify-subj false

--> enables server defaults, disables personal configuration, sets spam hits to 7, move spam mails to spam folder, disable modification of subject line
---> Please note: Move to spam folder and modify subject line doesn't work at the same time (at least for me)

Then type:

/opt/psa/bin/spamassassin --info-server

Result should be:

######################################
Spam filter configuration for *@*.

Status true
Allow personal settings false
Hits required for spam 7.00
Modify spam mail subject false

Black list
================================
Server-wide black list:

White list
================================
Server-wide white list:

SUCCESS: Gathering server wide information complete.
######################################

If it's still not working, check the following:
Go to Plesk Panel GUI -> Tools & Settings -> Spam Filter Settings
-- enable "Switch on server-wide SpamAssassin spam filtering"
-- disable "Apply individual settings to spam filtering"


I havn't got a solution for automatic enabling the antivirus.
I am creating mailboxes through the Plesk API and I enable the antivirus with the parameter "<antivir>inout</antivir>"

Hope this helps.

Best Regards
Achim
 
Last edited:
Back
Top