• 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

SpamAssassin Setup default value from Server level to Specific mailbox

Status
Not open for further replies.

anonymous_itop

New Pleskian
When i create Mailbox for customer, spamassassin have status (default):

HTML:
Status                           false         
The score that a message must                  
receive to qualify as spam                     
What to do with spam mail        move          
Add the following text to the    true          
beginning of subject of each                   
message recognized as spam                     
Modify spam mail subject text    ***SPAM***    

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

User's black list:

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

User's white list:

But i want it:

HTML:
Status                           false         
The score that a message must    7             
receive to qualify as spam                     
What to do with spam mail        text          
Add the following text to the    true          
beginning of subject of each                   
message recognized as spam                     
Modify spam mail subject text    ***SPAM***    

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

User's black list:

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

User's white list:

Not Move, it only text at "What to do with spam mail text"

How i can do it ?
 
Hello.
There is no way to manage default action for spamfilter on server level in Plesk.
But on Unix and Windows default setting is "text" (Mark spam messages by adding the following text to message subject: "***SPAM***").
It's exactly what you need.
 
but it not my situation, when i create new account, action for mail spam is move it to junk box. How i can change it to adding *****SPAM***** to subject of mail spam.
 
Now it not apply to email account. It not filter mail spam. Where is file or tables mysql which i can adjust to change i.e
"The score that a message must receive to qualify as spam "
or
"Add the following text to the beginning of subject of each message recognized as spam"
 
You may correct spam filter settings in UI, CLI or API-RPC for every mailbox.
Plesk database has data only for mailboxes, but not for server (tables "spamfilter" and "spamfilter_preferences" for Unix and tables "sa_conf", "sa_param" and "sa_list" for Windows).

As workaround I can propose something like this:
Create event handler for action "Mail account creation" ("Tools and Settings" -> "Event manager" -> Click "Add New Event Manager").
Write shell script and set its name in the "Command" field of event handler.

Shell script content:
#!/bin/bash
echo "--------------" >> /tmp/event_handler.log
sleep 5
/usr/local/psa/bin/spamassassin --update $NEW_MAILNAME -status true -action mark>> /tmp/event_handler.log
echo "--------------" >> /tmp/event_handler.log

"sleep 5" string needs, because spam filter settings during creation of mailbox are updated too and you have no effect from spamfilter updating without sleep.

For more information look "spamassassin -h"
 
Last edited:
Status
Not open for further replies.
Back
Top