Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2004 12:18:41 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Doug Hardie <bc979@lafn.org>, freebsd-questions@freebsd.org
Subject:   Re: I need to resend messages from dead.letters
Message-ID:  <20040113121841.GC23956@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20040113092421.GA73594@users.munk.nu>
References:  <63340-22004121311314124@M2W045.mail2web.com> <D6028309-4577-11D8-98C2-000393681B06@lafn.org> <20040113092421.GA73594@users.munk.nu>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040113121841.GC23956>