#436266 courier-imap: Do not purge messsages from trash by default

Package:
courier-imap
Source:
courier
Description:
Courier mail server - IMAP server
Submitter:
Olaf van der Spek
Date:
2025-06-13 18:55:02 UTC
Severity:
important
Tags:
#436266#5
Date:
2007-08-06 17:28:43 UTC
From:
To:
Hi,

I think not purging messages from trash after 7 days by default is a lot safer.
Users (probably) do not expect this 'feature'.

#436266#10
Date:
2007-08-06 18:54:47 UTC
From:
To:
Olaf van der Spek wrote:

On the other hand trash will overflow at some point and system administrators
don't expect this :-).

What about increasing the number of days ?

Regards
	Racke

#436266#15
Date:
2007-08-06 20:21:55 UTC
From:
To:
Are you sure?
Storage capacity is huge and users (AFAIK) always have to clean up
folder (not just trash) manually.

That'd be a nice start.

#436266#20
Date:
2007-11-23 12:42:19 UTC
From:
To:
Hi,

What is the progress on this bug?

I'm now running with "IMAP_EMPTYTRASH=" but now all mails from my trash
folder are deleted.
Could this be another bug?

Greetings,

Olaf

#436266#25
Date:
2008-04-01 14:30:54 UTC
From:
To:
Hi Stefan,

Do you have time to work on this bug?

Greetings,

Olaf

#436266#30
Date:
2010-02-28 16:12:48 UTC
From:
To:
Any updates?
If you don't have enough time, it might be an idea to just say so.

#436266#35
Date:
2010-03-03 08:37:22 UTC
From:
To:
Olaf van der Spek wrote:

Are the emails copied to the trash folder? This depends on your mail client,
as the standard configuration for expunging emails in /etc/courier/imapd is:

##NAME: IMAP_MOVE_EXPUNGE_TO_TRASH:0
#
# Set IMAP_MOVE_EXPUNGE_TO_TRASH to move expunged messages to Trash.  This
# effectively allows an undo of message deletion by fishing the deleted
# mail from trash.  Trash can be manually expunged as usually, and mail
# will get automatically expunged from Trash according to IMAP_EMPTYTRASH.
#
# NOTE: shared folders are still expunged as usual.  Shared folders are
# not affected.
#

IMAP_MOVE_EXPUNGE_TO_TRASH=0

Regards
	Racke

#436266#40
Date:
2010-03-03 13:25:27 UTC
From:
To:
I'm using Thunderbird. I'm not sure what you're asking.
#436266#45
Date:
2010-04-30 11:53:55 UTC
From:
To:
The upstream default appears to be to not deleting anything. Could you
please change to this default

#436266#50
Date:
2010-05-03 21:04:20 UTC
From:
To:
severity 436266 serious
thanks

This one leads to data loss...

#436266#57
Date:
2010-05-04 08:11:05 UTC
From:
To:
severity 436266 important
thanks

I don't consider this a serious data loss. Volatile and discarded
data has to be purged at some point.

Of course, the default setting can still be debated.

Regards
         Racke

#436266#64
Date:
2010-05-04 11:27:01 UTC
From:
To:
You may not, others may...

Not really. Not everyone is space constrained.

Can or will?
This bug has been open for years.

Olaf

#436266#69
Date:
2017-05-09 06:24:34 UTC
From:
To:
Hi,

reading through this bug, I can understand the motivation of the OP to
to not delete messages from the trash by default. It's a conservative
default.

However, to me, the main reason speaking against changing the default is
that such a change would increase the deviation of the Debian provided
package from upstream. And they might have their good reasons to choose
such a default. I'm therefore going to discuss this with upstream.

Olaf van der Spek <Olaf@XWIS.Net> wrote:

That clearly sounds like a bug to me. I'll check this and report back.

Kind Regards

Markus Wanner

#436266#76
Date:
2020-12-27 16:30:43 UTC
From:
To:
1.  when set to "IMAP_EMPTYTRASH=" it default to 0 so all the mail are
deleted of course.. is not important but of course an misc on code.. but
this are from 2017 so must be recheck with recent versions.. of course i
canot test with debian package cos does not build property

2. reported does not know what are doing.. when ask if all mail are moved
to trash with some sets of configuration doe snot know what are talking
about.. also does not read the hole documentation.. neither set the
IMAP_MOVE_EXPUNGE_TO_TRASH var property or IMAP_EMPTYTRASH variable in a
high number.

the only bug here is when there's no definition for IMAP_EMPTYTRASH= but is
a minor bug.. sysadmin or reported does not read property at documentation
or standard ..

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

#436266#81
Date:
2025-03-29 20:24:30 UTC
From:
To:
I have recently started maintaining Courier.  I am sympathetic to this
request as I personally have disabled this setting and it took me a
bit of work to figure out why the emails in my trash were disappearing
(I assumed it was being done by one of the many clients I have
connected to my account).

However, I am also resistant to deviating from upstream.

I have created a feature request upstream to see if they would be
amenable to changing it there.

https://github.com/svarshavchik/courier-libs/issues/41

Those interested in this issue should feel free to join that
conversation.

#436266#86
Date:
2025-06-13 18:53:45 UTC
From:
To:
I added the following documentation about how to modify the purging of
messages from the trash to README.Debian.

https://salsa.debian.org/debian/courier/-/blob/master/debian/courier-imap.README.Debian?ref_type=heads#L8-11

I am not closing this bug yet, as I am still determining if I should change
the default behavior in Debian (or if there ends up being consensus upstream
that it should be changed).  But adding documentation about it seemed like an
obvious step forward.

Personally, before I became the Courier maintainer, I ran into this problem
myself.  I assumed it was one of the clients I used that was deleting the
emails.  It took me quite a while before I looked at the Courier IMAP
settings, because it didn’t occur to me that the server would be deleting any
emails by default.

#436266#89
Date:
2025-06-13 18:53:45 UTC
From:
To:
I added the following documentation about how to modify the purging of
messages from the trash to README.Debian.

https://salsa.debian.org/debian/courier/-/blob/master/debian/courier-imap.README.Debian?ref_type=heads#L8-11

I am not closing this bug yet, as I am still determining if I should change
the default behavior in Debian (or if there ends up being consensus upstream
that it should be changed).  But adding documentation about it seemed like an
obvious step forward.

Personally, before I became the Courier maintainer, I ran into this problem
myself.  I assumed it was one of the clients I used that was deleting the
emails.  It took me quite a while before I looked at the Courier IMAP
settings, because it didn’t occur to me that the server would be deleting any
emails by default.