User Commands ezmlm-tstdig(1) NNNNAAAAMMMMEEEE ezmlm-tstdig - Tests if a digest should be created SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg [ ----kkkk _k_b_y_t_e_s ] [ ----mmmm _m_s_g ] [ -tttt _t_i_m_e ] _d_i_r eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg reads files in the list directory _d_i_r and determines if any of the criteria specified by the options are met. If they are, or if all options specified are 0, eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg exits with success (0). Otherwise, eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg exits (99), or in case of errors, (100) for permanent and (111) for temporary errors. The normal use of eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg is to place it in a script so that eeeezzzzmmmmllllmmmm----ggggeeeetttt((((1111)))) is executed if eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg exists 0, but skipped otherwise. eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg uses LOCAL to adapt its behavior so that it can be used from the command line, a script, or from within _d_i_r////eeeeddddiiiittttoooorrrr, or _d_i_r////mmmmaaaannnnaaaaggggeeeerrrr. If invoked from _d_i_r////eeeeddddiiiittttoooorrrr, the eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg line should end in '|| exit 99'. When used here, eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg if digest generation criteria are met tests a timestamp in _d_i_r////ttttssssttttddddiiiigggg. If _d_i_r////ttttssssttttddddiiiigggg is more than 1 hour old or a digest has been successfully created since _d_i_r////ttttssssttttddddiiiigggg was written, eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg will set the timestamp to the current time and exit 0. Otherwise it will exit 99. This is to guard against initiating duplicate digests when messages arrive while digesting is in progress. OOOOPPPPTTTTIIIIOOOONNNNSSSS -kkkk Success if more than _k_b_y_t_e_s of message body has accumu- lated since the latest digest. -mmmm Success if more than _m_s_g messages have accumulated since the latest digest. -tttt Success if more than _t_i_m_e hours have passed since the latest digest. UUUUSSSSAAAAGGGGEEEE This is an example script for ezmlm-tstdig usage. #!/bin/sh #usage: script dir diglist@host #digest if > 64 kbytes message bodies, # > 30 messages, or # > 48 hours since last digest. # ezmlm bin path - modify for your setup EZPATH='/usr/local/bin/ezmlm' EZTST="${EZPATH}/ezmlm-tstdig" SunOS 5.11 Last change: 1 User Commands ezmlm-tstdig(1) EZGET="${EZPATH}/ezmlm-get" ${EZTST} -k64 -m30 -t48 "$1" || exit 0 ${EZGET} -t "'$2'" "'$1'" < /dev/null # improve by testing exit status BBBBUUUUGGGGSSSS Obviously, eeeezzzzmmmmllllmmmm----ttttssssttttddddiiiigggg should be integrated into the dig- esting program so that _d_i_r////ttttssssttttddddiiiigggg will not be not necessary. This may be done in the next version. SSSSEEEEEEEE AAAALLLLSSSSOOOO ezmlm-get(1), ezmlm-make(1), ezmlm-manage(1), ezmlm-send(1), ezmlm(5) SunOS 5.11 Last change: 2