0

I have a small Ubuntu 16.04.3 email server and I choose the easiest way using IRedMail. Email and Roundcube now works for my primary domain, but I'm having problems adding a new domain. Let's say I have olddomain.com and newdomain.com.

  • I configured DNS at my DNS provider

  • I added newdomain.com in IRedMail Admin panel

  • I generated a key using:

      amavisd-new genrsa newdomain.com.pem
    

and if I run "amavisd-new testkeys" I get:

TESTING#1 olddomain.com: dkim._domainkey.olddomain.com => pass

TESTING#2 newdomain.com: dkim._domainkey.newdomain.com => pass

  • I think I did not touch the nginx configuration
  • Restarted everything

Now if I browse to mail.newdomain.com to use Roundcube I get redirected to mail.olddomain.com. I'm not sure if this is the default behavior, but it's not what I would prefer. I would like email users of newdomain.com be able to use Roundcube on mail.newdomain.com. How can I set that up?

user568021
  • 107
  • 1
  • 12

2 Answers2

0

I think you need to create configuration files for the new domain.

In case you have one installation of Roundcube to serve multiple domains hosted on one server you can create host-specific config files. These files have to be named like .inc.php and are saved in Roundcube's config directory.

Check this link

0

Actually, all you need to do is to create another virtual host in Apache or another server block in Nginx for the new mail domain. However, the Apache/Nginx directory structure is heavily modified by iRedmail, which makes the process a little complicated.

To see the exact steps for Nginx, check out my iRedMail tutorial: https://www.linuxbabe.com/mail-server/set-up-iredmail-multiple-domains-nginx

LinuxBabe
  • 885
  • 6
  • 9
  • Problem solved. Thanks. IRedMail modifies nginx confinguration a lot and that was the reason I was so lost. – user568021 Dec 21 '17 at 14:57