Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

attachments cleanup issue from server...

Quote Reply
attachments cleanup issue from server...
Hi,

Say users are attaching attachment and midway without deleting the attachments, they decide to abondon the composing of mails and move on to other page. The attachment stays on the server. This could lead to a gradual buildup of unwanted data on the server. There could be other conditions like browser crash/ system reboot etcetc which could cause this build up.

Is there a way to clean up all such attachments and directories of attachments.?

Thnx

Anup
Quote Reply
Re: [anup123] attachments cleanup issue from server... In reply to
This shouldn't happen to such a large degree as attachments are cleaned up each time a user sends an email.

Adrian
Quote Reply
Re: [brewt] attachments cleanup issue from server... In reply to
The attachments are cleaned under normal sequence of operations but the directories still remain under the upload directory. Shouldn't these directories be also removed upon sending of the mail else there will be empty directories under the upload directory and this could really build up with passage of time.

Anup
Quote Reply
Re: [brewt] attachments cleanup issue from server... In reply to
Hi Adrian.

I just checked the ADMIN user on disk and found almost 40 empty directory (attachments). These are all there and accumulating slowly with every attachment mail and though the attachment gets cleaned up, the directories still remain.

With a large number of users, it could end up with a million of such directories on server . Wouldn't it be better if the directory is also removed after the attachment is removed once the mail is sent.

Thnx

Anup
Quote Reply
Re: [anup123] attachments cleanup issue from server... In reply to
I'll look into changing this tomorrow.

Adrian
Quote Reply
Re: [brewt] attachments cleanup issue from server... In reply to
Thnx. Once done, would the already existing defunct directories have to be removed manually or it would be taken care of by the changes thought of by you?

Anup
Quote Reply
Re: [anup123] attachments cleanup issue from server... In reply to
I looked into it a little more just now and it seems that it does in fact clean up the old attachment directories as well. It does however wait till they're a day old before cleaning up (not entirely true - if you're running under mod_perl it will only clean up only when mod_perl is restarted. A bug that will be fixed).

Adrian
Quote Reply
Re: [brewt] attachments cleanup issue from server... In reply to
I checked for admin@localhost and found that the directories and attachments never get cleaned up. For the normal user however, restarting httpd does prevent the build up under mod_perl (im running under mod_perl). ls -alR reveals a figure of 532 for admin@localhost and everytime the welcome message is edited it would increase further leaving the old directories and attachments there.

Thnx

Anup
Quote Reply
Re: [anup123] attachments cleanup issue from server... In reply to
Ahh, it looks like the admin's upload directory isn't cleaned up (as it's handled in a different bit of code). I'll get that fixed up.

Adrian