LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix configuration problem -> domain mx has moved but old mail host still local (https://www.linuxquestions.org/questions/linux-server-73/postfix-configuration-problem-domain-mx-has-moved-but-old-mail-host-still-local-763869/)

stardotstar 10-22-2009 11:08 PM

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

irishbitte 10-24-2009 05:46 PM

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..

Berhanie 10-24-2009 11:49 PM

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.


All times are GMT -5. The time now is 04:41 PM.