procmail
[Top] [All Lists]

Re: turning recipes on and off

2002-08-23 13:03:49
Udi wrote about my suggestion to Helen,

| The From will give you the sender date,
| it is posible from different time zone.

First of all, Udi, *never* refer to just "From" in discussing email headers.
The RFC2822 From: header and the mbox format 'From ' line (often called the
From_ line) are two entirely different beasts.  To say just "From" like that
is ambiguous and potentially misleading.

Second, that which

| will give you the sender date,
| it is posible from different time zone

would be the Date: header (or perhaps the bottommost [oldest] Received:).
Indeed it is unreliable, since the sender's system could have its clock or its
calendar set wrong, or it could use an incorrect time zone indicator, or it
can use a valid time zone indicator that your system doesn't understand.  For
those reasons (among others: what counts here is the time of delivery, not the
time of sending), I didn't advise going by the time of day nor day of the week
as given there.  I recommended getting them from the From_ postmark line, if
Helen's mail has those, or if procmail's -f- option can generate one for her,
and failing that, getting them from the topmost Received: header.

| The Received: header is better but, not
| all the time it is in the topmost I heared that some servers put
| the Received: lines in revers order.

All servers add Received: headers in reverse order, putting new ones at the
top.  I've never heard of an exception, much less seen one.  The uppermost
Received: header will be the most recent.

| What I sugest is looking
| for Received: line with local machine name - something like:
| "Received:.* by our.local.server.here ...."

That is unnecessary because -- and it will come up only if From_ is
unavailable -- the uppermost Received: header will be the place to look.  In
ordinary circumstances, the entire trip once your provider's smtpd accepts the
message should be no longer than one or two seconds, so any Received: by your
server will have a close enough timestamp.  Once, though, I had an account
where it could take hours or days after a machine on the system first took a
message in from outside until it finally was delivered to a user account, so
the assorted Received:'s naming the server had greatly varying timestamps;
again, the real time of delivery was in the From_ line or in the uppermost
Received:.

All told, From_ is the easiest to parse, I find, especially if procmail -f-
generates it, because it will have a consistent syntax.  Received:'s can vary.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail