The hash and domain parts are then tested against successive lines of splitfile (default is dir/split). If a match is found, the request is forwarded to the corresponding sublist, and ezmlm-split exits 99. If a match is not found or action is not -subscribe or -unsubscribe, ezmlm-split exits 0.
In splitfile, blank lines and lines with ``#'' in position 1 are ignored. Other lines are expected to be of the format ``dom:low:hi:list@host'', where ``dom'' is the top level domain, ``low''-``hi'' the range of the hash (defaults 0 and 52), and ``list@host'' the name of the corresponding list (default is the local list). A line is considered to match if the address hash is between ``low'' and ``hi'' inclusive and ``dom'' is empty, or if the ``domain key'' matches ``dom'' for the full length of ``dom''. Thus, the address ``user@aol.com'' would match ``com'' and ``aol.com'', but not ``host.com''.
If the domain specified is the top level domain up to 3 characters, the split is identical as that used by the SQL subscriber interface. This is recommended. There can be several entries for a given sublist.
ezmlm-split can be used also for list with SQL-based sublisting. In this case, addresses matching the splitfile are forwarded to the respective non-SQL sublist, and non-matching addresses are handed by the SQL sublist.
Subscribers will receive all messages 'From:' the main list. When they subscribe or unsubscribe, the request will be forwarded to the appropriate sublist, which will handle the confirmation. All information, except bounce-bottom refers the user to the main list. Thus, to the user the list appears as a single list with the address of the main list, and distribution among sublists is at the discretion of the administrator of the main list.
To remove a sublist, edit the lines for that sublist in the splitfile to point to another list, and add the existing subscribers of the removed sublist to the sublist taking the load. When splitting a sublist into several sublists, create the new sublists, and edit the split file to distribute the load between them (usually by hash). Process the subscribers of the old list with:
| ezmlm-split -D dir | sort | programwhere to get one file of addresses per new sublist, ``program'' could be:
#!/usr/bin/perl while (<>) { ($f,$t) = split (':'); $t =~ s/^ //; if ($f ne $of) { $of = $f; close(OUT) if ($of); open(OUT,">$f") or die("Unable to open $f"); } print OUT $t; } close(OUT) if ($of);
Remove all subscribers from the old list, and add the respective subscribers to each list.
For any more drastic reorganizations, collect all the subscribes of the affected sublists, create the new subscriber lists, and update the subscribers of the affected lists.
Reorganizations are easier done when lists use SQL support. By temporarily using SQL support, reorganizations can be done on running lists even when normally using ezmlm-split and local subscriber databases.