|
NAMEezmlm-cgi - provide WWW access to the list archiveSYNOPSISezmlm-cgiDESCRIPTIONezmlm-cgi is executed by the httpd daemon and generates HTTP/CGI/html 4.0-compliant self-referencing output of index pages for threads in a given month, messages in a thread, messages by a given author, messages by date, and messages themselves with full navigation controls. It uses the archive directly, aided by index files created by ezmlm-idx(1), and ezmlm-send(1) as part of normal archive access and digest indexing, and by ezmlm-archive(1).ezmlm-cgi uses the httpd-supplied variables PATH_INFO to obtain the list number, QUERY_STRING to obtain the command, as well as SERVER_NAME, SERVER_PORT, and SCRIPT_NAME to create a self-referencing URL. When ezmlm-cgi is invoked without a command, it shows the threads for the current month. If no list number is supplied, the default list is shown (see below). CONFIGURATIONezmlm-cgi expects to find configuration info in /etc/ezmlm/ezcgirc when run SUID root, or .ezcgirc otherwise. The entries in this file describe one list per line. Blank lines and comments starting with a ``#'' in position 1 are allowed and ignored. No extra blanks, tab, etc, are allowed. Entries must be of the following format:listno;uid;listdir;listaddr;buttonbar;charset;style;bannerprog where:
OPTIONS
OUTPUTezmlm-cgi outputs 5 different views.
OUTPUT FORMATTINGezmlm-cgi outputs html 4.0 in a format suitable for Lynx and other text-mode browsers. The format is designed for easy optional enhancement via CSS1/2 type style sheets in the format ``text/css''. ezmlm-cgi is self-documenting in this respect. Simply review the output in the different views and the sample style sheet to see the class structure.EXTERNAL LINKS TO MESSAGESezmlm-cgi will accept a PATH_INFO of the following format:/listno/message where:
ROBOTSThere are many possible URLs for the same message. To still allow external indexing, ezmlm-cgi supports the command ezmlm-cgi/index which returns a page with links to all lists, except the default list. These links indirectly lead exactly once to each message. None of the links used contain a ``?''. Thus, to index the archives, allow access to scripts in the (separate) directory where ezmlm-cgi is installed, but deny access to directory/ezmlm-cgi?. Any message will have a ``nofollow'' robot META tag, and any view reached by a URL based on QUERY_STRING will in addition have a ``noindex'' robot META tag to avoid trapping robots in the archive.EXECUTIONezmlm-cgi can operate in two modes, SUID root and normal. ezmlm-cgi should not be installed SUID user other than root. Please see the SECURITY section before installing SUID root.In normal mode, ezmlm-cgi will read the configuration file .ezcgirc from the working directory set by the httpd daemon (per cgi definition this should be the same directory as ezmlm-cgi is in), then change directory to the list directory. ``uid'' is ignored. For user installations or systems where the httpd user has access to all the lists, normal mode usually gives sufficient access. In SUID root mode, ezmlm-cgi will read the configuration info from /etc/ezmlm/ezcgirc then change directory to that directory, then change root to that directory, then change userid to ``uid''. If ``uid'' is not specified, it will change to the uid of the process invoking ezmlm-cgi (normally the httpd user). If the archive files are world-readable, but the list directory is not, it is safest to leave ``uid'' blank. The httpd user will still be able to read the files. EXECUTION OF BANNER PROGRAMSezmlm-cgi supports display of banners, but not execution of banner programs. To obtain dynamic banners, use a URL that points to a banner program elsewhere.SECURITYezmlm-cgi will refuse to run as root.ezmlm-cgi does not write or lock any files. ezmlm-cgi has a short well commented segment of code that potentially runs SUID root. Read the source to convince yourself that this is safe. If possible, install it SUID user, or not SUID at all, if that meets your needs (single list user, httpd user is list user, or httpd user has sufficient access to all list directories and archives). ezmlm-cgi will not allow execution of banner programs. BUGSezmlm-send(1) updates the list message counter once a message is safely archived, but before it is accepted by qmail(7). Also, the index file is updated before the message is accepted by qmail(7). If qmail(7) fails, ezmlm-send(1) resets the counter before terminating. It is possible that in such a situation the message would be replaced by a different one. If ezmlm-cgi accesses a message that ultimately fails and in that time interval, it may expose a message that ultimately is replaced, especially when doing it via the ``Messages by date'' view which is based on the index file. In practice, this is relatively harmless. Avoiding it would require locking the list with significant implications for security and performance.SEE ALSOezmlm-archive(1), ezmlm-get(1), ezmlm-idx(1), ezmlm-send(1), ezmlm(5), qmail(7) Visit the GSP FreeBSD Man Page Interface. |