Date: Sun, 8 Dec 2002 00:19:45 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@FreeBSD.ORG Subject: Re: Mail resending Message-ID: <20021208001945.GA4634@happy-idiot-talk.infracaninophi> In-Reply-To: <916F009B-0A35-11D7-9E57-000393681B06@lafn.org> References: <20021207221430.2982.qmail@cat.math.uic.edu> <916F009B-0A35-11D7-9E57-000393681B06@lafn.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021208001945.GA4634>