1

Topic: how to extract all mail addresses in a domain?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: ubuntu-14.04LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):LDAP
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro? 2.3.1
- Related log if you're reporting an issue:
====
i want to extract all mail addresses in a domain. i see there is a export account to ldif.  when i execute , it only gives a couple of lines whereas there are more than 500 accounts in that domain.

----

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

2

Re: how to extract all mail addresses in a domain?

Please try 'ldapsearch' command.

$ ldapsearch -x -D 'cn=vmail,dc=xx,dc=xx' -W -b 'domainName=[your_domain],o=domains,dc=xx,dc=xx' mail

* Replace 'dc=xx,dc=xx' by the your real ldap suffix.
* You can find bind password for 'cn=vmail,dc=xx,dc=xx' in /etc/postfix/ldap/*.cf.

3

Re: how to extract all mail addresses in a domain?

thank you

how can i set value of any in a domain with such a ldap command ?

4

Re: how to extract all mail addresses in a domain?

yavuz.maslak wrote:

how can i set value of any in a domain with such a ldap command ?

You need command `ldapmodify`. Please read its manual page or Google to understand how to use it.