Unix and Linux...what to look for in mail.log?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix and Linux...what to look for in mail.log?
# 1  
Old 04-15-2011
Unix and Linux...what to look for in mail.log?

Hi all. I have a couple of scripts looking at my syslog.log, mail.log, and messages logs.

My scripts work well with syslog.log and messages logs. I use grep function and then make exceptions to things that I know happen often and that way can investigate better without being buried with useless info from the logs.

I use following:

Code:
egrep -iv 'checkpoint|homepage|added|quorum|updated|successful|etc|etc|etc|etc' /var/adm/syslog/syslog.log

The mail.log is the one thats quirky. Instead of using exceptions i.e. -v function in egrep, I would have to look for specifics. Like "error" or those type of things because there are so many lines...and then might miss things that are important.

I don't know a lot about what kind of problems may arise and how they are reported to mail.log. I would like to anticipate things better so that I can get more in tune with these logs and get potential problems better, faster and more intuitively.

Thanks,
Any info would be appreciated.
# 2  
Old 04-15-2011
Why not use the simple way:
Code:
fgrep 'error' mail.log

If you already know there is no regular expression in your search pattern, it is best to use 'fgrep' - the internal algorithm is faster as it does not allow for RE.
# 3  
Old 04-15-2011
Thanks,

I got a suggestion when I did that with syslog.log, and someone told me that if I do that I may miss important things because it would display lines containing "error" only.

Using -iv option I can ignore things which happen normally and catch all other things which may potentially be a problem.

However this is hard with mail.log. I don't really know what to not include in my search for problems with the mail.log.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX/Linux - awk - displaying unxpected ! character when viewed in mail; but not in actual file

Greetings Experts, I am on AIX using ksh; I am processing the input files and generating a awk_output.txt file using AWK. By reading that awk_output.txt file, I am building a output.html file which is cat and then fed to /usr/sbin/sendmail .When the shell script is triggered through command... (2 Replies)
Discussion started by: chill3chee
2 Replies

2. Shell Programming and Scripting

Log search and mail it if the log is updated before 24 hours from the current time

Hi , We have around 22 logs , each has different entries. I have to automate this using shell script. The ideas which am sharing is given below 1) We use only TAIL -100 <location and name of the log> Command to check the logs. 2) We want to check whether the log was updated before 24... (13 Replies)
Discussion started by: Kalaihari
13 Replies

3. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

4. Shell Programming and Scripting

Use mutt or mail in different contexts - Linux or Unix

Hi All, I need to write a "portable" shell script that can send mail from Unix or Linux servers. In my server Linux I find mutt and I need to attach a file In my server Unix mutt is not present. Only mail/mailx. In this case for attaching a file I need to pipe the uuecode command. My... (1 Reply)
Discussion started by: gio123bgg
1 Replies

5. HP-UX

[Solved] How do I configure Unix Mail Server to use another Mail Exchange Server

We have configured our mail unix server and can send out emails automatically from applications running on unix to different people in our company as well as outside our company. However there is an outside client who is not receiving these emails because the settings on their mail server cannot... (4 Replies)
Discussion started by: Tenyhwa
4 Replies

6. UNIX for Advanced & Expert Users

How to relay mail to mail server from Unix ?

Hi, I need to send email notifications from Unix/Linux box to users using mailx. In these Unix/Linux boxes mail is not configured however we are having mail server configured in our LAN. Could you please provide instructions to configure relay in these boxes so that we can relay our mails... (3 Replies)
Discussion started by: sourabhsharma
3 Replies

7. UNIX for Dummies Questions & Answers

Unix mail to personal mail, Strange behavour

Hi. I am running a script on solaris 10 and mailing it to my personal email. the script is ran as user xxx, And i have edited the crontab for user xxx to run the script and mail it to my email account. /network_check.sh | /usr/bin/mailx -s "Network Test" k454@hotmail.com the sript... (2 Replies)
Discussion started by: k00061804
2 Replies

8. Shell Programming and Scripting

Mail attachment with unix mail

Hi Could someone help me with the details on how to send an attachment through mail in unix. I have an html file in my unix machine and I want this to be send to some mail id, plese help with the steps. Regards Ajay (2 Replies)
Discussion started by: ajaykumarboyana
2 Replies

9. UNIX for Dummies Questions & Answers

I am not able to send mail form unix to other mail accounts.

Using Mailx command i.e mailx -s "subject" chinni@hotmail.com < \tmp\chin this command executed sucessfully but not able to receive the mail in chinni@hotmail.com please help. (1 Reply)
Discussion started by: chinnigd
1 Replies

10. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies
Login or Register to Ask a Question