[ un-cc lkml ] On Mon, 2005-07-11 at 19:16 -0400, Hal Rosenstock wrote: > > [ also, in future patch bombs, could you please set the references > > header so that the message thread properly, thanks ] > > How do I do this ?
Attached is the script I use to sent patchbombs. Thanks to Greg Kroah and Roland Dreier. -tduffy #!/usr/bin/perl -w # horrible hack of a script to send off a large number of email messages, # one after each other, all chained together. This is useful for large # numbers of patches. # # Use at your own risk!!!! # # greg kroah-hartman Jan 8, 2002 # <[EMAIL PROTECTED]> # # modifications by Roland Dreier <[EMAIL PROTECTED]> June 30, 2004 # changes by Tom Duffy <[EMAIL PROTECTED]> July 15, 2004 # - include references header for better threading # # Released under the artistic license. # # # modify these options each time you run the script # $to = '[email protected]'; #$to = '[EMAIL PROTECTED]'; #$to = '[EMAIL PROTECTED]'; # If you want to chain the first post, fill this in $initial_reply_to = ''; # a list of patches to send out @files = ( ['0-message','Use Linux standard linked lists'], ['dat1','convert the cr list to linux native'], ['dat2','convert the lmr list to linux native'], ['dat3','convert the rmr list to linux native'], ['dat4','convert the pz list to linux native'], ['dat5','convert the evd list to linux native'], ['dat6','convert the psp and rsp lists to linux native'], ['dat7','convert the srq list to linux native'], ['dat8','convert the hcas ia list to linux native'], ['dat9','remove all vestiges of dapls linked list implementation'], ); # count to start subject line [PATCH][n/N] part from $initial_count = 0; # Put your name and address here $from = 'Tom Duffy <[EMAIL PROTECTED]>'; # Don't need to change anything below here... use Mail::Sendmail; # we make a "fake" message id by taking the current number # of seconds since the beginning of Unix time and tacking on # a random number to the end, in case we are called quicker than # 1 second since the last time we were called. sub make_message_id { my $date = `date "+\%s"`; chomp($date); my $pseudo_rand = int (rand(4200)); $message_id = "<[EMAIL PROTECTED]>"; print "new message id = $message_id\n"; } sub send_message { %mail = ( To => $to, From => $from, Subject => $subject, Message => $message, 'In-Reply-To' => $reply_to, 'References' => $references, 'Message-ID' => $message_id, 'X-Mailer' => "Evolution 2.2.2", 'Content-Transfer-Encoding' => "8bit", ); $mail{smtp} = 'localhost'; sendmail(%mail) or die $Mail::Sendmail::error; print "OK. Log says:\n", $Mail::Sendmail::log; print "\n\n" } $reply_to = $initial_reply_to; $references = $reply_to; make_message_id(); $count = $initial_count; $tot = $#files + $initial_count; foreach $t (@files) { $F = $$t[0]; open F or die "can't open file $$t[0]"; undef $/; $message = <F>; # slurp the whole file in close F; $/ = "\n"; $subject = "[PATCH $count/$tot] kDAPL: " . $$t[1]; send_message(); # sleep 10; # set up for the next message $reply_to = $message_id; $references = $references . " " . $message_id; make_message_id(); ++$count; } _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
