Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon Support > Pruning messages basing on date and subject

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon Support  /

Pruning messages basing on date and subject

[Zanin, Luciano]
Luciano Zanin
Newbie
Newbie
Posts: 54
Luciano Zanin - 04:33am, Jul 22 2022

Hello,
Does MD offer any solution to prune / delete old messages basing on date and subject?
Standard pruning option is based only on date and content filter rules only work on new messages, not existing ones.
So is there a way to delete old messages when they are older than x days and subject contains a certain string?

  (older msg: 1)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Luciano Zanin - Jul 22, 2022 8:57 am (#2 Total: 4)  

 

Photo of Author
Luciano Zanin
Newbie
Newbie
Posts: 54
Sounds like a good solution. I'm gonna do some tests.

Arron Caruth - Jul 22, 2022 9:15 am (#3 Total: 4)  

Guest User  

Photo of Author
Posts: 1
There is a mistake in the Powershell script that I posted.
 
$_.LastWriteTime should be $_.CreationTime.
 
Using LastWriteTime, will use the file modified timestamp.  CreateTime will use the created time stamp.
 
You could also use the Date header in the message itself, but again, it gets significantly more complicated and in most cases, the CreationTime should work.
 
--
Arron Caruth

o: 817-601-3222    e: Arron.Caruth@mdaemon.com

MDaemon Technologies
Simple Secure Email

Visit us on www.mdaemon.com | Facebook | LinkedIn | YouTube
Sent using the MDaemon Email Server
 
On Fri, 22 Jul 2022 08:57:20 -0500, "lists-md-support@mdaemon.com (Luciano Zanin)" <lists-md-support@mdaemon.com> wrote:
Sounds like a good solution. I'm gonna do some tests.


View/reply at Pruning messages basing on date and subject
--MD-SUPPORT--------------------------------------------------------------
This list is for questions and discussion about MDAEMON. To unsubscribe 
from this mailing list send an email to md-support-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!-----------------------------------------------------

--------------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
--------------------------------------------------------------------------

--MD-SUPPORT--------------------------------------------------------------
This list is for questions and discussion about MDAEMON. To unsubscribe 
from this mailing list send an email to md-support-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!-----------------------------------------------------

--------------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
--------------------------------------------------------------------------

Luciano Zanin - Jul 22, 2022 10:32 am (#4 Total: 4)  

 

Photo of Author
Luciano Zanin
Newbie
Newbie
Posts: 54
Thank you,
anyway since we're dealing with email messages the creation datetime and the last edit datetime should be the same.

Instead, I made a little edit to the script since the files can't be deleted because they result locked by "another process". The process is the script itself, adding a "-List" before " | Remove-Item "
solves the problem.



  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.