1754924 Members
3199 Online
108827 Solutions
New Discussion юеВ

Re: mailx logging

 
Kirk Reindl
Frequent Advisor

mailx logging

Hi:

Can anyone tell me of any logging that mailx does in the event of message delivery failure. For instance, I attempted to send emails (via a script) to our exchange server. Our exchange server was down yesterday, and to me it appears the emails have gone off in oblivion.

I checked syslog.log, did a man on mailx, and did some poking around on the forum but couldn't find anything.
Thanks for the help.
7 REPLIES 7
Robert Hoey
Advisor

Re: mailx logging

I recall having a similar problem. We sent the mail as root and found a "DELIVERY FAILURE" message in root's mailbox. We use elm to check mail.

Also, check the mail queue.
Rob Smith
Respected Contributor

Re: mailx logging

Hi, you can check in /var/adm/syslog/mail.log for information regarding sent or not sent e-mails. Hope this helps.

Rob
Learn the rules so you can break them properly.
Charles McCary
Valued Contributor

Re: mailx logging

mailq or sendmail -bp will show all messages that are currently "undelivered".

sendmail -q will resend all messages in queue.

C
Kirk Reindl
Frequent Advisor

Re: mailx logging

Thanks for the responses, they have got me started. One more question. Does UNIX keep a rollover log anywhere that would show me email messages sent via mailx?

Regards,
Robert Hoey
Advisor

Re: mailx logging

Kirk,
We use mailx to send all of our mail messages from our system monitoring scripts. I just took a look at /var/adm/syslog/mail.log as Rob Smith pointed out and noticed that it shows when and who mail was sent to. If you are looking for a sent folder as you see in Lotus or Outlook, I'm not sure.
Good Luck.
-Rob
David Rodman
Frequent Advisor

Re: mailx logging

mailx is a mail client. Its only function is to read the mail files and to format mail for sendmail (the mail server) to deliver. Unix as an operating system really has nothing to do with it. Mail is just another program.

You could check the /etc/syslog.conf file, there is a facility for logging informational messages to a particular file.
My factory install of HPUX provided /var/adm/syslog/mail.log as the file for all mail related log
entries. Mostly these are related to mail that is outgoing to external systems.

If you want to audit use of mailx you may be able to do so with an HP trusted solution, however, you should know that mailx is only one of several options for a mail client on a unix system (see also mail,rmail,xmh,elm,procmail...etc)
You might do better by looking at logging from the server
(I assume sendmail). You can make the mail server log every mail message it sends out.
Buy a good book on sendmail configuration.
Kirk Reindl
Frequent Advisor

Re: mailx logging

Thanks to all who replied. I get the picture now. Also, please know that the mail.log can be disabled as I have determined is done in our enterprise.