#1  
Old 29th January 2009, 16:12
stevieb stevieb is offline
Junior Member
 
Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Email domain forwarding

Hi guys,

Using ISPConfig 2, is there any way to automatically forward email from one domain to another domain. In cPanel, this is known as Email Domain Forwarding, and it means you don't have to define each address separately and have to create a forwarder for it.

So what I want is:

user-alias-here@domain1.tld => user-alias-here@domain2.tld

This is very useful for companies who have two similar domains like the .com and the .co.uk and want email handled for both (in case someone actually types their email address with the wrong tld extension) but still receive the emails.

The one complication is that domain2.tld could be an external mail server so the email would only pass through the ISPConfig server for it to be re-addressed from domain1.tld to domain2.tld.

Any ideas how I can achieve this?

Is it possible by setting up a catch all mailbox? I would imagine that a catch-all would have to forward to a specific address which isn't what I want as this means one user would receive all mail for all users.

Thanks in advance.

Steve.
Reply With Quote
Sponsored Links
  #2  
Old 29th January 2009, 18:49
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,389
Thanks: 833
Thanked 5,486 Times in 4,318 Posts
Default

Add domain2.tld as co-domain to the website domain1.tld.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th January 2009, 10:41
stevieb stevieb is offline
Junior Member
 
Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the suggestion but that doesn't work....I did try it as follows:

Domain1.tld created on ISP config as a site, set to external mailserver
Domain2.tld added as a co-domain, set to local mailserver.

When emailing anything@Domain2.tld, I receive a bounce message saying user does not exist in local user table.

So then I create a catchall on User/Email tab on Domain1.tld

When emailing anything@Domain2.tld, the email is accepted and delivered into the catchall POP mailbox, but the email is not automatically forwarded to anything@Domain1.tld (external mailserver) which is what I want to happen.

Any further advice or suggestions?

Steve.
Reply With Quote
  #4  
Old 30th January 2009, 11:54
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,389
Thanks: 833
Thanked 5,486 Times in 4,318 Posts
Default

make sure that co-domain domain2.com has a empty hostname field and that you have a user with email anything@domain1.tld. You must create this user account even if you set domain1.tld to external mailserver!
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 30th January 2009, 12:03
stevieb stevieb is offline
Junior Member
 
Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As my last post states, I did try creating a catchall mail user for domain1.tld but it did not achieve the forwarding... it just ensured the email was delivered to this POP box which is not what I want.

I need *@domain2.tld to auto-forward to *@domain1.tld

I'm starting to think this isn't possible in ISPConfig. If not, is there a way using postfix without interferring with ISPConfig?
Reply With Quote
  #6  
Old 30th January 2009, 12:14
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,389
Thanks: 833
Thanked 5,486 Times in 4,318 Posts
Default

Quote:
As my last post states, I did try creating a catchall mail user for domain1.tld but it did not achieve the forwarding... it just ensured the email was delivered to this POP box which is not what I want.
The email has to be delivered to the pop box as the forwarding is done by a procmail recipe.

Quote:
I need *@domain2.tld to auto-forward to *@domain1.tld
Either you have to put both domains on this server or you set both domains to external server and point the mx record for domain2.tld to the msila server of domain1.tld
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 30th January 2009, 12:32
stevieb stevieb is offline
Junior Member
 
Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Til,

Thanks for your quick responses

Unfortunately the MX record solution isn't an option for us because we use a 3rd party antispam solution which only accepts email for on domain1.tld and will reject anything for domain2.tld....hence why we need the email re-addressed to user@domain1.tld

I think I'll look at doing this outside of ISPConfig. Once I find the solution, I will post here so this thread helps other users who might be in the same position as me.
Reply With Quote
  #8  
Old 30th January 2009, 15:18
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,389
Thanks: 833
Thanked 5,486 Times in 4,318 Posts
Default

You can add a transports directive in postfix main.cf and define the mail routing in the transports file then.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 30th January 2009, 17:51
stevieb stevieb is offline
Junior Member
 
Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thanks,

I found what I wanted by editing the virtusertable in /etc/postfix and adding the following below the MAKE MANUAL CHANGES BELOW THIS LINE which ISPConfig puts in:

Code:
@domain1.tld    @domain2.tld
Tested this and it works great...all email regardless of alias is sent out onto the 2nd domain....and ISPConfig already handles whether the domain is local or external, so didn't have to change anything else except this one change to virtusertable.

Remember to rebuild the virtusertable using
Code:
makemap hash virtusertable < virtusertable
Thanks for your help Til.
Reply With Quote
Reply

Bookmarks

Tags
email domain forwarding, email forwarder, email forwarding, forwarding

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
hotmail rejects outgoing email nzimas Server Operation 3 1st May 2009 03:39
ISPConfig 3RC1 - email domain vs. site domain across users Ben Developers' Forum 2 13th January 2009 18:57
Multiple MySQL Queries - with Postfix-mysql, courier-authmysql, maildrop-mysql... snowfly HOWTO-Related Questions 4 7th July 2006 04:19
email forwarding locally consumes all resources rdells General 20 1st May 2006 19:43


All times are GMT +2. The time now is 15:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.