<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div></div><br><br><br>-------- Original message --------<br>From: Phil'll Fix It Computers <phil@philfixit.info> <br>Date: 24/12/2013  13:47  (GMT+10:00) <br>To: "Ubuntu user technical support, not for general discussions" <ubuntu-users@lists.ubuntu.com> <br>Subject: Re: Imap trash settings <br> <br><br><div></div><div></div><br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div class="h5"> <br><br>On Sun, 22 Dec 2013 10:35:53 +0000, thufir wrote:<br><br>> I think you're asking what happens when a user trashes an e-mail from<br>> their client?  AFAIK, it's removed immediately, that's the point of<br>
> IMAP.  That's provided that they have the client configured to do so, in<br>> TB I believe there's a setting about that, what to do with deleted<br>> e-mails.<br><br>It's under Account Settings -> Server Settings<br>
<br>"when I remove a message"<br><br>x  move it to trash<br>   just mark deleted<br>   remove immediately<br><br><br>so, in the default setting above, I don't think TB is configured to tell <br>the IMAP server to remove it.  However, if the client has that box <br>
checked, then, yes, I think it happens right away.<br><br>Welcome to the mailing list :)<br><br>-Thufir<br><br><br>Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
<div><br></div></div></div><div>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.</div>
</div><br></blockquote><div><br></div><div><br></div><div>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.</div>
<div><br></div><div>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):</div>
<div><br></div><div><br></div><div>find /home -type f -name "*/Maildir/.Trash/cur/*" -mtime +30 -delete<br></div><div><br></div><div><br></div><div>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.</div>
<div><br></div><div>There may be other ways to tackle it as well, but something like this should work.</div><div><br></div><div>Preston</div><div><br></div><div><br></div><div><br></div><div><br></div><div>    Thanks for the welcome thufir!</div><div>    Great stuff preston, ill have a play around for a while now, thanks again.</div><div>    Phil</div><div><br></div><div><br></div><div>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.</div><div>Phil.</div><div><br></div><div><br></div><div><pre class="" style="background-color:rgb(207,217,255);color:rgb(0,0,0);font-size:13px;margin-top:0px;margin-bottom:0px;padding:3px;border:1px inset;width:1381.796875px;height:34px;overflow:auto">sfd</pre></div></div></div></div></div></div></div>
</body>