• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

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

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
sunhux
Asked:
sunhux
  • 2
  • 2
3 Solutions
 
simon3270Commented:
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
 
serialbandCommented:
How about just installing and running the SendmailAnalyzer?  http://sareport.darold.net/
0
 
sunhuxAuthor Commented:
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
 
sunhuxAuthor Commented:
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
 
serialbandCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now