mhonarc-users

Re: Problems with $DATE$

2002-10-23 11:11:33
On October 23, 2002 at 10:07, tomas(_dot_)halvarsson(_at_)fra(_dot_)se wrote:

I'm having trouble generating a good main index page for my
mailing lists. Whenever I generate such a page, and use the
$DATE$ resource variable to display the dates for messages, it
seems as if $DATE$ is picking the date from the "From ..."
separator line, and not the Date: header, in conflict with the
"Why doesn't MHonArc extract the date from "From ..." line?"
question in the FAQ.

The value of $DATE$ is dependent on the DATEFIELDS resource.
And it is true that the From separator is not used.  The default
DATEFIELDS resource specifies to extract the date of a message
from Received header field.

Note if you change DATEFIELDS, the change only will affect
new message added and not existing ones.

I'm currently in the process of setting up the web archive, and
have a lot of old messages I'd like to include in the archive. I
use the following command:
      formail -s procmail < ~/Mail/mailinglist
to try and generate the archive. My .procmailrc has a recipe that
creates directories and runs
      | mhonarc -rcfile ... -outdir ... -add
for each mail that fits. And up to this point, everything works
OK.

Have you looked into mharc, <http://www.mhonarc.org/mharc/>, which
automates alot of this type of stuff?

The troubles seem to occur in <LITEMPLATE> in the resource file.
I have (quite desperately, to try and figure out what is going
on) tried every date related resource variable ($DATE$,
$DDMMYYYY$, $GMTDATE$, $LOCALDATE$, $MMDDYYYY$, $MSGGMTDATE$, and
$MSGLOCALDATE$) but they all either generate the current
date/time, or the date/time in the "From ..." line, with slight
variations depending on GMT/localtime.

Since I pop my mail, and thus receive several mails at a time,
having many of them indexed with largely identical dates,
differing at most a few seconds, is not desirable. Especially
since on Mondays, I pop all weekend's worth of mail and thus can
get over a hundred mails with almost identical date/time.

So which field do you want used?  Just change DATEFIELDS to reflect
what you want.

For example, I run a private archive that fetches mail via POP with
fetchmail from my ISP.  Since the fetch only occurs once an hour (or
more if my system is off), I want to use the date my ISPs mail server
received the mail, not when I downloaded them.  Hence, I have the
following DATEFIELDS resource value:

  received[2]:received[1]:received:delivery-date:date

(Note: Using indexed fields is only supported in MHonArc v2.5.12 or
 later).

The value says to use the 3rd Received field first (which should be
the one the ISP mail server generates).  The 1st and 2nd Received
fields are generated from fetchmail and my local sendmail process.

--ewh

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

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