Q: How can I deactivate a LISTSERV mailing list without deleting it?

Knowing how to delete unused mailing lists keeps your site clean and organized, which, in turn, makes your site management tasks more enjoyable. Deleting a mailing list permanently is easy. This tip focuses on a different approach and shows how to deactivate a list without deleting it, which enables you to restore it and its message archives later if needed.

The Quick and Dirty Approach

The quick and dirty way is to rename the mailing list's .list file in the listserv\main\ (under Windows) or ~listserv/home (under Unix) directory so that it ends in some other extension (for instance, renaming "taskforce.list" to "taskforce.deactivated") and then restarting the LISTSERV primary instance service. This works because, if there is no .list file, then the mailing list doesn't exist as far as LISTSERV is concerned. You can then restore the list by renaming the file to its original name and restarting LISTSERV again.

The downside of this approach is that a bunch of files related to the now deactivated mailing list will still be cluttering up LISTSERV-related directories, which can make it hard to find other files that you're looking for. For these reasons, you may prefer to instead move all of the files related to the mailing list to a holding directory somewhere.

Preparing a Holding Directory

In this case, the first step is to figure out where all of the files are located. Collect this information:

1. First, check the mailing list's configuration (List Management > List Configuration) and check the "Notebook" setting to see if the mailing list has archives and, if so, where those archives are stored.

2. Next, go to Server Administration > Site Configuration and see what location is given for the WWW_ARCHIVE_DIR site configuration variable.

3. Create the holding directory that you're going to copy all of the files to.

Having collected this information, you can move on to:

4. In the listserv\main\ or ~listserv/home/ directory, find all files whose name match the mailing list and move them to the holding directory.

5. If the Notebook directory identified in Step 1 only has files related to the mailing list you're concerned with, then move the entire directory to the holding location. Otherwise, just move the files related to the mailing list. If the mailing list is configured with "Notebook= No", then you can skip this step.

6. In the WWW_ARCHIVE_DIR location identified in Step 2, delete any directories and files whose names match the mailing list. You don't have to store these files anywhere – LISTSERV will recreate them if it needs them.

7. Restart LISTSERV.

Restoring a Previously Deactivated Mailing List

If you want to restore the mailing list later, follow these steps:

1. Restore the files and directories from the holding directory back to their original locations.

2. Create a subdirectory of the WWW_ARCHIVE_DIR location previously identified above. The subdirectory's name should match the mailing list's name. Note that under Unix, the subdirectory's name must be in all lower case.

3. Restart LISTSERV.

Regardless of which procedure you follow, you should make sure that the archives are accessible again after the mailing list has been restored. Go to the mailing list's archives, make sure the messages are listed there, and click on one or two individual messages to ensure that they load successfully.

Got Feedback?

Let us know about topics and tasks you'd like to see covered in future tech tips.

Get in Touch

Next Steps

© L-Soft 2022. All Rights Reserved.