1

Topic: forward email from one domain to another domain

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:
====
Dear all,
I configure two domains on iredmail server : domain1.abc.com and domain2.abc.com
I want all emails incoming to domain1.abc.com will be forward to domain2.abc.com
Please help me the configuration for this.

Thanks and best regards,

----

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

2

Re: forward email from one domain to another domain

you could use Domain Alias via iRedAdmin.

3

Re: forward email from one domain to another domain

dorpha wrote:

you could use Domain Alias via iRedAdmin.

Thanks for your reply. I've carried out adding domain alias from thid  guide http://www.iredmail.org/docs/ldap.add.alias.domain.html .
But I have error in the mail log file : "unreasonable virtual_alias_maps map nesting user@example.com..."

Do I have to config anything else on iredmail? Please give me a hand!

Best regards

4

Re: forward email from one domain to another domain

What did you do by following our tutorial?

*) Did you add attribute/value pairs in domain account?
*) Did you add attribute/value pairs in ALL user accounts under this domain?

Btw, i assume you clearly understand what an "alias domain" is used for:

Let's say you have a mail domain example.com hosted on your iRedMail server, if you add domain name domain.ltd as an alias domain of example.com, all emails sent to username@domain.ltd will be delivered to user username@example.com's mailbox.

user@primary.com and user@alias_domain.com uses the same mailbox, it's not a "forwarding".

5 (edited by charlesb 2019-05-26 00:52:02)

Re: forward email from one domain to another domain

I know this is an old thread, but I felt this info was useful: While the documented "alias domain" does do the job (and, I assume, adds the ability for the user to log into either domain?), if you're doing it manually (vs. using the Pro WebUI) it's painful because you still have to add individual aliases for each email user, yet you still lose the ability to easily see "what addresses on domain A will forward to domain B" and the flexibility that you'd have if you e.g. set up regular users and used Sieve redirection. So it doesn't make life any easier for the admin.

I think that a good solution for many people (which I just tested) is to create a normal domain and use the "mail alias account" ( https://docs.iredmail.org/ldap.add.mail.alias.html ) with "user-less" addresses.  For example, I want all mail for domain A to instead go to domain B, where my users are set up.  I'd set up a mailing list (mail alias) on A that says to send mail for "@domainA.com" to "@domainB.com".    All mail for domain A will be rewritten to domain B, and you don't have to set up individual user accounts.

You can combine this with individual "user" address aliases (and, I suppose, regular user accounts); the "@domainB.com" is a fallback default that only takes effect if a more specific redirection doesn't take place first.  For example, "user1@domainA.com" can be delivered locally, "user2@domainA.com" can be redirected to "someone@google.com", and everything else at domain A will still attempt to be delivered to the same address at domain B.  You get both convenience and flexibility at the same time.