Skip to content

Commit

Permalink
restrict mailbox scanner to messages of last two months
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Oct 16, 2024
1 parent d846a3d commit 65f3d9c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ protected PasswordAuthentication getPasswordAuthentication() {
for (Message msg : allMessages) {

if (msg.getReceivedDate() != null) {
if (msg.getReceivedDate().getTime() < (currentTimeStamp - (1000l * 60l * 60l * 24l * 31l * 3l))) {
log.info("Message '" + msg.getSubject() + "' is older than three months and will not be processed");
if (msg.getReceivedDate().getTime() < (currentTimeStamp - (1000l * 60l * 60l * 24l * 31l * 2l))) {
log.info("Message '" + msg.getSubject() + "' is older than two months and will not be processed");
continue;
}
}
Expand Down

0 comments on commit 65f3d9c

Please sign in to comment.