itkin@luke.UUCP (Steven List) (08/07/85)
Description: This patch adds a From: line to the Rnmail header. It is intended for those systems using not-so-smart mailers that don't prepend anything other than the basic From line at the top. This will add a line of the form From: logname@sitename.DOMAIN (fullname) after the To: line in the mail header. This is based against the latest patches received from lwall (25?). *** Rnmail.orig Thu Jun 6 12:44:39 1985 --- /usr/bin/Rnmail Tue Aug 6 15:57:31 1985 *************** *** 27,32 # if you change this to something that does signatures, take out signature code # your site name case undef in define) sitename=`uuname -l` ;; undef) sitename="luke" ;; --- 27,33 ----- # if you change this to something that does signatures, take out signature code # your site name + undef=define case undef in define) sitename=`uuname -l` ;; undef) sitename="luke" ;; *************** *** 114,123 # now build a file with a header for them to edit ! orgname=${ORGANIZATION-$orgname} ! case $orgname in ! /*) orgname=`$cat $orgname` ;; ! esac $cat > $tmpart <<EOHeader To: $to --- 115,144 ----- # now build a file with a header for them to edit ! set X ${USER-${LOGNAME-`who am i`}} ! shift ! logname=$1 ! case $logname in ! *!*) logname=`expr "$logname" : '!\(.*\)$'` ;; ! esac ! case ${NAME-$nametype} in ! bsd) ! fullname=`$sed </etc/passwd -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/" -e "q" -e "}" -e "d"` ! case $fullname in ! *'&'*) : GACK ! lname=`$echo $logname | $tr 'a-z' 'A-Z'` ! lname=`$echo $lname $logname | $sed 's/^\(.\)[^ ]* ./\1/'` ! fullname=`$echo "$fullname" | $sed "s/&/${lname}/"` ! ;; ! esac ! ;; ! usg) ! fullname=`$sed </etc/passwd -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^(:]*\).*"'$'"/\1/" -e "s/^.*-//" -e "q" -e "}" -e "d"` ! ;; ! *) ! fullname=${NAME-`$cat ${HOME-$LOGDIR}/.fullname`} ! ;; ! esac orgname=${ORGANIZATION-$orgname} case $orgname in *************** *** 119,124 /*) orgname=`$cat $orgname` ;; esac $cat > $tmpart <<EOHeader To: $to Subject: $title --- 140,151 ----- ;; esac + orgname=${ORGANIZATION-$orgname} + case $orgname in + /*) orgname=`$cat $orgname` ;; + esac + + $cat > $tmpart <<EOHeader To: $to From: $logname@$sitename.UUCP ($fullname) *************** *** 121,126 $cat > $tmpart <<EOHeader To: $to Subject: $title Organization: $orgname Cc: --- 148,154 ----- $cat > $tmpart <<EOHeader To: $to + From: $logname@$sitename.UUCP ($fullname) Subject: $title Organization: $orgname Cc: -- *** * Steven List @ Benetics Corporation, Mt. View, CA * Just part of the stock at "Uncle Bene's Farm" * {cdp,greipa,idi,oliveb,sun,tolerant}!bene!luke!itkin ***