LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-23-2009, 12:08 AM   #1
stardotstar
Member
 
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
me@hotmail.com --> works fine via the running postfix server
you@gmail.com --> same, no problem
me@mydomain.com --> 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 main.cf 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 me@mydomain.com 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

Will
 
Old 10-24-2009, 06:46 PM   #2
irishbitte
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: 82
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-25-2009, 12:49 AM   #3
Berhanie
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.
 
  


Reply


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 08:05 PM
Postfix cant send mail in local or any outer domain vikki Linux - Server 4 07-22-2009 04:40 PM
Postfix user@domain restricted mail relay configuration bntawil Linux - Server 1 07-22-2008 06:35 PM
local domain versus official domain in POSTFIX lucmohamed Linux - Server 1 04-14-2008 07:06 AM
postfix : sending local mail without domain iainr Linux - Software 2 12-10-2003 04:05 AM


All times are GMT -5. The time now is 08:46 PM.

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