Sending Account Pruner log to the administrator

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 <[email protected]>
FROM <[email protected]>
SUBJECT <AccountPrune>
X-Flag=ATTACH <D:\MDaemon\Logs\AccountPrune.log, ASCII> -x

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

CC BY-NC-ND 4.0 Sending Account Pruner log to the administrator by Dave Warren (everything-mdaemon.com) is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.