Skip Menu |

This queue is for tickets about the MailTools CPAN distribution.

Report information
The Basics
Id: 91362
Status: resolved
Priority: 0/
Queue: MailTools

People
Owner: Nobody in particular
Requestors: ratkovdima [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug in module Mail::Address
Date: Thu, 12 Dec 2013 18:53:55 +0400
To: bug-MailTools [...] rt.cpan.org
From: D =) <ratkovdima [...] mail.ru>
Good day! I finded bug in method "parse" of module Mail::Address. I pass string for example to method Mail::Address->parse "ratkov <ratkovdima@mail.ru> <ratkovdima@mail.ru>") and method "address" return me ratkovdima@mail.ruratkovdima@mail.ru This is wrong? -- Дмитрий Ратьков
Subject: Re: [rt.cpan.org #91362] bug in module Mail::Address
Date: Thu, 12 Dec 2013 16:15:40 +0100
To: "ratkovdima [...] mail.ru via RT" <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <secretaris [...] nluug.nl>
* ratkovdima@mail.ru via RT (bug-MailTools@rt.cpan.org) [131212 14:54]: Show quoted text
> Thu Dec 12 09:54:13 2013: Request 91362 was acted upon. > Transaction: Ticket created by ratkovdima@mail.ru > Queue: MailTools > Subject: bug in module Mail::Address > Requestors: ratkovdima@mail.ru > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > > > I finded bug in method "parse" of module Mail::Address.
Probably you use the module the wrong way. An example by you included in the bug-report would make it more easy for me to reply to your issue. This code works as expected: #!/usr/bin/env perl use warnings; use strict; use Mail::Address; my @addr = Mail::Address->parse('ratkov <ratkovdima@mail.ru>'); print $_->address, "\n" for @addr; I suspect that you print @{$addr[0]}, but that's the object containing both phrase and address. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re[2]: [rt.cpan.org #91362] bug in module Mail::Address
Date: Thu, 12 Dec 2013 22:18:51 +0400
To: bug-MailTools [...] rt.cpan.org
From: D =) <ratkovdima [...] mail.ru>
No, this is my code   #!/usr/bin/env perl   use warnings;   use strict;   use Mail::Address;   my @addr = Mail::Address->parse('ratkov < ratkovdima@mail.ru > <ratkovdima@mail.ru>');   print $_->address, "\n" for @addr; result: ratkovdima@mail.ruratkovdima@mail.ru together expected: ratkovdima@mail.ru ratkovdima@mail.ru Note, that is how look string ' ratkov < ratkovdima@mail.ru > <ratkovdima@mail.ru> '. in this form sent to our system, with two brackets (< >) and without the quotes don't ask why this was the email message header FROM: ratkov < ratkovdima@mail.ru > <ratkovdima@mail.ru> P.S. The module Email::Address returns correct result Четверг, 12 декабря 2013, 10:16 -05:00 от "Mark Overmeer via RT" <bug-MailTools@rt.cpan.org>: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > > >* ratkovdima@mail.ru via RT (bug-MailTools@rt.cpan.org) [131212 14:54]:
>> Thu Dec 12 09:54:13 2013: Request 91362 was acted upon. >> Transaction: Ticket created by ratkovdima@mail.ru >> Queue: MailTools >> Subject: bug in module Mail::Address >> Requestors: ratkovdima@mail.ru >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > >> >> I finded bug in method "parse" of module Mail::Address.
> >Probably you use the module the wrong way. An example by you included >in the bug-report would make it more easy for me to reply to your >issue. This code works as expected: > >  #!/usr/bin/env perl >  use warnings; >  use strict; >  use Mail::Address; > >  my @addr = Mail::Address->parse('ratkov < ratkovdima@mail.ru >'); >  print $_->address, "\n" for @addr; > >I suspect that you print @{$addr[0]}, but that's the object containing >both phrase and address. >-- >Regards, >               MarkOv > >------------------------------------------------------------------------ >       Mark Overmeer MSc MARKOV Solutions >        Mark@Overmeer.net solutions@overmeer.net >http://Mark.Overmeer.net http://solutions.overmeer.net > >
-- Дмитрий Ратьков
Subject: Re: Re[2]: [rt.cpan.org #91362] bug in module Mail::Address
Date: Thu, 12 Dec 2013 20:15:41 +0100
To: "ratkovdima [...] mail.ru via RT" <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* ratkovdima@mail.ru via RT (bug-MailTools@rt.cpan.org) [131212 18:19]: Show quoted text
> Queue: MailTools > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > > > No, this is my code >   my @addr = Mail::Address->parse('ratkov < ratkovdima@mail.ru > <ratkovdima@mail.ru>');
This is not a but in Mail::Address, but an illegal address. A comma is lacking. Show quoted text
> P.S. The module Email::Address returns correct result
Apparently, Email::Address is flawed as well: it should also refuse this. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re[4]: [rt.cpan.org #91362] bug in module Mail::Address
Date: Thu, 12 Dec 2013 23:30:03 +0400
To: bug-MailTools [...] rt.cpan.org
From: D =) <ratkovdima [...] mail.ru>
I can legal set this params from command line, without comma for example /usr/bin/sendmail -t <<HERE Show quoted text
>TO: test_email@mail.ru >FROM: ratkov <ratkovdima@mail.ru> <ratkovdima@mail.ru> >SUBJECT: test >test >HERE
The message will come. So I have to correct handle this situation and get email address. Or what? Our client sent a message in this form. Четверг, 12 декабря 2013, 14:15 -05:00 от "Mark Overmeer via RT" <bug-MailTools@rt.cpan.org>: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > > >* ratkovdima@mail.ru via RT (bug-MailTools@rt.cpan.org) [131212 18:19]:
>> Queue: MailTools >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > >> >> No, this is my code >>   my @addr = Mail::Address->parse('ratkov < ratkovdima@mail.ru > < ratkovdima@mail.ru >');
> >This is not a but in Mail::Address, but an illegal address. A comma is lacking. >
>> P.S. The module Email::Address returns correct result
> >Apparently, Email::Address is flawed as well: it should also refuse this. >-- >Regards, >               MarkOv > >------------------------------------------------------------------------ >       Mark Overmeer MSc MARKOV Solutions >        Mark@Overmeer.net solutions@overmeer.net >http://Mark.Overmeer.net http://solutions.overmeer.net > >
-- Дмитрий Ратьков
Subject: Re: Re[4]: [rt.cpan.org #91362] bug in module Mail::Address
Date: Thu, 12 Dec 2013 23:51:32 +0100
To: "ratkovdima [...] mail.ru via RT" <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* ratkovdima@mail.ru via RT (bug-MailTools@rt.cpan.org) [131212 19:30]: Show quoted text
> Queue: MailTools > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > > > I can legal set this params from command line, without comma for example > > /usr/bin/sendmail -t <<HERE
> >TO: test_email@mail.ru > >FROM: ratkov <ratkovdima@mail.ru> <ratkovdima@mail.ru> > >SUBJECT: test > >test > >HERE
The current specification for email addresses can be found at http://www.rfc-editor.org/rfc/rfc5322.txt section 3.4. The address you specify at FROM is not a valid address according to the RFC. Behavior of out-of-spec values is "undefined"... one application will treat it differently from some other application. So, both sendmail and MailTools are handling correct: they try to recover the bug (although in a different a way). -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re[6]: [rt.cpan.org #91362] bug in module Mail::Address
Date: Fri, 13 Dec 2013 09:47:47 +0400
To: bug-MailTools [...] rt.cpan.org
From: D =) <ratkovdima [...] mail.ru>
Thanks for the answer s. Четверг, 12 декабря 2013, 17:51 -05:00 от "Mark Overmeer via RT" <bug-MailTools@rt.cpan.org>: Show quoted text
><URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > > >* ratkovdima@mail.ru via RT (bug-MailTools@rt.cpan.org) [131212 19:30]:
>> Queue: MailTools >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91362 > >> >> I can legal set this params from command line, without comma for example >> >> /usr/bin/sendmail -t <<HERE
>> >TO: test_email@mail.ru >> >FROM: ratkov < ratkovdima@mail.ru > < ratkovdima@mail.ru > >> >SUBJECT: test >> >test >> >HERE
> >The current specification for email addresses can be found at >http://www.rfc-editor.org/rfc/rfc5322.txt section 3.4. The address >you specify at FROM is not a valid address according to the RFC. > >Behavior of out-of-spec values is "undefined"... one application >will treat it differently from some other application. So, both >sendmail and MailTools are handling correct: they try to recover >the bug (although in a different a way). >-- >Regards, >               MarkOv > >------------------------------------------------------------------------ >       Mark Overmeer MSc MARKOV Solutions >        Mark@Overmeer.net solutions@overmeer.net >http://Mark.Overmeer.net http://solutions.overmeer.net > >
-- Дмитрий Ратьков
no change needed