From owner-freebsd-questions@FreeBSD.ORG Tue Jan 13 04:18:49 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A774916A4CE for ; Tue, 13 Jan 2004 04:18:49 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE90343D55 for ; Tue, 13 Jan 2004 04:18:45 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i0DCIgfn051708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jan 2004 12:18:42 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i0DCIffO051610; Tue, 13 Jan 2004 12:18:41 GMT (envelope-from matthew) Date: Tue, 13 Jan 2004 12:18:41 +0000 From: Matthew Seaman To: Doug Hardie , freebsd-questions@freebsd.org Message-ID: <20040113121841.GC23956@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Doug Hardie , freebsd-questions@freebsd.org References: <63340-22004121311314124@M2W045.mail2web.com> <20040113092421.GA73594@users.munk.nu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R+My9LyyhiUvIEro" Content-Disposition: inline In-Reply-To: <20040113092421.GA73594@users.munk.nu> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on happy-idiot-talk.infracaninophile.co.uk Subject: Re: I need to resend messages from dead.letters X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2004 12:18:49 -0000 --R+My9LyyhiUvIEro Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 13, 2004 at 09:24:21AM +0000, Jez Hancock wrote: > On Mon, Jan 12, 2004 at 07:23:20PM -0800, Doug Hardie wrote: > > There was a problem last night with my mail server and a bunch of mail= =20 > > went into the dead.letters mailbox rather than being sent. I have that= =20 > > mailbox and need a way to send all of those messages. I split them out= =20 > > into individual files, but there are just too many to send by hand. Is= =20 > > there a way to cause them all to be resent? > Look at the -f option to the mail command - see the manpage for mail(1) > for more info. Hmmm.. I don't think that's quite what the OP wanted. One solution is to install the procmail port (ports: mail/procmail) which contains a stunningly useful utility called formail(1). Amongst formail's many talents is the ability to split up a mbox format mailbox into individual messages and pipe each into a program. So in order to resend all of the messages in your dead.letter you could try: % formail -s /usr/sbin/sendmail -v -t -oiee < dead.letter Or to split up the dead.letter mailbox into individual numbered messages: % formail -s /bin/sh -c 'cat > msg.$FILENO' < dead.letter and you can pipe each message into sendmail as above to re-send it: % /usr/sbin/sendmail -v -t -oiee < msg.999 Nb. be careful when doing this sort of thing, or you'll spray e-mails all over the place and make yourself quite unpopular. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --R+My9LyyhiUvIEro Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAA+IhdtESqEQa7a0RAmZOAJ9QNd6gVzMrEIejMifstTSxFp11zwCglYcf VOWKCwLEG0BlV65Z3Rvk4m8= =/5sq -----END PGP SIGNATURE----- --R+My9LyyhiUvIEro--