Hello, There is a previous ticket (#1487096) indirectly dealing with the issue of squirrelmail contacts with multiple email addresses in squirrelmail_usercopy. As background, squirrelmail allows a contact to have a comma-separated list of addresses as its address field. #1487096 addressed the issue of imports failing for email fields longer than 128 characters (which occurs virtually only when there are multiple addresses). This was resolved by simply having squirrelmail_usercopy import only the first address and drop the rest silently.
This is certainly not an ideal solution and is not at all satisfactory in our usage, where many users use multiple-address squirrelmail contacts to easily mail class/project lists and will be very frustrated if these lists disappear in the upcoming migration to roundcube.
I have prepared a modification that will detect contacts having multiple email addresses and instead import them as multiple contacts (one per address) and then automatically place them in a roundcube group. This is the functionality that our users have requested and is, I think, useful to all roundcube users. As such I am sending a patch to you.
As you can see, it will check if the email field from squirrelmail contains a semicolon or comma (there seems to be some slight inconsistency on which character is used, so it is best, I think, to just work on both), and if there is it creates a group by the name of the squirrelmail contact, and then inserts a contact for each individual address (with only email address, no name info), and adds that contact to the group created before.
Thanks,