1

Topic: How to export/list aliases?

I'm just after an export of the aliases - how do I go about doing this?

----

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 export/list aliases?

Could you provide some more information, what backend are you on for instance? [MySQL/PGSQL/LDAP]

3

Re: How to export/list aliases?

Sorry, I believe MySql but also should have the data available in LDAP

4

Re: How to export/list aliases?

That's confusing, when you installed iredmail which backend did you choose? What you said implies ldap as all backends ship with MySQL for other components

5

Re: How to export/list aliases?

Not sure I'm afraid as it wasn't my install

6

Re: How to export/list aliases?

Show us output of command 'postconf virtual_alias_maps', then we can know which backend/database you're running.

7

Re: How to export/list aliases?

In mysql try this at the command line

mysql vmail -e "  select  address,goto,name,domain,islist,DATE(created),active from alias where  islist = 1"

8

Re: How to export/list aliases?

jpforte wrote:

In mysql try this at the command line

mysql vmail -e "  select  address,goto,name,domain,islist,DATE(created),active from alias where  islist = 1"

This is only going to function if your backend is MySQL

9

Re: How to export/list aliases?

Thanks.  Backend is LDAP

10 (edited by madengineer 2015-02-27 09:55:51)

Re: How to export/list aliases?

close, but this doesn't list the destination address

11

Re: How to export/list aliases?

To export member of mailing list, try this:

# ldapsearch -x -D 'cn=Manager,dc=x,dc=x' -W -b 'o=domains,dc=x,dc=x' "(memberOfGroup=list@domain.com)" mail

Please ALWAYS ALWAYS ALWAYS show us basic info of your iRedMail server when asking support:

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

12 (edited by madengineer 2015-02-28 07:44:45)

Re: How to export/list aliases?

ZhangHuangbin wrote:

To export member of mailing list, try this:

# ldapsearch -x -D 'cn=Manager,dc=x,dc=x' -W -b 'o=domains,dc=x,dc=x' "(memberOfGroup=list@domain.com)" mail

Please ALWAYS ALWAYS ALWAYS show us basic info of your iRedMail server when asking support:

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

hah yeah I would have if I'd known and at time of posting I wasn't in a position to check ..:

madengineer wrote:

Not sure I'm afraid as it wasn't my install

Your ldapsearch returns no results hmm

13

Re: How to export/list aliases?

madengineer wrote:

Your ldapsearch returns no results

Did you replace 'list@domain.com' in my sample command by the real mailing list address? And 'dc=x,dc=x'?

14 (edited by madengineer 2015-03-02 07:39:19)

Re: How to export/list aliases?

yes and yes

does this work for aliases also?  I did try entering the email address of a list with the same result of "0 Success"

15

Re: How to export/list aliases?

Mail alias members are stored in mail alias account, try this:

# ldapsearch -x ... "(mail=alias@domain.com)" mailForwardingAddress

16

Re: How to export/list aliases?

ldap_bind: Inappropriate authentication (48)
        additional info: anonymous bind disallowed

and if i use the -W switch it claims Invalid credentials (49) despite entering the correct p/w

17

Re: How to export/list aliases?

Please use the correct bind dn and password with ldapsearch.

18

Re: How to export/list aliases?

There we go - that worked smile

I'll have to do a foreach loop or something to lookup each alias