Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Aug 2001 01:23:57 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Brown - Ozxpress Support <brown@ozxpress.com.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: need help with mailserver
Message-ID:  <Pine.BSF.4.21.0108220115460.34199-100000@ren.sasknow.com>
In-Reply-To: <001301c12ad7$62f8eae0$e66386cb@cnnet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Brown - Ozxpress Support wrote to freebsd-questions@FreeBSD.ORG:

> Hi, i have just done a fresh install of freebsd 4.3 using the default
> partition sizes, and /var is so small that it keeps filling up with
> mail. Is there an easy way to either resize the partition without
> losing data, or to move the mail to a new location?

If you can swing it, resizing the partition is a good solution. But, you
will have to delete /var, and probably an adjacent partition, then
recreate, label, and newfs them both, and restore your data. Arguably,
this is a considerable pain.

You can indeed just move your mail, though.

1. kill `head -1 /var/run/sendmail.pid`
2. cp -Rp /var/mail /usr/mail
3. rm -Rf /var/mail 
or mv /var/mail /var/mail.backup
4. ln -s /usr/mail /var/mail
5. sendmail -bd

--------------------------------
In plain English:

1. Kill the sendmail server so that it does not attempt local delivery.
If you have a busy system, local delivery while you're moving the files
would probably result in lost mail.
2. Copy /var/mail to /usr/mail (with permissions and ownership intact!)
3. I recommend keeping a backup of /var/mail in /var/mail.backup until
you're sure everything went Ok. When you're confident enough (tomorrow
maybe), delete /var/mail
4. Create a symbolic link from /usr/mail to /var/mail
5. Restart the sendmail daemon


Now, all of your mail will be stored in /usr/mail



> Thanks
> 
> ps sorry if i posted this to the wrong list...

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0108220115460.34199-100000>