DEPRECATED: The scripts below are no longer relevant as
I read different in the thread you pointed to about the user_create_post.sh script.
DirectAdmin Knowledge Base
docs.directadmin.com
So that user_create_post.sh seems still active and relevant because it handles default changes to the user_prefs file as stated in these docs. Only difference would be the .spamassassin directory would not have be made anymore and can be removed from the script.
Then in fact only the domain_create_post.sh sript would be deprectated.
If I understand English correctly then deprecated means it's older and not used anymore but does mostly does not mean it does not work anymore. If I understood correctly from the docs if you don't use the custom .json file then the old way still works. As far as I can detect on my servers, the older method indeed still does work perfectly.
Ofcourse I would like to use the modern way then too as of now.
But I can't remove all filter and filter.conf files, because those contain various settings customized by the users.
So if I understand correctly that optional template spam_defaults.json would take care that both a custom filter and filter.conf is created.
I could now make a spam_defaults.json file instead of the filter and filter.conf files. But the explanation is rather short.
At this moment my filter.conf looks like this:
Code:
high_score=15
high_score_block=yes
where=delete
And filter is kind of like this:
Code:
if
$h_X-Spam-Level: contains "***************"
then
seen finish
endif
if
$h_X-Spam-Status: contains "Yes,"
then
seen finish
endif
if error_message then finish endif
So looking at my filter and filter.conf files, how should my file look? Like this?
Code:
{
"required_hits" : "3.5",
"high_score" : "15",
"high_score_block" : "yes",
"rewrite_subject" : "1",
"subject_tag" : "*****SPAM*****",
}
Is the required_hits pointing to the lowest score? So that would already be a custom score right? Because in DA the lowest score is 5.
Or is does the required_hits mean something else?
Now I would like to have a low score of 5 and high score of 15 and delete all spam by default.
And I want that if users change any value, my override isn't used anymore.
So I would have to set required_hits to 5 and keep the rewrite subject, but just still delete all spam mails until the user decides otherwise.
At this moment I have this working with my scripts this way. A global value is not entered as I see in DA.
But I don't see a way to make this happen in this .json file.