contact-researchers: add the Thunderbird account signature to IMAP drafts

Merged
YA
15d ago
+246-11

Summary

  • mailbox.py draft appends the signature of the Thunderbird account matching OUTREACH_EMAIL. Thunderbird doesn't add the signature to a draft that is opened from the drafts folder.
  • It reads the signature from prefs.js (the inline signature, or the signature file when one is attached). The profile is found in ~/.thunderbird, snap, flatpak or the macOS location. OUTREACH_THUNDERBIRD_PROFILE overrides the profile, and none turns the signature off.
  • The signature goes after Thunderbird's -- separator, unless the account suppresses it. An HTML signature makes the draft multipart/alternative (plain text + HTML), so it opens in Thunderbird's HTML editor.
  • mailbox.py config and draft print which signature was used.
  • SKILL.md: when a signature is found, the body ends at Cheers,. The report also notes that Thunderbird blocks remote images in a signature (such as a logo) in stored drafts until remote content is allowed for the sender.

Test

  • Built a test draft offline from the real Thunderbird profile and checked its plain-text and HTML parts.
  • Replaced the 30 existing drafts in the outreach mailbox with signed copies, using with_signature, and checked that all 30 have the signature.

šŸ¤– Generated with Claude Code