virtualmin / virtualmin-gpl

Virtualmin web hosting control panel for Webmin
https://www.virtualmin.com
GNU General Public License v3.0
331 stars 102 forks source link

SpamAssassain - Header and body test - Add additional information about test syntax #960

Open shoulders opened 1 week ago

shoulders commented 1 week ago
SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.102
Virtualmin version 7.20.2 Pro
Theme version 21.20.7
Apache version 2.4.52
Package updates 49 package updates are available

Background

The issue

You are able to make and submit rules that do no follow the required convention:

https://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html

Proposed solution

I would like to add the following text (from the SpamAssassain Docs) to the top of the Header and body tests page to help use the correct syntax.

This will be a useful stop gap because there is no form validation which is what users would expect.

Test names must not start with a number, and must contain only alphanumerics and underscores. It is suggested that lower-case characters not be used, and names have a length of no more than 22 characters, as an informal convention. Dashes are not allowed.

image

jcameron commented 6 days ago

Instead of that message, couldn't we just block rules with invalid names from being added?

shoulders commented 6 days ago

Would be better + a link maybe.

But I am sure @iliajie said it would be difficult because of UI limitations.

iliajie commented 6 days ago

I think what Jamie meant was that we can implement server-side validation and simply throw an error if a field isn’t set correctly or is left empty... We don’t actually need to do client-side validation.