redirecting majordomo mailing lists

redirecting majordomo mailing lists

In a recently article, hypermail – creating an www
interface to a mailing list archive
, I had the need to redirect the output of majordomo.  This talks about how I did that.  But in
hindsight, this is a pretty slack article.  But it does demonstrate the archive
facility of majordomo and thus provides a bit of insight into majordomo.
  I think what I’m actually going to do is just use the plain old archive provided by
majordomo.

Same machine

In this example, the mailing list archives and the mailing list exist on the same
machine.  So it it relatively easy to get a copy of the mail message.  If the
archive is on a different box, see the other solution.

When I added the archives, I
needed some way of getting the messages from the mailing list to a pre-determined
location.  I needed a copy of each outgoing message.   So I modified the /etc/aliases.majordomo
file.  It was like this (the lines contains quotes have been split for readability):

adsl-outgoing::include:/usr/local/majordomo/lists/adsl,
       "|/usr/local/majordomo/wrapper archive -a -m -f 
               /usr/local/majordomo/lists/adsl.archive/adsl.archive",
       "|/usr/local/majordomo/wrapper digest -r -C -l adsl-digest 
               adsl-digest-outgoing"

The above alias directed each outgoing ADSL message to the ADSL mailing list, the
archive, and the digest.  In effect, I wanted to create my own archive independent of
the mailing list archive.  So I added the following line (which has been split for
readability):

"|/usr/local/majordomo/wrapper archive -a -m -f 
           /usr/local/majordomo/hypermail/adsl/archive.current",

Remember that comma at the end of the line.  So now the file contains this (the
lines have been split for readability):

adsl-outgoing::include:/usr/local/majordomo/lists/adsl,
       "|/usr/local/majordomo/wrapper archive -a -m -f 
                /usr/local/majordomo/lists/adsl.archive/adsl.archive",
       "|/usr/local/majordomo/wrapper archive -a -m -f 
                 /usr/local/majordomo/hypermail/adsl/archive.current",
       "|/usr/local/majordomo/wrapper digest -r -C -l 
                    adsl-digest adsl-digest-outgoing"

Here’s what that directory looks like

drwxr-xr-x  2 majordom  majordom  512 Nov  9 13:55 adsl

Here’s what majordomo creates in that directory:

-rw-rw---- 1 majordom majordom 137750 Nov 9 13:55 archive.current.9911

Different machine

If your archive is not on the same machine as the mailing list, this is the solution
for you. 

  1. create a new user
  2. subscribe that user to the mailing list
  3. use that user’s mailbox to update the archives

After the user is subscribed, I would disable the login by setting the password to be *
using vipw.  You I would also change their shell to be /sbin/nologin.
  See the following for an example I created this (the next line has bee split for
readability):

adslarchive:*:1015:1015::0:0:ADSL Mailing List 
                    Archive:/home/adslarchive:/nonexistent

Leave a Comment

Scroll to Top