Kevin Amorin

kev@amorin.org

September 25, 2001

 

 

Majordomo Digesting & Archiving Install and configuration

 

 

Migrate Majordomo:

Review current configuration including:

        -majordomo user ID

        -majordomo group ID 

        -compiler name

        -path to perl 

        -check /etc/mail/aliases or include file

 

 

download majordomo source code from http://www.greatcircle.com/majordomo/1.94.5/majordomo-1.94.5.tar.Z

 

 

uncompress and untar majordomo to /usr/local/src, this can be any directory as long as it is not the final install destination of majordomo.  Modify the make file and make the required changes for the variables:

 

PERL = /usr/bin/perl

CC = gcc

W_HOME = /usr/local/majordomo-$(VERSION)

W_USER = 99

W_GROUP = 99

TMPDIR = /usr/tmp

 

 

 

Then compile the c wrapper program and install majordomo

 

#make wrapper

#make install

#make install-wrapper

 

 

The install will copy a sample configuration file to $MajordomoHome/majordomo.cf, this file needs to be modified before use, including the following variables:

 

$whereami = "amorin.org";

$log = "$/usr/local/majordomo/logs/majordomo.log";

 

If you would like digesting to work you must also change the following variables within the same majordomo.cf file:

 

$digest_work_dir = "/usr/local/majordomo/mail/digest";

$filedir = "/usr/local/majordomo/mail/files";

$filedir_suffix = ".archive";

 

 

You now have to create the directories that the majordomo configuration file is pointing to, keeping in mind that al of these directories MUST be owned by the user and group majordomo.  From the majordomo install directory perform the following:

 

#mkdir /usr/local/majordomo/tmp

#mkdir /usr/local/majordomo/lists

 

#chown majordomo:majordomo /usr/local/majordomo/lists

#chown majordomo:majordomo /usr/local/majordomo/tmp

 

 

If there is an existing majordomo installation you must copy over the lists directory to the new directory.

 

#tar cvf – lists | (cd ../majordomo-1.94.5; tar xvf -)

 

 

now that the install and configure is complete we are able to test majordomo with the config-test script.  Please run this from the majordomo home directory as a non privileged user (i.e. NON-ROOT)

 

./wrapper config-test (as non root user)

 

 

Digesting:

 

Make sure that you have preformed the necessary changes to the majordomo.cf as stated above to include:

 

$digest_work_dir=/usr/local/majordomo/mail/digest

$filedir=/usr/local/majordomo/mail/files

$filedir_suffix=.archive

 

 

now create the directories making sure to change the ownership to id majordomo group majordomo,

 

#mkdir /usr/local/majordomo/mail

#mkdir /usr/local/majordomo/mail/digest

#mkdir /usr/local/majordomo/mail/files

 

#chown –R majordomo:majordomo  /usr/local/majordomo/mail

 

 

 

In the following we will create a digest for the mailing list “test”.  We assume the test list has been created and the required aliases already added to the /etc/mail/aliases (or where ever your majordomo aliases file is stored) file:

 

make the digest working directories, following our configuration above these directories would be:

#mkdir /usr/local/majordomo/mail/digest/test-digest

#mkdir /usr/local/majordomo/mailfiles/test-digest.archive

 

 

#chown majordomo:majordomo /usr/local/majordomo/mail/digest/test-digest

 

#chown majordomo:majordomo /usr/local/majordomo/mail/files/test-digest.archive

 

 

Always make sure to triple check the permissions as it seems to be a recurring debugging nightmare afterward.

 

Create the mailing list configuration files, and add the users that wish to be included on the digesting list:

 

        /usr/local/majordomo/lists/test-digest

 

After this file is created issue a list command to majordomo (echo “list” | mail majordomo) and the following file should be created

 

        /usr/local/majordomo/lists/test-digest.config 

 

 

now all that is left is to modify the mailer aliases.  In this case we wish to digest the mailing list “test”, so the first requirement is to modify the existing aliases “test-outgoing” to include “test-digestify

 

 

test-outgoing: :include:/usr/local/majordomo/lists/test, test-digestify

 

 

the “, test-digestify” was added to the end of the line.  This modification will cause all outbound mail to the mailing list test to also be sent to the aliases test-digestify.

 

Now add the alias test-digestify.  This aliases will execute the digest command and save the mail until it reaches the max length/days specified in the “test-digest.config” file or until you execute the mkdigest majordomo command.

 

   test-digestify:  "|/usr/local/majordomo/wrapper digest -r -C -l test-digest test-digest-outgoing"

 

Also add the following aliases in case a user emails a response to the digest list instead of the “original” list.

 

   test-digest: test

 

The final aliases are in standard format, for ownership and approval.

 

   test-digest-outgoing: include:/usr/local/majordomo/lists/test-digest

   owner-test-digest-outgoing:  kev@amorin.org

   test-digest-approval: kev@amorin.org

 

 

Though the digest is configured in the <mailinglist>-digest.config file, users usually wish to digest a mailing list daily.  To accomplish this you would send majordomo the “mkdigest” command with the mailinglist-digest name and passwd (found in the <mailinglist>.config file), as shown in the example:

 

(cron entry)

  0 0 * * *       echo mkdigest test-digest password | mail majordomo

 

Digesting is now complete, the mailing list test will be digested and a copy of the digest will be sent to all users listed in the /usr/local/majordomo/lists/test-digest file nightly.

 

 

Archiving can also be done on an existing mailing list, this will copy each message sent to the mailing list and store it in a flat text file usally in the format “mailinglist.MONTH”, configurable by command line switches (more archive2.pl for more detail).  Using the earlier example list test, the following aliases would be used for archiving:

 

        test-archive: "|/usr/local/majordomo/wrapper archive2.pl -f /usr/local/majordomo/mail/files/test-archive.archive/my- -m -a"