| 13 |
# Source available at http://www.erc.msstate.edu/~phil/src/mailback.pl |
# Source available at http://www.erc.msstate.edu/~phil/src/mailback.pl |
| 14 |
# |
# |
| 15 |
# Also based on "sendmail-cgi.pl" by Erik C. Thauvin <erik@skytouch.com> |
# Also based on "sendmail-cgi.pl" by Erik C. Thauvin <erik@skytouch.com> |
| 16 |
# Copyright (C) 1995-99 Erik C. Thauvin. All rights reserved. |
# Copyright (C) 1995-2001 Erik C. Thauvin. All rights reserved. |
| 17 |
# |
# |
| 18 |
# Date: 02/26/99 |
# Date: 02/22/01 |
| 19 |
# |
# |
| 20 |
# Usage: You must reference this script in your HTML forms with |
# Usage: You must reference this script in your HTML forms with |
| 21 |
# the method=POST option. Options are passed inside the |
# the method=POST option. Options are passed inside the |
| 352 |
return 0; |
return 0; |
| 353 |
} |
} |
| 354 |
|
|
|
|
|
| 355 |
# |
# |
| 356 |
# Ensure that the proper environment variables are defined |
# Ensure that the proper environment variables are defined |
| 357 |
# |
# |
| 500 |
select(SOCK); $| = 1; |
select(SOCK); $| = 1; |
| 501 |
select(STDOUT); $| = 1; |
select(STDOUT); $| = 1; |
| 502 |
|
|
| 503 |
if (&getresultcode != 220) |
if (&getresultcode == 220) |
| 504 |
{ |
{ |
| 505 |
$mailagent = 'smtp'; |
$mailagent = 'smtp'; |
| 506 |
} |
} |
| 562 |
if (defined($ENV{REMOTE_IDENT})) { print SOCK "X-Remote-Ident: $ENV{REMOTE_IDENT}$eol"; } |
if (defined($ENV{REMOTE_IDENT})) { print SOCK "X-Remote-Ident: $ENV{REMOTE_IDENT}$eol"; } |
| 563 |
if (defined($ENV{REMOTE_USER})) { print SOCK "X-Remote-User: $ENV{REMOTE_USER}$eol"; } |
if (defined($ENV{REMOTE_USER})) { print SOCK "X-Remote-User: $ENV{REMOTE_USER}$eol"; } |
| 564 |
if (defined($ENV{HTTP_REFERER})) { print SOCK "X-URL: $ENV{HTTP_REFERER}$eol"; } |
if (defined($ENV{HTTP_REFERER})) { print SOCK "X-URL: $ENV{HTTP_REFERER}$eol"; } |
| 565 |
|
|
| 566 |
|
print SOCK "X-Mailback-Agent: $mailagent$eol"; |
| 567 |
|
|
| 568 |
if (defined($posted{senderinfo})) |
if (defined($posted{senderinfo})) |
| 569 |
{ |
{ |