The FreeBSD Diary
Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link.
Installing a mailing list server - majordomo 6 February 1999
The mailing list is a great way to communicate with a large group of people. It forms
the basis of many support groups. This article will tell you how to install majordomo,
arguably the most robust mailing list server around. The main website for majordomo
and one of the interesting things it tells you is the meaning of the name majordomo.
This article deals with version 1.94.4.
In order to use majordomo, you need to have sendmail running on your machine. All mail addressed to the mailing list must be processed by your machine.
Here's a good and useful page: http://www.uoregon.edu/~llynch/majordomo/get-config.html
|This should be familiar to you now. Since I have all the
ports installed, all I needed to do was:
# cd /usr/ports/mail/majordomo # make # make install
The full text of the above process is available if you want to see it. I have a few comments about the output produced during the installation.
I found no difficulty associated with not solving the above two anomalies.
|majordomo makes use of the alias feature of sendmail.
The first step is to tell sendmail about the majordomo
aliases. I've noted that the documentation refers to majordomo.aliases,
but the file name is actually aliases.majordomo. Please see the running newaliases section below for a file
location problem associated with this file.
If you have an older version of sendmail, modify /etc/sendmail.cf to contain the following lines:
But if you use the M4 configuration system of recent sendmails, you can add the following lines to your .mc file to achieve the same effect. In my case, the following line was added to my hendrix.mc file.
and you will then have to regenerate your /etc/sendmail.cf file. See the sendmail configuration section for details.
Majordomo also needs to be added to the list of sendmail trusted users. So you can either add this manually to /etc/sendmail.cf:
##################### # Trusted users # ##################### Tmajordom
Or add this to your .mc file instead:
|The default alias file is /usr/local/majordomo/aliases.majordomo. You
should modify all occurrences of "Postmaster" for your own email. Please
note that this example aliases file contains test lists which should be deleted once you
have finished your testing.
I found problems using the file in the default location. When I ran newaliases, I was getting the following errors:
# newaliases <junkmale>hash map "Alias0": unsafe map file /usr/local/majordomo/aliases.majordomo.db: \ Permission denied <junkmale>WARNING: cannot open alias database /usr/local/majordomo/aliases.majordomo <junkmale>Cannot create database for alias file /usr/local/majordomo/aliases.majordomo
But when I moved the file to /etc, newaliases worked fine:
I'm not sure if it's necessary or not, but I've been HUPing sendmail after each change to the above.
|The easiest way to test the mailing list server is by sending messages to firstname.lastname@example.org.
Such as this:
echo 'lists' | mail majordomo
If everything is working correctly, you should get a message back from Majordomo, and not Mailer-Daemon. See docs/INSTALL for more information.
Here's what I received in response to the above command:
Date sent: Sat, 6 Feb 1999 01:07:31 +1300 (NZDT) To: dan From: email@example.com Subject: Majordomo results Send reply to: firstname.lastname@example.org -- >>>> lists email@example.com serves the following lists: test test-l test-l-digest Use the 'info <list>' command to get more information about a specific list.
To subscribe to a list, do the following:
Or send a message to firstname.lastname@example.org with the following in the message body:
You should get messages in return telling you how to confirm your subscription etc.
Adding message trailers
|Here's what I added to /usr/local/majordomo/lists/test-l.config in order to
This will produce this at the end of each message in the list:
To unsubscribe: send mail to email@example.com with "unsubscribe test-l" in the body of the message
Note that you specify a blank line by putting a '-' at the start of the line with nothing else on the line. The config file contains a great deal of information on how to modify this file.
|Here is what I did to set up a mailing list. If you want more information, I
suggest you also refer to /usr/local/majordomo/doc/NEWLIST.
If you are creating a mailing list for virtual domains, I suggest you read Creating a majordomo mailing list for a virtual domain.
This section assumes you are creating a new list called newlist. Items in bold are commands you actually enter. Everything else is just a description of what you need to do.
I strongly urge you to make digests/archives of every list you create. It doesn't take much time and it require very little additional system resources. I wish I'd done that when I started my ADSL mailing list. But then, if I had, I wouldn't have written the "Creating a digest and archive for a majordomo mailing list" article. Look in the sample config files for the appropriate settings in the aliases file.
|Here are the key items which I normally change within a new list configiration
file. You should replace the values within angle brackets (<...>) with your
admin_passwd = <admin password> administrivia = no approve_passwd = <approve password> description = <some discription about your list> get_access = open message_footer << END - To unsubscribe: send mail to <firstname.lastname@example.org> with "unsubscribe $LIST" in the body of the message END restrict_post = <yourlist>:<yourlist>-digest unsubscribe_policy = open+confirm which_access = closed who_access = closed
Note that the restrict_post item shown assumes you have both a list and a digest version of your list. If you don't have a digest version, then just supply <yourlist> for this value.
|When you receive a message from a mailing list, you'll see something like the
following in the message headers:
Subject: sample mail headers From: Andrew <email@example.com> Send reply to: Andrew <firstname.lastname@example.org> Date sent: Wed, 17 Feb 1999 10:09:27 +0000 To: email@example.com
When you reply to this message, you will reply to Andrew, which is how most lists are set up and it is the default. However, that may not be what you want. Perhaps you want something like the following:
Subject: another sample From: Andrew <firstname.lastname@example.org> <email@example.com> Send reply to: firstname.lastname@example.org Date sent: Mon, 8 Feb 1999 22:12:27 +1300 To: email@example.com
If you decide this is the type of list for you, then you're in luck because it's a simple change to make. However, before you do this, perhaps you might wish to consider the implications of changing the reply-to field. I suggest you read ``Reply-To'' Munging Considered Harmful before you do that. Once, you've done that, and you still wish to proceed, just find the reply_to field in your list file and set the reply_to field.
# cd /usr/local/majordomo/lists/ # ee freebsd-questions.config [find and locate the following line and set it just so:] reply_to = firstname.lastname@example.org
I don't use the above option mainly for the following reason: a public message wrongly sent privately to a list member is much less likely to embarrass than a private message wrongly sent to the list.
The various bits and pieces
|There are two major components to a majordomo mailing list.
The first is the configuration files. These normally reside within /usr/local/majordomo/lists/ and have a .config suffix. The configuration file determines how people subscribe to the list, what actions they can take, the passwords for list maintenance, and various other options. Basically, the config file determines the look and feel of the list.
The second is the aliases file. This file determines various essential items including:
|25 August 1999 - Today I was trying to figure out how hide certain lists from the lists
command. I found my solution at http://www-uclink.berkeley.edu/major/major.hide.html
and I recommend that resource to you.
Here's what I put in the configuration file for the list in question:
noadvertise << END /.*/ END