1

Topic: Get a list of vmail.alias table, and remove incorrect entries

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Debian
- 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.
====

I need to be able to list the aliases that I have defined using the following command so I can see everyone in there, and also know how to delete a given alias as I apparently fat fingered the relay target address on 3 I added and will need to remove them and readd.

insert into vmail.alias (address, goto, islist, accesspolicy, domain, active) values ('useremail@domain.com', 'emailforwardedto@otherdomain.com', 1, 'public', 'rpedocs.com', 1);

Any help would be much appreciated!

----

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

2

Re: Get a list of vmail.alias table, and remove incorrect entries

I don't quite understand what you want sad

3

Re: Get a list of vmail.alias table, and remove incorrect entries

Zhang,

Using the mysql command line, I would like to view all of the aliases that were created using the command:

insert into vmail.alias (address, goto, islist, accesspolicy, domain, active) values ('useremail@domain.com', 'emailforwardedto@otherdomain.com', 1, 'public', 'otherdomain.com', 1);

The reason I want to see the ones that have been created is that some of them are incorrect.  So, once I have the instruction to view them, I would need instruction on how to remove those specific entries.

I tried to view them by using 'select * from vmail.alias', but that did not work.  Also, I tried to remove entries using 'delete from' statements, but that didn't work either.

Does that clear it up?

Ben

4

Re: Get a list of vmail.alias table, and remove incorrect entries

Oops.  I was forgetting my ';' at the end of my statements.  What I was looking for is:

To list the values in the table:

select * from vmail.alias;

To list specific values from the table:

select address from vmail.alias where address="email@domain.com";

To delete specific values from the table:

delete from vmail.alias where address="email@domain.com";

to re-enter new values into the table:

insert into vmail.alias (address, goto, islist, accesspolicy, domain, active) values ('useremail@domain.com', 'emailforwardedto@otherdomain.com', 1, 'public', 'otherdomain.com', 1);

Thank you for the prompt response to my question Zhang