5430411539347357344f6bf2552731b62f0a14fd |
|
07-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message_address_parse() - Handle invalid standalone phrases better
We'll treat "local-part" (without quotes) as a mailbox even without
@domain, but if it continues with anything or if it's a quoted-string,
we'll treat it as a display-name instead.
This is probably better than just converting everything to display-name,
since there are likely to exist headers like "To: localuser" |
b435147a713b1d9338a8cd99848db7c45e0a65a5 |
|
06-Jun-2016 |
Pali Rohár <pali.rohar@gmail.com> |
lib-mail: message_address_write: Quote and escape strings if needed
ATEXT characters must be properly quoted when are in phrase.
Test case:
{ name = "test\"test", mailbox = "user", domain = "host" }
converts to:
"test\"test" <user@host> |
91fdb25b5a77defecbbc0cb9b7f15f28e9dab1f0 |
|
06-Jun-2016 |
Pali Rohár <pali.rohar@gmail.com> |
lib-mail: parse_mailbox: Set display name instead mailbox when parsing failed
It does not make sense to set mailbox without domain on incorrect input.
Rather set display name which is more likely useable value.
Test case:
test
is parsed as:
{ name = "test", mailbox = NULL, domain = NULL } |
d56bcbb354f1495e3323c7816cf69638975a8608 |
|
06-Jun-2016 |
Pali Rohár <pali.rohar@gmail.com> |
lib-mail: message_address_write: Fix generating group list with empty name
Empty name for group list must be quoted.
Test case:
{ { name = NULL, mailbox = "", domain = NULL }, { name = NULL, mailbox = NULL, domain = NULL } }
converts to:
"":; |
b98e122661d4fd3c205448d918a3b133b8ccfea5 |
|
06-Jun-2016 |
Pali Rohár <pali.rohar@gmail.com> |
lib-mail: message_address_write: Fix generating empty group list
Empty group list ends with ": " not with ", ".
Test case:
{ { name = NULL, mailbox = "group", domain = NULL }, { name = NULL, mailbox = NULL, domain = NULL } }
converts to:
group:; |
4cd4dff21c647e955139be3b3fe1dc40fc9bdc00 |
|
14-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
If mailbox name was missing from message address, we didn't set it to
MISSING_MAILBOX as we should have, which caused crashing if the field was
tried to be SEARCHed. Also cleaned up the code a bit.
--HG--
branch : HEAD |