mharc-users

Re: Procmail problem?

2002-11-20 16:11:37
On November 20, 2002 at 15:20, "Christopher P. Lindsey" wrote:

    ## mharc-users
    :0
    * ^TO_mharc-users(_at_)mhonarc(_dot_)org
    {
      :0
      { HAVEMATCH=`echo yes` }

      :0
      { CMDEXC_=`mkdir -m 755 -p $MBOXROOT/mharc-users` }

      :0 Wih
      MESGDATE_=| extract-mesg-date -fmt '%Y-%m'

      :0 c:
      $MBOXROOT/mharc-users/$MESGDATE_
    }

Now, is the final 'c' flag needed?  The desire is to make sure that
the message is processed since the message could be a cross-post, so
each list being archived should get it.

Without having set up mharc it's tough for me to say, but won't the
procmailrc file be called once for each list regardless?

I'm not sure I understand the question, but I'll try to answer.
There is one procmailrc for all list archives.  It's role is to
filter incoming mail and file it into the various raw mailbox archives.
Hence, the recipe above is replicated in the procmailrc for each
list defined in the lists.def file (lists.def is a control file
that tells mharc what lists are to be archived):

  ...
  ## mharc-users
  :0
  * ^TO_mharc-users(_at_)mhonarc(_dot_)org
  {
    # ...[snip]...
    :0 c:
    $MBOXROOT/mharc-users/$MESGDATE_
  }
  ## mhonarc-users
  :0
  * ^TO_mhonarc-users(_at_)mhonarc(_dot_)org
  {
    # ...[snip]...
    :0 c:
    $MBOXROOT/mhonarc-users/$MESGDATE_
  }
  ...

So, if a message is cross-posted to mharc-users and mhonarc-users,
the message should appear in both archives.

mharc is designed to only require a single account for receiving
all mail to be archived.

One other nit...  The first line with ^TO_ should probably be

   * ^TO_mharc-users(_at_)mhonarc\(_dot_)org
                            ^
Note the escaped period.

This becomes a usability issue with lists.def.  Technically, each
address specified is treated as part of final regex, so it would
be up to the maintainer of lists.def to in escape '.'s.  An example
lists.def entry to capture any list admin messages:

  Name: .listsadmin
  Description: Lists Admin Messages
  From-Address: majordomo@
  From-Address: mailman-owner@
  From-Address: .*-request@
  From-Address: .*-help@
  Final: 1

I think not escaping '.'s for full addresses is a minor technical
issue that probably has no real operational effect (btw, the Final: 1
actually causes no 'c' flag to be generated so rule processing is
terminated if there is a match).

The format of lists.def is documented at
<http://www.mhonarc.org/mharc/doc/bin/mk-procmailrc.html>.

--ewh

P.S. The example regexes above are a simplification of what mharc
really generates.  For example, for mharc-users, you get:

  ## mharc-users
  :0
  * 
(^TO_mharc-users(_at_)mhonarc(_dot_)org|(^(Delivered-To:|List-Post:)(_dot_)*mharc-users(_at_)mhonarc(_dot_)org))
  {
  ...

If you want to see a complete real mharc procmailrc, the one
used for the mhonarc.org archives is located on mallorn systems at
~ehood/htdocs/archive/procmailrc.mharc.  NOTE: The file still contains
some of the inefficiencies previously discussed.  I've commited a
new mk-procmailrc into CVS that generates a more efficient procmailrc
as discussed in this thread.

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHARC-USERS

<Prev in Thread] Current Thread [Next in Thread>