Summary:/var/spool/mail filling up

From: Darrell King <darrellk_at_altion.com>
Date: Fri, 06 Aug 1999 12:23:56 +0100

As usual thanks to all for speedy useful responses.
Jim Smart,Hank Lee,Peter Prymmer,alan,Brian Hostetter,Mike Iglesias,John J
Francini
Dr. Tom Blinn, Sheryl A Lemma,
***************************original
question****************************************
My /var/spool/mail directory keeps filling up is there any way of linking to
another directory.
I cannot find any reference to /var/spool/mail in any of the sendmail files.
All clients get their mail on W95 machines using outlook or netscape.
Not sure which version of sendmail it is.
unix version is 4.0d.
***************************solution*****************************************
**********
the quickest and easiest option, when i get a new disk i may use one of the
other options.

/sbin/init.d/sendmail stop
vdump -0f - -D /var/spool/mail | vrestore -xf - -D /data11/spool/mail
rm -R /var/spool/mail
ln -fs /data11/spool/mail /var/spool/mail
/sbin/init.d/sendmail start
***************************responses****************************************
*******
1)If you just have one or two users with huge mail files, you can move their
     mail file to a different directory and use soft links inside
/var/spool/mail
    to their mail files. If you don't see any huge mail files, perhaps there
is
a process writing to that partition. The best way to find out is the use the
lsof utility on /var/spool/mail.

I tried this and i kept getting an error of embedded link or something.
*********
2)Set the option to delete mail from server when collecting mail.
This was already set on all clients the reason it was filling up was
increased number of users and people offsite not collecting mail. Before i
did this i used to just mv large files to another disk temporarily and then
when people were around i would cat using >> to append to /var/spool/mail.
*********
3)We did just what you are suggesting a while back on one of our servers.
What
we did was create a new filesystem (AdvFS, so we could add more space as
needed), called it /usr-extra, and then moved of all the spool directory
over there. We created a soft link to /usr-extra/spool named spool.
Everything then went to the new, expanded file system.

There are a couple of drawbacks, however:

1. New releases, upgrades, etc. require that /var/spool NOT be a symbolic
link. So, when we wanted to do an upgrade, we turned off mail, removed the
symbolic link, and re-created the directory. Then after the upgrade was
complete, BEFORE turning on mail again (and it will automatically be turned
on after a re-boot unless you rename the start file in /sbin/rc3.d), you
will need to re-create the symbolic link. Only after you have done that can
you turn mail back on.

2. If you have quotas enabled for all of /usr, including user directories,
and the quota covers both personal directories and incoming mail, you will
need to create quotas for the new filesystem and adjust the quota space for
the personal directory. (Because they are on different file systems, they
can't count all together.)

This worked well for us as a stop-gap measure until we could purchase a new
server (probably a year and a half). When we got the new server (which is
strictly for student accounts, unlike the other one), we made sure to make
/usr part of an AdvFS file system so we could increase the space as needed.



Darrell King
Systems Manager
+353 1 6142430
darrellk_at_altion.com
087-2850314
Received on Fri Aug 06 1999 - 11:25:15 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT