Imap trash settings
Phil'll Fix It Computers
phil at philfixit.info
Mon Dec 30 09:39:06 UTC 2013
-------- Original message --------
From: Phil'll Fix It Computers <phil at philfixit.info>
Date: 24/12/2013 13:47 (GMT+10:00)
To: "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com>
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
It's under Account Settings -> Server Settings
"when I remove a message"
x move it to trash
just mark deleted
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: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
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.
The command works perfectly if you put the full path after find, it complains that it doesn't like slashes in the -name category, so I just put *.* with the full path at the start and it seems to respect the mtime option, I haven't put it in as a cron job yet but as I say from the cli it behaves fine so far, thanks again.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users