General
cancel
Showing results for 
Search instead for 
Did you mean: 

unable to send mail from the server

SOLVED
Go to solution
user1221
Frequent Advisor

unable to send mail from the server

Hi all,

I am unable to send mail from hp-ux 11.31 server, I am trying to send mail to the same domain email id, the sendmail service is running but the mails are getting queued up.

/var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient--
n6DBUu1H025953 1781 Mon Jul 13 14:30 oracle
(host map: lookup (kmc.med): deferred)
mtaq@kmc.med
n6D5GNC8028538 1781 Mon Jul 13 08:16 oracle
(host map: lookup (kmc.med): deferred)
mtaq@kmc.med Total requests: 2

The HP openview operations sends the following critical message whenever there is a failed mail.
sendmail daemon could not receive/send mail to mtaq@kmc.med: Transient parse error -- message queued for future delivery

When tried
oracle:/etc/rc.config.d$ nslookup -q=mx kmc.med
Using /etc/hosts on: hdb03

looking up FILES
*** No address information is available for "kmc.med"

I even tried to dig
oracle:/etc/rc.config.d$ dig mx kmc.med

; <<>> DiG 9.3.2 <<>> mx kmc.med
;; global options: printcmd
;; connection timed out; no servers could be reached


Please help!
22 REPLIES
user1221
Frequent Advisor

Re: unable to send mail from the server

forget to add,
I am able to telnet the exchange (mail) server at port 25
Michal Kapalka (mikap)
Honored Contributor

Re: unable to send mail from the server

hi,

configure the sendmail with smarthost option.

mikap
James R. Ferguson
Acclaimed Contributor

Re: unable to send mail from the server

Hi:

Sendmail effectively requires DNS to be setup.

You have already seen that you can't resolve 'kmc.med':

*** No address information is available for "kmc.med"

Setup DNS and configure a smart relay (DS macro) in '/etc/mail/sendmail.cf'.

Regards!

...JRF...
user1221
Frequent Advisor

Re: unable to send mail from the server

could you please tell me how to set up smarthost option and the DS in /etc/mail/sendmail.cf

thanks & Regards
Michal Kapalka (mikap)
Honored Contributor

Re: unable to send mail from the server

Michal Kapalka (mikap)
Honored Contributor

Re: unable to send mail from the server

hi,

DS[192.168.1.1] or
DSmygateway.example.com

if you give there a hostname them add it to the DNS or /etc/hosts

mikap
Mel Burslan
Honored Contributor

Re: unable to send mail from the server

After you set up the smarthost on the DS line, make sure when you telnet to this server's port 25, you get something like :

# telnet smartmail 25
Trying...
Connected to smartmail.directv.com.
Escape character is '^]'.
220 smartmail.mydomain.com ready Mon, 13 Jul 2009 06:43:11 -0700

if you do not see the 220 message, or getting a connection refused, most probably mail relay server is not allowing your server to relay mails from. Talk to the maild server administrators in your organization to set this up.
________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor
Solution

Re: unable to send mail from the server

Shalom,

In most corporate environments a smtp relay server is provided for serves and such to dump email onto the corporate system.

You get the IP address or host name of the server, have it configured to accept mail from your server and.

Edit sendmail.cf

Change DS to:

DShostname_of_smtp_relay_server

or

DS
[ip address of smtp relay server]

ex

DS
[192.168.0.10]

/sbin/init.d/sendmail stop
/sbin/init.d.sendmail start

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vinod Kumar Yadav
Trusted Contributor

Re: unable to send mail from the server

Hi,


The Sendmail is working it the permission issue with /var/spool/mqueue or check the
/etc/resolv.conf & Please check the sendmail services running.

root # ps -ef | grep -i sendmail
root 1700 1 0 Jul 11 ? 0:04 sendmail: accepting connections
root 29011 23487 0 16:13:46 pts/tb 0:00 grep -i sendmail

root # ls -ld /var/spool/mqueue
drwxr-xr-x 2 root bin 1024 Jul 13 16:13 /var/spool/mqueue

root # ls -ld resolv.conf
-rw-r--r-- 1 root sys 110 Jun 16 2007 resolv.conf

Try with Permission send mail & check the log /var/adm/syslog/mail.log


Thanks
Vinod


Jai Shiv Shankar
user1221
Frequent Advisor

Re: unable to send mail from the server

Hi,

I modified the sendmail.cf file, added exchange server's hostname after DS,
DSmyexchangeserver.hostname

and also added the ip and hostname in the /etc/hosts file.

then tried to stop and start sendmail service

root@hrdb03:/etc/mail# /sbin/init.d/sendmail stop
Shutting down sendmail [Done]
Sendmail client not running
root@hrdb03:/etc/mail# ps -ef | grep sendmail
root 16501 14235 0 08:56:01 pts/tb 0:00 grep sendmail

root@hrdb03:/etc/mail# /sbin/init.d/sendmail start
Starting sendmail [Done]
Unable to start sm-client

then I copied submit.cf to /etc/mail/ and then again stop and start the sendmail service.

root@hrdb03:/etc/mail# /sbin/init.d/sendmail start
Starting sendmail [Done]
/etc/mail/submit.cf: line 1100: readcf: option RunAsUser: unknown user smmsp
/etc/mail/submit.cf: line 1119: readcf: option TrustedUser: unknown user smmsp
Mail submission program must have RunAsUser set to non root user
Unable to start sm-client

For more information see /var/adm/syslog/mail.log

oracle@hrdb03[central]:/etc$ /sbin/init.d/sendmail stop
kill_sendmail[9]: /etc/mail/sendmail.pid: cannot open
Sendmail client not running
oracle@hrdb03[central]:/etc$ /sbin/init.d/sendmail start
/sbin/init.d/sendmail[115]: /etc/rc.config.d/gwlmCtl: not found.

PLEASE HELP!
user1221
Frequent Advisor

Re: unable to send mail from the server

When I tried to send the mail I got this error
/etc/mail/submit.cf: line 1100: readcf: option RunAsUser: unknown user smmsp
/etc/mail/submit.cf: line 1119: readcf: option TrustedUser: unknown user smmsp
Mail submission program must have RunAsUser set to non root user

Please update!
user1221
Frequent Advisor

Re: unable to send mail from the server

got the following messages in the /var/admsyslog/mail.log

Jul 14 11:01:14 hrdb03 sendmail[24937]: sm_gethostbyname:name :hrdb03 family:22
Jul 14 11:16:48 hrdb03 sendmail[29887]: sm_gethostbyname:name :hrdb03 family:22
Jul 14 11:16:48 hrdb03 sendmail[29887]: NOQUEUE: SYSERR(oracle): /etc/mail/submit.cf:
line 1100: readcf: option RunAsUser: unknown user smmsp
Jul 14 11:16:48 hrdb03 sendmail[29887]: NOQUEUE: SYSERR(oracle): /etc/mail/submit.cf:
line 1119: readcf: option TrustedUser: unknown user smmsp
Jul 14 11:20:48 hrdb03 sendmail[1311]: sm_gethostbyname:name :hrdb03 family:22

Please update!
Michal Kapalka (mikap)
Honored Contributor

Re: unable to send mail from the server

hi,

make a alias in /etc/hosts

IP test.example.com test
user1221
Frequent Advisor

Re: unable to send mail from the server

Thanks for reply

I already added the ip of exchange server in the hosts file
10.242.12.56 cc1001-mail02.kmc.med cc1001-mail02
Michal Kapalka (mikap)
Honored Contributor

Re: unable to send mail from the server

hi,

check this link from ITRC :

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1036060

hope it help you

mikap
user1221
Frequent Advisor

Re: unable to send mail from the server

Thanks for your reply,

The SENDMAIL_SERVER is already set to 1

I the echo $SENDMAIL_SERVER gives the output 1.

I tried to restart the sendmail service & got the following
oracle@hrdb03[central]:/home/oracle/scripts$ /sbin/init.d/sendmail stop
kill_sendmail[9]: /etc/mail/sendmail.pid: cannot open
Sendmail client not running
oracle@hrdb03[central]:/home/oracle/scripts$ /sbin/init.d/sendmail start
/sbin/init.d/sendmail[115]: /etc/rc.config.d/gwlmCtl: not found.

Please update!
Michal Kapalka (mikap)
Honored Contributor

Re: unable to send mail from the server

hi,

the oracle user doesn't have permition to stop/start services.

mikap
user1221
Frequent Advisor

Re: unable to send mail from the server

I changed the file permission for gwlmCtl to 777 and then tried to run
oracle@hrdb03[central]:/sbin/init.d$ /sbin/init.d/sendmail start
/sbin/init.d/sendmail[115]: Syntax error at line 438 : `(' is not expected.

Please update!
user1221
Frequent Advisor

Re: unable to send mail from the server

even when I tried with the root user still the same error is coming
root@hrdb03:/etc/rc.config.d# /sbin/init.d/sendmail start
/sbin/init.d/sendmail[115]: Syntax error at line 438 : `(' is not expected.
Dennis Handly
Acclaimed Contributor

Re: unable to send mail from the server

>/sbin/init.d/sendmail[115]: Syntax error at line 438 : `(' is not expected.

This means you have a garbage file in /etc/rc.config.d/.
115 . /etc/rc.config

You can't have "backup" files in /etc/rc.config.d/ or any other types there.
Steven E. Protter
Exalted Contributor

Re: unable to send mail from the server

Shalom,

Unable to start sm-client

That is an extremely trivial message.

Your system will send and receive email without trouble without the sm-client running.

sendmail must be administered, stopped and started with the root user.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
user1221
Frequent Advisor

Re: unable to send mail from the server

Thanks for your reply

Dennins,

I removed one backup file from the /etc/rc.config.d/ directory then I was able to stop and start the sendmail service from the oracle user not from the root user, when I tried to stop and start from root user I got this error

root@hrdb03:/etc/mail# /sbin/init.d/sendmail stop
Shutting down sendmail [Done]
Sendmail client not running
root@hrdb03:/etc/mail# /sbin/init.d/sendmail start
Starting sendmail [Done]
/etc/mail/submit.cf: line 1100: readcf: option RunAsUser: unknown user smmsp
/etc/mail/submit.cf: line 1119: readcf: option TrustedUser: unknown user smmsp
Mail submission program must have RunAsUser set to non root user
Unable to start sm-client


then I tried to start from oracle user


oracle@hrdb03[central]:/sbin/init.d$ /sbin/init.d/sendmail start
Sendmail has already been started

but when I tried to send one mail I got the following error

oracle@hrdb03[central]:/home/oracle/scripts$ /etc/mail/submit.cf: line 1100: readcf:
option RunAsUser: unknown user smmsp
/etc/mail/submit.cf: line 1119: readcf: option TrustedUser: unknown user smmsp
Mail submission program must have RunAsUser set to non root user

and the process is just stucked there.

Please help!