• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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