Creating a majordomo mailing list for a virtual domain
In the past I’ve written a fair number of articles
about majordomo. The most complex was about creating virtual domains for majordomo. I’m just
now rereading that article in preparation for creating a new mailing list and I’ve
realized that the process is inadequately documented. Consider this article a
correction of that omission.
NOTE: It’s been brought to my attention that some steps are missing from this article.
Be sure to following the steps for the creation of a a new majordomo configuration
file, one for each virtual domain, as shown in virtual
domains for majordomo. Also read the addenda following that section
12 March 2001
The issues
The main idea surrounding virtual majordomo domains is the
separation of data into different directories. This is more for our own peace of
mind and to make things easy to find than it is for the convenience of majordomo.
As such, I’m creating a mailing list for yourdomain.org. Let’s call it fakelist.
Don’t bother subscribing. It does not exist.All of the files for yourdomain.org
mailing lists exist under /usr/local/majordomo/lists/yourdomain.org.
I like this layout because it’s easier to follow. You should pick a method
and stick with it.Step by step
These instructions are based upon the original instructions found at Installing a mailing list server – majordomo.
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. Items in italics you should change to your own values.Note: I like to keep my archives in:
/usr/local/majordomo/lists/<mydomain.org>/<listname>.archive/And my digests in
/usr/local/majordomo/lists/<mydomain.org>/digests/<listname>-digest/You may wish to adjust my templates accordingly.
- # cd /usr/local/majordomo/lists/yourdomain.org
- # touch fakelist
- # chown majordom:majordom fakelist
- # echo 'config fakelist fakelist.admin'
| mail majordomo@yourdomain.org
Don’t forget the domain! This will create fakelist.config
in the directory specified in step 1.- Modify fakelist.config which the previous step created. Change
passwords, add footers, etc. You may also wish to see my list of Commonly Changed Configuration Items.- add a section to /etc/mail/aliases.majordomo.yourdomain.org for
your list. Use the template text available from sample/majordomo.alias.txt.
Remember to refer to the next section which deals with digests.- Create aliases in /etc/mail/virtusertable. A template is available from
samples/majordomo.virtusertable.txt.- After modifying virtusertable, make sure you invoke the changes. I do
this with:makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
- # newaliases
This invokes the changes intoduced in step 6.- Create the directories as shown in majordomo
and virtual mailing lists – Creating Directories.- # killall -HUP sendmail
- # echo 'subscribe fakelist' | mail majordomo@yourdomain.org
(I suggest not doing this step as root).- 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.- send a message to fakelist@yourdomain.org
If you want digests
By default, the above steps will give you a digest list. If you don’t want
a digest, remove the indicated lines from this sample/majordomo.alias.txt
template as used in Step 6 from above. If you do want digests, and haven’t removed
the sections, follow these steps:
- cd /usr/local/majordomo/lists/<yourdomain.com>/digests/
- mkdir <listname>-digest
- chown majordom <listname>-digest
- chmod 750 <listname>-digest
- mkdir <listname>-digest.archive
- chown majordom <listname>-digest.archive
- chmod 754 <listname>-digest.archive
Remember to create a separate list for your digest. Remember to specify moderate
= yes during step 5. Follow steps 1-5.info files
When a person subscribes to a list, they are sent a message, which can
include custom information. You can include create a <yourlist>.info file and
let that contain list-specific information (e.g. list rules, expected conduct, etc).
You can create a list info file like this:
- cd /usr/local/majordomo/lists/<yourdomain.org>
- touch <listname>.info
- chown majordom <listname>.info
The list maintainer can update this file via majordomo. For details, send a
message to majordomo@<yourdomain.org> with help in the body of the
message.Finished
With all that work, you should now be able to use your virtual mailing
lists. Try subscribing. See what happens. Remember, when you subscribe,
you need to send to majordomo@yourdomain.org.Please, if you notice any
omissions or errors, please add your comments.