1 (edited by deltabravo191 2016-05-03 09:59:41)

Topic: iRedAdmin SSL (subdomain) cert issues

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: Ubuntu 14.04 (Server) 64bits
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:  N/A
====

Hey guys, I have a few issues. First, my set up:

VPS by OVH running Ubuntu Server 14.04. I have successfully installed iRedMail. I have even sent test emails to gmail and I have received from gmail. As well, I have created a few test accounts and subdomains. I have installed an SSL certificate from LetsEncrypt using the automated Apache system. Worked like a charm. The only issue is it is setting up the SSL for the main domain. I want to host a website on that.

When I went through the iRedMail set up I used mifflin.mydomain.com. So all emails were created in the format user@mifflin.mydomain.com, which is what I want. Except, I want my users to be able to send email via the web address of mail.mydomain.com/mail/ with a valid SSL certificate installed.

I made a manual certificate from letsencrypt for mail.mydomain.com. Then I went to where Apache2 keeps this information (/etc/apache2/sites-available/default-ssl.comf) and replaced the old SSL paths with the new certificates paths.

Of course, this gives me an SSL name mismatched. Id assume because the SSL certificate and the domain all say mail.mydomain.com and the actual content from iRedMail is saying mifflin.mydomain.com or just mydomain.com.

Any advice would be greatly appreciated. If this is not clear, or you need more information let me know.

Also note: I have no problem reinstalling my VPS completely if I majorly screwed up. I have done it a few times already to learn this much lol.

----

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

2

Re: iRedAdmin SSL (subdomain) cert issues

To avoid this, you have to use a separate ssl cert for 'mail.mydomain.com' (or cert for '*.mydomain.com') for web host.

3

Re: iRedAdmin SSL (subdomain) cert issues

ZhangHuangbin wrote:

To avoid this, you have to use a separate ssl cert for 'mail.mydomain.com' (or cert for '*.mydomain.com') for web host.


How would I go about installing iRedMail so it creates an apache2 system for mail.mydomain.com? I think I would need to do this so when I manually get an SSL cert everything matches, correct?

It looks like when I install iRedMail normally it creates an apache2 system for just mydomain.com, despite entering my first domain in the installer as Mifflin.mydomain.com.

As it stands I have a cert installed for mail.mydomain.com (manually) buy I get a 'mismatched' name error from SSL checkers. Plus mail.mydomain.com/iredadmin doesn't work.

4

Re: iRedAdmin SSL (subdomain) cert issues

For web hosts, it must match the web domain name. e.g. for https://mail.abc.com/, the cert hostname must be mail.abc.com (or '*.abc.com').

For POP3/IMAP/SMTP, it must matches the server hostname.

5

Re: iRedAdmin SSL (subdomain) cert issues

ZhangHuangbin wrote:

For web hosts, it must match the web domain name. e.g. for https://mail.abc.com/, the cert hostname must be mail.abc.com (or '*.abc.com').

For POP3/IMAP/SMTP, it must matches the server hostname.


Okay thank you for your help. One last question:

When installing iRedMail can I make it so it installs completely under a subdomain? As it stands now, when I set it up it always makes its email client on mydomain.com/mail?

Could I make this mail.mydomain.com/mail? I want to use mydomain.com for a regular site (not on the same server).

6

Re: iRedAdmin SSL (subdomain) cert issues

mydomain.com/mail
mail.mydomain.com/mail

They're just virtual web host configurable in Apache/Nginx, so if you want a web host called "abc.com", or "mail.abc.com", just create a new virtual web host in Apache/Nginx.

7

Re: iRedAdmin SSL (subdomain) cert issues

ZhangHuangbin wrote:

mydomain.com/mail
mail.mydomain.com/mail

They're just virtual web host configurable in Apache/Nginx, so if you want a web host called "abc.com", or "mail.abc.com", just create a new virtual web host in Apache/Nginx.


Okay great. Thank you so much. I can just edit the virtual host iRedMail makes automatically? That won't affect anything negatively?

8

Re: iRedAdmin SSL (subdomain) cert issues

It's just Apache virtual host:
http://httpd.apache.org/docs/current/vh … mples.html