[PATCH 0/7] Fixes for lib-mail message-address
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
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.rohar@gmail.com
On April 4, 2016 at 8:18 PM Pali Rohár pali.rohar@gmail.com 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.rohar@gmail.com
Can you please send them directly to me, please?
Aki Tuomi
On April 4, 2016 at 8:35 PM Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@dovecot.fi wrote:
Can you please send them directly to me, please?
Aki Tuomi
Sent.
-- Pali Rohár pali.rohar@gmail.com
Thanks.
Aki Tuomi
On April 6, 2016 at 5:29 PM Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@dovecot.fi wrote:
Can you please send them directly to me, please?
Aki Tuomi
Sent.
Received? Are patches OK now?
-- Pali Rohár pali.rohar@gmail.com
Hi!
Patches came thru fine, they are currently being reviewed.
Aki
On 06 Apr 2016, at 17:29, Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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.
On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
On 06 Apr 2016, at 17:29, Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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.rohar@gmail.com
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 pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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.rohar@gmail.com
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 pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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
On 11 Apr 2016, at 13:44, Pali Rohár pali.rohar@gmail.com wrote:
On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
On 06 Apr 2016, at 17:29, Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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.
On Thursday 21 April 2016 14:24:09 Timo Sirainen wrote:
On 11 Apr 2016, at 13:44, Pali Rohár pali.rohar@gmail.com wrote:
On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
On 06 Apr 2016, at 17:29, Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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" user@host
before patch it was:
test"test user@host
-- Pali Rohár pali.rohar@gmail.com
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 pali.rohar@gmail.com wrote:
On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
On 06 Apr 2016, at 17:29, Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@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" user@host
before patch it was:
test"test user@host
Timo, it is enough? Or do you need something more? Please let me know.
-- Pali Rohár pali.rohar@gmail.com
participants (4)
-
Aki Tuomi
-
aki.tuomi@dovecot.fi
-
Pali Rohár
-
Timo Sirainen