473,513 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SMTPsvg.Mailer error

I'm using a block of ASP to allow a user to send a form via e-mail.
However, someone keeps sending me spam through this form
and they're using a bogus return address. I'm testing for a
successful send, which should fail if the return address is
not valid, but I'm still getting the junk.
The block looks like this:

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "smtp.xxx.com"
Mailer.FromName = Request.QueryString ("Name")
Mailer.FromAddress = Request.QueryString ("Email")
Mailer.AddRecipient "Web Mail", "PC**@xxx.com"
Mailer.Subject = "P.C.T. E-mail"
Mailer.BodyText = UserString
if Mailer.SendMail then
Response.Write " - Sucessful - "
else
Response.Write " - Failed - "
Response.Write Mailer.Response
end if

Should this block be stopping bogus From addresses?
Or do I need to be doing something different?

Jan 27 '07 #1
4 6594
Mike wrote on Sat, 27 Jan 2007 12:13:00 -0800:
I'm using a block of ASP to allow a user to send a form via e-mail.
However, someone keeps sending me spam through this form
and they're using a bogus return address. I'm testing for a
successful send, which should fail if the return address is
not valid, but I'm still getting the junk.
The block looks like this:

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "smtp.xxx.com"
Mailer.FromName = Request.QueryString ("Name")
Mailer.FromAddress = Request.QueryString ("Email")
Mailer.AddRecipient "Web Mail", "PC**@xxx.com"
Mailer.Subject = "P.C.T. E-mail"
Mailer.BodyText = UserString
if Mailer.SendMail then
Response.Write " - Sucessful - "
else
Response.Write " - Failed - "
Response.Write Mailer.Response
end if

Should this block be stopping bogus From addresses?
Or do I need to be doing something different?
That mailer component cannot verify if the from address is valid or not - to
do so would require it to connect to the destination server for that domain
and then determine if the address exists; either start a dummy SMTP
conversation sending to that address and looking for an error response, or
and use the verify command to ask if the address exists - although most
servers that support ESMTP should have the VRFY command disabled if they
have any sense, as it can be used to pull a list of valid addresses from a
server using a dictionary scan. What would happen if the server was down?
Would you want the message rejected? What if the message was legitimate, but
the person's ISP was having some mail server issues at the time?

There really is very little you can do to block someone spamming you this
way if they're persistent. You could look for specific strings in the
UserString variable and reject on that (such as web addresses, or certain
words). You could add a random number + check digit as hidden fields, and
have your code verify that they match before accepting the rest of the
data - this prevents direct use of the form from a script, but won't prevent
one that pulls the form HTML from the server prior to generating the
necessary POST data string to send back to ensure it's complete.

I've had problems with spam to a customer comment system on one of my own
sites in the past; luckily all comments require admin moderation before
being published to the site, so the spam never got displayed to the public -
I used a combination of variable inspection (rejecting all submissions that
had a URL in the title, which most of the spam ones did), and the random
number + check digit (which stopped the ones that didn't have a URL in the
title field, but were being posted from a script).

Dan
Jan 29 '07 #2
Thanks for the reply.
I was considering the random number scheme previously,
but I don't know if the spammer is sitting at the keyboard
or if it's automated. Two months ago, he sent 30 messaged
in a single day (twice), and I don't know why an automated
system would do that, nor why someone at the keyboard
would waste that much time.
For the time being, I've disabled the mail handler page.

Jan 29 '07 #3
Mike wrote on Mon, 29 Jan 2007 09:11:02 -0800:
Thanks for the reply.
I was considering the random number scheme previously,
but I don't know if the spammer is sitting at the keyboard
or if it's automated. Two months ago, he sent 30 messaged
in a single day (twice), and I don't know why an automated
system would do that, nor why someone at the keyboard
would waste that much time.
For the time being, I've disabled the mail handler page.

Do these comments get posted anywhere on a web page? If so, and the spam is
full of URLs, it's being done to increase the number of links back to the
URL, and in doing so will increase Google Page Rank. This is what was being
done on my site, and the random number field plus filtering on URLs stopped
it dead. It probably is automated, it's pretty easy to write a script that
navigates sites looking for forms that ask for a set of information (such as
"email address" and "comment"), and then post to them using the form data as
it was presented at the time the form HTML was retrieved. What you need to
be careful of is that even here the random number + check digit will allow
the form to be posted unless your random number and/or check digit
calculation is also site time dependent. For instance, factor in the current
date into the calculation somehow.

Dan
Jan 30 '07 #4
"Daniel Crichton" wrote:
Do these comments get posted anywhere on a web page? If so, and the spam is
full of URLs, it's being done to increase the number of links back to the
URL, and in doing so will increase Google Page Rank. This is what was being
done on my site, and the random number field plus filtering on URLs stopped
it dead. It probably is automated, it's pretty easy to write a script that
navigates sites looking for forms that ask for a set of information (such as
"email address" and "comment"), and then post to them using the form data as
it was presented at the time the form HTML was retrieved. What you need to
be careful of is that even here the random number + check digit will allow
the form to be posted unless your random number and/or check digit
calculation is also site time dependent. For instance, factor in the current
date into the calculation somehow.
The comments don't get posted anywhere, they're just e-mailed to me.
But they include links to porn and pills web sites, so I guess he thinks
they're posted somewhere. I wonder if changing form text and variable
to nonstandard wording would throw off his bot?

Jan 30 '07 #5

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

Similar topics

6
7142
by: Raphael Gluck | last post by:
Hi all I am still finding my feet creating a website in ASP, and i'm trying to get to grips with users providing feeback to my site. my webhosts have the dundas mailer installed, and i am trying...
2
5303
by: John Davis | last post by:
What is the **MOST** obvious reason why will this will fail (it's not syntax or anything specific to the object)? Function Mail(MailerProgram, Message, Subject, Format, FromEmail, ToEmail,...
1
3246
by: Beyza | last post by:
Hi, I have a problem. One of my customer used to use php mailer in her web page. But when i changed something in the system (php packages) , it was broken. If she use php-mailer in her system,...
4
3133
by: Al G | last post by:
Has anyone played with MS's SMTP sample, mailer.exe? I downloaded the sample, and ran it, but keep getting the error "Failure sending mail". Where might I look for more information? Maybe some...
0
2703
by: askzda | last post by:
Hi, Can somebody pls help to solve above problem. I have used dundas mailer for my mailing part in my asp script, but the an error occured during sending the mail. Error that is prompted out just...
0
1467
by: ajadon | last post by:
I need help.... I bought SMTPsvg.Mailer and tried to use it on my server. I always get the error number 554 - No recipients have been specified. I know it all has to do with the SMTP...
6
26317
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided...
5
10013
by: neovantage | last post by:
Hey all, I am using Swift mailer and i am getting error "Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given does not comply with RFC 2822,...
9
8213
by: neovantage | last post by:
hey geeks, I have a small mail script which will cause a PHP script to send a receipt upon clicking the submit button, by an HTML mail. This mail contains special characters, namely 'å', 'ä' and...
0
7384
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,...
1
7099
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
5685
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,...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.