There's a bulk-mailer program out there which won't work on my machine
for various reasons, so I added some lines to digest (but you could for
resend too) to split the list into several smaller lists and send to
them. This requires sendmail aliases for each of the smaller lists and
right now I am just assuming that the number of split lists will remain
the same, cause if they don't I'll be sending mail to the wrong number
of files. Also because I was lazy I just used the unix sort and split
commands, so the resulting code looks something like this:
# ****** Now I REALLY get to muck with things... Reduce list to
# ****** groups of 400 people and mail each of them.
$ourreally=$V{'REALLY-TO'};
$ourreally=~ s/-outgoing$//g;
$ourpath="/usr/bacchus/lists/$ourreally";
system("/bin/sort -t\@ +1f -2 $ourpath > $ourpath.out");
unlink <$ourpath.split*>;
system("/usr/bin/split -400 $ourpath.out $ourpath.split");
# ****** now we have ? number of split files to send mail to.
system("/usr/lib/sendmail -odq $ourreally-outgoaa < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoab < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoac < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoad < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoae < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoaf < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoag < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoah < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoai < $DIGEST &");
system("/usr/lib/sendmail -odq $ourreally-outgoaj < $DIGEST &");
This has really helped speed up our mailing time because we don't have
to wait so long for slow hosts to respond. Of course you need aliases
for the listname-outgoxx files, and as I said right now I'm limited to
4000 users by this method (since I split it into 400 line files and
assume that there are no more than 10 resulting files).
- shawn
References:
|
|