Imap trash settings

Phil'll Fix It Computers phil at
Tue Dec 24 02:47:49 UTC 2013

-------- Original message --------
From: Preston Hagar <prestonh at> 
Date: 24/12/2013  03:22  (GMT+10:00) 
To: Phil'll Fix It Computers <phil at>,"Ubuntu user technical support, not for general discussions" <ubuntu-users at> 
Subject: Re: Imap trash settings 
On Sun, Dec 22, 2013 at 1:14 PM, Phil'll Fix It Computers <phil at> wrote:

From: thufir <hawat.thufir at> 
Date: 22/12/2013 21:45 (GMT+10:00) 
To: ubuntu-users at 
Subject: Re: Imap trash settings 

On Sun, 22 Dec 2013 10:35:53 +0000, thufir wrote:

> I think you're asking what happens when a user trashes an e-mail from
> their client?  AFAIK, it's removed immediately, that's the point of
> IMAP.  That's provided that they have the client configured to do so, in
> TB I believe there's a setting about that, what to do with deleted
> e-mails.

It's under Account Settings -> Server Settings

"when I remove a message"

x  move it to trash
   just mark deleted
   remove immediately

so, in the default setting above, I don't think TB is configured to tell 
the IMAP server to remove it.  However, if the client has that box 
checked, then, yes, I think it happens right away.

Welcome to the mailing list :)


Modify settings or unsubscribe at:

If you do not empty your trash manually (which a lot of users wont do) how long until the server removes them or will they sit in trash forever. Is there a setting to say automatically remove messages from trash that have resided there for more than 30 days.

By default (and in most common configurations that I have seen), there is nothing in Postfix or Dovecot that will auto delete any emails out of any folders.  It is up to the user/client settings to clear out the trash folders.

That said, if this is something you want, you could tackle it lots of ways.  Probably the easiest would be a cron job that runs a find command similar to this (untested, please test it a lot before trusting it):

find /home -type f -name "*/Maildir/.Trash/cur/*" -mtime +30 -delete

Basically, you are searching in this case /home (change that to be where you keep your maildirs), for .Trash folders (again, change as needed) and deleting out all files with a modification time greater than 30 days.  You could put it in a cron job and have it run daily.

There may be other ways to tackle it as well, but something like this should work.


    Thanks for the welcome thufir!
    Great stuff preston, ill have a play around for a while now, thanks again.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list