Re: smtp_address_cmp does not ignore case of localpart

2019-02-12 Thread John Fawcett via dovecot
On 12/02/2019 21:41, Andreas Jobs via dovecot wrote:
> On Tue, Feb 12, 2019 at 08:12:43AM +0100, John Fawcett via dovecot wrote:
>> On 11/02/2019 22:43, Andreas Jobs via dovecot wrote:
>> In practice if you convert the username part to lower case in the MTA
>> then you will accept mail with mixed case but only have to deal with
>> lowercase in Dovecot.
>
> Yes, but the vacation action (also) compares :addresses against the
> header to|cc|sender... And changing the headers is a bad idea.
>
> Maybe my subject line was a bad choice :-)
>
>
> --Andreas
>
You're right, ignore my suggestion. Only the domain is treated case
insensitive and localpart is compared case sensitive.

The change in itself looks trivial, but it would affect more than
vacation (smtp_address_equals is used in a few places in dovecot and
pigeonhole)

John




Re: smtp_address_cmp does not ignore case of localpart

2019-02-12 Thread Andreas Jobs via dovecot

On Tue, Feb 12, 2019 at 08:12:43AM +0100, John Fawcett via dovecot wrote:

On 11/02/2019 22:43, Andreas Jobs via dovecot wrote:
In practice if you convert the username part to lower case in the MTA
then you will accept mail with mixed case but only have to deal with
lowercase in Dovecot.


Yes, but the vacation action (also) compares :addresses against the 
header to|cc|sender... And changing the headers is a bad idea.


Maybe my subject line was a bad choice :-)


--Andreas

--
! AJ3630-RIPE @ RUB8-RIPENetwork Operation Center !
! Dezernat 5.I   Ruhr-Universitaet Bochum !
! The amount of energy necessary to refute bullshit is!
! an order of magnitude bigger than to produce it.  -- Alberto Brandolini !


Re: smtp_address_cmp does not ignore case of localpart

2019-02-11 Thread John Fawcett via dovecot
On 11/02/2019 22:43, Andreas Jobs via dovecot wrote:
> Hi,
>
> in src/lib-smtp/smtp-address.c line 759 the localpart is compared with
> null_strcmp, which does not ignore the case. While this is the correct
> behavior (according to the RFC) it causes problems in real life.
>
> In my case the vacation notices are not sent, if someone writes to
> first.l...@ruhr-uni-bochum.de because :addresses contains (only)
> first.l...@ruhr-uni-bochum.de.
>
>
>
> Regards,
> Andreas
>
In practice if you convert the username part to lower case in the MTA
then you will accept mail with mixed case but only have to deal with
lowercase in Dovecot.

John



smtp_address_cmp does not ignore case of localpart

2019-02-11 Thread Andreas Jobs via dovecot

Hi,

in src/lib-smtp/smtp-address.c line 759 the localpart is compared with 
null_strcmp, which does not ignore the case. While this is the correct 
behavior (according to the RFC) it causes problems in real life.


In my case the vacation notices are not sent, if someone writes to 
first.l...@ruhr-uni-bochum.de because :addresses contains (only)

first.l...@ruhr-uni-bochum.de.



Regards,
Andreas

--
! AJ3630-RIPE @ RUB8-RIPENetwork Operation Center !
! Dezernat 5.I   Ruhr-Universitaet Bochum !
! The amount of energy necessary to refute bullshit is!
! an order of magnitude bigger than to produce it.  -- Alberto Brandolini !