1

Topic: Import global address book

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
====
1.6

Is there any way where we can import address book as csv from the control panel. this could be a good feature.

thanks in advance.

PineMail11

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Import global address book

Roundcube will query LDAP server and list all mail users in global LDAP address book, is it ok enough for you?

3

Re: Import global address book

yes, it is ok.
Please advise.

Regards,
PineMail11

4

Re: Import global address book

PineMail11 wrote:

yes, it is ok.
Please advise.

Regards,
PineMail11

I believe it there should be a link to download in control panel not from roundcube.

Regards,
PineMail11

5

Re: Import global address book

Oh, personal address book, sorry about my misunderstood.

May i know why you prefer to import/export personal address book in control panel instead of Roundcube?

6

Re: Import global address book

ZhangHuangbin wrote:

Oh, personal address book, sorry about my misunderstood.

May i know why you prefer to import/export personal address book in control panel instead of Roundcube?

No, your earlier understanding was correct.

It would be great if we can have a link somewhere in admin panel where we can download global address book of the domain, download format can be CSV or any other which any one easily understand.

7

Re: Import global address book

So we're talking about EXPORT mail accounts in CSV format, right?
Hmm, sounds like a good idea as backing up mail accounts, and as address book. Will consider achieving it in future release.
Thanks very much for your feedback.

8

Re: Import global address book

ZhangHuangbin wrote:

So we're talking about EXPORT mail accounts in CSV format, right?
Hmm, sounds like a good idea as backing up mail accounts, and as address book. Will consider achieving it in future release.
Thanks very much for your feedback.

Perfect understanding! yes it is.

It would be great if you can provide a script so it can be updated on the existing server without upgrading just for this cause.

9

Re: Import global address book

Hi Zhang,
Can we have some kind of script to import the same.
thanks
PineMailAdmin

10

Re: Import global address book

Hi Zhang,
waiting for your reply.
Thanks
PineMailAdmin

11

Re: Import global address book

No plan to write separate script to export accounts, sorry. You can try it yourself.

12

Re: Import global address book

sad If I would know how to write scripts, I wouldn't have written to you.
hope to see this in next version!

13

Re: Import global address book

PineMail11 wrote:

sad If I would know how to write scripts, I wouldn't have written to you.
hope to see this in next version!

Hi Zhang,

We have made script to get the global address book contacts, but we need to make a link in control panel, so that  we can download it from control panel.
Kindly advice how the script can be called from control Panel.

Script:
ldapsearch -LLLL -x -D "cn=Manager,dc=test,dc=com" -h mail.test.com -b "ou=Users,domainName=test1.com,o=domains,dc=test,dc=com" -w xxxx cn=* sAMAccountName cn  sn=*-S sn=* sAMAccountName sn mail=*@* -S mail=*@* sAMAccountName mail | egrep 'mail:'>file1
ldapsearch -LLLL -x -D "cn=Manager,dc=test,dc=com" -h mail.test.com -b "ou=Users,domainName=test1.com,o=domains,dc=test,dc=com" -w xxxx cn=* sAMAccountName cn  sn=*-S sn=* sAMAccountName sn mail=*@* -S mail=*@* sAMAccountName mail | egrep 'cn:'>file2
paste file1.txt file2.txt | sed 's/\t/,/g'>/home/abc.csv

Thanks,
Regards,
Pinemail11

14

Re: Import global address book

You can modify HTML template files under templates/default/ldap/domain/, add the link to domain profile page or listing page.

Is this Active Directory server? OpenLDAP doesn't have attribute "sAMAccountName" by default.

15

Re: Import global address book

ZhangHuangbin wrote:

You can modify HTML template files under templates/default/ldap/domain/, add the link to domain profile page or listing page.

Is this Active Directory server? OpenLDAP doesn't have attribute "sAMAccountName" by default.

This is Open LDAP.

How can we get it done, we are unable to downloaded when we click on the link created on html page. It does not recognize the location.

16

Re: Import global address book

Of course you should set a correct link on HTML page first.

Generate CSV file with your command, and copy to a location which is reachable through web server. Then set correct link on HTML page of iRedAdmin.

17

Re: Import global address book

Hi Zhang,

We have copied the generated CSV file to webserver reachable  location, but we need to access only if  logged through iRedAdminpro control panel. So suggest us where we need to create a hyper link, so that it can be accessed only if logged in the control panel.

Thanks,
Regards,
PineMail11