1 Commits
Author SHA1 Message Date
Juan DenisandClaude Fable 5 7211560768 fix(postfix): match virtual-map entries by address token, not substring
add_domain deduped with a raw substring test, so with sub.example.com
already mapped, adding example.com was a no-op that still reported
success and mail for the new domain never routed. remove_domain
filtered alias lines with a bare `@domain in line` test, which also
deleted example.com.br entries. Appends went through tee -a with no
trailing-newline guard, so a truncated map glued the new entry onto
the last line, corrupting both and making them unremovable.

- add_domain dedupes on the line's domain field
- remove_domain drops only lines whose address tokens are at exactly
  that domain (com.br superstrings and sub.example.com both survive)
- map appends heal a missing trailing newline first

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 04:10:14 -04:00