1 (edited by blueaquan 2023-01-20 14:22:03)

Topic: How does additional domain work...?

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

I have a new and fully functional iRedMail version 1.6.2 on Ubuntu 22.10.  This is currently a testbed machine, where I am testing and trying to learn how all these different softwares installed by iRedmail are working together as a single unit.
My question is, initially I had a domain to start with, say abc.com which was specified as the FQDN and entries in the hosts file and also in the mydomain statement in Postfix's main.cf file.  The mydestination also has this domain statement which is perfect.

Once this initial domain was tested, I added a secondary domain say xyz.com using /iredadmin web interface expecting it to make modifications to Postfix files. However to my surprise, Postfix only has the intial abc.com entries still in mydomain and mydestination, but mails from the new domain user@xyz.com are going out and come in too.

I am curious to know how this is working and where the entries to the secondary domain are made.



P.S.  I have all corresponding MX, SPF, DKIM and DMARC records for both domains.


Thanks, Best

BA

----

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

2

Re: How does additional domain work...?

Email domains are stored in SQL/LDAP database, you just add new ones with "/iredadmin/" web interface, then add required DNS records for email domain names by following our tutorial here:
https://docs.iredmail.org/setup.dns.html

3 (edited by blueaquan 2023-01-21 18:00:51)

Re: How does additional domain work...?

Hi Zhang
Matter of fact, I've already added a new domain and it works perfectly.  My question however was on how it works...? When I initially installed iRedmail, I could see the Postfix main.cf file which had the entries related to my initial domain, but when I added the secondary domain using /iredadmin I don't see any additional entries in Postfix related to the new domain, but send and receive works perfectly.

Therefore I am curious to know how this works even though there are no entries in Postfix. Apart from storing domain and user related information in LDAP, doesn't it require changes in Postfix to accommodate the new domain...?

Thanks, Best

BA

4

Re: How does additional domain work...?

no, since they are all virtual, all information are stored in a database, only thing you need/can change is a different dkim key for each domain, which is optional:


https://docs.iredmail.org/sign.dkim.sig … omain.html

5

Re: How does additional domain work...?

Hi @Cthulhu and @Zhang
My understanding is, please correct me if I am wrong, iRedmail installs a collection of softwares which all work as a single unit. Such as OpenLDAP for storing Domain and User information, Postfix to act as MTA, Dovecot to act as MDA, Spamassasin for SPAM filtering, and AMAVISD as Antivirus and Nginx / Apache and Roundcube as Web Server and web interface respectively.
Although OpenLDAP is used to store Domain and User information, it is not responsible for Mail transfer, that is handled by Postfix and it is Postfix's configuration file that should have the details of which domains, it plans to relay.  I think in this case postfix queries LDAP to know which domains to relay. Under relay_domains, an LDAP file was specified, when queried using ldapsearch, it contained the names of both domains and various other information too about mail enabled users and Alias users etc.
So that solves it, although it's not directly mentioned in the main.cf file, it queries LDAP to know which domains it should relay.

Thank you all

BA