sendmail problem

Discussion in 'Server Operation' started by globalpiece, Dec 1, 2008.

  1. globalpiece

    globalpiece New Member

    hi,

    recently i started using an exchange hosting company to host my email and i changed my MX records so that email to [email protected] goes to their server. everything is working fine except for email sent from my web server (www.mydomain.com).

    specifically... i have a contact page (www.mydomain.com/contact.html) on my website that uses a php script to send email to [email protected]. it worked just fine before i started using the exchange host. actually the script still sends a message to the local 'info' account.

    in sendmail i added '[email protected]' as an alias to the local 'info' user but this has not made any difference.

    i think the problem is that somehow the web server has no idea that the exchange server exists -- even though the MX records point to it.

    any ideas how to fix this? thanks in advance!
     
  2. topdog

    topdog Active Member

    Use the mailer table to direct the mail in /etc/mail/mailertable

    Code:
    .mydomain.com		smtp:[their_server_name]
    Then
    Code:
    cd /etc/mail; make restart
     
  3. globalpiece

    globalpiece New Member

    thank you. i have done exactly as you suggested but it hasn't solved the problem. it just seems strange that sendmail isn't looking to the MX record for the domain - if it did it would know where to send it.
     
  4. topdog

    topdog Active Member

    The mailertable is designed to allow you to by pass the mx record i thought that is what you wanted ?

    what is the output of
    Code:
     sendmail -bv address@domain
     
  5. globalpiece

    globalpiece New Member

    Thanks for sticking with me on this. In fact I don't want to bypass the MX records. The MX records are correct.

    It's just that sendmail is not bothering to check the MX records and thinks that [email protected] should be sent to the local user 'info'.

    Actually, I think what I want to do is to force sendmail to look to the MX records to find the mail server.

    any suggestions?
     
    Last edited: Dec 4, 2008
  6. globalpiece

    globalpiece New Member

    just a thought...maybe the solution is to somehow tell sendmail that it is not supposed to handle mail addressed to users@mydomain.

    i want it to handle local mail to local users without the @domain in the address so that programs can function properly.

    not sure if this is making sense the way i'm describing it...
     
  7. topdog

    topdog Active Member

    remove the domain name from /etc/mail/local-host-names
     
  8. globalpiece

    globalpiece New Member

    hmmm...there is nothing in that file except for the first commented line:

    # local-host-names - include all aliases for your machine here.
     

Share This Page