[mlmmj] RFE: improving access rejection messages

Konstantin Ryabitsev <[email protected]> Wed, 04 Oct 2023 21:20:39 +0000
Newsgroups org.mlmmj.mlmmj
Message-ID <20231004-unsnap-cofounder-ed17ed@meerkat>
Hello:

One of the problems I'm having is not being able to tell submitters exactly
why their message was denied. For example, I may have the following rules in
my access file:

    deny ^Content-Type: text/html
    deny ^Authentication-Results:.*dmarcĂșil
    deny ^Subject:.*forbidden-topic

Currently, there is only one message generated on deny, and I have to include
all possible reasons why didn't allow the message through. This can be greatly
improved if we can tell the user exactly why their message was rejected,
instead of making them guess.

I propose extending the functionality to additionally include the reason that
can point at a different file, e.g.:

    deny-html  ^Content-Type: text/html
    deny-dmarc ^Authentication-Results:.*dmarcĂșil
    deny-topic ^Subject:.*forbidden-topic

The dash-extension is used to identify the listtext to use, if present. For
example, if "deny-html" is triggered, the rejection message is loaded from
listtexts/deny-post-access-html. If "deny-dmarc" then from
deny-post-access-dmarc. If there is no matching file present, the usual
fallback path is followed (deny-post-access, then deny-post).

Best regards,
-K