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.
Thread Tools Display Modes
Old 12th January 2011, 04: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


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

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):

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.
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)
Old 12th January 2011, 17:50
beckteck beckteck is offline
Junior Member
Join Date: Dec 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts

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.

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.

Reply With Quote


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 10:32
dovecot: lda: Fatal: Unknown user dpicella Installation/Configuration 1 22nd August 2010 03:59
RoundCube Sends but will not receive. happz Installation/Configuration 33 17th April 2010 22:55
Postfix problem and few questions Gimly Installation/Configuration 12 7th July 2009 17:27
Postfix + postfixadmin = SMTP errors... Rashef Server Operation 4 25th June 2009 17:12

All times are GMT +2. The time now is 09:38.

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