From owner-freebsd-questions Fri May 15 06:22:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA22058 for freebsd-questions-outgoing; Fri, 15 May 1998 06:22:14 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from lucy.bedford.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA22046 for ; Fri, 15 May 1998 06:22:03 -0700 (PDT) (envelope-from listread@lucy.bedford.net) Received: (from listread@localhost) by lucy.bedford.net (8.8.8/8.8.8) id JAA19040; Fri, 15 May 1998 09:20:22 -0400 (EDT) (envelope-from listread) Message-Id: <199805151320.JAA19040@lucy.bedford.net> Subject: Re: temporary mail 40 MB copied to root In-Reply-To: <199805150751.JAA04896@i-p-d.com> from "chem@i-p-d.com" at "May 15, 98 09:51:04 am" To: chem@i-p-d.com Date: Fri, 15 May 1998 09:20:22 -0400 (EDT) Cc: questions@FreeBSD.ORG Reply-to: djv@bedford.net From: CyberPeasant X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG chem@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: djv@bedford.net <----|=================================== <----' Zber Qnrzbaf, Srjre Qrivyf! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message