external mail server and sending e-mails from a site problem

Discussion in 'Server Operation' started by dimas, Nov 19, 2008.

  1. dimas

    dimas Member

    I have two servers with ISPConfig 2.2.25, perfect setup, Debian Etch.

    The problem is the following.

    One of my clients needed a domain, let's say, domain.com, and I bought it for him the usual way and set up nameservers ns1.myserver.com and ns2.myserver.com (these nameservers are my nameservers set up at my ISPConfig servers).

    Everything was OK, the client's site was up and running, etc.

    Then the client decided that he wanted to use another (external) mail server. At the time there were two A records in the DNS Manager:
    xx.xx.xx.xx www
    xx.xx.xx.xx mail
    (where xx.xx.xx.xx is the IP address of my server and the client's site on it)

    and one MX record

    Now, I had to change the 'mail' A record to the IP address of the external mail server of my client, so now the two A records are:

    xx.xx.xx.xx www
    yy.yy.yy.yy mail
    (where yy.yy.yy.yy is the IP address of the external mail server)

    The MX record is the same.

    Now, the client says that the external mail server works, BUT there is a problem - there is an html form on the client's site (hosted on my server) that uses php mail function to send mails to, let's say, [email protected].

    And these e-mails bounce, according to mail.log, - because user11 is not found! Apparently postfix looks for this user locally, and not at the external mail server. I wonder why this is happening and how can I change this behavior.

    Please kindly help.
  2. marpada

    marpada New Member

    Last edited: May 13, 2011
  3. dimas

    dimas Member

    thank you, but where exactly? and will the site continue to work in this case?
  4. dimas

    dimas Member

    There is a file /etc/postfix/local-host-names

    If I remove all instances of the domain from this file and restart, the problem disappears. But if any changes are made to the hosting account, the values are back. I wonder if there is a way to permanently remove these instances.
  5. falko

    falko Super Moderator ISPConfig Developer

    Go to the domain.com (without www!) Co-Domain in ISPConfig and select External Mailserver for that Co-Domain.
  6. dimas

    dimas Member

    Thank you very much, this does the trick!

Share This Page