in reply to Security of Mail Script

Yes, this is also what I am using for the new 'mailaform' script. It must be secure, unless ofcourse your database isn't secure (db password must not be readable for users). This will stop the e-mail scanners. The chance that soms spammer will try to send spam via a cgi script that is limited to only sending to one (or a few) e-mail addresses is a minimum.

Be carefull with referer checking. This can be annoying for users who have explicitly chosen not to send the referer.
Best bet is to check it only when it's there. Then you make the spamming only harder, less likely, but still your script is usable for everybody.

---
Berik

Replies are listed 'Best First'.
Re: Re: Security of Mail Script
by Cody Pendant (Prior) on Feb 09, 2004 at 01:50 UTC

    It must be secure, unless ofcourse if your database isn't secure (db password must not be readable for users).

    The back end of the whole thing is a whole other thing. Our IT people will probably just want to use a .dat file in an obscurely-named folder in /cgi-bin, knowing them. As long as the script doesn't ever give a CGI::Carp type error saying it couldn't find it, that's probably secure enough anyway ... right..?



    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
    =~y~b-v~a-z~s; print
      On public servers, wich I'm dealing with, I can only find one good solution. You should run the script setuid to some user, and let the script then read a datafile with the passord in it. Make sure that user is the only one able to read the password file. Now the location doesn't need to be secure cause the webserver itself or any other user can't read the file. Suggestions welcome for other ways of dealing with this.
      ---
      Berik