If you've seen this before, please delete it.
Most reply pointed to adding a ~/.signature file. However, the standard
mail or mailtool program from Sun doesn't pick up that file. If you're
using elm, it works, but I'm using Solaris 2.2 and I don't think there is
a copy of elm for Solaris 2.X yet, or does it exist?
Thanks to Alex Sarafian, Ed Arnold and Brian Decker who gave me some
good pointers on how to do it with standard mail. I included their replies
below. Some people suggested that I create a template with mailtool, which
I knew already. Some people misunderstand and tell me how to email with
attachment. Anyway, thanks to all who answered nicely.
1 person asked me not to post summary but 4 people asked me to. 1 person
from Aurora Technologies want to sell me consulting contract for this but
no thanks!
Thanks to the reply from the following people and more:
afm@cis.ufl.edu
djh@rational.com
neputi@inlmutt.den.mmc.com
fcheng@pilot.njin.net
alex.sarafian@analog.com - thank
brian@arthur.melpar.esys.com - thank
era@ncar.ucar.edu - thank
hdong@crhc.uiuc.edu
amick@erim.org
adam%bwnmr4@harvard.harvard.edu
villa@eagle.bio.unipr.it
ckelly@math.nwu.edu
DocKnow@BComeau.Hydro.Qc.CA
tkevans@eplrx7.es.duPont.com
kroeze@cs.utwente.nl
Matt_Mauss_-T@hqdev.3mail.3com.com
bachner@Cassini.genethon.fr
HILL@cgi.com
dhouston@bio.ri.ccf.org
hkatz@nucmed.NYU.EDU
trigraph!briand
The following people requested summary:
afm@cis.ufl.edu
djh@rational.com
neputi@inlmutt.den.mmc.com
The following person request not to post summary:
ckelly@math.nwu.edu - Sorry! 3 to 1, they win.
I will include some good reply:
---------------------From alex.sarafian@analog.com-------------------
First, create a file in the home directory named ".signature"
which contains the footer.
Make sure it is no longer than 4 lines (this is the accepted .signature
length).
Then, in your ".mailrc" file in your home directory (if you don't have one, then
create it), add the following line in the begining of the file:
"set sendmail=my-mailer"
Then, in your home directory, create a file called "my-mailer" which
contains the following:
#! /bin/sh
#
# @(#)my-mailer v.1.0 21-MAY-91
#
#
(IFS_save=$IFS
#solves problem of read line discarding leading blanks which are necessary
#for correct interpretation of continuation lines in mail headers
IFS=
while read line
do
echo "$line"
case $line in
"") break ;;
esac
done
IFS=$IFS_save
cat -) | cat - $HOME/.signature 2> /dev/null | /usr/lib/sendmail "$@"
#
# END
Make sure it has execute permissions (do a "chmod x+a my-mailer")
----------------------------------------------------------------------------
---------------------From brian@arthur.melpar.esys.com---------------
Write a executable script like the following and put it into an
accessible place ( like $HOME/bin/signmail )
#!/bin/sh
#
# signmail - automatically add .signature to mail and then
# exec sendmail
#
if [ -f ${HOME}/.signature ]; then
(cat - ; echo "" ; cat ${HOME}/.signature) | exec /usr/lib/sendmail $*
else
exec /usr/lib/sendmail $*
fi
Create a $HOME/.signature file with your choice of witty saying, etc..
Edit your $HOME/.mailrc file so that there is a line that reads
set sendmail=path_to_where_you_put_it/signmail
----------------------------------------------------------------------------
---------------------From era@ncar.ucar.edu----------------------------
Some mailers include the ability to tack your ~/.signature file onto
a mail message, either when it's sent, or just before throwing you
into an editor to compose it.
I use the "elm" mailer. In my ~/.elm/elmrc file, I tell elm to tack
the .signature file onto my messages via the line:
remotesignature = .signature
If you use the old Berkeley "Mail" program, things are a little messier.
What I do with it, is to put a "set sendmail" reference in my ~/.mailrc
file, which causes "Mail" to call my "sendmail":
set sendmail=/crestone/home/era/bin/sendmail.era
That file is just a script that tacks .signature onto the message, then
calls the real sendmail:
#!/bin/sh
# add From: & Reply-To: lines before forwarding mail to /usr/lib/sendmail.
# add also a signature automatically.
# This file referenced in $HOME/.mailrc.
(
echo "From: era@ncar.ucar.edu (Ed Arnold)"
echo "Reply-to: era@ncar.ucar.edu (Ed Arnold)"
cat -
echo "--------"
cat $HOME/.signature
) | /usr/lib/sendmail $*
----------------------------------------------------------------------------
----------------------------------------------------------
Johnny Hui email: jhui@magma.com
MAGMA Tel: (619) 457-0750
6725 Mesa Ridge Road #100, Fax: (619) 457-0798
San Diego, CA 92124
----------------------------------------------------------
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:51 CDT