[3553] in WWW Security List Archive
get_host_email (fwd)
daemon@ATHENA.MIT.EDU (Steff Watkins)
Fri Nov 15 13:24:22 1996
Date: Fri, 15 Nov 1996 14:17:43 +0000 (GMT)
From: Steff Watkins <Steff.Watkins@Bristol.ac.uk>
To: www-security@ns2.rutgers.edu
Errors-To: owner-www-security@ns2.rutgers.edu
>See the sender sends the form to the script, the script then sends it to
>the recipients. Hence Sendmail thinks that the sender is the script and
>not a person. The recipient gets a mail that says the mail was sent from
>my server.
>how do I go about this? I want get the senders email? not host name,
>email. I mean there is no command like ENV(GETHOSTEMAIL).
Hello,
try something like:
Determine the user's ID is someway (I would say use getenv{'REMOTE_USER'}
but I'm still getting shitty emails from the last time I suggested that).
Drop that in $userid
Determine the remote host. Drop that into $host
Set the 'Sender: ' and 'Reply-to: 'fields on the outgoing email to
$user@$host.
Note:- This is NOT a very good way of doing it, as you cannot guarantee
that you can deterime the userid, or that the derived 'email address' is
valid for the receipt of email.
Another way of doing it is to have the form sender put their email
address into the script in some variable. Then you have the
remailler script take that email address out of the form, and put it into
the 'Sender: ' and 'Reply-to: ' headers of the outgoing email..
Two pennies worth,
Steff
: Steff Watkins, General Computer-type being
: University of Bristol, Clifton, Bristol, BS8 1TH, UK
:
: RFC-822 : Steff.Watkins@bris.ac.uk
: X-400 : /G=Steff/S=Watkins/O=Bristol/PRMD=UK.AC/ADMD= /C=GB/
: Phone: +44 177 9287869 (external) 3046 / 7869 (internal)