Sending Account Pruner log to the administrator

Posted on June 20, 2008
Filed Under MDaemon | Leave a Comment

The account pruner logs it’s activities in the accountprune.log file in the \MDaemon\Logs\ directory, including potentially important details like accounts which were deleted due to inactivity.

In addition to MDaemon’s daily stats report, I also like to review the accountprune.log just to ensure that nothing important was deleted.

On my server I created a scheduled task that calls a batch file which says “IF EXIST C:\MDaemon\Logs\accountprune.log COPY c:\MDaemon\accountprune.raw C:\MDaemon\Queues\Rawfiles\accountprune.raw”, where accountprune.raw is a RAW file I build that emails my admin mailbox and uses the attachment feature to attach (and delete) the logfile.

The RAW file is pretty simple, mine looks like this:

TO <postmaster@example.com>
FROM <mdaemon@example.com>
SUBJECT <AccountPrune>
X-Flag=ATTACH <D:\MDaemon\Logs\AccountPrune.log, ASCII> -x

The result is that I get to see the report each morning.

Comments

Leave a Reply




Everything MDaemon is Digg proof thanks to caching by WP Super Cache