Operating System - HP-UX
1748267 Members
3832 Online
108760 Solutions
New Discussion юеВ

Re: Regarding mailx command

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: Regarding mailx command

>ME: Does it have: /etc/mail/submit.cf is missing

If it has this, you can probably ignore it.
Dennis Handly
Acclaimed Contributor

Re: Regarding mailx command

You need to look at /var/adm/syslog/mail.log to see if your messages are being sent. And if so, you need to look at where the messages are sent.
Kavita Poonia
Regular Advisor

Re: Regarding mailx command

Hello Dennis,

I created that file submit.cf and after that when I restarted sendmail then I have got below error in /var/adm/syslog/mail.log

Jan 20 18:49:51 mddxrdd1 sm-msp-queue[8248]: sm_gethostbyname:name :mddxrdd1 family:22
Jan 20 18:49:51 mddxrdd1 sm-msp-queue[8248]: NOQUEUE: SYSERR(root): No local mailer defined
Jan 20 18:49:51 mddxrdd1 sm-msp-queue[8248]: NOQUEUE: SYSERR(root): QueueDirectory (Q) option must be set
Jan 20 18:49:51 mddxrdd1 /sbin/init.d/sendmail[8226]: Unable to start sendmail client
Jan 20 18:49:52 mddxrdd1 sm-mta[8247]: sm_gethostbyname:name :smtp.na.jnj.com. family:22
Jan 20 18:49:52 mddxrdd1 sm-mta[8247]: sm_gethostbyname:name :ncsusmea.jnj.com. family:22
Dennis Handly
Acclaimed Contributor

Re: Regarding mailx command

>I created that file submit.cf

If you don't know what goes there, remove it. I can still sent mail with that warning.

You should restart sendmail and then try sending mail and then show us the logs.

(You may want to replace the actual addresses in the logs with some dummy names.)
Kavita Poonia
Regular Advisor

Re: Regarding mailx command

Hello Dennis,

I have removed that file and restarted sendmail but same error is coming as below....

[root@mddxrdd1:/etc/rc.config.d]#
#-> /sbin/init.d/sendmail stop
Sendmail not running
Sendmail client not running
[root@mddxrdd1:/etc/rc.config.d]#
#-> /sbin/init.d/sendmail start
Starting sendmail [Done]
Unable to start sm-client

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

Jan 20 19:21:05 mddxrdd1 /sbin/init.d/sendmail[24102]: #### Starting sendmail ####
Jan 20 19:21:05 mddxrdd1 sendmail[24119]: sm_gethostbyname:name :mddxrdd1 family:22
Jan 20 19:21:05 mddxrdd1 sendmail[24119]: alias database /etc/mail/aliases rebuilt by kpoonia
Jan 20 19:21:05 mddxrdd1 sendmail[24119]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Jan 20 19:21:05 mddxrdd1 /sbin/init.d/sendmail[24102]: /etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
Jan 20 19:21:05 mddxrdd1 sm-mta[24121]: sm_gethostbyname:name :mddxrdd1 family:22
Jan 20 19:21:05 mddxrdd1 sm-mta[24122]: starting daemon (@(#)Sendmail version 8.13.3 - Revision 1.000 - 1st August,2006): SMTP+queueing@00:30:
00
Jan 20 19:21:05 mddxrdd1 /sbin/init.d/sendmail[24102]: /etc/mail/submit.cf is missing
Jan 20 19:21:05 mddxrdd1 /sbin/init.d/sendmail[24102]: Sendmail client not started
Jan 20 19:21:06 mddxrdd1 sm-mta[24125]: sm_gethostbyname:name :smtp.na.jnj.com. family:22
Jan 20 19:21:06 mddxrdd1 sm-mta[24125]: sm_gethostbyname:name :ncsusmea.jnj.com. family:22


Further, I tried sending mails but I am not receiving them on delvered email id

You are talking about replacing which actual names ????


Thanks * regards,
Kavita
Steven E. Protter
Exalted Contributor

Re: Regarding mailx command

Shalom,

I am considered knowledgeable on sendmail, and not one time in ten years of use have I ever changed submit.cf

Note:

To merely send outbound mail, the sendmail daemon need not run. You can run the sendmail -v -q command in a cron job and run the queue to deliver outbound mail.

Not being able to run the client as noted in your last message does not to my knowledge impact sendmail functionality at all.

For your reading pleasure:
http://www.hpux.ws/?p=5

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
Kavita Poonia
Regular Advisor

Re: Regarding mailx command

Hello SEP,

WE already have sendmail configured in cronjobs....

#Sendmail queue
0 8,11,15 * * * /usr/sbin/sendmail -q > /var/adm/log/sendmail.log 2>&1


I do not know what to do here.....

Your provided link is also not opening.

Thanks * regards,
Kavita
Dennis Handly
Acclaimed Contributor

Re: Regarding mailx command

>I tried sending mails

I don't see any mail.log messages saying you sent mail or an error occurred sending it.

>You are talking about replacing which actual names?

I'm saying that if you just paste your mail.log output here, you should be careful that spammers don't pick up your mail addresses.
Kavita Poonia
Regular Advisor

Re: Regarding mailx command

Oh I see......


I did send mail but I forgot to paste the logs. Here they are...

Jan 20 19:21:07 mddxrdd1 sm-mta[24125]: n0KMgBsA007806: to=kpoonia@its.jnj.com, ctladdr=kpoonia (24545/8649), delay=01:38:56, xdelay=00:00:00,
mailer=relay, pri=570136, relay=ncsusraexmea2.na.jnj.com, dsn=4.0.0, stat=Deferred
Jan 20 19:21:07 mddxrdd1 sm-mta[24125]: n0KMts85014779: to=kpoonia@its.jnj.com, ctladdr=kpoonia (24545/8649), delay=01:25:13, xdelay=00:00:00,
mailer=relay, pri=570136, relay=ncsusraexmea2.na.jnj.com, dsn=4.0.0, stat=Deferred


The command which I tried sending mail is as follows....

echo "test"|mailx -s "yip" kpoonia@its.jnj.com


Thanks * regards,
Kavita
Dennis Handly
Acclaimed Contributor

Re: Regarding mailx command

>to=kpoonia@its.jnj.com
>kpoonia@its.jnj.com

Here is where I cautioned you not to put your real address. nslookup can't find it so is it fake?

>... stat=Deferred

This says it is having problems sending it.
What does mailq show?