[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a definevar var in indexes



On January 25, 2002 at 00:18, Jason Englander wrote:

> :0:
> | /usr/local/bin/mhonarc -add -outdir $MAILDIR/subdir \
>   -definevar FOO="$FOO" \
>   -rcfile $LIBDIR/mhonarc.rc -quiet -- -
> 
> Everything works just fine, except that each time the indexes get
> re-created (every time a message comes in), the last message's value
> for $FOO$ ends up in the index for every message in the list.  Is there a
> per message definevar?

Nope.

> Annotate?  One run of mhonarc to add the msg, a 2nd to add a note for
> it?

This is a possible solution to the problem that requires no changes to
MHonArc directly.  To avoid the double mhonarc call, you could generate
the annotation via the Procmail process before calling mhonarc.

An annotation for a message is stored in a filename based on the
message-id of the message.  If creating the annotation outside of
mhonarc, you just need to convert the message-ids to quoted-printable
format to create the filename for the annotation.  Then the file should
be written to where the NOTEDIR resource is set to.

The mhutil.pl library of MHonArc containes a routine called
msgid_to_filename which can be used to convert a message-id into a
filename.

--ewh


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]