The contents of dir/headeradd are added to the header of outgoing messages.
If digestcode is not specified on the command line, ezmlm-get will try to read it from the file dir/digestcode .
ezmlm-get is normally invoked from a .qmail(7) file. It reads a mail message from its standard input, and a mail envelope from the SENDER, LOCAL, and HOST environment variables.
ezmlm-get uses LOCAL to determine where it is invoked. If LOCAL is the list local name only, ezmlm-get assumes it is run from dir/editor to produce a digest. The digest is sent directly to the digest list subscribers.
If LOCAL is empty or undefined, ezmlm-get assumes it is run from the command line or a script. In this case it behaves as if run from dir/editor and sends out a digest to the digest subscribers.
Otherwise, ezmlm-get expects LOCAL to be of the form list-action. Here list is the first line of dir/outlocal and action is a request. The output is sent to the envelope sender.
ezmlm-get checks action for dig.digestcode, index, thread, and get. If action is one of these, ezmlm-get handles the request and sends a reply. If successful, it exits 99 (ignore remaining .qmail(7) file entries). If action is not one of these, ezmlm-get exits 0 (success) to pass the message on to later handlers, such as ezmlm-manage(1).
ezmlm-dig.digestcode returns a digest of messages received since the last digest, unless numerical arguments are given. digestcode must be alphanumeric, and match (case-insensitive) digestcode on the ezmlm-get command line. Otherwise, the request will be ignored. This is to restrict digest creation. The body of the requesting message up to the first line starting with '-' is copied into the administrivia section of the digest. This is followed by the contents of dir/text/digest, if this file exists.
Note: Anyone who can read your dir/manager and dir/digestcode files, digest-requesting scripts, or mail log knows the digestcode and can trigger digests.
ezmlm-get copies the TXT_MAILING_LIST message into a Mailing-List field in its response. If the incoming message has a Mailing-List field, ezmlm-get refuses to respond. ezmlm-get also refuses to respond to bounce messages.
If dir/listid exists, ezmlm-get will assume that the format is correct and create a ``List-ID:'' header by placing the contents after the text ``List-ID: ''.
If dir/qmqpservers exists, ezmlm-get will use qmail-qmqp(1) to send digests. Other messages are sent by the normal qmail mechanism.
If dir/public does not exist, ezmlm-get rejects all archive retrieval attempts, unless the -p command line switch is used.
Archive retrieval actions can be of the form action[f], action[f].num or action[f].num_num2, where num is the message number for the action or num_num2 the range of message numbers for the action.
f is an optional format specifier for -get, -thread, and -dig requests. It is allowed, but ignored for -index requests. Currently, the following are allowed:
The format is no longer compliant with rfc1153, as the rfc1153 format is incompatible with rfc2046, with which the format is (should be) compatible.
For flexibility and backwards compatibility, the '.' separating the action from the first argument can be replaced by '-', or omitted. Any non-alphanumeric character can separate num2 from num.
If action is dig.digestcode, ezmlm-get returns a digest of the messages received since the last digest, and updates the digest issue counter.
If action is get, ezmlm-get sends back message(s) num or num through num2. from dir/archive/. If num is omitted and dir/dignum does not exist or is 0, the latest HISTGET message (default 30) are returned. Otherwise, the messages since the latest digest are returned including the last message in that digest, so that always at least 1 message is send. If the number of messages exceeds MAXGET (default 100), only the MAXGET last messages are returned. if num is greater than the latest message in the archive _and_ num2 is specified, the latest messages back to HISTGET before the end of the latest digest up to MAXGET messages are returned. This is a good way of always getting at least the latest 30 messages without knowing the latest message number. A link with such a command could be put into e.g. dir/text/sub-ok.
num and num2 are adjusted to make both > 0, and num2 >= num. If either is greater than the largest message number processed, it is silently set to the largest message number. At most 100 messages are returned.
If action is index, ezmlm-get sends back the subjects and authors of the message(s) num or num through num2 in sets of 100 from dir/archive/. num and num2 are reasonable adjusted as for 'get'. No warnings are sent. At most 20 sets of 100 message entries are returned per request. If num is omitted, ezmlm-get returns the last 100-200 message entries, which automatically gives information about the last message number.
If action is thread, ezmlm-get sends back the message(s) that have an index subject entry identical to that of message num from dir/archive/.
If num2 is given it is ignored. If num is out of range, and error message is returned. The message range scanned for the subject is limited to 2000 messages before and after the master message, i.e. the thread argument. This limit protects very large archives. Most threads are expected to be considerably more short-lived. In the unlikely event that there are further messages, these can be retrieved by a second request for the highest/lowest message returned in the first request.
ezmlm-get reads dir/copylines to determine how many lines of the original message to copy into the outgoing message. If this file is empty or not present, a value of 0 is presumed, meaning that only the header is copied.