1 (edited by mcdaniels 2023-12-27 07:01:05)

Topic: Create Alias Address via SQL

Hi there,
I am using the latest iRedMail - version with MSQL/NGINX on Debian 12. I added my domain e.g. home.at and an emailaddress peter.pan@home.at.

Now I would like to add an alias address to this address above.

lets say postmaster@home.at.

So if someone sends to postmaster@home.at the mail should be delivered to peter.pan@home.at

As I have read this is only possible via SQL-commands.

Would you be so kind and give me a hint / the full command (SQL) to archive the above mentioned? I was not successful when trying it via the online-wiki-article (manual) of iRedMail.

EDIT I searched for the wrong problem. I had to search for docs.iredmail.org/user.alias.address.html

Its working now.

What I am also interested in is how to add multiple aliases to one mailaddress (would be kind if you could provide an SQL-command ;-)

Thanks a lot!

----

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

2 (edited by Pavel Zhe 2023-12-30 05:10:42)

Re: Create Alias Address via SQL

INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_alias, active) VALUES ('postmaster@home.at', 'peter.pan@home.at', 'home.at', 'home.at', 1, 1);

To add next alias

INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_alias, active) VALUES ('alias2@home.at', 'peter.pan@home.at', 'home.at', 'home.at', 1, 1);

3

Re: Create Alias Address via SQL

Pavel Zhe wrote:

INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_alias, active) VALUES ('postmaster@home.at', 'peter.pan@home.at', 'home.at', 'home.at', 1, 1);

To add next alias

INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_alias, active) VALUES ('alias2@home.at', 'peter.pan@home.at', 'home.at', 'home.at', 1, 1);

Thanks! It works for me

4

Re: Create Alias Address via SQL

Search "SQL:" on document index page: https://docs.iredmail.org/