https://gitlab.synchro.net/main/sbbs/-/commit/48f7666bb036aa8c19e00419
Added Files:
exec/tests/msgbase/notify/rcpt_list.js rcpt_list_child.inc scratch.inc skipif
Modified Files:
src/sbbs3/js_msgbase.cpp postmsg.cpp sbbs.h
Log Message:
Notify recipients of mail saved to a recipient list
MsgBase.save_msg() and save_msg_from_file() given a recipient list stored
the message with savemsg(), which saw a header with no recipient and so
skipped its post-save work, then added one header per recipient with smb_addmsghdr(), which does none of it either. So mail saved to a list,
even a list of one, left no "sent you E-mail" short message for a local recipient and never touched the FidoNet netmail semaphore for a FidoNet recipient (nor a sub-board's semaphores, for a sub saved to a list).
The semaphore and short-message lines of savemsg() are now a function of
their own, announce_saved_msg(), unchanged: the same conditions, texts
and user lookup. savemsg() calls it where it ran those lines, and the
recipient loop in js_msgbase.cpp calls it after each header it adds, so
each recipient of a list is handled as a single recipient is. A list
with several FidoNet recipients touches the semaphore once per
recipient. The mail server's own recipient loop, which notifies in its
own way, is unchanged.
As before, a mail base opened by path is not the configured mail base:
no short message is left for its recipients.
New test exec/tests/msgbase/notify/rcpt_list.js saves to the "mail" base
of a scratch configuration and data directory (below the test jsexec's system.temp_dir, removed afterwards) in a child jsexec, which refuses to
run unless its data directory is inside the scratch tree. It is skipped
where /proc is unavailable (the child jsexec is located through it).
Without the fix the list cases fail: no short message for the recipient
or the sender, and the semaphore untouched; the single-recipient cases
pass either way.
Built and tested with GCC only.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net