Operating System - HP-UX
1833875 Members
1962 Online
110063 Solutions
New Discussion

how to get rid of useless information in mail

 
SOLVED
Go to solution
Victor_5
Trusted Contributor

how to get rid of useless information in mail

Whenever I enter the system, there are a prompt: "You have mail in /var/mail/root." I use # mail to read it, but I found there were so many printer information which were useless for me, for example:
"xxxprinter paper out"
"xxxprinter need attention"
"xxxprinter paper jam".
... ...

I am trying to find a way to get rid of those messages automatically so that I can only focus on critical system information. Anyone can help me?
5 REPLIES 5
Rick Garland
Honored Contributor

Re: how to get rid of useless information in mail

What is sending the mail? Find that out and you can turn off or redirect to another mail acct.

Re: how to get rid of useless information in mail

Seems these messages are caused by hpnp* ( HP JetDirect-Programs), do you use it on this system ( or is it a syslog-Server for othe rmachines ?)

To change / get rid of these messages check the following :

- Do your printers use your machine as syslog-server ? IF yes, disable this feature ( do a telent to your printer or use jetadmin ...)
- As far as I remember the printer-stuff uses lpr0/local as syslog-priorities, and it could be that on your machine this redireted to be sent via mail Check /etc/syslogd.conf for your syslogd - configuration, check what is sent via mail !
Hope it helps,
christian
Steve Faidley
Valued Contributor
Solution

Re: how to get rid of useless information in mail

We had a situation where thousands of messages got
generated and we needed to clean them up fast so I
came up with this script. The SUBJECT of the messages
needs to be unique in order for this to work.
Place the subject you want to cleanup in a file named
mail.filter in the same dir as this script. You can strip out
all the question/response items once you feel it does the right thing.
I'm sure there are more eloquent ways to do it, but this
gets the job done.
Hope it helps!
If it ain't broke, let me have a look at it.
Victor_5
Trusted Contributor

Re: how to get rid of useless information in mail

Hi Friends:

Thanks a lot for your quick responses and helpful suggestion, I have solved the problem according to Steve, but I still have question for Christian.

Yes, I am using JetAdmin(Rev. D.06.21), those printer informatin came from HPDPS server. But how can I know the printers are using my host as Syslog server, and how to disable it?

From telnet, the configuration for Syslog SERver is 0.0.0.0.

From JetAdmin
2) Diagnostics
5) View HP JetDirect interface's current configuration
no Syslog Server information there.
Jacques Simon
Advisor

Re: how to get rid of useless information in mail

echo delete /string | mailx
deletes all mails whose subject contains string!
Jacques