| From | Sent On | Attachments |
|---|---|---|
| ch...@i-p-d.com | May 15, 1998 2:50 am | |
| CyberPeasant | May 15, 1998 6:20 am | |
| ch...@i-p-d.com | May 15, 1998 11:59 am |
| Subject: | Re: temporary mail 40 MB copied to root | |
|---|---|---|
| From: | CyberPeasant (dj...@bedford.net) | |
| Date: | May 15, 1998 6:20:01 am | |
| List: | org.freebsd.freebsd-questions | |
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
-- <----. mail-to: dj...@bedford.net <----|=================================== <----' Zber Qnrzbaf, Srjre Qrivyf!
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message





