mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6725] Thunderbird cannot send emails via IMAP when email crypgraphic signing is enabled #3347
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3347
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ipaqmaster on GitHub (Apr 30, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6725
Description
Describe the bug
When thunderbird launches via firejail it cannot send emails.
Steps to Reproduce
Steps to reproduce the behavior
firejail thunderbirdLC_ALL=C firejail /path/to/program(LC_ALL=Cto get a consistentoutput in English that can be understood by everybody)
ERRORExpected behavior
What you expected to happen
Thunderbird should be allowed to connect to its configured SMTP remote and send an email via it.
Actual behavior
What actually happened
Generic non-descriptive error is thrown: with title ``Send Message Error
sayingSending of the message failed.` and an [OK] buttonBehavior without a profile
What changed calling
LC_ALL=C firejail --noprofile /path/to/programin aterminal?
LC_ALL=C firejail --noprofile /usr/bin/thunderbirdworked and thunderbird was able to send the email.Additional context
Any other detail that may help to understand/debug the problem
Environment
uname -srm):Linux 6.12.23-1-lts x86_64Arch Linuxmesa 1:24.3.3-2"):Mozilla Thunderbird 137.0.1`firejail --version):firejail version 0.9.74was compiled (
git rev-parse HEAD): NAChecklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/program@kmk3 commented on GitHub (Apr 30, 2025):
The logs are missing.
Try commenting thunderbird.profile and firefox-common.profile until it works to
find out which lines are causing the issue.
@ipaqmaster commented on GitHub (Aug 2, 2025):
Yep coming back to this as it's annoying. I'll fiddle with the default profile to figure out what needs to be permitted for this one.
Thunderbird is not allowed to make outbound connections it seems, at least to 587/tcp (TLS) which is how one of my mail accounts are configured.
Bizarre.. it just happened and I've restarted thunderbird and now outgoing emails are sending just fine (Confirmed firejail is still being used with
ps aux | grep thunderbird.I will start commenting out parts of thunderbird.profile to figure out what's causing this when it happens again.
@ipaqmaster commented on GitHub (Aug 12, 2025):
I commented
netfilterinfirefox-common.profileand thunderbird was able to send an email (thunderbird.profileincludesfirefox-common.profileat the bottom)@ipaqmaster commented on GitHub (Aug 12, 2025):
There doesn't seem to be a way to add rules to the default netfilter and I don't think the solution would be to make a custom iptables ruleset just for thunderbird for the netfilter argument to reference, unless that's something this project would consider?
@ipaqmaster commented on GitHub (Aug 12, 2025):
There does seem to be things like
/etc/firejail/webserver.netwhich means we could make a mailclient.net that could contain iptables rules to allow outbound SMTP ports@ipaqmaster commented on GitHub (Aug 12, 2025):
Strange, the default
netfilterrules don't block output for the ports I'm talking about. I'm not sure why omitting thenetfilterrule seems to do the trick then.@kmk3 commented on GitHub (Aug 12, 2025):
For reference, this is the default filter:
It looks like the following profiles have always had
netfilter:And it looks like the default filter was never changed.
If this is caused by
netfilter, then it seems that thunderbird.profile hasbeen broken in this regard since the beginning.
That sounds great.
If the problem is indeed
netfilter,ignore netfiltercould be added tothunderbird.profile for now and later a mailclient.net profile could be added
and included in the profile of every email client.
Feel free to open PRs.
@rusty-snake commented on GitHub (Aug 12, 2025):
netfilteris inactive withoutnet IFACE.@ipaqmaster commented on GitHub (Nov 25, 2025):
Spent some time on this tonight.
opensslhad no problems connecting to my remotes on 25, 465, 587 and 993. So it had to be thunderbird. And it was.This issue is caused by using openpgp in emails. The error when I send an email with thunderbird is:
If I go to the top of the email being sent, click the down arrow on OpenPGP and uncheck Digitally Sign, my email sends while using firejail. But not otherwise, which is the default for all emails when you give thunderbird a pgp key to play with.
@ipaqmaster commented on GitHub (Nov 25, 2025):
Bizarre. I took some stack traces of thunderbird when I send an email to try and find executables or a gnupg sockets I might need to whitelist for this to stop happening.
Then I ran it in firejail again with --debug again, confirming its using the stock thunderbird profile again... and with Digitally Sign checked, as default... the issue is not reproducing 😵
@ipaqmaster commented on GitHub (Nov 25, 2025):
It seems running thunderbird without firejail has created whatever special file it was trying to create while firejailed. I'll diff my filesystem.
I rolled back ~/.thunderbird by an hour and it still works, so it's not something in there.
It wasn't until I killed the
/usr/bin/gpg-agent --supervisedprocess running as my user that the issue reproduced in firejail. Now I know what it is.Thunderbird doesn't launch when the .local file contains
include ssh.profileIt's not solved by any of these either:
Commenting
include firefox-common.profileallowed thunderbird to prompt for the pgp key for gpg-agent with its key, but took away its charset (Unicode was unicode rectangles with hex values inside them, pasting into my text editor rendered them correctly.)I have to move on for now. But I'm on the right track. Something to do with gpg-agent and speaking with it. Tried a ton more options in my thunderbird.local file related to the rundir to no avail. Will come back to this soon.
@ipaqmaster commented on GitHub (Nov 25, 2025):
Should've seen that from the start.
It's caused by
dbus-user nonein firefox-common.profile, included in thunderbird.profile.@ipaqmaster commented on GitHub (Nov 25, 2025):
ignore dbus-userin~/.config/firejail/thunderbird.local"soft-fixes" this, but it asks for a passphrase when gpg-agent is running despite it being allegedly unlocked by the gnome-keyring-daemon process.@ipaqmaster commented on GitHub (Nov 25, 2025):
Ah... yep...
ignore dbus-userandignore dbus-systemtogether in the above .local file solves this problem flawlessly. What a ride.E:
Looks like it's technically caused by this:
Something about Thunderbird's dbus access doesn't let it communicate with the running gpg-agent, at least not fully.