Skip to content

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

Merged
Yann-CV merged 4 commits into
mainfrom
draft-thunderbird-signature
Oct 27, 2026
Merged

Yann-CV merged 4 commits into
mainfrom
draft-thunderbird-signature

Conversation

@Yann-CV

@Yann-CV Yann-CV commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

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

Yann-CV and others added 2 commits October 27, 2026 16:57
…afts

A draft opened from the drafts folder doesn't get the account signature
from Thunderbird, so mailbox.py now appends the signature of the
Thunderbird identity matching OUTREACH_EMAIL (HTML or plain text, with
Thunderbird's "-- " separator). An HTML signature makes the draft
multipart/alternative. OUTREACH_THUNDERBIRD_PROFILE picks the profile,
or disables the signature with "none".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thunderbird blocks remote images in stored drafts, so the signature's
logo (a link) didn't show. Download the signature's remote images and
embed them as cid: parts (multipart/related), and keep the signature
HTML exactly as Thunderbird stores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/contact-researchers/SKILL.md">

<violation number="1" location="skills/contact-researchers/SKILL.md:128">
P2: An explicit request for no signature is not honored for IMAP drafts: this instruction still allows `mailbox.py draft` to append the configured Thunderbird signature. Tell the workflow to invoke the draft command with `OUTREACH_THUNDERBIRD_PROFILE=none` when the user asks for none, or clarify that the request excludes the configured account signature.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

**No signature** (optional): when the user says their mail tool already
adds a signature (or asks for none), the email ends with the closing word
adds a signature (or asks for none), and always for an IMAP draft when
`mailbox.py config` reports a `signature` (the account's signature is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: An explicit request for no signature is not honored for IMAP drafts: this instruction still allows mailbox.py draft to append the configured Thunderbird signature. Tell the workflow to invoke the draft command with OUTREACH_THUNDERBIRD_PROFILE=none when the user asks for none, or clarify that the request excludes the configured account signature.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At skills/contact-researchers/SKILL.md, line 128:

<comment>An explicit request for no signature is not honored for IMAP drafts: this instruction still allows `mailbox.py draft` to append the configured Thunderbird signature. Tell the workflow to invoke the draft command with `OUTREACH_THUNDERBIRD_PROFILE=none` when the user asks for none, or clarify that the request excludes the configured account signature.</comment>

<file context>
@@ -114,7 +124,9 @@ themselves.
    **No signature** (optional): when the user says their mail tool already
-   adds a signature (or asks for none), the email ends with the closing word
+   adds a signature (or asks for none), and always for an IMAP draft when
+   `mailbox.py config` reports a `signature` (the account's signature is
+   appended to the draft), the email ends with the closing word
    only (`Cheers,`), without the name and role lines, and no `[Your name]`
</file context>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread skills/contact-researchers/SKILL.md Resolved
Without a Date header, Thunderbird lists the draft as undated, away from
the recent drafts, so new drafts looked missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

- find snap profiles under ~/snap/thunderbird/common too
- resolve the portable sig_file-rel path; a missing attached signature
  file means no signature, not the stale htmlSigText
- download signature images only when building a draft (not in config),
  capped at 5 MiB each
- replace empty Date / Message-ID headers instead of adding a second one
- document which images get embedded, and store IMAP drafts with
  OUTREACH_THUNDERBIRD_PROFILE=none when the user asks for no signature

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Yann-CV
Yann-CV merged commit afc8d8c into main Oct 27, 2026
1 check passed

This branch had an error being deployed

1 failed deployment
linkedin-post — 3e48dbfa Deployed Oct 27, 2026 by Yann-CV via Draft a LinkedIn post about a research paper #9
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.

1 participant