Header RSS Feed
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup BSD Database Hacks Hardware Internet Linux Mail MySQL Monitoring Network Personal PHP Proxy Shell Solaris Unix Virtualization VMware Windows Wyse

Atmail increasingly uses disk space due to tmp files
Friday - Nov 30th 2012 - by - (0 comments)

In the past days I've been wondering about the following graph, which shows the root partition (/) of an Atmail server:

Atmail uses up disk space 

As you can see, the disk usage continuously grew over time but I didn't know why. I especially separated user mails, logs and MySQL databases to their own mountpoint and their own LV - but something was still eating up the root partition.

After a few du's, I finally got the reponsible directory: /usr/local/atmail/webmail/tmp. This seems to be the Atmail-internal tmp folder for the uploaded mail attachments in Atmail webmail. There were many old files, which obviously were never deleted. But why the heck would these files stay in a tmp folder?

While looking for an answer, I came across this Atmail Wiki post called "Performance Improvements":

Atmail Wiki delete tmp folders  (click to enlarge)

Unfortunately I do not know, how old this Wiki post is because on my current Atmail installation (6.6.0) the code looks completely different in application/modules/mail/controllers/AuthController.php:

//remove users tmp folder
//but only if not using memcache
$global = Zend_Registry::get('config')->global;
$useMemcache = (array_key_exists('cacheType', $global) && $global['cacheType'] == 'memcache');
     $usersTmpFolder = users::getTmpFolder();

The problem is, that the tmp files are not deleted if Memcache is activated in the Atmail settings. For whatever reason this might be...

Solution: Create a daily cronjob to delete old tmp files, e.g.:

find /usr/local/atmail/webmail/tmp -type f -mtime +7 -exec rm {} +

Update December 4th 2012:
Atmail acknowledged this bug and told me that a fix will become available in a later release of Atmail.


Add a comment

Show form to leave a comment

Comments (newest first):

No comments yet.

Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

6938 Days
until Death of Computers