1

Topic: Removing a catch-all domain

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

I've successfully added a catch all domain as per the instructions here: http://www.iredmail.org/docs/sql.create … 70701.html

However, I now want to remove this domain as it has moved to it's own mailserver. Anybody know how?

Thanks

----

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

2 (edited by evilstiefel 2017-08-10 04:56:14)

Re: Removing a catch-all domain

Same thing like you did when adding the alias, just delete the entry from the database:

$ mysql -u root -p
sql> USE vmail;
sql> DELETE FROM alias
                WHERE address = 'domain.com';

Adjust to what you initially entered for the alias address. As always, when manually modifying the database, create a backup first.

Also, there is no harm in leaving the alias registered, since when switching the domain to another mail server, no emails directed to this address should ever even get to your old mailserver.

It's just cosmetic and cleanup at this point.

Edit: also note, from the wiki it is not clear which entry specifies the alias, it's either 'domain' or 'address' which should be in the WHERE-clause.

If you want to make sure, since only one such alias should exist, you can run, before deleting the entry:

$ mysql -u root -p
sql> USE vmail;
sql> SELECT * FROM alias
                WHERE address = 'domain.com';

which should only return one result.