# Sendmail and Godaddy



## rostyslav (Jan 19, 2011)

Hi, I have web server (FreeBSD), with sendmail on it. So my domain is registered with Godaddy and email services I using with Godaddy. All services on my server working ok, except sendmail related to my Godaddy email account. if for example I sending message from my server form console *sendmail someuser@f1computer.net*, it send my email to registered users locally on my server but does not deliver it to Godaddy's secureserver.net (where I have account). I do the same with google.com, yahoo.com, hotmail.com etc..., it works perfect, on hotmail for example I receiving email in this case form: charlie root@f1computer.net. Can someone help me figure out this problem. 
Info:
My domain: f1computer.net (Godaddy.com)
My IP:     blah.2.3.4     (local ISP Static IP)
Thank you, Ross


----------



## DutchDaemon (Jan 19, 2011)

Sendmail thinks it's running on a machine called f1computer.net, so it will strip the @f1computer.net part from the email address and deliver to 'someuser' locally. See if f1computer.net is in /etc/local-host-names. If it is, remove that line and restart Sendmail. This should make Sendmail look up the MX records for f1computer.net and deliver accordingly. You can also change the hostname of the machine to something else, e.g. host.f1computer.net, so Sendmail won't treat f1computer.net as the locally deliverable domain.


----------



## rostyslav (Jan 20, 2011)

*Sendmail&Godaddy*

Thanks for reply... Here is the thing... Lets say I have email account 01@f1computer.net with Godaddy. If I don't have local (on my server) *o1*, but still have it with Godaddy (with domain f1computer.net, that is what I getting by sending email form console:


```
root@f1computer# mail
Mail version 8.1 6/6/93.  Type ? for help.                                                                          
"/var/mail/user": 4 messages 1 new
    1 root@f1computer.net   Wed Jan 19 20:35  19/658   "test"
    2 MAILER-DAEMON@f1comp  Wed Jan 19 23:37  68/2144  "Returned mail: see transcript for details"
    3 MAILER-DAEMON@f1comp  Wed Jan 19 23:38  82/2558  "Returned mail: see transcript for details"
>N  4 MAILER-DAEMON@f1comp  Thu Jan 20 00:17  70/2301  "Returned mail: see transcript for details"
& t 4
Message 4:
From MAILER-DAEMON Thu Jan 20 00:17:00 2011
Date: Thu, 20 Jan 2011 00:17:00 GMT
From: Mail Delivery Subsystem <MAILER-DAEMON@f1computer.net>
To: user@f1computer.net
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="p0K0H0fJ047970.1295482620/f1computer.net"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--p0K0H0fJ047970.1295482620/f1computer.net

The original message was received at Thu, 20 Jan 2011 00:17:00 GMT
from root@localhost

   ----- The following addresses had permanent fatal errors -----
rostyslav@f1computer.net
    (reason: 550 5.1.1 <01@f1computer.net>... User unknown)
    (expanded from: 01@f1computer.net)

   ----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 550 5.1.1 <01@f1computer.net>... User unknown
550 5.1.1 01@f1computer.net... User unknown
<<< 503 5.0.0 Need RCPT (recipient)

--p0K0H0fJ047970.1295482620/f1computer.net
Content-Type: message/delivery-status

Reporting-MTA: dns; f1computer.net
Arrival-Date: Thu, 20 Jan 2011 00:17:00 GMT

Final-Recipient: RFC822; 01@f1computer.net
Action: failed
Status: 5.1.1
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 550 5.1.1 <01@f1computer.net>... User unknown
Last-Attempt-Date: Thu, 20 Jan 2011 00:17:00 GMT

--p0K0H0fJ047970.1295482620/f1computer.net
Content-Type: message/rfc822

Return-Path: <user>
Received: (from root@localhost)
        by f1computer.net (8.14.4/8.14.4/Submit) id p0K0H0fI047970
        for 01@f1computer.net; Thu, 20 Jan 2011 00:17:00 GMT
        (envelope-from user)
Date: Thu, 20 Jan 2011 00:17:00 GMT
From: Administrator <user>
Message-Id: <201101200017.p0K0H0fI047970@f1computer.net>
To: 01@f1computer.net
Subject: test my mail, please

go

--p0K0H0fJ047970.1295482620/f1computer.net--
```
PS: removing f1computer.net from (in my case) /etc/mail/local-host-names, does not change anything
Thanks, Ross


----------



## DutchDaemon (Jan 20, 2011)

Like I said: your local computer thinks it's supposed to handle email destined for f1computer.net, because it thinks it itself is called f1computer.net. You're sending email to 127.0.0.1 (the mailserver running on localhost) which immediately tries to deliver the email to local user '01', which does not exist.

If you run (as root) `# sendmail -bv [email]01@f1computer.net[/email]` you will see how the email is going to be handled in different scenarios.

You will have to make sure that the local computer does not trick Sendmail into thinking it is called f1computer.net. See e.g. /etc/hosts, the command *hostname*, etc. Also make sure that if you change anything, to run:


```
cd /etc/mail
make && make install && make restart
```

Also look in /var/log/maillog.


----------



## rostyslav (Jan 21, 2011)

Thanks for your reply... I getting some syntax errors during this process (make && make install .... Anyway, you pointed me to the right place (issue). Thanks for your time. I appreciate it a lot. 

Ross 

PS: The problem can be resolved by patient over viewing all related config files (scripts)


----------

