# -*- Perl -*-
# This is a generic TLB config file, for use with Majordomo.
# Options:
#  -l: the name of the list
#  -a: call archive2 to do list archiving.
#  -b: call digest to handle the digesting.  (You still need to define the
#      digest list in the normal way.)
$list_name = $opt_l;

# We could require majordomo.cf here, but I want to avoid possible variable
# conflicts.
# Take these from majordomo.cf:
$homedir = "/usr/local/lists/majordomo";
$listdir = "/usr/local/lists/lists";
$filedir = "/usr/local/lists/archive";
$filedir_suffix = "";
$digest_work_dir = "/usr/local/lists/digest";
$whereami = "hpc.uh.edu";

$address_file = "$listdir/$list_name";
$sender = "owner-$list_name\@$whereami";

# This is the mailer we will use to make deliveries if we can't connect to
# any of the hosts defined later.  It must speak SMTP on standard input and
# output.
$local_mailer = "/usr/sbin/sendmail -bs";

# Define your hosts here.  There are many parameters you may use; check the
# documentation for more info.
%host1   = ('hostname' => 'mailhost.dom.ain',
	   'port'     => 'smtp',
	   'timeout'  => 20,
	  );

%host2 = ('hostname' => 'otherhost.dom.ain',
	   'port'     => 'smtp',
	   'timeout'  => 20,
	  );

# Now the delivery matrix.  There are plento of other batching parameters
# you can use.  Check the documentation for more info.
@delivery_matrix = (
		    {
		      'hosts'      => [ \%host1, \%host2 ],
                      'minseparate'=> 3,
		      'maxdomains' => 10,
		     },
		   );

# We set up the list of external programs to call, depending on what
# options we were given.  You can add your own in this manner; the
# documentation has more info.
if ($opt_a) {
  $send_to_externals = 1;
  push(@external_programs,
       {
	'commandline' => "$homedir/archive2 -a -m" .
	  " -f /usr/local/lists/archive/type-o/type-o",
	'pipemessage' => 1,
	'needsfrom'   => 1,
       }
      );
}

if ($opt_b) {
  $send_to_externals = 1;
  push(@external_programs,
       {
	'commandline' => "$homedir/digest -r -C -l $list_name-digest" .
	  " $list_name-digest-outgoing",
	'pipemessage' => 1,
	'needsfrom'   => 1,
       }
      );
}

# Don't delete this 1.
1;
