473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sending mails fr

I'm writing small script for sending mail from my web pages. I have heard
about security hole in FormMail.pl script which can be used by spammers. I
would like to prevent that in my script. Can you give me some suggestions
regarding that.
Thanx!

--
Relaxen und watch das blinkenlights...
Jul 17 '05 #1
6 1973
"Cpt. Zeep" <ze**@nemame.com> wrote in message
news:bt**********@bagan.srce.hr...
I'm writing small script for sending mail from my web pages. I have heard
about security hole in FormMail.pl script which can be used by spammers. I
would like to prevent that in my script. Can you give me some suggestions
regarding that.
Thanx!

--
Relaxen und watch das blinkenlights...


number one thing, DONT PUT THE RECIPIENT ADDRESS IN THE FORM!
sorry, didn't mean to yell, I have hated marks script since day 1, to big,
to insecure, to complicated.
(and mark, if your reading this, why not put the recipient in the
formmail.pl script with the other freaking things you made everyone
configure?)

sending mail via a script is so freakin easy, but everyone tries to make it
look hard, then they try to wrap it up in some class file, and thats even
harder to use than writing one yourself.

Ok, I know I am venting, I havent vented in a while.

I have two snippets for sending mail if you need them (see my site below)

to keep spammers or others from using your form, hard code the recipient
email address in the script, not the form that the user fills out.

thats about it, thanx for letting me vent, it felt good.
--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #2
"Cpt. Zeep" <ze**@nemame.com> wrote in news:bt**********@bagan.srce.hr:
I'm writing small script for sending mail from my web pages. I have
heard about security hole in FormMail.pl script which can be used by
spammers. I would like to prevent that in my script. Can you give me
some suggestions regarding that.


You need to make sure that the script can send mail *only* to specific
addresses which are defined either in the script or in a database/file
which is *not* writeable by the outside world. The problem with the
original FormMail.pl script was that it took the destination address from a
form field (not a problem in itself) and then would *blindly* (the problem)
send mail to it. Thus spammers would simply write scripts that would
submit their own spam via the form, specifying a different address from
their list each time, and the spam would actually be mailed through your
system.

Thus if the form HTML itself contains the actual address to send to as a
hidden field, your script *must* check to see that the address it's getting
from that field is on the list of "OK to send to" addresses. Or you might
make the hidden field specify a code, which your script would translate to
determine the destination address (this makes it harder for spammers to
harvest your address from the forms).

It would also be a good idea for the script to set a limit on the amount of
data it will mail per invocation, in order to prevent its being used for
DOS attacks on you. This limitation *cannot* be enforced by anything
client side (since an attacker won't be using your client-side form and any
scripting in it); it *must* be enforced by the form handler itself.
Jul 17 '05 #3
CountScubula wrote:

<snip>
to keep spammers or others from using your form, hard code the
recipient email address in the script, not the form that the user
fills out.

thats about it, thanx for letting me vent, it felt good.


Your ventings are quite usefull and informative :) Stay stressed :)
Thanx! (and to Eric, too!)

BTW, it seems that you live on Usenet lately? :)

--
Relaxen und watch das blinkenlights...
Jul 17 '05 #4
"Cpt. Zeep" <ze**@nemame.com> wrote in message
news:bt**********@bagan.srce.hr...
BTW, it seems that you live on Usenet lately? :)

It keeps my mind stimulated, and one never stops learning. As one learns a
new language, one tends to keep using waht works, and doesnt realize there
are better,faster,easier ways to do it.

example: I am a long time perl programmer, I use to write shell scripts, and
sites with it, and I use backticks `` a lot. so, I tend to go there instead
of php functions that do the same.

Besides the Usenet, keeps my kind of hours :)

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #5
I noticed that Message-ID:
<Xn*******************************@130.133.1.4> from Eric Bohlman
contained the following:
I'm writing small script for sending mail from my web pages. I have
heard about security hole in FormMail.pl script which can be used by
spammers. I would like to prevent that in my script. Can you give me
some suggestions regarding that.


You need to make sure that the script can send mail *only* to specific
addresses which are defined either in the script or in a database/file
which is *not* writeable by the outside world.


What if the script has to send a password or order confirmation?

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #6
Geoff Berrow <bl******@ckdog.co.uk> wrote in
news:ei********************************@4ax.com:
You need to make sure that the script can send mail *only* to specific
addresses which are defined either in the script or in a database/file
which is *not* writeable by the outside world.


What if the script has to send a password or order confirmation?


Presumably such a script generates its own content rather than merely
passing along the content sent to it, so it would be useless to spammers.
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
3
by: martin smith | last post by:
Here's the scenario. I'm currently using cdosys/asp to send mail to our SMTP server. We use a product called MailFilter to check for SPAM. It doesn't work very well. If MailFilter isn't working...
1
by: Jayakumar | last post by:
HI, I am using System.web.mail class in my application to send mails. I am using SMTP server for the same. I can send mail to the intranet addresses, But when i send mails to Hotmail or other...
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
5
by: cashdeskmac | last post by:
I am writing a web application will will be hosted on a few peoples laptops as a local application. It will send e-mails once the user connects to the internet. How can I set up the "Mail.From"...
1
by: Dirk Goossens | last post by:
Hello! I'm sending E-mails to mailadresses in a table, using the code below. How can I send more than one attachment? Access can find the file to be send in this field: MY_EMAILATTACHMENT_FIELD...
8
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great ...
1
by: gemma.gill | last post by:
Hi There, I have a button on a form within access that sends a verification e- mail. My problem is that these e-mails are sending from individual user accounts rather than a genieric mailbox. ...
3
by: dskinibbyb | last post by:
Hi Everybody, I am sending mail using the new class in .Net 2.0. Here while sending internal mails it is giving me problem. Carriage return, Line feed and Spaces are lost while sending mails....
2
by: srinivaspnv21 | last post by:
hi every one, plz help me out, i have to send mails from my asp.net page.... I have tried a code where mails are going only to gmail users the code is ... namespace: using System.Web.Mail;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.