Subject: | <Без темы> |
Date: | Wed, 08 Jul 2009 19:56:54 +0400 |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
From: | Sits tst <sitstst [...] mail.ru> |
There is a problem with fetch_hash method.
It cannot fetch safely ENVELOPE.
It assume that any fetched value is one of quoted string, unquoted string or parenthesized value.
But envelope has nested parentheses.
envelope is
( "Date"
"Subject"
(
( "from-name" "from-path" "from-localpart" "from-domain" )
[ .. more "from"s ]
)
(
( "sender-name" "sender-path" "sender-localpart" "sender-domain" )
[ .. more "sender"s ]
)
(
( "reply-name" "reply-path" "reply-localpart" "reply-domain" )
[ .. more "reply"s ]
)
(
( "reply-name" "reply-path" "reply-localpart" "reply-domain" )
[ .. more "reply"s ]
)
(
( "to-name" "to-path" "to-localpart" "to-domain" )
[ .. more "to"s ]
)
(
( "cc-name" "cc-path" "cc-localpart" "cc-domain" )
[ .. more "cc"s ]
)
(
( "bcc-name" "bcc-path" "bcc-localpart" "bcc-domain" )
[ .. more "bcc"s ]
)
"ref-message-id"
"message-id"
)
All that structure is cut to first ")" i.e. after first "from"
Moreover rfc-2822 does not deny using bare parentheses in any fields
so problem not only with envelope but on some messages it can occur with any field, just with envelope it always occur on any message