kahngskp
04-09-2006, 03:38 PM
Hello Javascript Gurus,
I am trying to set up the form and change variables according to form_mailer.pl. I think I followed the instruction exactly. I still don't receive user's information. I can't seem to find what I am doing wrong. I copied and pasted the instruction below. At the end of the message, I copied and pasted my variables.
$mailprog = '/usr/lib/sendmail -i -t';
This variable must define the location to your server's sendmail
program. If this is incorrect, form results will not be mailed to you.
Specifying the parameters in this variable is new in v1.91, and we have
included the -i parameter so that a single period on a line by itself
will not end the message. -t instructs sendmail to read the recipient list
from the message text.
@referers = ('yourdomain.com','YOUR_IP');
This array allows you to define the domains one which you allow forms
to reside and use this installation of FormMail. If a user tries to
put a form on another server, that is not yourdomain.com, they
will receive an error message when someone tries to fill out their form.
By placing yourdomain.com in the @referers array, this also allows
www.yourdomain.com, ftp.yourdomain.com, any other http address
with yourdomain.com in it and yourdomain.com's IP address to access
this script as well, so no users will be turned away.
NOTE: This is not a security check. Referer headers can EASILY be faked.
Rather, it prevents someone on xyznotyou.com from using the FormMail
on your server to process forms on their server on a regular basis.
It remains in the script as a remnant of earlier versions when it
was used for security, but the @recipients variable is now used
to specify exactly who can receive e-mail from this installation.
As of version 1.7, the domains listed here are also used as the defaults
when checking valid recipient e-mail addresses. You should either
include all domain names that you wish to have FormMail send e-mails to
in your @referers array or tailor the @recipients array by hand.
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
This array allows the administrator to specify a list of environment
variables that the user may request be added into the e-mail.
Only environment variables listed in this array may be included in the
form field env_report. So if you wanted to also know what URL a user was
submitting from, you could change @valid_ENV to:
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER',
'HTTP_USER_AGENT','HTTP_REFERER');
and then include HTTP_REFERER in your env_report form field.
@recipients = &fill_recipients(@referers);
If you wish to only allow e-mail addresses at the domain names in
@referers to receive form results, you probably do not need to change this
variable. However, if you get any 'Error: Bad/No Recipient' messages when
running FormMail, you may have to revisit @recipients and make sure you
have correctly listed all domains or configured this variable.
@recipients is the most important variable you need to configure. It is an
array of regular expressions defining all valid recipients that can be
specified. In order for an e-mail to be sent to the recipient defined in
a form, the recipient e-mail address must match one of the elements in the
@recipients array.
SIMPLE SETUP:
For the most simple setup, place any domain name that you wish to send
form results to in the @referers array. Warning: This allows those domains
to also access your FormMail script and utilize it to process their own
forms, but likely this is what you intended anyway. If so, you can leave:
@recipients = &fill_recipients(@referers);
NO, THAT IS NOT WHAT I INTENDED!
Another alternative, then, is to set @recipients equal to the return value
of the fill-recipients function and pass this function all of the domains
to which e-mail may be addressed:
@recipients = &fill_recipients('domain.com','sub.domain.com','another.com');
You are now allowing e-mail to any username (provided it contains only A-Z,
a-z, 0-9, _, - or .) at those three domains.
Similarly, since @recipients is just an array, you could even do:
@recipients = (&fill_recipients('domain.com','sub.domain.com'),
'^otheruser1@otherhost\.com','^otheruser2@otherhost\.com');
This would allow any recipient at domain.com and sub.domain.com similar
to the previous example, but would also allow your friends otheruser1 and
otheruser2 on otherhost.com to use your FormMail! Of course, you will need
to add otherhost.com into your @referers array if a form is on their host!
This is what I got according to the instruction above.
$mailprog = 'windmail -t';
@referers = ('skipritchielaw.com','66.245.191.32');
@recipients = &fill_recipients('kahngskp@hotmail.com');
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
Have I missed anything?
Thanks in advance.
I am trying to set up the form and change variables according to form_mailer.pl. I think I followed the instruction exactly. I still don't receive user's information. I can't seem to find what I am doing wrong. I copied and pasted the instruction below. At the end of the message, I copied and pasted my variables.
$mailprog = '/usr/lib/sendmail -i -t';
This variable must define the location to your server's sendmail
program. If this is incorrect, form results will not be mailed to you.
Specifying the parameters in this variable is new in v1.91, and we have
included the -i parameter so that a single period on a line by itself
will not end the message. -t instructs sendmail to read the recipient list
from the message text.
@referers = ('yourdomain.com','YOUR_IP');
This array allows you to define the domains one which you allow forms
to reside and use this installation of FormMail. If a user tries to
put a form on another server, that is not yourdomain.com, they
will receive an error message when someone tries to fill out their form.
By placing yourdomain.com in the @referers array, this also allows
www.yourdomain.com, ftp.yourdomain.com, any other http address
with yourdomain.com in it and yourdomain.com's IP address to access
this script as well, so no users will be turned away.
NOTE: This is not a security check. Referer headers can EASILY be faked.
Rather, it prevents someone on xyznotyou.com from using the FormMail
on your server to process forms on their server on a regular basis.
It remains in the script as a remnant of earlier versions when it
was used for security, but the @recipients variable is now used
to specify exactly who can receive e-mail from this installation.
As of version 1.7, the domains listed here are also used as the defaults
when checking valid recipient e-mail addresses. You should either
include all domain names that you wish to have FormMail send e-mails to
in your @referers array or tailor the @recipients array by hand.
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
This array allows the administrator to specify a list of environment
variables that the user may request be added into the e-mail.
Only environment variables listed in this array may be included in the
form field env_report. So if you wanted to also know what URL a user was
submitting from, you could change @valid_ENV to:
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER',
'HTTP_USER_AGENT','HTTP_REFERER');
and then include HTTP_REFERER in your env_report form field.
@recipients = &fill_recipients(@referers);
If you wish to only allow e-mail addresses at the domain names in
@referers to receive form results, you probably do not need to change this
variable. However, if you get any 'Error: Bad/No Recipient' messages when
running FormMail, you may have to revisit @recipients and make sure you
have correctly listed all domains or configured this variable.
@recipients is the most important variable you need to configure. It is an
array of regular expressions defining all valid recipients that can be
specified. In order for an e-mail to be sent to the recipient defined in
a form, the recipient e-mail address must match one of the elements in the
@recipients array.
SIMPLE SETUP:
For the most simple setup, place any domain name that you wish to send
form results to in the @referers array. Warning: This allows those domains
to also access your FormMail script and utilize it to process their own
forms, but likely this is what you intended anyway. If so, you can leave:
@recipients = &fill_recipients(@referers);
NO, THAT IS NOT WHAT I INTENDED!
Another alternative, then, is to set @recipients equal to the return value
of the fill-recipients function and pass this function all of the domains
to which e-mail may be addressed:
@recipients = &fill_recipients('domain.com','sub.domain.com','another.com');
You are now allowing e-mail to any username (provided it contains only A-Z,
a-z, 0-9, _, - or .) at those three domains.
Similarly, since @recipients is just an array, you could even do:
@recipients = (&fill_recipients('domain.com','sub.domain.com'),
'^otheruser1@otherhost\.com','^otheruser2@otherhost\.com');
This would allow any recipient at domain.com and sub.domain.com similar
to the previous example, but would also allow your friends otheruser1 and
otheruser2 on otherhost.com to use your FormMail! Of course, you will need
to add otherhost.com into your @referers array if a form is on their host!
This is what I got according to the instruction above.
$mailprog = 'windmail -t';
@referers = ('skipritchielaw.com','66.245.191.32');
@recipients = &fill_recipients('kahngskp@hotmail.com');
@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');
Have I missed anything?
Thanks in advance.