Prune exclusion | MDaemon Technologies, Ltd.

Prune exclusion


  • Hello,

    we currently run the prune command through midnight.bat set for 7 days but we have one user that needs it disabled. (person needs all the emails, just in case, for a longer period.)

    Is there a way to exclude a specific user from prune command?

    also, we added "skipautoprune=yes" under settings to HIWATER.MRK file under sent items and deleted items folder in hopes of disabling prune on those folders for a specific user. Would this be valid?

    Thank you!



  • What is the command line you are using in the midnight.bat file?

     


  • Thank you for your reply.

    Command we are using is 

    Accountprune.exe /m /d=7 /p="Trash.IMAP"

    Accountprune.exe /m /d=7 /p="Deleted Messages.IMAP"

    and so on...


  • Yes, adding SkipAutoPrune=Yes to the hiwater.mrk file in the specific folders that you want to skip should work. 

    The accountprune log will show something like this:

    [Wed 2024-10-16 07:14:38] Path:  C:\MDaemon\Users\domain\mailbox\Trash.IMAP
    [Wed 2024-10-16 07:14:38] Skipped C:\MDaemon\Users\domain\mailbox\Trash.IMAP\ because SkipAutoPrune=Yes

     


  • Thank you for the reply.

    Just wanted to confirm... there isnt a AutoPrune command parameter we could add to skip delete for users?

    SkipAutoPrune is good but just trying to find out a way to do it without going into individual user accounts as its easy to lose track.

    we were hoping for a resolution within the MIDNIGHT.BAT file, if possible.

    Thank you.


  • There are other options, they may be more work though.

    You could use a seperate command line for each user using the /u switch.  If you have lots of users it could be cumbersome.  

    accountprune.exe /m /d=7 /p="Trash.IMAP" /u="user1@domain.com"

    accountprune.exe /m /d=7 /p="Trash.IMAP" /u="user2@domain.com"

    accountprune.exe /m /d=7 /p="Trash.IMAP" /u="user4@domain.com"

    If that is too cumbersome, you could write a powershell script that retrieves a list of users using the XML-API, and then iterates through the list running the command for each user except the ones you want excluded.

     


  • Thank you for the quick reply!

     


Please login to reply this topic!