[rt-users] sendmail with e-mail
Jeff Ballard
ballard at engr.wisc.edu
Fri Aug 31 09:13:17 EDT 2001
I have a handy script to take a MBOX file and resend it. As root:
------ Begin Included File
#!/usr/bin/perl
# (c)2001 Jeff Ballard <ballardATengr.wisc.edu>
$DESTINATION = "your_rt_address\@your.site";
while(<>) {
if ($_ =~ /^From /) {
$first++;
open (FILE, "| sendmail $DESTINATION");
#open (FILE, "| cat");
}
print FILE $_;
}
------- End Included File
(extra $_'s added for clarity).
Its run by:
./resend_mbox.pl < mboxfilename
Now, granted, if you have 30,000 messages, it could be slow, but its an option
nevertheless. I use it for when people leave, but forget to forward their
mail. I have them set a forward, then run the resender on it. In the popular
MUA's (eg Eudora), they look at the headers of the original message to get the
date it was sent. I don't think RT will (so all of them will probably start
at 0sec old).
Regards,
-Jeff
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jeff Ballard <ballard at engr.wisc.edu> 608-265-5090
Unix Systems Manager
Computer-Aided Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 245 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20010831/dcd4939d/attachment.sig>
More information about the rt-users
mailing list