Skip to content

lang: emit CRLF-separator blank line after email Subject headers#15

Merged
Essency merged 2 commits intoazzurra:masterfrom
vjt:fix/email-subject-blank-line
Apr 22, 2026
Merged

lang: emit CRLF-separator blank line after email Subject headers#15
Essency merged 2 commits intoazzurra:masterfrom
vjt:fix/email-subject-blank-line

Conversation

@vjt
Copy link
Copy Markdown
Contributor

@vjt vjt commented Apr 22, 2026

Summary

  • Email Subject headers compiled by `langcomp` currently end with a single `\n` because their `.lang` entries have only one trailing tab-empty terminator.
  • When `do_sendpass` / `do_sendcode` fprintfs the Subject line followed by body text, the output skips the RFC 5322 blank-line separator between headers and body.
  • Strict parsers (e.g. the resend.com SMTP relay that now fronts `nickserv-bounces@azzurra.chat`) reject these with 554 "Failed to parse email message", so SENDPASS / SENDCODE / RESETPASS / DROP / REGISTER / REMIND / SET / SEND / SENDTO mails have stopped being delivered.
  • Fix adds a second tab-empty terminator to every `*_EMAIL_SUBJECT` entry that contains an actual `Subject: ...` line, across `IT/US/ES/FR`. Compiled `.clng` bodies now end with `\n\n`, providing the required blank line.

Notes

  • 12 subject entries × 4 languages = 48 body terminations fixed.
  • Format-arg sub-entries (`_AUTH`, `_DROP`, `_MAIL`, `_RPWD` for `NS_SENDCODE_EMAIL_SUBJECT`) are interpolated into the parent Subject line via `%s` and are intentionally left alone.
  • No `langcomp.py` change: the fix is pure data. Hot-reloadable via `rehash` once the `.clng` files are regenerated.
  • `inc/lang_msg_svc.h` unchanged (message IDs stable).

Test plan

  • `python3 lang/langcomp.py` produces the 4 `svc*.clng` files without errors
  • Every compiled Subject entry body now ends with `\n\n` (verified via struct-parse of IT clng for all 12 entries)
  • Non-subject entries (e.g. `NS_SENDCODE_EMAIL_SUBJECT_AUTH` = `"la registrazione"`) unchanged
  • Deploy testnet `.clng`, trigger `/ns SENDPASS` / `/ns SENDCODE`, confirm resend.com accepts (no 554)
  • Deploy prod after staff OK

vjt and others added 2 commits April 22, 2026 16:05
Every *_EMAIL_SUBJECT .lang entry that maps to an RFC 5322 "Subject: ..."
header previously compiled to a body ending with a single '\n'. When
do_sendpass / do_sendcode / etc. fprintf the Subject line followed by
the email body, the output lacks the required blank line between
headers and body, so strict RFC 5322 parsers (e.g. the resend.com SMTP
relay used for nickserv-bounces@azzurra.chat) reject the message with
554 "Failed to parse email message".

Fix: add one extra tab-empty terminator after the Subject line in each
of the 12 subject-header entries per language, so the compiled .clng
body ends with '\n\n' — the blank-line separator strict parsers
require. Affects NS_{SENDCODE,SENDPASS,DROP,REGISTER,REMIND,SET}_EMAIL_SUBJECT,
CS_{DROP,REMIND,SENDPASS,SENDPASS_RPWD}_EMAIL_SUBJECT, and
MS_{SEND,SENDTO}_EMAIL_SUBJECT.

Leaves _AUTH/_DROP/_MAIL/_RPWD format-arg sub-entries untouched — those
are interpolated via %s into the parent Subject line and are not headers
themselves.

No langcomp / lang_msg_svc.h changes; parse-order and message IDs are
stable. Hot-reloadable via rehash once svc{IT,US,ES,FR}.clng are
regenerated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
parse_lang skips fully-empty lines, so the blank line inside the body
was dead weight. Per Sonic's review on the PR: keep only the trailing
tab-empty terminators that actually shape the compiled output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Essency Essency merged commit 27d2d26 into azzurra:master Apr 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants