inverse-inc/sogo — pull request #28 by Skrupellos (2014-03-15 21:29:48+00:00)
Title: Fix #1158: Allow mail addresses with different full names

As stated in http://www.sogo.nu/bugs/view.php?id=1158, the the MailFieldNames fields (like _mail_) can only contain a plain E-Mail address, without a full name like _"Dude" \_. If the value contains never the less a full value, something strange happened:
* Since SOGo 2.2.1: The result would have been _"Bro" \<"Dude" \\>_
* Before SOGo 2.2.1: The result would have been _"Bro" \_
therefore the only sane values have been without a full name and "<>".

Now it is possible to have
* E-Mail addresses without a full name
* E-Mail addresses with a different full name

to accomplish this, without breaking backward compatibility for former sane configurations, the new behavior only kicks in if the value contains a "<". Depending on it's position, one of the two new E-Mails address types is selected. The mapping is as following:

| Input | Result | Users fullName |
|---:|---:|:---:|
| bro@example.com | "Bro" \ | "Bro" |
| bro@example.com | bro@example.com | "" |
| \ | bro@example.com | "Bro" or "" |
| "Dude" \ | "Dude" \ | "Bro" or "" |