Sendmail Issue?
Whenever I am running this command on the command line on RHEL I am getting the error:
Code:
[root@EL385 ~]# echo "it is my job"| mail -vv aaina@gmail.com Code:
Dec 17 04:35:19 tuxbuddy sendmail[5834]: My unqualified host name (EL385) unknown; sleeping for retry Completely confused !!! |
Hi
This is not a proper format for the command. #echo 'hai' | mail john@example.com is the proper format to sent mail And this case u are directly sending the mail to gamil domain and user name aaina. So ur stub resolver should have the Ip address of the gmail main server and gmail.com in the /etc/hosts like this 10.24.3.140 gmail.com and check whether u are getting the ping with ip and the hostname the both... |
The Entry is already there.
Here's the output again: Code:
Dec 17 05:36:49 EL385 sendmail[15784]: unable to qualify my own domain name (EL385) -- using short name I am sorry if the O/p seems something different as I was making some modification for public docs. Just i need to ask you something very serious. Say I have a friend at UK and his machine name is there in my /etc/hosts file. now When I sent her a mail from India it says "just the o/p above as sent mail. but she says I am not getting mail. How to troubleshoot the same? |
local host name is not a FQDN. Issue uname -a to check your hostname?. By the way what OS are you using? Post your OS so members can help you quickly
|
Quote:
|
dear shadow
Two way to send transfer mail communication. 1) Through local network 2) Through internet service for send the mail from command prompt u sould have configured the sendmail/postfix in the both end and if ur using internet ur machine should be in a qualified Domain. ok... |
Tajamari,
Let you explain in detail.My machine is presently located in india.The Server has /etc/hosts entry correectly mentioned with the remote client machine ip and hostname. The /etc/resolv.conf file has entry to search for the domain. Whenever I am trying to send one of the remote machine mail it says :"Sent". But the remote user says I havent received the mail. For testing, What i did is I added my company mail server address mymail.intfo.com with IP in /etc/hosts.Wrote : search intfo.com in /etc/resolv.conf. And sent the mail saying: echo "hello"| mail "aaina@loga.com And all it says: Code:
, size=322, class=0, nrcpts=1, msgid=<200812170714.mBH7EVsu030770@BL18DL385>, pr oto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] |
Here's the complete log:
Dec 17 07:26:07 EL385sendmail[32111]: My unqualified host name (EL385) unknown; sleeping for retry Dec 17 07:27:07 EL385sendmail[32111]: unable to qualify my own domain name (EL385) -- using short name Dec 17 07:27:07 EL385sendmail[32111]: mBH7R7NZ032111: from=root, size=48, class=0, nrcpts=1, msgid=<200812170727.mBH7R7NZ032111@EL385>, relay=root@localhost Dec 17 07:27:08 EL385sendmail[32401]: mBH7R75t032401: <am.uk.initooinfra.com@EL385>... User unknown Dec 17 07:27:08 EL385sendmail[32111]: mBH7R7NZ032111: to=am.uk.initooinfra.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30048, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown Dec 17 07:27:08 EL385sendmail[32401]: mBH7R75t032401: from=<root@EL385>, size=48, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Dec 17 07:27:08 EL385sendmail[32111]: mBH7R7NZ032111: mBH7R7Na032111: DSN: User unknown Dec 17 07:27:08 EL385sendmail[32401]: mBH7R75v032401: from=<>, size=1951, class=0, nrcpts=1, msgid=<200812170727.mBH7R7Na032111@EL385>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Dec 17 07:27:08 EL385sendmail[32111]: mBH7R7Na032111: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31072, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBH7R75v032401 Message accepted for delivery) Dec 17 07:27:08 EL385sendmail[32402]: mBH7R75v032401: to=<root@EL385>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32131, dsn=2.0.0, stat=Sent |
Hi there,
1. Is your system is working as SMTP server? OR is it relaying mails to other SMTP server? Copy the output of : #grep "DS" /path/to/sendmail.cf #grep "SMART_HOST /path/to/sendmail.mc 2. Are you able to connect to smtp port and send mail using standard SMTP commands? Link: http://postmaster.aol.com/tools/telnet.html Please go through this link and test yourself. |
As already identified, the issue is your hostname is not fully qualified. /etc/hosts act like a mini nameserver, so when you type "ping myhost.mydomain.com" it finds the relevant IP in there.
Sendmail is complaining that your hostname is not fully qualified, and as already started, you can set this in /etc/sysconfig/network, or use the system-config-network utility (probably safer). Don't forget to restart the network service after any changes. In case it isn't clear - /etc/hosts does not define your hostname. WW125599, you deserve a RTFM for your reply - mail -vv is perfectly valid Rgds |
#grep "DS" /etc/mail/sendmail.cf
DS # Return-Receipt-To: header implies DSN request # DHParameters (only required if DSA/DH is used) #grep "SMART_HOST" /etc/mail/sendmail.mc dnl define(`SMART_HOST',`smtp.your.provider') [root@EL385 ~]# The Test #telnet <> 25 works and tested successfuly. But why the remote user not receiving the mail. SMTP Server is a seperate server. |
Billymay,
What Can I see is hostname may not matter becoz': Code:
Dec 17 07:27:07 EL385sendmail[32111]: unable to qualify my own domain name (EL385) -- using short name But the strange output : Code:
Dec 17 07:27:08 EL385sendmail[32111]: mBH7R7Na032111: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31072, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBH7R75v032401 Message accepted for delivery) Correct me if I am wrong. |
Did root receive that message? There is probably more in the logs than just that line.
|
few more things I need to ask:
Whenever i do : #service sendmail restart it takes time at : [root@bl18dl385 ~]# service sendmail restart Shutting down sendmail: [ OK ] Shutting down sm-client: [ OK ] Starting sendmail: [ OK ] Starting sm-client: Takes a lot of time here in starting: [code] Dec 17 09:24:01 EL385 sendmail[15463]: unable to qualify my own domain name (EL385) -- using short name Dec 17 09:24:01 EL385 sendmail[15463]: alias database /etc/aliases rebuilt by root Dec 17 09:24:01 EL385 sendmail[15463]: /etc/aliases: 78 aliases, longest 10 bytes, 802 bytes total Dec 17 09:24:02 EL385 sendmail[15718]: My unqualified host name (EL385) unknown; sleeping for retry |
Here's the appropriate maillog:
Code:
Dec 17 09:51:50 sendmail[21840]: unable to qualify my own domain name (EL385) -- using short name |
please try following
Possible cause may be your system is not configured to relay mails to separate SMTP server.
Quote:
2. Replace "smtp.your.provider" with your SMTP server qualified name in sendmail.mc file. Make sure you are able to ping, as well as telnet <SMTP Server> 25 from konsole. 3. Regenerate sendmail.cf using m4 /path/to/sendmail.mc > /path/to/sendmail.cf 4. Restart sendmail service. 5. Try sending mail and also paste logs. Quote:
Are you doing telenet to SMTP server or localhost ? Can you double check that remote SMTP server has no restriction for relaying mail from your system ? |
Quote:
|
All times are GMT -5. The time now is 09:43 PM. |