Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-05-30 Thread Pali Rohár
On Thursday 12 May 2016 13:24:36 Pali Rohár wrote:
> On Thursday 21 April 2016 14:24:09 Timo Sirainen wrote:
> > On 11 Apr 2016, at 13:44, Pali Rohár  wrote:
> > > 
> > > On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
> > >> On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
> > >>> 
> > >>> On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
> >  On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> > > Can you please send them directly to me, please?
> > > ---
> > > Aki Tuomi
> >  
> >  Sent.
> > >>> 
> > >>> Received? Are patches OK now?
> > >> 
> > >> It would be nice if each commit was accompanied with the corresponding 
> > >> unit test change in test-message-address.c. Now that the unit test 
> > >> changes are done in a separate commit I'm not really sure which test 
> > >> change is testing which commit or if some tests are missing. At least 
> > >> the "Quote and escape strings if needed" patch needs more tests for 
> > >> different kinds of escapes/atext/non-atext chars and =? in strings.
> > >> 
> > > 
> > > Ok. If you really need that I can rework my patches. But I'm thinking
> > > what to do with tests... I have written lot of examples and tests
> > > scenarios in perl for that new perl module. But dovecot test framework
> > > is not easy to use as perl Test::More/Test::Spec and such complicated
> > > tests which I have are really hard to write directory for dovecot...
> > 
> > Although it would be nice to have a lot of unit tests for everything, I 
> > think it would be enough to have just some to show what the change actually 
> > fixes. Maybe even just in the git commit message. I remember that by 
> > looking at the patches I didn't completely understand what all of the 
> > changes did.
> 
> Hi! Here are examples/test cases which patches fixes. Patches 3 and 4
> should be self-explained... It is enough? Or do you need more detailed
> description about problems in parser/formatter?
> 
> PATCH 1:
> 
> struct:
> { { name = NULL, mailbox = "group", domain = NULL}, { name = NULL, mailbox = 
> NULL, domain = NULL } }
> 
> should be formatted as string:
> 
> group:;
> 
> before patch it was:
> 
> group;
> 
> 
> 
> PATCH 2:
> 
> struct:
> { { name = NULL, mailbox = "", domain = NULL}, { name = NULL, mailbox = NULL, 
> domain = NULL } }
> 
> should be formatted as string:
> 
> "":;
> 
> before patch it was:
> 
> :;
> 
> 
> 
> PATCH 5:
> 
> input string:
> 
>  test
> 
> will be parsed as struct:
> 
> { name = "test", mailbox = NULL, domain = NULL }
> 
> before patch it was struct:
> 
> { name = NULL, mailbox = "test", domain = NULL }
> 
> 
> 
> PATCH 6:
> 
> struct:
> { name = "test\"test", mailbox = "user", domain = "host" }
> 
> should be formatted as string:
> 
> "test\"test" 
> 
> before patch it was:
> 
> test"test 
> 
> 

Timo, it is enough? Or do you need something more? Please let me know.

-- 
Pali Rohár
pali.ro...@gmail.com


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-05-12 Thread Pali Rohár
On Thursday 21 April 2016 14:24:09 Timo Sirainen wrote:
> On 11 Apr 2016, at 13:44, Pali Rohár  wrote:
> > 
> > On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
> >> On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
> >>> 
> >>> On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
>  On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> > Can you please send them directly to me, please?
> > ---
> > Aki Tuomi
>  
>  Sent.
> >>> 
> >>> Received? Are patches OK now?
> >> 
> >> It would be nice if each commit was accompanied with the corresponding 
> >> unit test change in test-message-address.c. Now that the unit test changes 
> >> are done in a separate commit I'm not really sure which test change is 
> >> testing which commit or if some tests are missing. At least the "Quote and 
> >> escape strings if needed" patch needs more tests for different kinds of 
> >> escapes/atext/non-atext chars and =? in strings.
> >> 
> > 
> > Ok. If you really need that I can rework my patches. But I'm thinking
> > what to do with tests... I have written lot of examples and tests
> > scenarios in perl for that new perl module. But dovecot test framework
> > is not easy to use as perl Test::More/Test::Spec and such complicated
> > tests which I have are really hard to write directory for dovecot...
> 
> Although it would be nice to have a lot of unit tests for everything, I think 
> it would be enough to have just some to show what the change actually fixes. 
> Maybe even just in the git commit message. I remember that by looking at the 
> patches I didn't completely understand what all of the changes did.

Hi! Here are examples/test cases which patches fixes. Patches 3 and 4
should be self-explained... It is enough? Or do you need more detailed
description about problems in parser/formatter?

PATCH 1:

struct:
{ { name = NULL, mailbox = "group", domain = NULL}, { name = NULL, mailbox = 
NULL, domain = NULL } }

should be formatted as string:

group:;

before patch it was:

group;



PATCH 2:

struct:
{ { name = NULL, mailbox = "", domain = NULL}, { name = NULL, mailbox = NULL, 
domain = NULL } }

should be formatted as string:

"":;

before patch it was:

:;



PATCH 5:

input string:

 test

will be parsed as struct:

{ name = "test", mailbox = NULL, domain = NULL }

before patch it was struct:

{ name = NULL, mailbox = "test", domain = NULL }



PATCH 6:

struct:
{ name = "test\"test", mailbox = "user", domain = "host" }

should be formatted as string:

"test\"test" 

before patch it was:

test"test 


-- 
Pali Rohár
pali.ro...@gmail.com


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-21 Thread Timo Sirainen
On 11 Apr 2016, at 13:44, Pali Rohár  wrote:
> 
> On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
>> On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
>>> 
>>> On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
 On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> Can you please send them directly to me, please?
> ---
> Aki Tuomi
 
 Sent.
>>> 
>>> Received? Are patches OK now?
>> 
>> It would be nice if each commit was accompanied with the corresponding unit 
>> test change in test-message-address.c. Now that the unit test changes are 
>> done in a separate commit I'm not really sure which test change is testing 
>> which commit or if some tests are missing. At least the "Quote and escape 
>> strings if needed" patch needs more tests for different kinds of 
>> escapes/atext/non-atext chars and =? in strings.
>> 
> 
> Ok. If you really need that I can rework my patches. But I'm thinking
> what to do with tests... I have written lot of examples and tests
> scenarios in perl for that new perl module. But dovecot test framework
> is not easy to use as perl Test::More/Test::Spec and such complicated
> tests which I have are really hard to write directory for dovecot...

Although it would be nice to have a lot of unit tests for everything, I think 
it would be enough to have just some to show what the change actually fixes. 
Maybe even just in the git commit message. I remember that by looking at the 
patches I didn't completely understand what all of the changes did.

> Anyway, are you recofigured dovecot mailing list filter to finally
> accept git patches? Now you have all emails, so you should know what hit
> "drop" action and probably also how to fix it...

It was supposed to work already the previous time, but for some reason didn't. 
I've since disabled the reply-to checking entirely.


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-21 Thread Aki Tuomi


On 21.04.2016 13:50, Pali Rohár wrote:
> On Monday 11 April 2016 12:44:02 Pali Rohár wrote:
>> On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
>>> On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
 On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
> On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
>> Can you please send them directly to me, please?
>> ---
>> Aki Tuomi
> Sent.
 Received? Are patches OK now?
>>> It would be nice if each commit was accompanied with the corresponding unit 
>>> test change in test-message-address.c. Now that the unit test changes are 
>>> done in a separate commit I'm not really sure which test change is testing 
>>> which commit or if some tests are missing. At least the "Quote and escape 
>>> strings if needed" patch needs more tests for different kinds of 
>>> escapes/atext/non-atext chars and =? in strings.
>>>
>> Ok. If you really need that I can rework my patches. But I'm thinking
>> what to do with tests... I have written lot of examples and tests
>> scenarios in perl for that new perl module. But dovecot test framework
>> is not easy to use as perl Test::More/Test::Spec and such complicated
>> tests which I have are really hard to write directory for dovecot...
>>
>> Anyway, are you recofigured dovecot mailing list filter to finally
>> accept git patches? Now you have all emails, so you should know what hit
>> "drop" action and probably also how to fix it...
>>
> PING!
>
Hi!

Please see the other test-*.c files for information on how the unit
tests are done.

Aki


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-21 Thread Pali Rohár
On Monday 11 April 2016 12:44:02 Pali Rohár wrote:
> On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
> > On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
> > > 
> > > On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
> > >> On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> > >>> Can you please send them directly to me, please?
> > >>> ---
> > >>> Aki Tuomi
> > >> 
> > >> Sent.
> > > 
> > > Received? Are patches OK now?
> > 
> > It would be nice if each commit was accompanied with the corresponding unit 
> > test change in test-message-address.c. Now that the unit test changes are 
> > done in a separate commit I'm not really sure which test change is testing 
> > which commit or if some tests are missing. At least the "Quote and escape 
> > strings if needed" patch needs more tests for different kinds of 
> > escapes/atext/non-atext chars and =? in strings.
> > 
> 
> Ok. If you really need that I can rework my patches. But I'm thinking
> what to do with tests... I have written lot of examples and tests
> scenarios in perl for that new perl module. But dovecot test framework
> is not easy to use as perl Test::More/Test::Spec and such complicated
> tests which I have are really hard to write directory for dovecot...
> 
> Anyway, are you recofigured dovecot mailing list filter to finally
> accept git patches? Now you have all emails, so you should know what hit
> "drop" action and probably also how to fix it...
> 

PING!

-- 
Pali Rohár
pali.ro...@gmail.com


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-11 Thread Pali Rohár
On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
> On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
> > 
> > On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
> >> On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> >>> Can you please send them directly to me, please?
> >>> ---
> >>> Aki Tuomi
> >> 
> >> Sent.
> > 
> > Received? Are patches OK now?
> 
> It would be nice if each commit was accompanied with the corresponding unit 
> test change in test-message-address.c. Now that the unit test changes are 
> done in a separate commit I'm not really sure which test change is testing 
> which commit or if some tests are missing. At least the "Quote and escape 
> strings if needed" patch needs more tests for different kinds of 
> escapes/atext/non-atext chars and =? in strings.
> 

Ok. If you really need that I can rework my patches. But I'm thinking
what to do with tests... I have written lot of examples and tests
scenarios in perl for that new perl module. But dovecot test framework
is not easy to use as perl Test::More/Test::Spec and such complicated
tests which I have are really hard to write directory for dovecot...

Anyway, are you recofigured dovecot mailing list filter to finally
accept git patches? Now you have all emails, so you should know what hit
"drop" action and probably also how to fix it...

-- 
Pali Rohár
pali.ro...@gmail.com


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-07 Thread Timo Sirainen
On 06 Apr 2016, at 17:29, Pali Rohár  wrote:
> 
> On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
>> On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
>>> Can you please send them directly to me, please?
>>> ---
>>> Aki Tuomi
>> 
>> Sent.
> 
> Received? Are patches OK now?

It would be nice if each commit was accompanied with the corresponding unit 
test change in test-message-address.c. Now that the unit test changes are done 
in a separate commit I'm not really sure which test change is testing which 
commit or if some tests are missing. At least the "Quote and escape strings if 
needed" patch needs more tests for different kinds of escapes/atext/non-atext 
chars and =? in strings.


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-06 Thread aki . tuomi

> On April 6, 2016 at 5:29 PM Pali Rohár  wrote:
> 
> 
> On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
> > On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> > > Can you please send them directly to me, please?
> > > ---
> > > Aki Tuomi
> > 
> > Sent.
> 
> Received? Are patches OK now?
> 
> -- 
> Pali Rohár
> pali.ro...@gmail.com

Hi!

Patches came thru fine, they are currently being reviewed.

Aki


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-06 Thread Pali Rohár
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
> On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> > Can you please send them directly to me, please?
> > ---
> > Aki Tuomi
> 
> Sent.

Received? Are patches OK now?

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-04 Thread aki . tuomi

> On April 4, 2016 at 8:35 PM Pali Rohár  wrote:
> 
> 
> On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> > Can you please send them directly to me, please?
> > ---
> > Aki Tuomi
> 
> Sent.
> 
> -- 
> Pali Rohár
> pali.ro...@gmail.com

Thanks.
---
Aki Tuomi


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-04 Thread Pali Rohár
On Monday 04 April 2016 19:31:06 aki.tu...@dovecot.fi wrote:
> Can you please send them directly to me, please?
> ---
> Aki Tuomi

Sent.

-- 
Pali Rohár
pali.ro...@gmail.com


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-04 Thread aki . tuomi

> On April 4, 2016 at 8:18 PM Pali Rohár  wrote:
> 
> 
> On Monday 04 April 2016 19:12:56 Pali Rohár wrote:
> > Hello,
> > 
> > I borrowed dovecot parser for email addresses and going to use it in new
> > perl module as replacement for Email::Address. During implementation and
> > testing I found bugs in dovecot parser & generator. So I'm sending my
> > patches together with tests.
> > 
> > Pali Rohár (7):
> >   lib-mail: message_address_write: Fix generating empty group list
> >   lib-mail: message_address_write: Fix generating group list with empty
> > name
> >   lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if
> > last_comment is not NULL
> >   lib-mail: parse_addr_spec: Email address without local-part is
> > invalid
> >   lib-mail: parse_mailbox: Set display name instead mailbox when
> > parsing failed
> >   lib-mail: message_address_write: Quote and escape strings if needed
> >   lib-mail: Update tests for message address
> > 
> >  src/lib-mail/message-address.c  |   99
> > +++
> >  src/lib-mail/test-message-address.c |   11 +++-
> >  2 files changed, 98 insertions(+), 12 deletions(-)
> > 
> 
> Again "Undelivered Mail Returned to Sender" :-( Cannot send them...
> 
> -- 
> Pali Rohár
> pali.ro...@gmail.com

Can you please send them directly to me, please?
---
Aki Tuomi


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-04 Thread Pali Rohár
On Monday 04 April 2016 19:12:56 Pali Rohár wrote:
> Hello,
> 
> I borrowed dovecot parser for email addresses and going to use it in new
> perl module as replacement for Email::Address. During implementation and
> testing I found bugs in dovecot parser & generator. So I'm sending my
> patches together with tests.
> 
> Pali Rohár (7):
>   lib-mail: message_address_write: Fix generating empty group list
>   lib-mail: message_address_write: Fix generating group list with empty
> name
>   lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if
> last_comment is not NULL
>   lib-mail: parse_addr_spec: Email address without local-part is
> invalid
>   lib-mail: parse_mailbox: Set display name instead mailbox when
> parsing failed
>   lib-mail: message_address_write: Quote and escape strings if needed
>   lib-mail: Update tests for message address
> 
>  src/lib-mail/message-address.c  |   99 
> +++
>  src/lib-mail/test-message-address.c |   11 +++-
>  2 files changed, 98 insertions(+), 12 deletions(-)
> 

Again "Undelivered Mail Returned to Sender" :-( Cannot send them...

-- 
Pali Rohár
pali.ro...@gmail.com


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-03 Thread Pali Rohár
On Sunday 03 April 2016 12:45:23 aki.tu...@dovecot.fi wrote:
> > On April 2, 2016 at 6:58 PM Pali Rohár 
> > wrote:
> > 
> > 
> > Hello,
> > 
> > I borrowed dovecot parser for email addresses and going to use it
> > in new perl module as replacement for Email::Address. During
> > implementation and testing I found bugs in dovecot parser &
> > generator. So I'm sending my patches together with tests.
> > 
> > Pali Rohár (7):
> >   lib-mail: message_address_write: Fix generating empty group list
> >   lib-mail: message_address_write: Fix generating group list with
> >   empty
> >   
> > name
> >   
> >   lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if
> >   
> > last_comment is not NULL
> >   
> >   lib-mail: parse_addr_spec: Email address without local-part is
> >   
> > invalid
> >   
> >   lib-mail: parse_mailbox: Set display name instead mailbox when
> >   
> > parsing failed
> >   
> >   lib-mail: message_address_write: Quote and escape strings if
> >   needed lib-mail: Update tests for message address
> >  
> >  src/lib-mail/message-address.c  |   99
> > 
> > +++
> > 
> >  src/lib-mail/test-message-address.c |   11 +++-
> >  2 files changed, 98 insertions(+), 12 deletions(-)
> 
> Hi!
> 
> Did you post the patches somewhere as they do not seem to have made
> it thru.
> 
> Aki Tuomi
> Dovecot Oy

Hi! I sent all patches to ML, but dovecot server refused them. I already 
contacted dovecot-owner@ about this problem, but without response yet.

-- 
Pali Rohár
pali.ro...@gmail.com


signature.asc
Description: This is a digitally signed message part.


Re: [PATCH 0/7] Fixes for lib-mail message-address

2016-04-03 Thread aki . tuomi
> On April 2, 2016 at 6:58 PM Pali Rohár  wrote:
> 
> 
> Hello,
> 
> I borrowed dovecot parser for email addresses and going to use it in new
> perl module as replacement for Email::Address. During implementation and
> testing I found bugs in dovecot parser & generator. So I'm sending my
> patches together with tests.
> 
> Pali Rohár (7):
>   lib-mail: message_address_write: Fix generating empty group list
>   lib-mail: message_address_write: Fix generating group list with empty
> name
>   lib-mail: parse_addr_spec: Like in rfc822_skip_comment() check if
> last_comment is not NULL
>   lib-mail: parse_addr_spec: Email address without local-part is
> invalid
>   lib-mail: parse_mailbox: Set display name instead mailbox when
> parsing failed
>   lib-mail: message_address_write: Quote and escape strings if needed
>   lib-mail: Update tests for message address
> 
>  src/lib-mail/message-address.c  |   99
> +++
>  src/lib-mail/test-message-address.c |   11 +++-
>  2 files changed, 98 insertions(+), 12 deletions(-)
> 
> -- 
> 1.7.9.5

Hi!

Did you post the patches somewhere as they do not seem to have made it thru.

Aki Tuomi
Dovecot Oy