- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mail.log file - How do I divert mail log from ...
Operating System - HP-UX
1753530
Members
4809
Online
108795
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 06:39 AM
тАО02-25-2010 06:39 AM
mail.log file - How do I divert mail log from certain user to another file?
Folks,
I see that /var/adm/syslog/mail.log gets flooded with emails that get sent to a certain mail destination.
If I want to force these specific email related log entries to be sent to any file other than mail.log, how can I acomplish this?
Thanks
I see that /var/adm/syslog/mail.log gets flooded with emails that get sent to a certain mail destination.
If I want to force these specific email related log entries to be sent to any file other than mail.log, how can I acomplish this?
Thanks
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 07:06 AM
тАО02-25-2010 07:06 AM
Re: mail.log file - How do I divert mail log from certain user to another file?
Shalom,
You don't.
Rotate the logs to a location with space. The syslog configuration is not meant to select data by user. It is meant to select data by daemon.
This would require a custom script to occasionally process the the data creating the second log file.
looking however at the syslogd man page there does appear to be the ability to log messages to a particular user.
Some amount of hacking might produce desired results.
--snippet--
For example, the configuration file:
kern,mark.debug /dev/console
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root,eric,kridle
*.emerg *
*.emerg @admin
logs all kernel messages and 20 minute marks onto the system console,
all mail system messages to /var/adm/syslog/mail.log, and all messages
at info and above, except mail messages, to the file
/var/adm/syslog/syslog.log. Messages at alert and above are logged to
the console and to the users root, eric, and kridle if they are logged
in. emerg messages are written to all logged-in users' terminals, and
--end snippet--
SEP
You don't.
Rotate the logs to a location with space. The syslog configuration is not meant to select data by user. It is meant to select data by daemon.
This would require a custom script to occasionally process the the data creating the second log file.
looking however at the syslogd man page there does appear to be the ability to log messages to a particular user.
Some amount of hacking might produce desired results.
--snippet--
For example, the configuration file:
kern,mark.debug /dev/console
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root,eric,kridle
*.emerg *
*.emerg @admin
logs all kernel messages and 20 minute marks onto the system console,
all mail system messages to /var/adm/syslog/mail.log, and all messages
at info and above, except mail messages, to the file
/var/adm/syslog/syslog.log. Messages at alert and above are logged to
the console and to the users root, eric, and kridle if they are logged
in. emerg messages are written to all logged-in users' terminals, and
--end snippet--
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
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 07:45 AM
тАО02-25-2010 07:45 AM
Re: mail.log file - How do I divert mail log from certain user to another file?
Or a simple cron script could grep out the entries for that user on an hourly, daily, weekly basis.
Pete
Pete
Pete
Pete
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP