Sendmail - problem sending to own domain when web host is not the mail host

Posted on 2009-02-08
Last Modified: 2013-12-17
I  recently set up a web server using   I have a properly configured mail server for this domain that is hosted by a third party.

After installing sendmail, I can send messages to any domain but my own.  The message I'm getting in the mail log is "user unknown" because sendmail is treating mail sent to as local mail. How do I get sendmail to treat messages sent from the web server to like any other message?
Question by:thomas_nc
    LVL 26

    Expert Comment

    1. Edit the /etc/mail/local-host-names file and remove ""
    2. Edit /etc/hosts and remove "". You should have a host entry for the actual computer (, but not just the domain name.
    LVL 2

    Author Comment

    I updated the /etc/mail/.local-host-names file and that did the trick for sending the mail out, but now the mx servers are reporting that does not exist when looking at the Return-Path.

    This is correct because the Return-Path is not a valid account.  How can I get the "Return-Path" set to something that my mail server will not try to validate on it's end as a local account?  Or, could there be something else going on?

    I suppose the Return-Path would need to be, but am not sure.  Here is the host info for the server, if that helps:

    I have an entry in /etc/hosts:  xx.xx.xx.xx (the public IP addr)

    ..and in /etc/sysconfig:

    LVL 26

    Accepted Solution

    Your return-path really just needs to be any email address with a valid domain. It's not going to check the user part, to see if there is an account created for that user, but it'll try to resolve the domain. Where are you seeing this "does not exist" error? Are you using the domain is right (not misspelled)? Does it have an MX record and associated A record in DNS?

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    This short article will present "How to import ICS Calendar onto Office 365 Calendar". I was searching for free (or not free) tools to convert ICS to CSV without success. The only tools I found & working well were online tools...this was too hard to…
    Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
    In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
    The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now