Subject: Re: autoreply

From: [email-masked] (Zhiliang Hu)
Date: Sat, 15 Apr 1995 13:46:37 +1000

At  1:37 PM 4/15/95 -0400, Joshua wrote:
>Hi, everybody:
>
>When I use the following recipe to do autoreplying, for some requests
>procmail fails to reply to the right From field (the leading or original 
>>From field).
>
>#### autoreply recipe ####
>
>:0 h
>  * [email-masked]
>  | (formail -r -A"Precedence: junk" -I"Subject: Info: Hyson Intl";\
>    cat $HOME/hyson/info.txt) | $SENDMAIL -oi -t
>
>However, when I use the following recipe to do logging, I got the right
>>From field.
>
>##  logging recipe #####
>
>:0 hc
>{
>  from=`sed -n -e '/From:/s/From: //p' -e '/^$/q'`
>  to=`sed -n -e '/To:/s/To: //p' -e '/^$/q'`
>  date=`date +'%a %b %d %Y %T'`
>  :0
>  | echo $to $date $from >> $HOME/outbound/.log
>}
>
>My question is: how do I use the right From field in my logging recipe
>in my autoreply recipe? or is there any other alternative?
>
>Note: In the logging recipe: 1. the 'from' variable has sender' name and 
>sender' email address. How do I change it so 'from' contains only sender's
>email address? 2. It seems to me the 'date' variable doesn't work for me.
>Any idea?
>
>Happy easter!
>
>Joshua

  David W. Tamkin <[email-masked]> has a recipe to do this:

      formail -I 'From ' -r
  or
      formail -I 'From ' -rt

  Which works fine on my machine.

  Zhiliang