Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

2016-02-10 Thread Tomi Ollila
On Tue, Feb 09 2016, David Edmondson  wrote:

> On Mon, Feb 08 2016, David Edmondson wrote:
>> On Mon, Feb 08 2016, David Edmondson wrote:
>>> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
 So where is the case-insensitive lookup happening?  Is this a bug in
 mml-mode, or in notmuch-emacs?
>>>
>>> It's caused by behaviour in mml2015.el (hence upstream).
>>>
>>> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
>>> the composition buffer with the addresses from the matching key.
>>>
>>> The simplest way to get the desired behaviour would be to `downcase'
>>> both strings before comparing.
>>
>> Reported as bug#22603 in emacs.
>
> Fixed in the emacs-25 branch.

We could perhaps add defadvice to **wiki** for those who want to 
do global change in their emacs environment, something like:

(if (< emacs-major-version 25)
  (defadvice mml2015-epg-check-user-id (around downcase activate)
(ad-set-arg 1 (downcase (ad-get-arg 1)))
(ad-set-arg 2 (downcase (ad-get-arg 2)))
ad-do-it))

totally untested -- also now that I finished that 'before might also work.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

2016-02-09 Thread David Edmondson
On Mon, Feb 08 2016, David Edmondson wrote:
> On Mon, Feb 08 2016, David Edmondson wrote:
>> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
>>> So where is the case-insensitive lookup happening?  Is this a bug in
>>> mml-mode, or in notmuch-emacs?
>>
>> It's caused by behaviour in mml2015.el (hence upstream).
>>
>> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
>> the composition buffer with the addresses from the matching key.
>>
>> The simplest way to get the desired behaviour would be to `downcase'
>> both strings before comparing.
>
> Reported as bug#22603 in emacs.

Fixed in the emacs-25 branch.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

2016-02-08 Thread David Edmondson
On Mon, Feb 08 2016, David Edmondson wrote:
> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
>> So where is the case-insensitive lookup happening?  Is this a bug in
>> mml-mode, or in notmuch-emacs?
>
> It's caused by behaviour in mml2015.el (hence upstream).
>
> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
> the composition buffer with the addresses from the matching key.
>
> The simplest way to get the desired behaviour would be to `downcase'
> both strings before comparing.

Reported as bug#22603 in emacs.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

2016-02-08 Thread David Edmondson
On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
> So where is the case-insensitive lookup happening?  Is this a bug in
> mml-mode, or in notmuch-emacs?

It's caused by behaviour in mml2015.el (hence upstream).

`mml2015-epg-check-user-id' uses `equal' to compare the recipient from
the composition buffer with the addresses from the matching key.

The simplest way to get the desired behaviour would be to `downcase'
both strings before comparing.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

2016-01-15 Thread Daniel Kahn Gillmor
On Tue 2016-01-12 11:44:18 -0500, David Bremner wrote:
> [gaudenz wrote:]
>>   When sending encrypted mail the key lookup to encrypt to is done case
>>   sensitive on the mail address. As mail addresses are case insensitive
>>   this should be done case insensitive. Otherwise keys for users which for
>>   some reason have uppercase letters in their email address in the key UID
>>   are not found.

fwiw, i agree with gaudenz that this is the right thing to do, despite
being a gray area.

For the right-hand side of an e-mail address (the stuff after the @; the
e-mail domain), the DNS label there is case-insensitive by definition.

There may be some additional thinking to be done here when thinking
about non-ASCII DNS labels in the RHS, though -- should we be
normalizing the domain names in doing the search?  using punycode?

The stuff before the @ is a bit more problematic.

According to the standards documents, the left-hand-side of an e-mail
address (the "domain-specific" part) is up to the mail domain to parse
and process.  So it would not be a violation of the public
specifications for the operator of the MX for example.org to provide
three distinct mailboxes for al...@example.org and al...@example.org and
al...@example.org.

However, i know of no mail providers that do so, and anyone proposing to
do such a thing should have their head examined.

Examining GnuPG's interface here, it looks like gpg already does
case-insensitive matching when searching for an e-mail address
surrounded by angle-brackets.

So where is the case-insensitive lookup happening?  Is this a bug in
mml-mode, or in notmuch-emacs?

  --dkg
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

2016-01-12 Thread David Bremner
--- Begin Message ---
Package: notmuch-emacs
Version: 0.21-3
Severity: normal

When sending encrypted mail the key lookup to encrypt to is done case
sensitive on the mail address. As mail addresses are case insensitive
this should be done case insensitive. Otherwise keys for users which for
some reason have uppercase letters in their email address in the key UID
are not found.

Gaudenz

P.S.: I'm not completely sure if this part of the mail sending is done
by notmuch-emacs or some other part of emacs. Feel free to reassign as
appropriate.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (100, 
'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages notmuch-emacs depends on:
ii  emacs24 24.5+1-3
ii  emacsen-common  2.0.8
ii  notmuch 0.21-3

notmuch-emacs recommends no packages.

notmuch-emacs suggests no packages.

-- no debconf information

--- End Message ---
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch