sendmal not listening to localhost

Discussion in 'Installation/Configuration' started by korbynn, May 2, 2010.

  1. korbynn

    korbynn Member

    sendmail not listening to localhost

    the php function mail() sends to external email address's with no problem but will not process email sent to localhost.

    netstat -nl shows that it is listening to 0.0.0.0.
    How do I point it to 127.0.0.1 or localhost?
     
    Last edited: May 3, 2010
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    netstat -tap | grep smtp

    Your problem might be that an ispconfig server has no email addresses @localhost as it is a virtual user setup. You can use the real email address as recipient. This can be any local or remote email account that you created in ispconfig.

    By the way, why do you add an angry icon to your post? I guess nobody likes to answer posts of angry poeple, so without that icon, you might get more responses :)
     
    Last edited: May 2, 2010
  3. korbynn

    korbynn Member

    Working with CentOS 5.4.

    I am not quite sure what you are referring to. I did an update to ispconfig and I also needed to install other RPMS which required some updates. I made sure that I excluded postfix in the yum update sequence. The mail() from php to any localhost emails was working properly before this sequence. There were other problems with anti-virus and postfix that were resolved in a previous post. This is the last piece of the puzzle that I am trying to fix.


    netstat -tap | grep smtp output:

    This was working until I upgraded/updated.


    Sorry, this has been down for a week and my customers are on my back to get it fixed. Will mod the icon.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Postfix is listening on all IP addresses incl. localhost, so this part looks fine.

    Please try to send a email to a local email address and post the lines that get added into the maillog for this action.
     
  5. korbynn

    korbynn Member

    Here is what I think is the maillog dump of a test email through a php form using mail() to myself:

    The weird part of this is I can send to external emails with the same form but no to any internal emails.

    Also I found this in /var/spool/mail/web1:

    It actually gets to my telus.net account but not my korbynn.net account!
     
  6. falko

    falko Super Moderator Howtoforge Staff

  7. korbynn

    korbynn Member

    Yes, the correct one is [email protected].
    ns0.korbynn.net is the name of the server.

    What do I need to change to set it back to korbynn.net?

    Like I have stated, this was working monday of last week. I am not quite sure what needs to be set back.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Does the MX record of korbynn.net point to the correct server? You can check that by running
    Code:
    dig mx korbynn.net
     
  9. korbynn

    korbynn Member

    This is the output of dig

    Code:
    ; <<>> DiG 9.5.2-RedHat-9.5.2-1.fc10 <<>> mx korbynn.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29838
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
    
    ;; QUESTION SECTION:
    ;korbynn.net.			IN	MX
    
    ;; ANSWER SECTION:
    korbynn.net.		86400	IN	MX	10 mail.korbynn.net.
    
    ;; AUTHORITY SECTION:
    korbynn.net.		86400	IN	NS	ns0.korbynn.net.
    
    ;; ADDITIONAL SECTION:
    mail.korbynn.net.	86400	IN	A	64.46.39.49
    ns0.korbynn.net.	9418	IN	A	64.46.39.49
    
    ;; Query time: 576 msec
    ;; SERVER: 192.168.16.254#53(192.168.16.254)
    ;; WHEN: Wed May  5 09:07:05 2010
    ;; MSG SIZE  rcvd: 100
    
    I guess this means that the DNS records are wrong

    So this begs the question. What DNS records are required?
     
  10. korbynn

    korbynn Member

    So now that I have removed some NS DNS records. My clients can now receive mail from their contact pages which use the php function mail().

    Problem still is that my own contact page still seems to try to email to [email protected] which is wrong. Or do I add a DNS MX record to handle this issue?
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Did you specify the correct recipient address in your contact page?
     

Share This Page