1

Topic: List all domains

I just installed the iredmail server and I really like it!

Our domain registry does have a backup/relay mail server in case our mailserver is down.
For this they need a url with an plain-text file of all the mail domains on my server.

How can I query postfix/ldap/iredmail for a simple list of all domains? Anyone an idea for that?
Is there a command to run?

Thanks!

----

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

2

Re: List all domains

You can use OpenLDAP client tool "ldapsearch" to get all domains.

Example:

# ldapsearch -x -s one -D 'cn=vmail,dc=iredmail,dc=org' -b 'o=domains,dc=iredmail,dc=org' -W "(objectClass=mailDomain)" domainName

You have to replace "cn=vmail,dc=iredmail,dc=org" and "o=domains,dc=iredmail,dc=org" here, and you can find them in /etc/postfix/ldap_*.cf (bind_dn, search_base).

For more information, please read manual page of 'ldapsearch':

# man ldapsearch

3

Re: List all domains

Thanks a lot for the quick reply, all sorted out now smile
No experience whatsoever with Ldap, but this pointed me to the right direction..