javaguy Posted May 1, 2007 Report Share Posted May 1, 2007 When I send a message via sendmail it never arrives. I get the following in the syslog: sendmail[10331]: My unqualified host name (localhost) unknown; sleeping for retry I use DHCP and don't really have a host name--my /etc/hosts just says 127.0.0.1 localhost I'm not exactly sure what it's looking for. Any suggestions? Quote Link to comment Share on other sites More sharing options...
scoonma Posted May 1, 2007 Report Share Posted May 1, 2007 I use DHCP and don't really have a host name--my /etc/hosts just says127.0.0.1 localhost I'm not exactly sure what it's looking for. Any suggestions? You could set a qualified hostname in /etc/hosts simply by adding an alias for your localhost: 127.0.0.1 localhost myprettymachine A better solution is to set a DHCP hostname using MCC/Networking/Reconfigure Network Interface/DHCP. Without a qualified hostname (localhost is always the local machine) you would not be able to use sendmail. There are millions of computers in the world. If every single one would just be named localhost, how could sendmail know where to send it's data to? Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 1, 2007 Author Report Share Posted May 1, 2007 ...how could sendmail know where to send it's data to? Why, to mine, of course. The one called localhost. ;) Seriously though, I'll give that a whirl and let you know. Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 2, 2007 Author Report Share Posted May 2, 2007 Okay, I tried setting a hostname in MCC/Networking/Reconfigure Network Interface/DHCP, but I still get the same error message. :( Quote Link to comment Share on other sites More sharing options...
scoonma Posted May 2, 2007 Report Share Posted May 2, 2007 Seems you have to add some information to config files. Here is a brief explanation of what to do: http://cri.ch/linux/docs/sk0009.html The page explains how to use sendmail to connect to your ISP's SMTP server. Does it fit your needs? Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 4, 2007 Author Report Share Posted May 4, 2007 I followed those instructions, and everything looked okay, but I still get May 3 20:00:25 localhost sendmail[21693]: My unqualified host name (localhost) unknown; sleeping for retry :( Incidentally, I'm not married to sendmail. It's just the one I'm familiar with. If anybody can suggest another simple mail-sending utility, I'm all ears. I just don't want to set up a mail server; I want to send messages not become a mail admin. :) Quote Link to comment Share on other sites More sharing options...
SilverSurfer60 Posted May 4, 2007 Report Share Posted May 4, 2007 If it's any good to you I ran Postfix for a while. There was a nice application that went with it and that was called Postfix Admin. Really easy to set up and maintain. Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 4, 2007 Author Report Share Posted May 4, 2007 Postfix is just a mailer, right? Not a full mail server? I need something that doesn't burn up a lot of cpu cycles while I'm gaming. ;) Quote Link to comment Share on other sites More sharing options...
scoonma Posted May 4, 2007 Report Share Posted May 4, 2007 Wise you chose not to build a full server ;-) Okay, some thoughts for going on with sendmail: - Does the local test perform successfully? ( /usr/sbin/sendmail -bv root@localhost ) - What's in /etc/hosts now? Was it updated now reflecting your new hostname? If not, I'd add your chosen name here as an alias - Can you see some helpful error message/hints in the logs ( i.e. "tail -200 /var/log/maillog | more" ) After applying any changes I'd restart subsystems ("service network restart"; "service sendmail restart") HTH, scoonma Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 4, 2007 Author Report Share Posted May 4, 2007 /etc/hosts is: 127.0.0.1 javaguyhost.localhost javaguyhost I get a returned mail saying: ----- The following addresses had permanent fatal errors ----- <javaguy@sammckee.com> (reason: 550-Verification failed for <javaguy@javaguyhost.localhost>) ----- Transcript of session follows ----- ... while talking to sammckee.com.: >>> DATA <<< 550-Verification failed for <javaguy@javaguyhost.localhost> <<< 550-unrouteable mail domain "javaguyhost.localhost" <<< 550 Sender verify failed 550 5.1.1 <javaguy@sammckee.com>... User unknown <<< 503 valid RCPT command must precede DATA The message is address to javaguy@sammckee.com, not @javaguyhost.localhost. Quote Link to comment Share on other sites More sharing options...
paul Posted May 4, 2007 Report Share Posted May 4, 2007 the server at sammckee is rejecting your message because it comes from an invalid domain change you host file to something that looks like a real domain 127.0.0.1 home.mydomain.com localhost this is normal behaviour for mail servers, is one of the tools that is used for anti-spamming Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 5, 2007 Author Report Share Posted May 5, 2007 Here's my /etc/hosts now: 127.0.0.1 home.sammckee.com localhost Now the tail of my syslog looks like this: May 4 20:58:04 localhost sendmail[30877]: l450w4Zh030877: from=javaguy, size=13, class=0, nrcpts=1, msgid=<200705050058.l450w4Zh030877@javaguyhost>, relay=javaguy@localhost May 4 20:58:04 localhost sendmail[30878]: l450w4WZ030878: from=<javaguy@javaguyhost>, size=287, class=0, nrcpts=1, msgid=<200705050058.l450w4Zh030877@javaguyhost>, proto=ESMTP, daemon=MTA, relay=home.sammckee.com [127.0.0.1] May 4 20:58:04 localhost sendmail[30878]: l450w4WZ030878: to=<javaguy@sammckee.com>, delay=00:00:00, mailer=esmtp, pri=30287, dsn=4.4.3, stat=queued May 4 20:58:04 localhost sendmail[30877]: l450w4Zh030877: to=javaguy@sammckee.com, ctladdr=javaguy (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30013, relay=home.sammckee.com. [127.0.0.1], dsn=2.0.0, stat=Sent (l450w4WZ030878 Message accepted for delivery) ...but the message never arrives. Quote Link to comment Share on other sites More sharing options...
paul Posted May 5, 2007 Report Share Posted May 5, 2007 this is for local delivery right? have you got something accepting the mail? like uw-imap, courier, cyrus, etc? Quote Link to comment Share on other sites More sharing options...
javaguy Posted May 5, 2007 Author Report Share Posted May 5, 2007 No, not for local delivery. I want to send something out to an e-mail address on the Internet. Quote Link to comment Share on other sites More sharing options...
paul Posted May 5, 2007 Report Share Posted May 5, 2007 what response do you get if you do this: dig sammckee.com MX ; <<>> DiG 9.3.2 <<>> sammckee.com MX ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35940 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;sammckee.com. IN MX ;; ANSWER SECTION: sammckee.com. 14400 IN MX 0 sammckee.com. ;; AUTHORITY SECTION: sammckee.com. 86400 IN NS ns1.snhdns.com. sammckee.com. 86400 IN NS ns2.snhdns.com. ;; ADDITIONAL SECTION: sammckee.com. 14400 IN A 72.18.130.77 ;; Query time: 681 msec ;; SERVER: 192.168.1.2#53(192.168.1.2) ;; WHEN: Sat May 5 14:20:30 2007 ;; MSG SIZE rcvd: 105 looks to me like 1 of perhaps 2 things 1. your local machine can't resolve the MX record for sammckee.com 2. sammckee.com is reject mail for some reason. do you have access to the log files at sammckee.com ? try doing a manual email send: telnet sammckee.com 25 HELO home.sammckee.com MAIL FROM: javaguy@home.sammckee.com RCPT TO: javaguy@sammckee.com DATA Subject:-My test message- (note:then press enter twice (these are needed to conform to RFC 882)) this is my test message, you are reading the body of the message . (note: To tell the mail server that you have completed the message enter a single "." on a line on it's own.) QUIT Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.