thunderbird / thunderbird-android

Thunderbird for Android – Open Source Email App for Android (fka K-9 Mail)
https://thunderbird.net/
Apache License 2.0
10.23k stars 2.47k forks source link

Request: prefered mode pgp/inline or pgp/mime #2448

Open sbriskin opened 7 years ago

sbriskin commented 7 years ago

Many of my friends use the iphone for correspondence. The process of reading pgp/mime causes certain difficulties for them (download the full letter and decipher each attached file one by one). Since our messages rarely include more than a few words, we prefer to use pgp/inline. Now I have to manually switch the mode each time, but I want to do it only once. In some other programs (Claws, Enigmail) the encryption mode is selected automatically, based on the presence of attachments or configured rules for each recipient. This method is the most comfortable for the user, but also the most difficult to implement. Therefore, I want to have a choice in the settings of which mode to use by default.

Valodim commented 7 years ago

Sounds reasonable. Anyone feel like doing a PR for this?

For the record, there are also arguments against pgp/mime as a default. I wonder if pgp/inline isn't the better way to go for the simple case, i.e. signed+encrypted plaintext mail without attachment. It helps in some cases, but the issue I have with it is that it effectively just introduces a special case that may or may not work better, making things less consistent overall. @BjarniRunar

BjarniRunar commented 7 years ago

In Mailpile, we currently default to PGP/MIME for encrypted content, as well as signed messages with attachments.

In the special case where a message only has a single signed plain-text part (we don't generate HTML), we use inline PGP, for the following reasons:

  1. User tests imply in-line PGP is less confusing than the signature.asc attachment
  2. Compatibility with tools like Mailvelope in webmails w/o APIs that give access to raw MIME

The user can express a preference which deviates from this policy on a per-account basis.

cketti commented 7 years ago

I'd rather keep the current default of PGP/MIME and have per-recipient rules to override that. Ideally, PGP/INLINE becomes the exception and eventually fades away. Since we don't support sign-only by default, I don't think we need to/should make it send PGP/INLINE by default for simple text messages.

To make creating recipient rules as painless as possible we could ask the user whether they'd like to create them for the recipients of the current message when they manually switch to PGP/INLINE.

rijuldhir commented 7 years ago

I would like to work on it. Should we ask to store their preferences when they manually shift to PGP/INLINE

philipwhiuk commented 7 years ago

We probably will need a way to remove recipient rules as well. Otherwise you're adding an ever-growing list.

Do you think an activity linked from the Global settings (under Crypto) makes sense @cketti

Also the data probably wants to be exportable as part of settings. Which also raises the question as to whether this stuff should be stored in settings or the DB. Given its global i guess settings makes sense although it makes it harder to search.

Probably want to be able to optionally remove from the list if you turn off PGP/INLINE too.

cketti commented 7 years ago

Should recipient rules be global? My first instinct is to tie them to an account.

philipwhiuk commented 7 years ago

shrug

For me it wouldn't make any difference - I have work email and home email accounts.

On a technical level I would have thought either someone can receive PGP/MIME or they can't - it's not going to be different dependent on what account you're sending from.

cketti commented 7 years ago

Makes sense. Global settings it is.

As for the other questions: I think we want a separate database table for this. But we also want to include the rules in the settings file. So we need to extend the import/export code to support the new data source/sink.

Once a rule was created I'd expect disabling PGP/INLINE to be a one time exception, not the desire to delete the rule. We could display a snackbar with an undo action when a rule was created. That way people who immediately regret the creation can undo it without having to go to settings.

srinivaas-ganesan commented 7 years ago

Hi, I would like to work on this. My understanding is to move "Enable PGP/INLINE' from new email to a check box in 'Account settings -> Cryptography'. Let me know if this must be moved to some other settings category. Thanks

philipwhiuk commented 7 years ago

No. Please read cketti's idea.

srinivaas-ganesan commented 7 years ago

Hi Philip - I am a bit confused. Please say if my understanding is correct 1) A per recipient rule in settings to enable PGP/Inline. When is a new rule created? Is it when the user composes to a new recipient? (Is this gonna be a database of recipients for whom PGP/Inline is enabled. If so will the global settings allow for deleting rules) 2) An option in message composing settings to disable PGP/Inline for that specific message Let me know if i am missing something. Thanks

akmittal006 commented 7 years ago

@cketti I would like to work on this issue. Here's checklist of what to

This is still an overall list , further details can be added. But i wanted to ask if these are main tasks, should i start working on it? or am i getting something wrong

vikasmahato commented 6 years ago

@sbriskin @Valodim @cketti I want to work on this issue. Can I take it??