https://gitlab.synchro.net/main/sbbs/-/commit/a055ea4703f5498ec0eb5e1b
Modified Files:
exec/load/mailbox.js exec/tests/mailbox/read.js exec/tests/webmail/address.js api_settings.js drafts.js send.js webmail/lib/address.js api.js drafts.js webmail/lib/locale/en_us.ini webmail/lib/send.js webmail/root/js/compose.js format.js settings.js
Log Message:
Web mail client: send from your other addresses; a reply keeps its address
The From address was the user's alias at a domain they may send from.
The From menu, in the compose panel and as the default in Settings, now
offers:
- the alias at each domain the user may send from (the default);
- the user's own Internet address (user.netmail), when it is at one of
those domains;
- the real name written with dots (Rob.Swindell), when the system
receives e-mail by real name.
The last two are listed only when the mail server would deliver mail
for that address to this user, since a user can type any address into user.netmail.
Sending is allowed from any address the mail server delivers to the
user at those domains (Address.own_address), listed or not: a name ctrl/alias.cfg points at them, and name#tag, which the server delivers
to the user of the name unless that user blocked the tag (data/user/NNNN.smtpblock). The names of alias.cfg are not put in the
menu, because a sysop can have dozens. A reply starts from the address
its message was sent to when that is one of the user's own; before,
only its domain followed. The compose panel adds that address to its
menu for that message, and reply all leaves it out of the recipients.
Address.system_resolvers() gains own.deliver_user(), which follows
alias.cfg as the mail server's RCPT TO handling does (the whole
address, then the name, then a user number, alias, the sysop's name or
a real name). alias.cfg is read once per request and parsed as
userdat.c alias() reads it. The mailbox library's get() returns headers.to_addr: the address the message was delivered to (the SMTP
forward path).
Drafts and settings store the chosen name as from_local beside
from_domain ("" is the default name); a draft or settings file saved
before reads as the default. settings.get returns from_addresses. The
choice is checked when it is saved and again when the message is sent,
so an address taken away in alias.cfg since cannot be sent from.
Tests: webmail/address.js (the alias table, delivery for each kind of
entry, tags and a blocked tag, the list, own_address, the stored
choice), drafts.js (the reply's From, a tagged address, reply all,
saving a name), send.js, api_settings.js, mailbox/read.js. Checked in
headless Firefox on a scratch server: replies to mail sent to an
alias.cfg name, a whole-address entry, a tagged address and the default address; a change of From in the compose panel; the default chosen in
Settings. Run on Linux only.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>