Magnus Bäck wrote:
On Thursday, August 02, 2007 at 19:33 CEST,
Ranjith Kumar <ranjitbat AT gmail DOT com> wrote:
I am using Postfix 2.0. Daily thousands of mails will be transferred
through my server. Most of my users are using POP3. I want to find
that how many users are sending attachements like audio, video files
(.wav, .avi, .mp3, etc) from maillog.
If you use amavis, this information is also available in the logs, and
is reported with the amavis-logwatch utility. See:
http://www.mikecappella.com/logwatch/example-amavis-detail5
http://www.mikecappella.com/logwatch/example-amavis-detail10
for examples.
The size's aren't being shown currently, but if anyone finds this
useful, I will add size-per-file, cumulative-size-type, and
cumulative-size-all attatchments.
MrC
You can use mime_header_checks and a WARN action to log each attachment
header. Noel Jones regularly posts an expression used to block
attachments having a certain file extension. You could use a slight
variation of that expression for your purposes. This method will at
least provide the number of attachments but not the size of each
attachment. The size of each message can on the other hand already
be found in the log.
|