This tool parses a collection of vcards, such as those extracted from Roundcube, and generates a CSV that is fit to be imported on Outlook.
USE roundcube
tee contacts.lst
SELECT c.vcard contact_vcard
FROM
contacts c INNER JOIN
contactgroupmembers cgm ON cgm.contact_id = c.contact_id INNER JOIN
contactgroups cg ON cgm.contactgroup_id = cg.contactgroup_id
WHERE
c.del <> 1
GROUP BY c.contact_id\G
grep -v 'row ***' contacts.lst > /tmp/f
mv /tmp/f contacts.lst
cat contacts.lst | python parse_vcards.py contacts.csv
Follow this guide to log-in in a PowerShell session.
Then follow this guide to import the CSV.
If you need to purge all contacts, after logging-in, do this in PowerShell:
Get-MailContact | Remove-MailContact
N=1
cat contacts.lst | while read l; do N=$(($N + 1)); echo $l | sed 's!^,!'$N'@missing.email.invalid,!g' ; done > /tmp/f;
mv /tmp/f contacts.lst
With this you should be all set.
This is quite minimal, but it does the job for bulk import.