1 (edited by steen 2021-09-01 22:37:44)

Topic: Need help to domain aliases

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.0 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Yes
- Linux/BSD distribution name and version: Ubunto 20.4.3 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- 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.
====
I need some help regarding domain aliases

Am I misunderstanding something here ?

I have a few domains for personal test-, and daily use, and I'm trying to obtain that all emails sent to eg user1 on any of my domains are forwarded / sent to user1@main_domain.dk, so I just need to check one mailbox (user1@main_domain.dk) for new mails.
I have added all my domains to IredMail via iredadmin under domains, and created the same user for all domains eg. user1 via the GUI
Since this is entirely for personal use, I'm using the free version that lacks GUI handling of aliases etc, so I added all my domains minus the destination domain main_domain.dk to table alias_domain and have 6 rows looking like this
alias_domain        target_domain          created            modified       active
aaa.dk                  main_domain.dk       1970-01-01       1970-01-01      1
bbb.dk                  main_domain.dk        1970-01-01       1970-01-01      1
etc                        etc                           etc                   etc                 etc

When sending a email to eg user1@aaa.dk I would expect that the mail is showing up in the mailbox for user1@main_domain.dk but it isn't and I can find the email in the mailbox for user1@aaa.dk and the same happens for all the domains that I have put under alias_domain

What am I doing wrong ??

Br Steen

Some further testings:

Running the command: postmap -q 'steen@aaa.dk' mysql:/etc/postfix/mysql/domain_alias_maps.cf gives this output
steen@main_domain.dk
So the information from the database is obviously ok and can be read from the domain_alias_maps.cf script

BUT running this command the output seems wrong:
Seems like it's still pointing to the maildir for domain aaa.dk and not the maildir for main_domain.dk

root@mail:/etc/postfix/mysql# for cf in $(ls); do echo ${cf}; postmap -q 'steen@aaa.dk' mysql:./${cf}; done
catchall_maps.cf
domain_alias_catchall_maps.cf
domain_alias_maps.cf
steen@main_domain.dk
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
steen@aaa.dk
transport_maps_domain.cf
transport_maps_maillist.cf
transport_maps_user.cf
virtual_alias_maps.cf
steen@aaa.dk
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf
vmail1/aaa.dk/s/t/e/steen-2021.08.31.09.32.33//Maildir/

But sending an email to steen@aaa.dk still ends up in the mailbox for steen@aaa.dk and not as wished in steen@main_domain.dk

----

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

2

Re: Need help to domain aliases

steen wrote:

What am I doing wrong ??

- Create only one mail domain in iRedAdmin(-Pro), create the user under this domain.
- Assign other domains as alias domains to this domain. Do NOT create other domains separately.