-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email part (2) #3849
Email part (2) #3849
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutt
whitelist
🚀- some nitpicks and future suggestions
- does it break w/o
quiet
?
neomutt
Wouldn't it make sense to make it a mutt redirect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geary
I've a unfinished and untested version of this in my local profiles directory.
# Uncomment if you want to ...
#noblacklist /var/mail
#noblacklist /var/spool/mail
#whitelist /var/mail
#whitelist /var/spool/mail
#writable-var
machine-id
seccomp.block-secondary
What have other email programs?
disable-mnt
From flatpak and to permissive:
dbus-user filter
dbus-user.own org.gnome.Geary
dbus-user.talk ca.desrt.dconf
dbus-user.talk org.gnome.Contacts
dbus-user.talk org.gnome.OnlineAccounts
dbus-user.talk org.gnome.evolution.dataserver.AddressBook10
dbus-user.talk org.gnome.evolution.dataserver.Sources5
dbus-user.talk org.freedesktop.secrets
dbus-system none
Yea I think so but the difference is
No it doesn't but they can take command line arguments too such as subject, to/from etc., I don't think leaving quiet is a good option.
I don't think Geary has the option to utilize a local mailbox.
Thanks.
Makes sense.
I'll check this.
Not sure what you mean. |
… common to both geary and evolution; add dbus permissions fromflatpak
MUAs like mutt are also used as development tools, especially on projects As a featureful example, aerc has a built-in terminal emulator and applying Mutt is also not too far off since it supports macros for running arbitrary Besides that, there's the effort of mantaining the whitelists for every email
These alone would mean maintaining 4 sets of paths on 4 different profiles. On a related note, there's already some text editor exceptions scattered in a The main problem with whitelists is that there's no way to tell firejail to |
Users who use a tui-mail-client and develop, are expected to have the knowledge to read documentation and customize there profiles. Therefore the question is IMHO not "Does this work with all workflows?" but "Does it work with the workflow of the (huge) majority of the users?". IDK how many mutt+firejail users develop on the kernel or similar, although I think that there are not that many.
Conditions would also be a solution (e.g. |
Agreed.
Sounds interesting; do you know of any docs/articles/papers on this?
Thanks, I didn't know that disabling the whitelist was that simple.
If all it takes is But to nitpick a bit: speaking of documentation, it didn't occur to me that $ git show -q --pretty='%h %s' master
862f6820 manpage: /bin/bash -> user's perferred shell
$ grep -Fnr 'ignore whitelist' | grep -v '^etc/profile-' It's not exactly clear to me which paths are treated specially by Anyways, my other point of contention is the amount of junk files that would Well, if
But I did some testing and unfortunately that's not the case: $ cat /tmp/firejail/test.profile
ignore mkdir ${HOME}
ignore mkfile ${HOME}
ignore whitelist ${HOME}
mkdir ${HOME}/.spam
mkfile ${HOME}/.spamrc
whitelist ${HOME}/.spam
whitelist ${HOME}/.spamrc
$ ls .spam .spamrc | cat
ls: cannot access '.spam': No such file or directory
ls: cannot access '.spamrc': No such file or directory
$ firejail --quiet --profile=/tmp/firejail/test.profile ls .spam .spamrc | cat
.spamrc
.spam:
$ ls .spam .spamrc | cat
.spamrc
.spam: So On a related side note, it would be nice to create only the xdg-base-dir paths -mkfile ${HOME}/.muttrc
-mkfile ${HOME}/.nanorc
[...]
mkdir ${HOME}/.config/mutt
mkdir ${HOME}/.config/nano But since
I personally see both mutt and firejail as relatively medium-advanced user I mentioned the kernel because it's the most known example, but perhaps not a A more acessible instance would be SourceHut. It is The point being that this is not something only used by high-profile or (I'll reply to the rest on a new issue as that's mostly about a feature |
The other option would be to provide a commented opt-in whitelist. (Again) users of such software aren't expected to be completely unskilled, so they can look at the profile and uncomment/copy this part. ... or we have it opt-out and add a "If you need less restricted
Agreed. (As in the most OS-projects, there's a lower interest in writing and fine-tuning documentation and no one is paid to do that). Here you need either some playing with
/home | ${HOME} is usually treated special (and some others). Again undocumented. Commands to
FYI: #3527. In my opinion a skilled attacker who can run any code in the sandbox, can escape any sandbox. The question is how much work it is to escape (without exploits). If the NSA wants to hack you, they can. If some ransomware uses becomes OT. If you have more question it would be the best to open an issues with quotes from here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added Sylpheed and Claws-mail too. (1) gpg (2) hyperlinks (3) dbus permissions
@rusty-snake I think you missed electron-mail as part of the electron refactor pull (3807). It is whitelisted already.
Only email clients left are Fetchmail, Fossamail and Thunderbird let me know if there are any others. This one ends here, rest I'll do as part of another.
My point isn't so much about the defaults or knowing how to write profiles, but Something which would work right now and partly achieve that is to put the Or rather, to avoid derailing this further, this can be merged without that and
Yeah, maintaining documentation is not exactly the most fun activity. As long
Thanks for the explanation/link. I thought you had meant escape in the sense Some testing for future reference: $ cat .emacs
cat: .emacs: No such file or directory
$ firejail --noprofile --quiet --blacklist='${HOME}/.emacs' \
bash -c 'echo evil >~/.emacs; echo $?' 2>/dev/null
0
$ cat .emacs
evil
$ firejail --noprofile --quiet --blacklist='${HOME}/.emacs' \
bash -c 'echo evil2 >>~/.emacs; echo $?' 2>/dev/null
1
$ cat .emacs
evil
Indeed, and that's where I believe firejail shines the most, by mitigating the
Agreed. |
Sure. About the sorts except dbus: IMO it is better to consider macros except Home/ as their own section. Otherwise if the whitelists get too long it'll be easy to loose them since Downloads/Documents will be in the top then Home/... then Pictures,Videos etc. people most often need to tweak these. I'm fine either way. |
Ah, that's right; I forgot about those. Considering that, putting Anyway, there was one last attempted sort on
So here is the sorted version:
Other than that, LGTM. |
$ grep -Fnr 'mkfile ${HOME}/.elinks' etc
etc/profile-m-z/neomutt.profile:68:mkfile ${HOME}/.elinks
etc/profile-m-z/mutt.profile:67:mkfile ${HOME}/.elinks
$ grep -Fnr 'mkfile ${HOME}/.w3m' etc
etc/profile-m-z/neomutt.profile:78:mkfile ${HOME}/.w3m
etc/profile-m-z/mutt.profile:76:mkfile ${HOME}/.w3m These should be |
… mutt,neomuut; some sorting
Hello, I have a pile of changes that are based on this branch (the WIP branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions (mostly styling). I still think a redirect profile for neomutt would be good, but this can be done in a future PR.
etc/profile-m-z/mutt.profile
Outdated
include allow-perl.inc | ||
include allow-python2.inc | ||
include allow-python3.inc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they needed? mutt.profile has disable-interpreters.inc
since 3 years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are some optional functionality for Oauth etc. I will comment them.
Yea this one is too long I'll add it in the next one. |
All going in, thanks! |
To reduce the amount of spam created in the user home directory. It's unlikely that these paths are going to be both: * Created only after mutt is first opened through firejail and * Created from within mutt Also, no other profile does that: $ git grep -El '(mkdir|mkfile) \$\{HOME\}/\.(emacs|nano|vim)' -- etc etc/profile-m-z/mutt.profile So just whitelist them if they already exist. Added on commit a8a8e33 ("Add whitelisting to mutt; improve geary, new profile for neomutt", 2020-12-28) / PR netblue30#3849.
Let either the respective program or the user create the file. * ~/.bogofilter: Used by the bogofilter program * ~/.msmtprc: Used by the msmtp program Added on commit a8a8e33 ("Add whitelisting to mutt; improve geary, new profile for neomutt", 2020-12-28) / PR netblue30#3849.
Move some paths from mutt.profile and neomutt.profile. Added on commit 6b9bfad ("Fix python; add read-only to editors/cli browsers;re-add cache directory", 2020-12-29) / PR netblue30#3849. Misc: This is a follow-up to netblue30#5626.
Continuation of #3607
Mutt/Neomutt needs some testing I may not have went through all use cases, leaving a (neo)muttrc if anyone wants to do some testing https://termbin.com/tryb