3

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
hazymat
  • 390
  • 1
  • 7
  • 16

2 Answers2

4
overflow              1.0M     0  1.0M   0% /tmp

You have only 1 MB of tmp space

EDIT:

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
Suku
  • 2,006
  • 13
  • 15
  • 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](http://mancoosi.org/~abate/mountoverflowtmp). – David Schwartz Jan 18 '13 at 13:50
  • David. Thanks so much for providing that link. Very interesting to learn. – hazymat Feb 05 '13 at 09:58
0

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.

adaptr
  • 16,479
  • 21
  • 33
  • 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