How to check mailx on unix?
I need to check if mailx utility is available or not on certail unix hosts.
I am trying to do that by a script, but dont how to check the mailx command .
So how can i diffrentiate that mailx was not run or run.
Whats wrong with
Thanks for reply.
What is the -e option?
I tried it gives error "unknown test operator"
I am on HP-UX
---------- Post updated at 09:23 AM ---------- Previous update was at 09:03 AM ----------
Also , mailx is present and is executable, it is just that sometimes it doesnot run and return with error.
So , i need to check if mailx command is running or not.
Pludi's response is quite correct to the question posed.
Please re-phrase in good English stating what you actually want to know.
Also, are all your hosts HP-UX ?
There is a whole lot of difference between mail (whether the command is "mail" "mailx" or whatever) working within a local server and mail working to external servers.
Yes, all my hosts are HP-UX.
I mean is my mailx running fine(able to send mails or read).
I will be checking all hosts every 10mins(through cron), so cant send mails to a mailID every time for all the hosts, to check mailx.
Can we assume that you have a number of servers where the mail normallly works, and you need to know whether the mail is still working?
Let's home in a bit more:
What version(s) of HP-UX?
Are you definitely using "sendmail" for your mail transport?
Checking the entire mail service every 10 mins is paranoia for an Operating System which can work reliably for years. What sort of faults have you experienced which might make you want to do this?
We do run a basic monitor from cron every 15 mins to check count the number of mail items in /usr/spool/mqueue . On this busy machine should the count exceed 50 we raise an alert.
Yes, you are right.
The version is 11.23, we use sendmail.
We have seen this type of errors:
"can not write to queue directory /var/spool/clientmqueue/ (RunAsGid=0, required=114): Permission denied."
We have our daily logs being mailed from diff servers to a distro(or some specific mailID's), we are seeing that sometimes some servers not able to mail.
We found after investigating that its b'coz mailx didnt work.
Now we need a laert which can inform if on some machines mailx is not working so we an ask someone to fix it(Support team).
There are more than 300 servers.
|All times are GMT -4. The time now is 07:36 PM.|
Linux and Unix Supported by: vBulletin
Search Engine Optimisation provided by DragonByte SEO v1.1.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Unix & Linux Forums Content Copyright ©1993-2015. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums