re-delivering email

Peter Barker pbarker at barker.dropbear.id.au
Fri Aug 10 12:20:51 EST 2001


On Fri, 10 Aug 2001, Grant Morphett wrote:

> going to the root user by default.  I will investigate that shortly
> but the urgent thing is to get that huge file re-delivered to all the
> correct users.  Ideas on how I should do this automatically would be
> great otherwise I will spend an hour or two doing it by hand.

Unfortunately, a lot of machines nowadays only bounce partial messages, so
that may be a problem.

What you may be able to do is hack something up in perl to rip apart the
MIME messages and resend them.

Basically:
 - slurp the mailbox
 - split the mailbox into separate messages (the flip-flop operator is
apparently good for this :-)
 - use one of the MIME perl libraries out there to put each message into a
structure
  - check the mimetype, make sure it is appropriate (MILTIPART/REPORT?)
  - check the structure, make sure it is of the appropriate shape
 - take the bounced message out of the bounce message structure
 - resend the bounced message (using a Perl::SENDMAIL library?)

Hmmmm.... perhaps it _would_ be easier to do it by hand :-)

Of course, doing it once - do it by hand. Doing it twice, automate it...

> cheers

Yours,
-- 
Peter Barker                          |   N    _--_|\ /---- Barham, Vic 
Programmer,Sysadmin,Geek              | W + E /     /\                
pbarker at barker.dropbear.id.au         |   S   \_,--?_*<-- Canberra      
You need a bigger hammer.             |             v    [35S, 149E]   
"When used legally and in its intended fashion, the Acrobat eBook Reader secures eBooks purchased by locking the eBook to the hardware from which it was purchased." -- Adobe press release





More information about the linux mailing list