First of all I've checked these two solutions on serverfault but I'm still having issues.

Here's my problem:

root@myserver:/# mail
/tmp: No space left on device
  • Firstly I checked the filesystem usage by running df -k but all filesystem usage was under 25%
  • Then I ran df -i to check inode usage; maximum was 4% usage
  • I have emptied /tmp and /var/tmp and still get above error

Pertinent information:

  • I'm running Debian 6, postfix
  • Recently had to remove a number of rogue scripts which were planted in user www directories. They looked like this: https://stackoverflow.com/questions/3328235/how-does-this-giant-regex-work these were being used to send high volumes of spam, and I've checked the mail logs and mail queue to ensure spam is no longer being sent. As a result, mail logs had grown very quickly. I have archived the large mail logs to another machine / deleted them, and done the same with all other large files in /var/log

Here's the output of df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda              20G  4.0G   15G  22% /
tmpfs                 249M     0  249M   0% /lib/init/rw
udev                   10M  112K  9.9M   2% /dev
tmpfs                 249M     0  249M   0% /dev/shm
overflow              1.0M     0  1.0M   0% /tmp
  • Can you paste your df -h output in question? – Suku Jan 18 '13 at 12:23
  • Yeh - having problems with the mini-markdown in the comment box, newlines not allowed... – hazymat Jan 18 '13 at 12:27
  • hazymat, edit it into your question instead. – MadHatter Jan 18 '13 at 12:27
  • 2
    Your /tmp is 1M big... That's for too small. – Heis Spiter Jan 18 '13 at 12:28
  • @MadHatter Just trying to edit into the original question but formatting / tabs not lining up - give me a few secs... – hazymat Jan 18 '13 at 12:30
overflow              1.0M     0  1.0M   0% /tmp

You have only 1 MB of tmp space


In this way you can increase size of /tmp

sudo dd if=/dev/zero of=/usr/temp-disk bs=2M count=1024
sudo mke2fs -j /usr/temp-disk
sudo mke2fs -j /usr/temp-disk
sudo chmod 1777 /usr/temp-disk
sudo umount /tmp
sudo mount -t ext3 -o rw,noexec,nosuid,loop /usr/temp-disk /tmp
df -h
|improve this answer|||||
  • Thank you. I see your point - 1MB available space is not enough to run mail. How did it get that way? Can a filesystem mount automatically shrink if another requires more space? Sorry for the basic question. It's just that I never changed the available space myself, and mail always used to work. – hazymat Jan 18 '13 at 12:39
  • See my edit in answer. In that way you can increase /tmp space – Suku Jan 18 '13 at 12:41
  • Re: FS size; no, filesystem will not get shrink, although there are exceptional cases. In your case, asfaiu, increasing the size of /tmp will fix the issue. – Suku Jan 18 '13 at 12:46
  • 1
    @hazymat: To answer the "how did it get that way" question, see this page. – David Schwartz Jan 18 '13 at 13:50
  • David. Thanks so much for providing that link. Very interesting to learn. – hazymat Feb 5 '13 at 9:58

mail(1) is not part of postfix.

If postfix has problems sending or receiving mail, this will be logged by the mail.* facility of syslog.

You can check for postfix problems by following the DEBUG_README on www.postfix.org.

|improve this answer|||||
  • Thanks. I realised now mail is not part of postfix, I was just including the fact I run postfix as an aside. I don't have issues with the MTA itself, just the mail client. – hazymat Jan 18 '13 at 12:36
  • I'll edit the tags. – adaptr Jan 18 '13 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.