Setting the default reply-to address in a majordomo mailing list

Installing a mailing list server – majordomo

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:


This should be familiar to you now.  Since I have all the
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

  1. The output says you should su to root and do a make install-wrapper.  The make file
    doesn’t seem to know how to do this as a separate step.
  2. Mention is made of  I couldn’t find any such script.

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/ 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 file.


and you will then have to regenerate your /etc/ 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/

#   Trusted users   #                             


Or add this to your .mc file instead:

define(`confTRUSTED_USERS', majordom)dnl

Running newaliases

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
<junkmale>Cannot create database for alias file 

But when I moved the file to /etc, newaliases worked fine:

# newaliases /etc/aliases.majordomo: 16 aliases, longest 235 bytes, 878 bytes

I’m not sure if it’s necessary or not, but I’ve been HUPing sendmail after each change
to the above.

killall -HUP sendmail

testing majordomo

The easiest way to test the mailing list server is by sending messages to
  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
Subject:        	Majordomo results
Send reply to:


>>>> lists serves the following lists:


Use the 'info <list>' command to get more information
about a specific list.

To subscribe to a list, do the following:

echo 'subscribe test-l' | mail majordomo

Or send a message to with the following in the
message body:

subscribe test-l

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
have footers:

message_footer << END

To unsubscribe: send mail to
with "unsubscribe $LIST" in the body of the message


This will produce this at the end of each message in the list:

To unsubscribe: send mail to
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.

Creating a new list

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

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.

  1. # cd /usr/local/majordomo/lists
  2. # touch newlist
  3. # chown majordom newlist
  4. # echo 'config newlist newlist.admin' | mail majordomo
    If you are creating virtual domains or if you are not on the box on which
    majordomo resides, then you need to specify the domain in the mail message (i.e.
  5. Modify newlist.config which the previous step created.  Change
    passwords, add footers, etc.  Use the contents of test-l.config as a
    starting point  You may also wish to see my list of Commonly Changed Configuration Items.
  6. add a section to /etc/aliases.majordomo for your list.  Here is an example for you to use.
  7. # newaliases
  8. # killall -HUP sendmail
  9. # echo 'subscribe newlist' | mail majordomo
    As in step 4, you may need to use
  10. Respond to any email that majordomo sends back to you.  This is normally
    confirmation that you have supplied a valid email address and that you are subscribing
    yourself and not somebody else.
  11. send a message to

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.

Commonly Changed Configuration Items

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
own values.

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 <>
with "unsubscribe $LIST" in the body of the message

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.

Sending all replies back to the list

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 <>
Send reply to: 		Andrew <>
Date sent: 		Wed, 17 Feb 1999 10:09:27 +0000

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 <> <>
Send reply to:
Date sent:      	Mon, 8 Feb 1999 22:12:27 +1300

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
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

# cd /usr/local/majordomo/lists/
# ee freebsd-questions.config
[find and locate the following line and set it just so:]
reply_to =

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

  • the list owner
  • archive locations
  • digest locations

How to Reduce the Exposure of your List to Spam

25 August 1999 – Today I was trying to figure out how hide certain lists from the lists
command.  I found my solution at
and I recommend that resource to you.

Here’s what I put in the configuration file for
the list in question:

noadvertise << END

Leave a Comment

Scroll to Top