• 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

Bug: Event "Mail account created"

L

lhwparis

Guest
---------------------------------------------------------------
Plesk, 10.1.1, Ubuntu 10.04, x64

PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
It is not possible to manipulate some of the settings done by mail account creation with the event handler "Mail account created" For example this is no more possible: http://kb.odin.com/en/2232

ACTUAL RESULT
The things i wanna change by my event are all overwritten :( i have tried to switch on antivirus for another email account with the Mail account created event, this works! only switching it on for the domain i created at the moment is not possible why?

EXPECTED RESULT
The event is called "Mail account created" so it should fire after creating the mail account and it should be allowed to overwrite setting for this new mail account! i want to switch on antivirus and spam assassin by default for each mail account ( btw. its a shame that there is no option in plesk to do that without event handler)
 
Any feedback about that issue? Can someone pls provide a solution to enable spam-filter and antivirus per default for new created mail accounts?
 
Bump again, no reaction? is ther no way to enable antivirus by default for each new mail adress????
 
I have forwarded it to developers. I will update thread with results.
 
Try to use

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

without ".sh". It should be ok.
 
thanks igor but thats not the problem i think i try to explain it:

[email protected] is an existing email adress

when i create [email protected] with my script it did not activate the mail scanner but when i change my script and hardcore [email protected] as email adress in the script and then try to create [email protected] the antivirus from [email protected] will be activated. the script works! when i trie to hardcode [email protected] in the script and i create [email protected] it also did NOT work:(

so i think its not a problem with the script or with the event its the problem that the script cant change or will be overwritten by plesk if you try to change something for the actual created email adress
 
additionaly to my problem: when i run my script after i created the mailbox with:
/var/my_mail_script.sh [email protected]
it works and the antivir is activated so it is deffinitly overwritten by plesk when it is executed by the eventhandler.
can you pls forward this information to you devs igor?

my script:
#!/bin/bash
/usr/local/psa/bin/mail --update $1 -antivirus in
/usr/local/psa/bin/spamassassin --update $1 -status true -personal-conf true -hits 7.2 -action mark -modify-subj true -modify-subj-text "***SPAM***[_SCORE_]"



BTW: Igor is there now a new event documentation for P10 available? is there a variable for "Additional Services" when a subscription is created? or a way to see which service plan is used? i use plesk9.5 event documentation till now and all this new things i cant handle:(
 
Last edited by a moderator:
Try to use

after
/usr/local/psa/bin/mail --update ${NEW_MAILNAME} -antivirus inout

call

/usr/local/psa/bin/mail --info ${NEW_MAILNAME} after

to see was it enableв or not.
Also, could you please provide which command you use in Event handler, script, where it placed and server level configuration related to mail?

Also, I can say that in Plesk 10.2 after creating mailbox Antivirus is enabled on mailbox.
 
Back
Top