Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th January 2011, 03:34
beckteck beckteck is offline
Junior Member
 
Join Date: Dec 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Question Forwarding an entire domain to another mail server

Here is the sit rep:

I have my main server with Ubuntu 8.04lts and Postfix, mail.server.com

I just commissioned a new server web1.server.com running ubuntu 10.04lts and postfix.

My question is how do i make web1.server.com forward all mail for server.com to mail.server.com ?It always wants to try local delivery because of it's host name.

I don't want it to forward all mail, just mail destined for server.com domain.

Thanks for reading

Beck

Last edited by beckteck; 12th January 2011 at 03:35. Reason: add info
Reply With Quote
Sponsored Links
  #2  
Old 12th January 2011, 14:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

You can do this with Postfix transports.

On the old server, create a Postfix transport now so that all emails are forwarded to the new server (for the time until the MX records of your domains have switched to the new server):

Code:
echo "*  smtp:[<IP address of new server>]" >> /etc/postfix/transport
postmap /etc/postfix/transport
/etc/init.d/postfix restart
On the new server, open /etc/postfix/main.cf and add the hostname of the old server to the mydestination line so that the new server accepts the forwarded mails.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
beckteck (12th January 2011)
  #3  
Old 12th January 2011, 16:50
beckteck beckteck is offline
Junior Member
 
Join Date: Dec 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

Thanks Falko,

Although that is not exactly what I wanted to do, it did get me on the right track and was ablet to create a transport map for the new server to forward all of a certain domains mail to the old server.

Code:
echo "server.com smtp:server.com" >> /etc/postfix/transport
postmap /etc/postfix/transport
The old server is still up and controls the domain server.com. It will remain running.

Thanks again.


Beck
Reply With Quote
Reply

Bookmarks

Tags
domains, forwarding, postfix

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
ISPConfig3 mail doesn't work Marr General 6 1st September 2010 09:32
dovecot: lda: Fatal: Unknown user dpicella Installation/Configuration 1 22nd August 2010 02:59
RoundCube Sends but will not receive. happz Installation/Configuration 33 17th April 2010 21:55
Postfix problem and few questions Gimly Installation/Configuration 12 7th July 2009 16:27
Postfix + postfixadmin = SMTP errors... Rashef Server Operation 4 25th June 2009 16:12


All times are GMT +2. The time now is 16:25.


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