Solved

Shell / Perl scripts to compile SMTP usage detail in Sendmail maillogs

Posted on 2014-04-28
5
519 Views
Last Modified: 2014-05-03
Need a Shell and/or Perl script for RHES 5.x / 6.x to will
accept as its parameters the start time+date & end time
+date to get from a sendmail's maillogs :

a) how many outgoing mails for that duration
b) how many incoming mails for that duration
c) amount of bytes incoming & outgoing if it's
    logged in maillogs (or tell me how to enable
    this if needed)

Our sendmail is the default that comes with RHES 5.8
0
Comment
Question by:sunhux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 19

Assisted Solution

by:simon3270
simon3270 earned 150 total points
ID: 40028979
Do you have an example sendmail log that we could look at?  I don't have admin access to any machines running sendmail, but the first part of this is a text manipulation exercise rather than a sendmail one, so that shouldn't be a problem!
0
 
LVL 30

Assisted Solution

by:serialband
serialband earned 350 total points
ID: 40033906
How about just installing and running the SendmailAnalyzer?  http://sareport.darold.net/
0
 

Author Comment

by:sunhux
ID: 40034460
Hi Simon3270,

Give me a few more days as my password to the domain was locked
out and the sysadmin was away on leave.


Hi Serialband,

Let me check with my colleague when he's back if freeware is allowed
in our environment (sometimes, we fear freeware has malware in
it & sometimes, the support is not there)
0
 

Author Comment

by:sunhux
ID: 40034473
Hi Serialband,

Must the tool/analyser be installed in the sendmail server itself?
Might be allowed if we pipe the maillogs to a non-critical test
Linux VM & run this tool on that test VM
0
 
LVL 30

Accepted Solution

by:
serialband earned 350 total points
ID: 40035370
Since it's a perl based script that watches the logs, you could run it on another server and periodically copy the log files over to it.  You don't have to run it as a daemon to watch the logs constantly.
http://sareport.darold.net/admin.html

The path to the log file is configurable.
http://sareport.darold.net/config.html
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question