[Logwatch-Devel] Sendmail, Amavis and Qpopper

Jim O'Halloran Jim@kendle.com.au
Tue, 25 Mar 2003 12:00:33 +1030


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C2F26E.2119FB40
Content-Type: text/plain;
	charset="iso-8859-1"

I spent a lot of early last week hacking at logwatch to give me more
information about what is happening on our main Linux box. The patches are
now ready for prime time, and attached to this email. The changes made
include a module for amavis which summarises the virus scanner log entries.
When run in high detail, LogWatch will now produce this...

708 messages checked and passed.
4 virus infected messages were found.

Viruses Detected:
   W32/Klez.h@MM: 4 Times(s)

I've also made a couple of changes to the sendmail script. The first of
which reads the sendmail config files to determine which domains are local
to this server, then produces a report showing message traffic to, from and
within those domains.

Message traffic by domain:
                         |   Inbound   |  Outbound   |  Internal   |
Total
Domain                   | Msgs Kbytes | Msgs Kbytes | Msgs Kbytes | Msgs
Kbytes
-------------------------+-------------+-------------+-------------+--------
----
kendle.com.au            |  141   2131 |   16     93 |    4     11 |  161
2236
otherdomain.com.au       |  126  15740 |   32  13370 |   18  12765 |  176
41877
<snip>
-------------------------+-------------+-------------+-------------+--------
----
TOTAL                    |  476  44522 |  170  41839 |   54  17992 |  700
104354

LogWatch now also analyses the size of each message passing through the
server, and breaks it up into ranges. I implemented this because I thought
the average size of messages passing through our server was bigger than I'd
expected, and I wanted to see what proportion of messages accounted for the
network traffic on our server.

Message Size Distribution:
Range          # Msgs       KBytes
0 - 10k           425         1342
10k - 20k          69          907
20k - 50k         103         3164
50k - 100k         45         3296
100k - 500k        47        10459
500k - 1Mb         11         8115
1Mb - 2Mb          10        14723
2Mb - 5Mb          16        41461
5Mb - 10Mb          2        11983
10Mb+               0            0
----------------------------------
TOTAL             728        95455
Avg. Size                      131

Where very large (in the 10+Mb range) messages are found, we report the From
and To addresses as follows to assist me in identifying repeat offenders.

Large Messages (From -> To):
    user1@domain.tld -> user2@domain2.tld: 2 Times(s)

Most of the new sendmail information is only reported when the detail level
is set to high, so as to not clutter up the report for those who don't want
this level of detail.  Finally, I've also made some changes to the qpopper
script to suppress some more meaningless log messages.

Hope people find these useful.

Jim.

---
Jim O'Halloran
Kendle Computer Services Pty. Ltd.
Phone: (08) 8354 1600   (intl. +61-8-8354-1600)
Fax: (08) 8354 1900 (intl. +61-8-8354-1900)

"Don't half heatedly wound a problem.  Kill it 
dead." - Clarence "Kelly" Johnson




------_=_NextPart_000_01C2F26E.2119FB40
Content-Type: application/octet-stream;
	name="patches030325.tar.gz.tar"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="patches030325.tar.gz.tar"

H4sIAN+vfz4AA+08a1fbyJLzdfwrasE52PgpG2OwgQsJZsIOBBbI5M5iMkdYbaMbWfLqAcNlvL99
q7pbT780TJJ79xx1Arak6qqu6up6dQt1rD7qzg/ftNWVer3dav1QFy352WzXt3+ot7eb7XajqSh1
gm+32z9A/dsOSzTPcVUb4AfbstxlcKue/z9t6/9R8xy7dq+btQmzDag85da/WsutQ/5U64DKlaz8
CEq1CY16vVFT6jWlAfVGp77TUXbgi25/gd7vE8h/TeqvxoXjvnnQHXhS8cfWXZeZoJoa4K2xqpsu
/jAN7p87CIjtP/UxXGy8Vw3DslUT9v6hjw+/MFMzWHVgjauqd5AjlJcGUx0GDj4BhAV8Nmam65TB
8UYj5ri6ZeLFvTcCm00sG58I/MwdlMG1YAZv9fUc5vLHDPkwYB/yvQ+/vGycXfz06ejm3fvfjns3
R6dnv531fumdbUy7ufw7HLd57owchK3j9ak5ZAOXaeEtYk61kTfDGg11g+WeHvA3FDQ2JEkV8iTN
M/yK4HvXN8enHw6KRXjJIW+RR/8LTu1zv3Db1+5K/SLUal0CoB99CAUoxEBrnzXrN9UZ6HqtyGF4
s+wZsBPLI3k/gjNQTZPZqcD7+dv+9V3ptu/clVQXuyzt88HyO5R5D9NywXN0cwS6u4IcGR8XIasg
FwkOlfpI6VBbh08MNMvccGGg2gzUe8tzwX1gDiOQKTDDIQElMF+qjsO0MtRCVOFMlkrdWN9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