On Sun, 22 Jun 2025 05:54:27 -0500
"Administrator :: pLAN9" <ad...@plan9.co> wrote:

> Thanks for the reply. Is this setting global to all mailboxes? Just 
> because I have 5 email accounts on the server. Ideally I would like
> to have just the account that the cameras use to be auto emptied. Can
> this setting be applied to only certain users/folders?

I think it is global setting. As the config file is actually a shell
script, it is probably possible to do something on a per mailbox base.
I don't know. But you can create a special folder for your videos, not
used for other mailboxes, and apply the setting for this.

From imapd config file:

------- 8< --------------------------------------------------------------

##NAME: IMAP_EMPTYTRASH:0
#
# The following setting is optional, and causes messages from the given
# folder to be automatically deleted after the given number of days.
# IMAP_EMPTYTRASH is a comma-separated list of folder:days.  The default
# setting, below, purges 7 day old messages from the Trash folder.
# Another useful setting would be:
#
# IMAP_EMPTYTRASH=Trash:7,Sent:30
#
# This would also delete messages from the Sent folder (presumably copies
# of sent mail) after 30 days.  This is a global setting that is applied to
# every mail account, and is probably useful in a controlled, corporate
# environment.
#
# Important: the purging is controlled by CTIME, not MTIME (the file time
# as shown by ls).  It is perfectly ordinary to see stuff in Trash that's
# a year old.  That's the file modification time, MTIME, that's displayed.
# This is generally when the message was originally delivered to this
# mailbox.  Purging is controlled by a different timestamp, CTIME, which is
# changed when the file is moved to the Trash folder (and at other times too).
#
# You might want to disable this setting in certain situations - it results
# in a stat() of every file in each folder, at login and logout.
#

------- 8< --------------------------------------------------------------

If you use folder name like KeptFor90Days and set in your imapd config

IMAP_EMPTYTRASH=KeptFor90Days:90

it should do what you want (and you can expect nobody else to use such
a weird folder name in their mailbox).

Regards,
Milan

> On 6/22/25 5:32 AM, Milan Obuch wrote:
> > On Sun, 22 Jun 2025 04:31:29 -0500
> > "Administrator :: pLAN9 via Courier-imap"
> > <courier-imap@lists.sourceforge.net> wrote:
> >  
> >> Hello, I've been a very happy courier-imap user for over 10 years
> >> now for my personal mail server. I wanted to know if courier-imap
> >> has any mechanism built in for mail retention. About a year ago I
> >> added an email account on the server for my security cameras, and
> >> configured them to email me 15 second videos when motion is
> >> detected.  This work fine, but the size of the inbox is growing to
> >> over 10GB in size. This makes it a bit slow for initial syncs of
> >> the inbox. Does courier-imap offer a way to, perhaps, only keep
> >> the last 60 or 90 days of mail, and delete older ones? The server
> >> is running Arch, btw. Thanks! 
> > Hi,
> >
> > look for IMAP_EMPTYTRASH settings in imapd config file. I think this
> > could be what you are looking for.
> >
> > Regards,
> > Milan  


_______________________________________________
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to