procmail
[Top] [All Lists]

Re: Y2K problem in auto-responder

2000-01-03 17:17:53
Helmut <Helmut(_dot_)Brammerts(_at_)ruhr-uni-bochum(_dot_)de> writes:
Our partners have problems to find our automatic replies 
in their mailbox because their date is "3 Jan 100".
The first Received header is:
Received: by our.host (Smail3.1.29.1 #4) id m1259at-000MZ1n; 
         Mon, 3 Jan 100 16:40 GMT+0100 

While silly, that Received: header is perfectly legal: according to
rfc1123, the official arpa date specification for e-mail allows, 2, 3
or 4 digit years.  Tell them their software is violating the standards
(Of course, yours isn't much better).


We can't replace the (old) Smail by now. We wonder, however, if
there might be a solution using a better procmail recipe which feeds
the correct date to Smail - all messages sent by pine on the
same host produce a correct (visible) date for the receiver
(in spite of the wrong Received header date).

Oh, so it's not the Received: header that's the problem but rather the
Date: header?  Their software is still broken, but this can be worked
around on your end.


We use the standard auto-responder recipe:

:0 h c
* !^FROM_DAEMON
* !^X-Loop: our(_at_)address
| (formail -r -I"Precedence: junk" \
             -A"X-Loop: our(_at_)address" ; \
  cat $HOME/received.msg) | $SENDMAIL -t

You can nest the date command into the formail argument by careful
quoting:

        :0 h c
        * !^FROM_DAEMON
        * !^X-Loop: our(_at_)address
        | (formail -r -I"Precedence: junk" \
                      -A"X-Loop: our(_at_)address" \
                      -A"Date: `date +'%a, %d %b %Y %T'` -0500" ; \
           cat $HOME/received.msg) | $SENDMAIL -t


Any smail that doesn't emit 4 digit years probably has a myriad of
other bugs in it, so don't put off upgrading it for too long...


Philip Guenther


(For those who prefer to be inscrutable, consider the following:

        "`date +'-ADate: %a, %d %b %Y %T -0500'`" 

Kids, Don't Try This At Home!)

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