Notes on the mailing list archives

All mailing lists on sourceware.cygnus.com are archived. There are five possible archives maintained for any given list:

  1. The ezmlm-maintained archive in DIR/archive. Messages in this dir are stored individually and are not in mbox format; run them through something like formail -ds (a program from procmail) to make them mboxable.
  2. The web archives stored in /www/sourceware/ml or /www/gcc/ml, they are generated by MHonArc, and have three possible format: high-volume, medium-volume, and low-volume. High-volume lists are stored with one archive (directory) per month; medium-volume lists are stored with one archive (directory) per quarter; low-volume lists are stored with one archive (directory) per year.
  3. The ftp archives, also in high/medium/low volume formats. The medium- and low-volume mailing lists are updated in place in the ftp directory directly, e.g. for gdb it would be in ~ftp/pub/gdb/mail-archives. Note: high-volume lists are not updated in the ftp directories as notes are added--they are built up in a staging place (/sourceware/projects/gdb-home/mail-archives for gdb) and moved in to the ftp directory when the month is up. I set up this staging approach because mirror sites were continuously downloading the high volume mail archives every couple of hours, and they would grow to several megabytes by the end of the month. It was adding up to a lot of wasted bandwidth!
  4. Non-public lists can have mbox formatted archives stored in a subdir of the CVS directory for that project. e.g. for GDB it would be /sourceware/projects/gdb-home/hidden-mail-archives. Unlike the high-volume mbox archives, hidden mail archives are not moved in to the ftp directory at period boundaries; they're just kept in the hidden-mail-archives permanently for reference.
  5. Mailing list <-> newsgroup gatewaying. A perl program written by DJ Delorie is used to do this; for mail->news, the program is called from the dot-qmail list archiver. For news->mail, a crontab does the work of querying the news server for new messages.

How a mailing list archives a mail note

I'll use a specific mailing list in my examples. The gdb-patches mailing list has a special address subscribed to it, listarch-gdb-patches@sourceware.cygnus.com.

Remember that in qmail, by default, each user owns the namespace starting with their username. There is a user "listarch" on sourceware; listarch's home directory is /qmail/listarch. In that directory, there is a dot-qmail file for each mailing list you're archiving. For our example list, the file is /qmail/listarch/.qmail-gdb-patches. When mail is sent to "listarch-gdb-patches", qmail ultimately runs the commands listed in the dot-qmail file.

The commands in the .qmail-gdb-patches are as follows:

|/usr/sourceware/bin/local-mail-only.sh
|/qmail/bin/preline  /sourceware/infra/ml-archiving/www-archives.sh --high-volume gdb gdb-patches || exit 0
|/qmail/bin/preline  /sourceware/infra/ml-archiving/ftp-archives.sh --high-volume gdb gdb-patches || exit 0
|/qmail/bin/preline  /sourceware/news-gateway/gateway -m gdb-patches || exit 0
local-mail-only.sh
A simple shell script that verifies that the incoming mail note came from the local system. This is to protect against people spamming the list archiver address directly (this had happened before).

The script depends on the fact that qmail sets the SENDER environment variable to the SMTP envelope address; we grep against that to see where the mail note originated.

If you're archiving a mailing list that isn't hosted on sourceware, don't use local-mail-only.sh; use the standard rbl checker, rbl-check.sh to at least check against RBLs before archiving any mail notes.

Like all dot-qmail lines, local-mail-only.sh exist with return code "0" if the note is allowed to proceed; return code "100" if the note is not allowed to proceed and should be bounced. The script also provides a basic error message so people know why their mail note was bounced.

You'll see local-mail-only.sh used in several other places as well, such as for cvs commit mailing lists, where mail should only originate on the local system.

www-archives.sh
This script adds a mail note to a web archive by calling mhonarc. Two config files are selected when archiving a mail note:

The call to preline before www-archives.sh is used to add an mbox-style From_ header at the beginning. Mhonarc expects to see it.

The "|| exit 0" at the end is to assure that no matter what happens, the processing will continue and a mail note will not bounce. If a mail note bounced, the ezmlm management of the gdb-patches list would unsubscribe the list archiver after a few weeks of bounces. This would be bad. It's better to ignore a failure of any one note and continue with the further archiver lines.

Output from Mhonarc is stored in /www/sourceware/ml/gdb-patches/Log. If you want to see any recent problems, do a command like this:

  % cd /www/sourceware/ml
  % ls -lt */Log | head
Take a look at the tail of any log files that have been recently modified. It's a good exercise to do every now and then--you may find out that the locks are timing out and www-archives.sh needs to tweak its call to mhonarc to retry the lock more times or something.

FIXME: Keep writing here

When moving mailing lists

Sometimes projects join or split, or the mailing lists for some other reason change archive location. After such a change are, the search engine databases need to be regenerated.

See also the main mailing list page.

Last modified 2000-12-27 by hp@bitrange.com.