1

Topic: Alias email linked to alias domain

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.8 MARIADB edition.
- downloadable installer
- Linux/BSD distribution name and version: Debian 12 (bookworm)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====


Process 1 - I do not create a domain in the admin panel
----------------------------------------------------------
I performed the steps following steps in order:
1. "docs.iredmail.org/sql.add.alias.domain.html"
2. "docs.iredmail.org/sql.create.mail.alias.html"
Result from sending to alias email (in gmail client) : 
The response from the remote server was:
550 5.1.1 : Recipient address rejected: User unknown

Process 2 - I do create a domain in the admin panel
------------------------------------------------------------
I performed the steps following steps in order:
1. I create the domain in admin panel and then follow
2. "docs.iredmail.org/sql.create.mail.alias.html" it works.
Result from sending to alias email (in gmail client) : 
Success - Mail is delivered

Is there any way that I can get process 1 to work instead of process 2?

I am desiring the following outcome

alias@alias.domain to be delivered to existing@existing.domain
without having to create alias.domain in the admin panel.

Thank you

----

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

2

Re: Alias email linked to alias domain

It's NOT clear at all what you actually inserted into SQL database.
Please show us detailed SQL commands so that we can help troubleshooting.

3

Re: Alias email linked to alias domain

Hi,

Here are the sql inserts that I am using for Process 1

USE vmail;
INSERT INTO alias_domain (alias_domain, target_domain) VALUES ('easyflash.co.za', 'fibastrip.co.za');
INSERT INTO alias (address, domain, active) VALUES ('test@easyflash.co.za', 'easyflash.co.za', 1);
INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_list, active) VALUES ('test@easyflash.co.za', 'test2@fibastrip.co.za', 'easyflash.co.za', 'fibastrip.co.za', 1, 1);

This produces an error from gmail

Address not found
Your message wasn't delivered to test@easyflash.co.za because the address couldn't be found, or is unable to receive mail.
The response from the remote server was:
550 5.1.1 : Recipient address rejected: User unknown

Thank you

4

Re: Alias email linked to alias domain

What's the output of commands below?

cd /etc/postfix/mysql/
for i in $(ls *cf); do echo $i; postmap -q 'test@easyflash.co.za' mysql:./$i; done

5

Re: Alias email linked to alias domain

catchall_maps.cf
domain_alias_catchall_maps.cf
domain_alias_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_dependent_relayhost_maps.cf
sender_login_maps.cf
transport_maps_domain.cf
transport_maps_maillist.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf

6

Re: Alias email linked to alias domain

It doesn't find this user at all.
Do you have domain fibastrip.co.za on this server?

7

Re: Alias email linked to alias domain

If I create the domain in the admin panel, then it works. The original question was can I create an alias domain without having to create the domain in the admin panel.

Process 1 (Does not work)
I do not create the domain in the admin panel (Trying to keep the list clean and minimal)
Step 1. INSERT INTO alias_domain
Step 2. INSERT INTO alias
Step 3. INSERT INTO forwardings

Process 2 (That worked)
Step 1. Create domain in the admin panel
Step 2. INSERT INTO alias_domain
Step 3. INSERT INTO alias
Step 4. INSERT INTO forwardings

8

Re: Alias email linked to alias domain

iRedMail is free to modify to you own needs, but there is no support for such modifications and makes troubleshooting way harder

you could archive this by modifying the templates in /etc/postfix/mysql/

BUT

be aware that this will cause a lot of problems and maybe add vulnerabilities and i highly suggest to not temper with it if you don't know what exactly you are doing

9

Re: Alias email linked to alias domain

Voltimort wrote:

The original question was can I create an alias domain without having to create the domain in the admin panel.

No.