The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

redirecting majordomo mailing lists 9 November 1999
Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles
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
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
Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles