Postifx SMTP server errors

I have a Debian server with Spam Assassin 3.1.7 and Postfix v. 2.3.8 .. I started getting Postfix SMTP server error - Insufficient system storage this past couple days. I have 70M of availble space. Mail is flowing but if I get this error, I have delete e-mails with huge attachments for mail to flow again. Since I'm a newbie at this, what files can I safely delete? Any temp files? Cached? Any advise is appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Your server may be set up so that at least your /var drive is in its own partition maybe?  This is normally where spooled and system account email is kept and that partition being full might be the reason things are locking up.

Type the following to see a list of partitions and how much free space is on each:

df -h

Any number of things could be causing your disk to fill up.  Running du can help you to localize where the directory that is the primary culprit.  

Run the following when in /var or /home and watch the output:

du -h

One thing I forgot to ask, is this just an SMTP gateway or does it house user mail boxes?  If its housing user mailboxes, what is it using to support them? (ie. are they system accounts, virtual accounts (like with Vpopmail) etc.)
davidndallasAuthor Commented:
Thanks for the quick reply .. I ran du -h on the /var drive and saw:
9.4 G ./lib
9.3 G ./lib/amavis
8.3 G ./lib/amavis/virusmails
Can I delete the contents on the virusmails?

Thiis box is a gateway .. no user mailboxes.
Hey MSSPs! What's your total cost of ownership?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

I haven't used Amavis before but its serves an identical purpose to Qmail-Scanner which I use all the time on my Debian Mail servers (ie. adds the ability to tie multiple mail scanners into the MTA queue) and I actually have a cron job that empties out my quarantine folder once a week.

To be on the safe side though, have a look for the following line in /etc/amavis/amavisd.conf:

$QUARANTINEDIR = '/var/lib/amavis/virusmails';

It should exist and, if it does, you should safely be able to empty out the contents of that directory (don't remove the directory itself though)  If for some reason, the directory has too many files in it to remove with the rm command, you may have to actually remove the directory to get rid of them all.  Just remember to make a note of the ownership and permissions on the directory so you can recreate it afterwards.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
davidndallasAuthor Commented:
I used the rm command and get an Argument list too long error, is there any other command besides deleting and recreating the folder? Just curious.
Yes I received that too if I waited to long to empty it out.

It should be safe to remove the virusmails directory as long as you recreate it with the exact same permissions and ownership.

You might want to shut down Postfix while you do this.
davidndallasAuthor Commented:
Ok .. I used the following command and it works like a charm.

find . -name 'virus-*' | xargs rm

All the files started with either "virus" or "spam".

Thank you for your help.
davidndallasAuthor Commented:
Thank you again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.