MailWatch icon indicating copy to clipboard operation
MailWatch copied to clipboard

Feature request - Domain admins and administrators should have option to change entire domain spam scores.

Open mealerz opened this issue 7 years ago • 10 comments

It would mean another option maybe, that would change all users on that domain to the same score for both normal and high scoring spam. Otherwise, you have to get all your users on your domain to log in and get them to all change their scores to the new score. Maybe there should be -

Spam Score: 4 0=Use Default High Spam Score: 10 0=Use Default Global Spam Score: X Global High Spam Score: X

Then instead of mysql query = '[email protected]'; you could explode [email protected] into domain.com and mysql query like '%domain.com'; to update all users on that domain.

mealerz avatar Jan 10 '17 12:01 mealerz

Where do you set the default spam scores now? I don't see anything in conf.php. I've amended the DEFAULT in MySQL but when I create a new user it still says default = 0. Most people will want spamscore = 4 and highspamscore = 10.

mealerz avatar Jul 18 '17 08:07 mealerz

0 means use default, not that is 0 spam score.

asuweb avatar Jul 18 '17 09:07 asuweb

So where do you set default? I see this in user_manager -

$spamscore = deepSanitizeInput($_POST['spamscore'], 'float'); if (!validateInput($spamscore, 'float')) { $spamscore = '0'; } $highspamscore = deepSanitizeInput($_POST['highspamscore'], 'float'); if (!validateInput($highspamscore, 'float')) { $highspamscore = '0'; }

mealerz avatar Jul 18 '17 09:07 mealerz

You should define an admin user (as MailWatch administrator) and set default values for spamscore and highspamscore. MailWatch code will use admin values as default for others users if values set to 0.

stefaweb avatar Jul 18 '17 09:07 stefaweb

OK. I have tried amending my admin user to spamscore = 4 and highspamscore = 10. Then I added a domain admin user and left to 0 as default. I checked mysql but my new user still has scores 0 / 0. Should I not see the scores populate in mysql?

mealerz avatar Jul 18 '17 09:07 mealerz

If I understand this correctly, then if score is 0, use admin score. What if someone creates second admin? Also, it would be great if the user_manager would show the default scores for admin, if this is the case. Something like '0 = Default score ($adminspamscore)' etc.

mealerz avatar Jul 18 '17 09:07 mealerz

You can have only one "admin" administrator login. But you can have more administrator login with a different name. The code look for the "admin" administrator login only.

stefaweb avatar Jul 18 '17 10:07 stefaweb

@stefaweb are you sure that we use the values of the admin account? The last time that I looked at it the values were hardcoded in the pm files

Skywalker-11 avatar Jul 18 '17 10:07 Skywalker-11

It looks like all the pm files have changed in the develop version.

mealerz avatar Jul 18 '17 11:07 mealerz

I will test later on. Just waiting for DNS. This is from the pm

# Based on the address it is going to, choose the correct Spam score.
# If the actual "To:" user is not found, then use the domain defaults
# as supplied by the domain administrator. If there is no domain default
# then fallback to the system default as defined in the "admin" user.
# If the user has not supplied a value and the domain administrator has
# not supplied a value and the system administrator has not supplied a
# value, then return 999 which will effectively let everything through
# and nothing will be considered Spam.

mealerz avatar Jul 18 '17 11:07 mealerz