ezmlm-split(1) ezmlm-split(1) NNAAMMEE ezmlm-split - distribute (un)subscribe requests to sublists SSYYNNOOPPSSIISS eezzmmllmm--sspplliitt _d_i_r [ --ddDD ][ _s_p_l_i_t_f_i_l_e ] DDEESSCCRRIIPPTTIIOONN If the action is _-_s_u_b_s_c_r_i_b_e or _-_u_n_s_u_b_s_c_r_i_b_e, eezzmmllmm--sspplliitt analyzes the target of the request, computing a hash in the range 0-52 from the address, and determines the ‘‘domain key’’, i.e. the two top levels of the host address in reverse order. Thus, the domain entry for ‘‘d@a.b.c’’ becomes ‘‘c.b’’ and the one for ‘‘d@a’’ becomes ‘‘a’’. The hash and domain parts are then tested against successive lines of _s_p_l_i_t_f_i_l_e (default is _d_i_r//sspplliitt). If a match is found, the request is forwarded to the corresponding sublist, and eezzmmllmm--sspplliitt exits 99. If a match is not found or action is not _-_s_u_b_s_c_r_i_b_e or _-_u_n_s_u_b_s_c_r_i_b_e, eezzmmllmm-- sspplliitt exits 0. In _s_p_l_i_t_f_i_l_e, 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. eezzmmllmm--sspplliitt can be used also for list with SQL-based sublisting. In this case, addresses matching the _s_p_l_i_t_f_i_l_e are forwarded to the respective non-SQL sublist, and non-matching addresses are handed by the SQL sublist. OOPPTTIIOONNSS --dd (Default.) Do. Forward requests to the appropriate list. --DD Do not process messages. Rather, read addresses, one per line from stdin, and print ‘‘sublist@host: address’’ where ‘‘sub- list@host’’ is the address to which the request would have been forwarded in normal operation. This is used to process a set of existing addresses into a set of address collections, one per sublist. The output can be sorted and easily processed into a set of files, one per sublist containing the addresses that sub- list handles. SSPPLLIITT LLIISSTT SSEETTUUPP To use a hierarchy of sublists, set up the master list and add a eezzmmllmm-- sspplliitt line before the eezzmmllmm--mmaannaaggee((11)) line in _d_i_r//mmaannaaggeerr. Create any number of sublists of the main list on other local or distant hosts. Ideally, these should be non-archived, to point to the correct message numbers of the main list archive (see eezzmmllmm--sseenndd((11)). You can use eezzmmllmm--mmaakkee --CC_e_z_m_l_m_s_u_b_r_c for this. If you don’t, use the text files from the main list, except _b_o_u_n_c_e_-_b_o_t_t_o_m. Next, create _s_p_l_i_t in the main list directory to achieve an appropriate split. Load splitting between several local hosts is best achieved by hash, with a blank domain. Geographical splitting with hosts in different countries is best done via ‘‘domain’’ and naturally, a large domain can be subdivided by hash. Subscribers will receive all messages ’From:’ the main list. When they subscribe or unsubscribe, the request will be forwarded to the appro- priate sublist, which will handle the confirmation. All information, except _b_o_u_n_c_e_-_b_o_t_t_o_m 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. AADDDDIINNGG//RREEMMOOVVIINNGG SSUUBBLLIISSTTSS In general, the main list should be disabled, while changing the sub- list split. This can be done by changing the mode of _d_i_r//lloocckk to 0 or by setting the sticky bit for the home directory of the user control- ling the 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 sub- list 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 | program where 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 sub- scribers to each list. For any more drastic reorganizations, collect all the subscribes of the affected sublists, create the new subscriber lists, and update the sub- scribers of the affected lists. Reorganizations are easier done when lists use SQL support. By tem- porarily using SQL support, reorganizations can be done on running lists even when normally using eezzmmllmm--sspplliitt and local subscriber databases. SSEEEE AALLSSOO ezmlm-list(1), ezmlm-make(1), ezmlm-manage(1), ezmlm-sub(1) ezmlm- unsub(1), ezmlm(5), ezmlmrc(5), ezmlmsubrc(5) ezmlm-split(1)