[SOLVED] Forward email to another server in a per-user basis

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
tapp
Posts: 2
Joined: Tue Feb 26, 2019 11:31 am

[SOLVED] Forward email to another server in a per-user basis

Post by tapp »

Hello.
I'm currently migrating my current email server (iRedMail) to a new one based on Zimbra Collaboration Server. Currently, all corporate email is being received in the old server. Due to the amount of email accounts, I'm planning to create the email accounts in the zimbra server, and define a forward rule in the iRedMail server for each account defined in the Zimbra server, so the email received is forwarded to the new server (this has been already done). However, I've found a problem: whenever a user in the zimbra server tries to send an email to an account not migrated yet (i.e. still in the iRedMail server), they receive a message telling that the account is not found. So I think that there are two alternatives:

Code: Select all

This is the mail system at host server.domain.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system
I'm thinking about two possible solutions, until I migrate/create all accounts:
  • Define a rule in the zimbra server to forward all email for not existing accounts to the iRedMail server (even those from the same domain)
  • Create accounts in the zimbra server, and define a rule to forward email for a user to the old server
Is it possible to define any of both options in zimbra? I haven't found any of both options in the docs. How could it be defined?

In case you propose a better option, I would be glad.

Thanks for your attention.

Best regards.
Last edited by tapp on Wed Feb 27, 2019 9:08 am, edited 1 time in total.
User avatar
pup_seba
Outstanding Member
Outstanding Member
Posts: 687
Joined: Sat Sep 13, 2014 2:43 am
Location: Tarragona - Spain
Contact:

Re: Forward email to another server in a per-user basis

Post by pup_seba »

Hi mate,

This kb may help: https://wiki.zimbra.com/wiki/Split_Domain

One way to do it is to:
1. Create all accounts in you zimbra server
2. Modify the accounts in the zimbra server, so the accounts that are not yet migrated, have a transport using smtp:ip_of_your_old_server:25
3. Once you migrate the contents of the account to the zimbra server, change that transport to the default one which is something like lmtp:zimbra_server:7025 (double check this)

Idk...maybe there is an easier/better approach but this is the one I can think of. Give a read to that kb article and check if this makes sense to you and your environment.

Regards,
tapp
Posts: 2
Joined: Tue Feb 26, 2019 11:31 am

Re: [SOLVED] Forward email to another server in a per-user basis

Post by tapp »

Thanks Sebastián.
I had'nt found that page in the docs, sorry.
Your solution works!

Thanks again.
Best regards
Post Reply