Mailserver different server

Discussion in 'Installation/Configuration' started by madmucho, Jan 31, 2008.

  1. madmucho

    madmucho Member HowtoForge Supporter

    Hi all, im little bit confused, i try solve problem with some of my domains i try slowly explain problem.

    I have website for domainX on server1 and mailserver for this domain is exchange on server2

    mailusers on server1.* try to send mail to domainX and there is problem
    When try this another users from server3.* all is ok transport work as i want.

    I search this forum for relative topics, i have set on all subdomains and domainX mailserver to external.
    MX Checkbox in site is unchecked i try add mx record in dns manager server1 points to my server2 ip but when i send mail using webmail from server1.domainY addresed to user.domainX mail returns with this debug message

    Action: failed
    Status: 5.4.6
    Diagnostic-Code: X-Postfix; mail for server1.domainX loops back to myself


    Any idea how to set this correctly?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Please add server1.domainX at the end of /etc/postfix/local-host-names and restart Postfix.
     
  3. madmucho

    madmucho Member HowtoForge Supporter

    Thank you for reply,
    When i do what you say, mailserver try deliver mail from server1 users localy, not to server2... i send mail from ssh as root to admin@server2 and this is delivered to local webadministration account for domain.
    :-/
     
    Last edited: Jan 31, 2008
  4. madmucho

    madmucho Member HowtoForge Supporter

    heh

    Maibe i find something that will help, i change ip in DNS Entry where Domain (SOA) hostname and ipaddress is to correct ip, when i have mx record mail.
    4dprojekt.cz point to A record mail.4dprojekt.cz and this point to correct ip, telnet mail.4dprojekt.cz 25 point to exchange, but telnet 4dprojekt.cz 25 poing to local postfix, and that was problem, i change ip on this screen and now telnet to 25 port point to correct ip.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Please make sure that you set the website and co-domain in ispconfig to external mailserver.
     
  6. madmucho

    madmucho Member HowtoForge Supporter

    Main site and all co-domains for this site is defined in listbox as external.
     
  7. falko

    falko Super Moderator Howtoforge Staff

    So you want to deliver emails for the server's main domain to an external server? You can do this with transports. Take a look at
    Code:
    man 5 transport
     
  8. madmucho

    madmucho Member HowtoForge Supporter

    Aha, that looks what i looking for. I try this on testing domain.

    But now whit changed DNS that work perfectly.

    But i dont understand why server want deliver mail localy, why dont use dns information from other dns servers.
    For this site i have not specified mx record, MX reccord is specified at domain master, and that point to correct location.
     

Share This Page