You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Don Ireland <sa...@donireland.com> on 2009/06/06 15:42:57 UTC

check message body/subject for spam?

Hi everyone.

I have a contact form that allows visitors to send messages to me.  Some 
nimnod is using it to send me ads wanting me to use his "Search Engine 
Optimization" service.

Because the form sends messages as though it is ME, the mail server 
doesn't check messages received from my form through SA.  I'm a user on 
a shared hosting service so I can't change that.

If I write the message/subject to a file (so that it looks like a 
message without most of the headers), can I run it through SA and make 
sure that it's not spam?

TIA!

Don Ireland



Re: check message body/subject for spam?

Posted by John Hardin <jh...@impsec.org>.
On Sat, 6 Jun 2009, Don Ireland wrote:

> If I write the message/subject to a file (so that it looks like a 
> message without most of the headers), can I run it through SA and make 
> sure that it's not spam?

Certainly.

Figuring out the headers shouldn't be too difficult, and you will probably 
want to run it using a config that's customized to fake mail (i.e. with 
scores adjusted to reduce the effect of header tests like "does the 
sending hostname look evil?", but it's absolutely technically doable.

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   It is not the place of government to make right every tragedy and
   woe that befalls every resident of the nation.
-----------------------------------------------------------------------
  Today: the 65th anniversary of D-Day

Re: check message body/subject for spam?

Posted by Charles Gregory <cg...@hwcn.org>.
On Sat, 6 Jun 2009, Don Ireland wrote:
> P.S.  What I'm looking to do is check it for spam BEFORE sending the 
> message.

I find that this kind of 'form spam' is best handled by a couple of simple 
'tricks' within the form and the cgi that processes it:

    1) Include a 'hidden' field (using the style visibility attribute) and 
give it a 'tempting' name like 'e-mail'. If it has an entered value, then 
a robot has 'filled' the form.
    2) Reject if anyone enters URI's into the form.
    3) To stop the kind of spam that enters garbage into all the fields 
except for one, do simple format checking on phone number, e-mail and/or 
zip/post-code fields.

These three things stop ALL my form spam. And you don't have to invoke SA.
So I guess this answer was slightly OT.... :)

- Charles

Re: check message body/subject for spam?

Posted by Don Ireland <sa...@donireland.com>.
P.S.  What I'm looking to do is check it for spam BEFORE sending the 
message.

Thx!

Don Ireland



Don Ireland wrote:
> Hi everyone.
>
> I have a contact form that allows visitors to send messages to me.  
> Some nimnod is using it to send me ads wanting me to use his "Search 
> Engine Optimization" service.
>
> Because the form sends messages as though it is ME, the mail server 
> doesn't check messages received from my form through SA.  I'm a user 
> on a shared hosting service so I can't change that.
>
> If I write the message/subject to a file (so that it looks like a 
> message without most of the headers), can I run it through SA and make 
> sure that it's not spam?
>
> TIA!
>
> Don Ireland
>
>