Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-22-2009, 11:08 PM   #1
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Rep: Reputation: 30
postfix configuration problem -> domain mx has moved but old mail host still local

Hard to put this simply guys:

I am sure it is common however.

I have two servers. My original and older machine used to be apache, dns, mail, sql and everything, now it is just for apache and sql since I have moved all other core services onto a new host which is doing shared hosting. The old host must still run a mail server since php on that box still has to send mail from a couple of web apps.

The problem is I don't know how to configure PostFix to forward mail to the proper mail server (the new server) since the local php scripts when they send mail to the world work fine but whenever a locally destined address is called for it still goes to the local account for the domain.

Hmmm, how to explain...

Say my openx ad server (uses php mail function and therefore on linux this has to be the local mail server - win32 can define smtp) has to send the following mails --> works fine via the running postfix server --> same, no problem --> gets delivered locally to the me account on the localhost because it seems that the mail server does not know that its not the mx for the domain anymore.

I have to log into the roundcube on the local box to get all mail that from anywhere else is resolving to the correct mx record server - the new server which

ahhh, I can't explain it easily enough.

In postfix I changed the domain name to another but it still thinks any mail to any account at "mydomain" is to be locally delivered not forwarded to the real/new mail server for "mydomain"

I can't see where else to change "mydomain" on my old server that would be useful. The hosts and resolv.conf now point to the new server and local named is off...

In the mean time I have tried to configure a mail redirect for to another domain account of mine.

Any suggestions would be appreciated but I must say I am not very confident that this question is well formed enough to attract much good will

Old 10-24-2009, 05:46 PM   #2
Senior Member
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 83
Well, have you changed the /etc/hosts file to reflect the new setup? Can you post the contents of it here, and we can make some suggestions..
Old 10-24-2009, 11:49 PM   #3
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
The mydomain parameter doesn't control which domain names will be delivered on the machine itself. Rather, check mydestination and virtual_mailbox_domains. But things can also get more complicated, so if you can't see the cause right away, you can start by posting the
output of "postconf -n". Finally, postfix needs to be able to query your domain's MX record, which should have your new server's host name. As
irishbitte mentions, you can just use an A record for your domain, if you don't have MX records.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Hostname / domain name configuration problem. farrukhndm Linux - Server 6 10-30-2010 07:05 PM
Postfix cant send mail in local or any outer domain vikki Linux - Server 4 07-22-2009 03:40 PM
Postfix user@domain restricted mail relay configuration bntawil Linux - Server 1 07-22-2008 05:35 PM
local domain versus official domain in POSTFIX lucmohamed Linux - Server 1 04-14-2008 06:06 AM
postfix : sending local mail without domain iainr Linux - Software 2 12-10-2003 03:05 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration