Mail Loop To Myself With Postfix, Courier, MySQL Setup

Discussion in 'Server Operation' started by asyadiqin, Feb 22, 2007.

  1. asyadiqin

    asyadiqin New Member


    I've just recently fresh-installed my server using the "The Perfect Setup - Fedora Core 5" guide, and then followed the guide "Virtual Users And Domains With Postfix, Courier And MySQL (Fedora Core 5)".

    Everything seems to be working fine. I next added a domain and user into the MySQL table to see if everything is working. Next I changed the domain DNS setup to point the domain MX record to the new server IP address and everything resolves fine.

    However, when I tried to check and then send a test email to that email address, I get an error in the maillog.

    I assumed that the whole setup guide would be enough to have a mailserver and that it would do everything once I added the details to the MySQL database. I've read and re-read the guide and there is nothing else in there to specify that I need to do something else to make this mailserver work. Can anyone tell me is there something else that need to be done?.. eg, create the mail folders manually, add domain to bind, dns or something, etc...

    I am not very knowledgeable when it comes to mailservers, so if anyone can help me, please provide as much details as possible.


    A. Syadiqin
  2. falko

    falko Super Moderator ISPConfig Developer

    Please add localhost to /etc/hosts and to the mydestination line in /etc/postfix/ and restart Postfix.
  3. asyadiqin

    asyadiqin New Member

    Hi Falko and thanks for replying.

    localhost was always in the /etc/hosts file and I still don't know what was the problem.

    Anyway, I've modified the mailserver to use postfixadmin and everything works fine now, except for the localhost issue

    This is what is listed on my /etc/hosts

    Any ideas?
  4. martinfst

    martinfst ISPConfig Developer ISPConfig Developer and fc5-g1 can only be on one interface. You have now defined it at both and You should always have a one on one relation between your name and IP number (except with rDNS, but we're not discussing rDNS now).
  5. asyadiqin

    asyadiqin New Member

    I've modified /etc/hosts

    Reloaded postfix but still getting that error.

    Any other suggestions?
  6. falko

    falko Super Moderator ISPConfig Developer

    Please try this:
    postconf -e 'smtp_host_lookup = native'
    /etc/init.d/postfix restart
  7. asyadiqin

    asyadiqin New Member

    Tried that. Still getting the same error.

    Any other reason why Postfix is not recognising localhost as

    This is starting to be really frustrating.
  8. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/hosts and /etc/postfix/ (please strip out the comments)?
  9. asyadiqin

    asyadiqin New Member

    Content of /etc/hosts

    Content of /etc/postfic/

  10. falko

    falko Super Moderator ISPConfig Developer

    Please remove from the mydestination line in /etc/postfix/ and restart Postfix.
  11. asyadiqin

    asyadiqin New Member

    Did that. Same errors.

    Any other suggestions?
  12. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/hosts and /etc/postfix/ now? What's in /etc/host.conf? Should look like this:
    order hosts,bind
    multi on
  13. asyadiqin

    asyadiqin New Member

    Added the entry into /etc/host.conf, restart named, apache, postfix, everything...... Still the same error.

    The content of both /etc/hosts and /etc/postfix/ is still as what i posted before but with the changes you mentioned. Still no go.

  14. EThaiZone

    EThaiZone New Member

    Hi, I want to make postfix can mail loopback to localhost too.

    This's how I config postfix and It's work.
    My server IP is
    On ubuntu 9.10. Install with apt-get


    mydomain = localdomain.localhost
    mydestination = ubuntu. localhost

    (Comment: This 2 files must be same data or Postfix will show warning about it.) localhost ubuntu. ubuntu

    I hope this can be some help for other too.

Share This Page