Topic: Multiple SSL for Multiple Domains in the same Machine & IP
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.0 OPENLDAP edition.
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Ubuntu22.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- 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.
====
Hi there,
Im trying to setup iRedMail and its working perfectly for a single domain.
The thing im trying to do is to have some separated domains on the same server (same IP and same machine). I have been trying to search information about this but nothing has worked.
I tried adding a hash map for multiple domains on postfix, i tried setting configurations for multiple ssl but im stuck.
I have got a mx.domain1.com that gets the certificate perfectly when I send an email from it, but when i try to send an email from mx.domain2.com, it takes the certificate from the first one.
---/etc/hosts/---
127.0.0.1 mx.domain1.com mx.domain2.com mail localhost localhost.localdomain
xxx.xxx.xxx.xxx mx.domain1.com mx.domain2.com mail
----dovecot.conf----
local_name domain1.com {
ssl_cert = </etc/ssl/certs/domain1.crt
ssl_key = </etc/ssl/private/domain1.crt
}
local_name domain2.com {
ssl_cert = </etc/ssl/certs/domain2.crt
ssl_key = </etc/ssl/private/domain2.key
}
I dont know exactly how to make it works on postfix but i followed the method of generating a hashmap with this clause:
tls_server_sni_maps = hash:/etc/postfix/sni_maps
and compiling it to get sni_maps.db, anyway I still thinking that it takes the parameters on this file and ignores sni_maps.db
Am i missing anything?
I dont care about nginx because it is working perfectly for both domains.
I'm sorry but im new in smtp server deployment.
Thank you so much.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.