https://gitlab.synchro.net/main/sbbs/-/commit/0b669450bfc6dedcc42e5ae4
Added Files:
exec/tests/webmail/blocktags.js webmail/lib/blocktags.js
Modified Files:
exec/tests/webmail/api_settings.js webmail/lib/api.js webmail/lib/locale/en_us.ini webmail/root/js/settings.js
Log Message:
WebMail: block and unblock address tags in Settings
The mail server delivers mail for name#tag@host to the user of that
name unless the tag is listed in data/user/NNNN.smtpblock. Until now
that file could only be edited by hand, by someone with access to the
system's files.
Settings has a new "Address tags" section: it lists the user's blocked
tags, blocks a new one (typed as the tag, or pasted as a whole
name#tag@host address) and unblocks one. settings.get returns
blocked_tags; settings.set takes tag_block and tag_unblock.
The file is a filter file that may have been written by hand, so the
new library (webmail/lib/blocktags.js) leaves every line it was not
asked to remove as it is: comments, notes after a tab, patterns and the
file's line endings. A pattern entry is listed (marked as one) and can
be removed, but only plain tags (letters, digits and . _ + = -, 64 at
most) can be added here. The file is replaced by rename, so the mail
server never reads half of it, and the list is capped at 500 entries.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>