- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How do I scan all root mail as it arrives w/ a...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
09-14-2005 04:11 AM
09-14-2005 04:11 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 04:36 AM
09-14-2005 04:36 AM
Re: How do I scan all root mail as it arrives w/ a script?
/var/mail/root
Scanning it is a simple matter.
cat /var/mail/root | grep -i error
This can be made more efficient, but its the basis for what you want to do.
SEP
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
09-14-2005 04:38 AM
09-14-2005 04:38 AM
Solutionhttp://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/procmail-3.22/
Hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 05:46 AM
09-14-2005 05:46 AM
Re: How do I scan all root mail as it arrives w/ a script?
In fact, there's a reasonably good spam filter called spambouncer that uses procmail rules.
Docs are reasonably good. If you need additional help with it, you can post a question to nntp:comp.mail.misc; however, there are quite a few trolls on that newsgroup so be aware of that up front.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 06:36 AM
09-14-2005 06:36 AM
Re: How do I scan all root mail as it arrives w/ a script?
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2005 08:09 AM
09-14-2005 08:09 AM
Re: How do I scan all root mail as it arrives w/ a script?
alias_name : | "/fullpath/name options"
or as an example:
pagermail : | /root/bin/pagermail
NOTE: the script must be readable and excutable by the sendmail and rmail daemons. For testing, ehe message can be printed by simply putting a cat | lp in your script. The headers are always first and separated from the body of the message by a single blank line.
Debugging these types of scripts is interesting because there won't be any place for error messages to be viewed (other than mail.log) so I typically put debug messages into the script using logger and then look in syslog. Or you can send debug messages to a specific file.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2005 09:56 AM
09-15-2005 09:56 AM
Re: How do I scan all root mail as it arrives w/ a script?
Thank you!
-Dave