atom feed3 messages in org.freebsd.freebsd-questionsRe: temporary mail 40 MB copied to root
FromSent OnAttachments
ch...@i-p-d.comMay 15, 1998 2:50 am 
CyberPeasantMay 15, 1998 6:20 am 
ch...@i-p-d.comMay 15, 1998 11:59 am 
Subject:Re: temporary mail 40 MB copied to root
From:ch...@i-p-d.com (ch@i-p-d.com)
Date:May 15, 1998 11:59:07 am
List:org.freebsd.freebsd-questions

From: CyberPeasant <dj@bedford.net>

ch@i-p-d.com wrote:

Hi,

Now that I have the temp-files of mail.local on var, with lots of empty space, mail.local managed to deliver 1 of 5 (!) 40 MB-messages in my root-inbox, cause it has been sent over 5 days ago, and wasnt able to deliver it..... I deleted the 4 others in the mailqueue. Now - obviously - I can't open the root-inbox no more. Is there a way to delete this message, without loosing all my other messages in the root in-box? Or do I just delete my whole root-file at /var/mail?

And in case you are wondering, I have set MaxMessageSize in sendmail at 2 MB now.......

The easiest thing is to get rid of the file, if the other messages are unimportant.

OK: lets say the others are important. THey will be located at the head of the file. Suppose you /know/ they are, total, less than 1 MB in size. Then to grab the first 1 MB of the file, use dd, as in:

dd if=/var/mail/root of=/tmp/somefile bs=1k count=1k

Now look at 'somefile' with vi, and work your way down to the start of the bad/big mail; Delete from there to the end of file.

then you can rm /var/mail/root, i.e. mv /tmp/somefile /var/mail/root

Be certain that the permissions are good! Should be rw-------, owned root.wheel

This can also be done with "head", or with "formail" but the dd is straightforward.

Dave

It worked! Thanks for all the help :)

Gina

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