• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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