[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

Re: [ba-ohs-talk] Purpling our BA-OHS and BA-UNREV e-mails



I have at working, in principle, in a test scenario. I'm not sure
it is foolproof, so I'll toss it up here for review and
refinement. And, as stated before, it's nothing if it can't get
installed.    (01)

This version doesn't yet completely work, for reasons explained
below, but is a start.    (02)

At    (03)

  http://www.burningchrome.com/~cdent/uviz/URLinator    (04)

please find some sample code. AT    (05)

  http://www.burningchrome.com/~cdent/uviz/mhamain.pl.diff    (06)

find a very short diff to some of the mhonarc code. The logic for
these things is explained below.    (07)

Thanks to my good friend Stan Gerbig for helping me deduce the
complexities of majordomo to get this moving. I'd have been
stuck without it. I don't have a majorodmo installation to play
with. He has one and wishes he didn't.    (08)

Okay. Majordomo works with a series of aliases. An incoming message
goes to one alias, is processed and then sent back out in the
mail, to another alias, and then sometimes to another.    (09)

By placing a shim in this series of aliases it is possible to
incorporate the mhonarc injection process into the chain, and
acquire the URL of the message before it is sent out to the
world.    (010)

Here's a fairly standard set of aliases for one list:    (011)

alist-request:       "|/usr/local/majordomo/wrapper majordomo -l alist"
alist:       "|/usr/local/majordomo/wrapper resend -l alist -h indiana.edu alist-outgoing"
alist-outgoing: :include:/usr/local/majordomo/lists/alist
alist-approval: :include:/usr/local/majordomo/lists/alist-approval
owner-alist: :include:/usr/local/majordomo/lists/owner-alist
owner-alist-outgoing:        owner-alist    (012)

A message is sent to alist, is processed and sent to
alist-outgoing. If alist-outgoing is adjusted like this:    (013)


alist-outgoing: "|/path/URLinator /path/to/filesystem/archive \
                  http://url.to/archive alist-outgoing-real"
alist-outgoing-real: :include:/usr/local/majordomo/lists/alist    (014)

Then URLinator does the following:    (015)

- takes the message on STDIN, injects it to mhonarc
  - URLinator include logic to deal with archives that are
    separated by month and year
- mhonarc returns the number of the message it injected
- URLinator modifies the body of the message to add a link
  to the mhonarc URL at the top of the message
  - Right now this only works with text/plain messages as I
    didn't (yet) want to mess with MIME
- URLinator hands the message back to sendmail at the
  alist-outgoing-real address
  - Right now it doesn't do this, instead it prints the message,
    with modifications, to STDOUT    (016)

Doing it this way avoids several problems with messages sent
right at the end of the month and allows mhonarc to do its own
locking to prevent numeric collisions. It's also late enough in
the delivery chain that as far as majordomo is concerned the
message has been approved and is subject to delivery, problems
that happen are not its problem.    (017)

This is not an ideal solution, but nor is majordomo.    (018)

Dealing with MIME (including HTML messages) is potentially a
non-trivial problem.    (019)

Comments and questions are very much appreciated.    (020)

I did this with as straight a perl as I could make it (stuff that
comes default in the distribution) using    (021)

   This is perl, version 5.005_03 built for i386-linux    (022)

and mhonarc    (023)

   MHonArc v2.5.2 (Perl 5.00503 linux)    (024)

On Mon, 5 Aug 2002, Eric Armstrong wrote:    (025)

> Many thanks for offering, Chris!
>
> Hopefully, someone who has some clue as to where the
> servers are even located will be in touch with you soon.
> :_)
>
> Chris Dent wrote:
>
> > If someone can let me know where mhonarc fits into majordomo's
> > process chain at bootstrap, I can make some progress on this.
> > There are some race conditions that can be avoided with some
> > dancing, but how you dance depends on where mhonarc is fit in.
> >
> > Of course none of this is worth doing if we aren't able to the
> > administrators of the bootstrap machines.
> >
> > There are two paths. One is the switch to Mailman that Eugene
> > recommended. This requires a lot of cooperation with the
> > administrators. The other is to hack at majordomo. This also
> > requires a fair piece of cooperation but might be possible with
> > just a change to the aliases file on the mail server.    (026)

-- 
Chris Dent  <cdent@burningchrome.com>  http://www.burningchrome.com/~cdent/
"If you assume that there is an instinct for freedom, that there are
opportunities to change things, that hope is possible, then hope may be
justified, and a better world may be built. That's your choice.'' N.Chomsky    (027)