Bug 168494 - kmail always sends message encrypted, even if per-message encryption is turned off
Summary: kmail always sends message encrypted, even if per-message encryption is turne...
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.10.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-08-06 11:51 UTC by Peter Lewis
Modified: 2009-04-11 06:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lewis 2008-08-06 11:51:09 UTC
Version:           1.10.0 (using KDE 4.1.0)
Installed from:    Ubuntu Packages

To reproduce:

1. Set up an address book entry for yourself.
2. Associate your own identity with a GPG key.
3. Try to send a message to yourself, unencrypted.

Even though the "encrypt" toolbar button is not selected, and the "encrypted message" wrapper is not visible in the composer window, the message is *always* encrypted to the receiver.

I'm not sure if this applies equally to messages sent to other people.

Thanks.
Comment 1 Peter Lewis 2008-08-06 11:55:29 UTC
Further info:

Disabling any or all of the options in the "composing" tab of the "security" pane in the configuration dialog has no effect.
Comment 2 Peter Lewis 2008-08-06 12:00:55 UTC
Attempt to work-around, number 2 :-)

Removing the OpenPGP keys from my identity in the identities pane, and then attempting to send any (unencrypted) message to myself, results in the following:

1. Warning: "Examination of recipient's encryption preferences yielded that the message should be encrypted using OpenPGP, at least for some recipients;
however, you have not configured valid trusted OpenPGP encryption keys for this identity. You may continue without encrypting to yourself, but be aware that you will not be able to read your own messages if you do so."

(clicked continue)

2. Warning: "Examination of recipient's signing preferences yielded that the message should be signed using OpenPGP, at least for some recipients; however, you have not configured valid OpenPGP signing certificates for this identity."

(clicked "do not openpgp-sign")

3. KMail crashes.

I've no idea why it's trying to sign and encrypt the email, even though I don't have those options enabled. It looks like then, since there's no key to sign/encrypt with, it crashes.

Thanks.

Comment 3 Peter Lewis 2008-12-15 15:14:46 UTC
Any progress on this at all?

I think it might be related to bug #89237, which is also about KMail not honouring openPGP preferences.

A further update is that it does appear to apply to other people. I don't seem able to send an unencrypted message to someone for whom I have their key. This is really quite annoying. In fact, the whole key selection system in KMail seems really quite broken. When I try to send an unencrypted mail to someone (whose key I have) it asks me to add them to my address book again :-/

Cheers.
Comment 4 Ruchir Brahmbhatt 2009-04-09 13:24:19 UTC
(In reply to comment #2)
> Attempt to work-around, number 2 :-)
> 
> Removing the OpenPGP keys from my identity in the identities pane, and then attempting to send any (unencrypted) message to myself, results in the following:
> 
> 1. Warning: "Examination of recipient's encryption preferences yielded that the message should be encrypted using OpenPGP, at least for some recipients;
> however, you have not configured valid trusted OpenPGP encryption keys for this identity. You may continue without encrypting to yourself, but be aware that you will not be able to read your own messages if you do so."
> 
> (clicked continue)
> 
> 2. Warning: "Examination of recipient's signing preferences yielded that the message should be signed using OpenPGP, at least for some recipients; however, you have not configured valid OpenPGP signing certificates for this identity."
> 
> (clicked "do not openpgp-sign")
> 
> 3. KMail crashes.
> 
> I've no idea why it's trying to sign and encrypt the email, even though I don't have those options enabled. It looks like then, since there's no key to sign/encrypt with, it crashes.
> 
> Thanks.
> 
> 

kmail 1.11.2, it doesn't allow to use encryption if no gpg keys defined.
Comment 5 Ruchir Brahmbhatt 2009-04-09 13:37:57 UTC
I can not reproduce the original bug as well as the one mentioned in  comment #2. Please feel free to reopen if you can still reproduce it.
Comment 6 Peter Lewis 2009-04-09 20:17:20 UTC
It seems that some things have changed, such that I can't get it to crash any more. However, it still keeps prompting me to add the address to the address book once more, even though it is already there.

I'm a little unsure as to what the "Encryption Key Approval" dialog window, which appears when I click send on an encrypted message, is for. I'm also unsure what I should select under the "encryption preference" option. By choosing anything but <none>, KMail subsequently shows me another dialog window entitled "Name selection", asking me what name the contact should have in my address book. I'm rather confused about this, since the contact is already in my address book - that's how it knew what key to use in the previous dialog, right?

What should I enter in this second box? If I type something in, then it gets added as a duplicate entry in my address book. Pressing cancel sends the message without adding the entry.

So in summary, (and I think this is a bug, since it's either broken or too confusing) the questions are:

1. What is the "encryption preference" drop-down box for, and
2. Why does KMail prompt me to add the entry to my address book every time I send an encrypted message to a contact already in my address book?

Hope this makes sense :-)
Comment 7 Ruchir Brahmbhatt 2009-04-10 11:31:43 UTC
Not able to reproduce on 1.11.2. It never asks me to add contact in addressbook before sending. In order to keep bugzilla clean please don't report multiple bugs in separate report. Please file all bugs separately.
Comment 8 Peter Lewis 2009-04-10 11:55:42 UTC
Okay, sorry I guess I'm just so confused by how the encryption preferences are supposed to fit together that it's difficult to separate out the issues into separate bugs. I will try though.

So, I'll try to untangle the behaviour that occurs in my later comments and file separate bugs, but I can confirm that the behaviour in my original report is still present in 1.11.2.

However, I've discovered that the problem really is that in the address book entry, the preferences under the "crypto settings" tab override the per-message settings (i.e. toolbar buttons) without any warning. The problem I originally described was that in the address book entry for the recipient, I had "always encrypt" selected. This meant that the "encrypt" (padlock) button on a composer window had no effect (but could still be toggled), and that no indication was given in the composer window that the message would be encrypted (i.e. the wrapper bar).

This may well be the desired behaviour (to override the per-message settings, though it seems a little counter-intuitive to me), though if so can I suggest that in the case that this happens, that at least the wrapper bar should appear in the composer window, indicating that the message is to be encrypted (as would happen if I'd selected the padlock toolbar button).

Also, I think that in this case some feedback should be given to the user explaining why the message is being encrypted, despite the "encrypt" toolbar button being unselected. Perhaps one of the following could occur:

- the encrypt button is greyed out,
- it is not present,
- the wrapper bar says that the message will be encrypted due to address book settings, or something similar.

I hope this clears up the original problems! I'll file separate bugs for the other stuff when I get that clear in my head too!
Comment 9 Ruchir Brahmbhatt 2009-04-11 06:54:52 UTC
@Peter: Thanks for details but as the bug in original report is not reproducible, I'm closing this bug for now. Please feel free to file separate bug for other problems you are having.