[prev in list] [next in list] [prev in thread] [next in thread] 

List:       majordomo-users
Subject:    Re: Archive set up
From:       Daniel Liston <dliston () sonny ! org>
Date:       2003-11-13 4:01:31
[Download RAW message or body]

You need special aliases to make archiving work.

test: "|/usr/lib/majordomo/wrapper resend -l test test-outgoing,nobody"
owner-test: test-owner
test-owner: dliston,
test-approval: test-owner
test-outgoing: :include:/var/lib/majordomo/lists/test,test-archiver,test-digestify
test-archiver: "|/usr/lib/majordomo/wrapper archive2.pl -f \
                /var/lib/majordomo/archives/test/test -a -M"
test-digestify: "|/usr/lib/majordomo/wrapper digest -r -C -l test-digest \
                test-digest-outgoing,"
test-request: "|/usr/lib/majordomo/wrapper request-answer test"
#test-request: "|/usr/lib/majordomo/wrapper majordomo -l test"
test-digest: test
owner-test-digest: test-owner
test-digest-outgoing: "|/usr/sbin/bulk_mailer owner-test@example.com \
/var/lib/majordomo/lists/test-digest"


To explain and educate, the "test" alias calls resend which
reads the test.config file for rules and policies, and will
redeliver the message to sendmail with a destination address
of test-outgoing,nobody.

Sendmail does not expand test-outgoing *visibly* because the
address has multiple recipients.  However, when the message
does get to the :include: file, the destination address still
has two more recipients.  In this case, both are aliases.

The test-archiver alias does it's thing calling the archive2
tool, and the test-digestify calls the digest tool.  The nice
part, is they can happen in parallel instead of serially.

Now...  Even if you have all this in place, and your
test-digest.config file in order, you still have settings in
the global majordomo.cf file to worry about.

$datadir = "/var/lib/majordomo";
# $listdir -- Where are the mailing lists?
#
$listdir = "$datadir/lists";

# $digest_work_dir -- the parent directory for digest's queue area
# Each list must have a subdirectory under this directory in order for
# digest to work. E.G. The bblisa list would use:
#       /usr/local/mail/digest/bblisa
# as its directory.
#
$digest_work_dir = "$datadir/digests";

# Majordomo will look for "get" and "index" files related to $list in
# directory "$filedir/$list$filedir_suffix", so set $filedir and
# $filedir_suffix appropriately.  For instance, to look in
# /usr/local/mail/files/$list, use:
#   $filedir = "/usr/local/mail/files";
#   $filedir_suffix = "";               # empty string
# or to look in $listdir/$list.archive, use:
#   $filedir = "$listdir";
#   $filedir_suffix = ".archive";

$filedir = "$datadir/archives";
$filedir_suffix = "";


The $datadir is not a standard majordomo configuration variable.
I have just been in the habit of using to keep my life simpler.
I only included it here so you can follow the directory structure
being used.
$datadir = "/var/lib/majordomo"; this is a given
$listdir = "$datadir/lists"; same as /var/lib/majordomo/lists
Notice the explanation above the $digest_work_dir variable.
$digest_work_dir = "$datadir/digests"; same as /var/lib/majordomo/digests
if /var/lib/majordomo/digests is the parent directory, every list
that you enable a digest for will need a subdirectory named the
same as the name of the list.  In my case:
/var/lib/majordomo/digests/test-digest
Archives are a little more confusing, because even if you do
not use them, you need the directories created for digest to
store messages between the queueing process and the delivery
process.
$filedir = "$datadir/archives"; same as /var/lib/majordomo/archives
Notice the explanation above the variable again.  The get and index
commands are the only part of majordomo that are told to look for
list archives, and where they look is based on $filedir.  This is
really confusing, as you need your alias to match up with the right
place for this directory too.  Did you see my test-archiver alias?
test-archiver: "|/usr/lib/majordomo/wrapper archive2.pl -f \
/var/lib/majordomo/archives/test/test -a -M" Do you see how it compares to the value \
of $filedir? Just /var/lib/majordomo/archives/test/test -a -M" matters here for now.
again, $filedir = /var/lib/majordomo/archives

$filedir + $list + $filedir_suffix is the directory name that
archives for that list are stored in.  Again, in my case,
/var/lib/majordomo/archives/test/<empty_suffix>/
We match this up in the alias for test-archiver, but the
archive2.pl needs a filename, not a directory name. That is
why the alias has the listname again followed by -a -M.
test will be the name of the file, and the -a appends each
additional message to that file, and the -M gives it an
extension based on month but since it is capitolized, it
will also have a 4 digit year in the extension.  Resulting in

test.200311 in /var/lib/majordomo/archives/test/

Dan Liston

Ratsky wrote:
> Why doesn't archive work?
> Here is my config settings. 
> What do I need to do to get archive working:
> 
> # archive_dir          [absolute_dir] (undef) <majordomo>
> # The directory where the mailing list archive is kept. This item
> # does not currently work. Leave it blank.
> archive_dir         =
> 
> # comments             [string_array] (undef) <config>
> # Comment string that will be retained across config file rewrites.
> comments            <<  END


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic