Pruning/Quotas
-
When setting Quotas, under Pruning it allows me to "delete messages older than XX days".
Will this setting delete ALL messages older than XX days in all folders or only old messages in the DELETE folder?
Specifically I would like to delete old messages only in the delete folder, not any other folder.
-
Arron Staff
The option for "delete messages older than XX days" will remove all mail that is older than XX days.
If you only want to remove messages that have been deleted there are a couple of different ways depending on how the IMAP clients are deleting the messages. If the IMAP client is setting the DELETED flag on messages then you'll want to use the option for "PURGE deleted IMAP messages older than YY days."
In case its helpful, here is a link to the help for configuring pruning.
https://help.mdaemon.com/mdaemon/en/domain-manager_options.html
If the IMAP client is moving deleted messages to the Trash or Deleted Items folder than you'll need to edit the midnight.bat file in the MDaemon\app directory and add the following:
c:\MDaemon\App\AccountPrune.exe /m /d=2 /p=”Trash.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=2 /p=”Deleted Items.IMAP”
c:\MDaemon\App\AccountPrune.exe /m /d=2 /p=”Deleted Messages.IMAP”Save the file and then MDaemon will run it each night at midnight.
This will cause MDaemon to delete all mail in the Trash, Deleted Items, and Deleted Messages folders that are more than 2 days old. You can adjust the /d option to control how old messages are. You can also adjust the folder names as you see fit.
-
So is the DELETED flag set if using MS Outlook with the MDaemon Connector plugin or though ActiveSync on mobile devices?
I will also assume if the "midnight.bat" file does not exist then you need to create one?
-
Arron Staff
So is the DELETED flag set if using MS Outlook with the MDaemon Connector plugin or though ActiveSync on mobile devices?
No.
I will also assume if the "midnight.bat" file does not exist then you need to create one?
Correct.
-
So is the DELETED flag set if using MS Outlook with the MDaemon Connector plugin or though ActiveSync on mobile devices?
No.
Ok, so basically because our clients are using the MDaemon Connector and also ActiveSync on their mobile devices, there is no way for MDaemon to prune files only in their "Deleted Items" folder or specific users "Deleted Items" folder?
Seems like this would be a good "Feature Request" :)
If I write a script to scan through a users "Deleted Items" folder and delete files older than a specific date, would the changes be reflected in MDaemon? or would this cause problems because MDaemon wouldn't know about the changes?
-
Arron Staff
Ok, so basically because our clients are using the MDaemon Connector and also ActiveSync on their mobile devices, there is no way for MDaemon to prune files only in their "Deleted Items" folder or specific users "Deleted Items" folder?
Its not just MDaemon Connector and ActiveSync. Any client that is moving messages to a trash folder and not setting the IMAP DELETED flag, will require you to do more than just check a box. MDaemon does offer the ability to prune the messages, you just have to use a customized command to call AccountPrune.exe. This is required because we don't know what folder the client is using as the trash folder.
If I write a script to scan through a users "Deleted Items" folder and delete files older than a specific date, would the changes be reflected in MDaemon? or would this cause problems because MDaemon wouldn't know about the changes?
There is no need to write a script. Simply add the command provided to the midnight.bat file. Then MDaemon will run the command each night.
If you do right a script to handle this or you use a customized command for account prune, the changes will be reflected in MDaemon. Most clients cache the content for a folder, so the client will have to check for mail in the folder in order for the client to be updated with the changes. Most clients will check the folder for mail when you click on it.
-
Ok, sounds good.
Thank you for your help!
-
Hi
This is new for us since version2!!!
Our data disk just got full.
I had the setting to delete messages older than set to
Also our midnight.bat has this:
c:\mdaemon\app\accountprune /m /s /d=7 /p="Spam.IMAP"
c:\mdaemon\app\Accountprune.exe /m /s /d=30 /p="Trash.IMAP" /S
c:\mdaemon\app\Accountprune.exe /m /s /d=30 /p="Deleted Items.IMAP" /S
c:\mdaemon\app\Accountprune.exe /m /s /d=30 /p="Deleted Messages.IMAP" /SDoes this delete the messages as set above from ALL folders? Or do I have to add
Accountprune.exe /A
to the batch file?
thx in advance
-
Arron Staff
No you do not need to add AccountPrune.exe /a to the batch file.
Check the Account Prune log and verify it is pruning mail according to your settings.
Do you know what is using all the disk space? I'd suggest using a tool such as windirstat to help you pinpoint what is taking up large amounts of disk space.
If messages are not being pruned according ot your settings, please provide a copy of the account prune log and let us know what is not being pruned as it should be.
-
@Arron Ok, thx.
I changed the holding time from 10yrs to 3yrs. Will see how it goes.