From owner-freebsd-questions Sat Dec 7 16:20: 2 2002 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 B64FC37B401 for ; Sat, 7 Dec 2002 16:20:00 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D3CD43E4A for ; Sat, 7 Dec 2002 16:19:59 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gB80Jo46004829 for ; Sun, 8 Dec 2002 00:19:50 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gB80JjHg004828 for freebsd-questions@FreeBSD.ORG; Sun, 8 Dec 2002 00:19:45 GMT Date: Sun, 8 Dec 2002 00:19:45 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: Mail resending Message-ID: <20021208001945.GA4634@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <20021207221430.2982.qmail@cat.math.uic.edu> <916F009B-0A35-11D7-9E57-000393681B06@lafn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <916F009B-0A35-11D7-9E57-000393681B06@lafn.org> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-3.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, USER_AGENT,USER_AGENT_MUTT version=2.43 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 07, 2002 at 02:45:22PM -0800, Doug Hardie wrote: > One of our system accounts had all its mail blocked and there now are > over 500 emails in dead.letter that need to be resent. Is there a way > to send them (either from dead.letter or from separate files) without > having to do each one individually? I haven't been able to find any > way using mail or sendmail. If you can split up the dead.letter mailbox into individual messages, you can just pipe each message into sendmail to resend it. A handy way of doing that is to install the procmail port (ports/mail/procmail) and use the formail(1) command which is part of that, to feed each message one by one into sendmail: formail -s /usr/sbin/sendmail -t -oi -oem < dead.letter [Those sendmail arguments mean: -t Read message headers to find destination addresses -oi Ignore dots '.' alone on a line as end-of-message indicators -oem Return errors by e-mail. This mode never writes to dead.letter, which is handy for this particular job.] Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message