You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by forum <an...@gmail.com> on 2005/05/09 11:01:00 UTC

how to force SA to scan mail that send from php

Hi, I've wrote php command to send an e-mail to myself and i found that SA didn't scan it.

i use the command
mail(myself@mydomain,"subject","message");
and there are many keywords that affect my rules
but when i receive it, there aren't any header from spam assassin

which part of SA code should i change or what should i do to force SA to scan every mail.
thanks

Re: how to force SA to scan mail that send from php

Posted by wolfgang <me...@gmx.net>.
In an older episode (Monday 09 May 2005 12:08), forum wrote:
> My server uses a local ip so it can't receive real
> mails. Thus i've to feed every mail by myself.

Be aware that SA uses a lot of tests that are based on "outside" information 
like Received: headers. If the mails that you feed do not contain such 
information, your results may be misleading.

> PHP's mail command use smtp to send mails.

OK. Your smtp server (MTA) needs to pass the mails to SA, for details how to 
do that, you may find
http://wiki.apache.org/spamassassin/TestingInstallation
http://wiki.apache.org/spamassassin/StartUsing
http://wiki.apache.org/spamassassin/AskingAboutIntegrations
http://wiki.apache.org/spamassassin/IntegratedInMta
useful.

> I only know 
> that i follow steps in QMailRocks to config SA

I dont know what QMailRocks is, I guess it is about qmail.
If you want people to be able (and willing) to help you, you should provide 
additional needed information with your requests, in this case, e.g. the URL 
of QMailRocks would certainly have been helpful.

A fairly easy way to test if SA works at all (without using smtp) can be the 
command:

echo -e "Subject: THIS IS A TEST\\n\\nCLICK BELOW" | spamassassin -tD

Hope this helps,

wolfgang

Re: how to force SA to scan mail that send from php

Posted by forum <an...@gmail.com>.
mails that i received form other servers are added with a line such as
"X-Spam-Status: No, hits=-4.4 required=4.0"

This type of mail is very important for me because i'm studying the accuracy
of SA for my project. My server uses a local ip so it can't receive real
mails. Thus i've to feed every mail by myself.

Other information
PHP's mail command use smtp to send mails.
I've tried to use smtp to send mail to myself and the result is as like as
result from php.
My SA is version 3.01.
I don't know the way i call SA because i'm a newbie in unix. I only know
that i follow steps in QMailRocks to config SA

Thanks




----- Original Message -----
From: "wolfgang" <me...@gmx.net>
To: <us...@spamassassin.apache.org>
Sent: Monday, May 09, 2005 4:43 PM
Subject: Re: how to force SA to scan mail that send from php


> In an older episode (Monday 09 May 2005 11:01), forum wrote:
>
> > i use the command
> > mail(myself@mydomain,"subject","message");
> > and there are many keywords that affect my rules
> > but when i receive it, there aren't any header from spam assassin
>
> In other mails you receive, there are headers from spamassassin?
>
> >
> > which part of SA code should i change or what should i do to force SA to
> scan every mail.
>
> I don't think that is a problem of SA but rather of
> - the way you call SA on the receiving system.
> - the way your php command submits the mail to the MTA.
>
> How is the mail inserted into the mail system?
>
> regards,
> wolfgang
>


Re: how to force SA to scan mail that send from php

Posted by wolfgang <me...@gmx.net>.
In an older episode (Monday 09 May 2005 11:01), forum wrote:

> i use the command
> mail(myself@mydomain,"subject","message");
> and there are many keywords that affect my rules
> but when i receive it, there aren't any header from spam assassin

In other mails you receive, there are headers from spamassassin?

> 
> which part of SA code should i change or what should i do to force SA to 
scan every mail.

I don't think that is a problem of SA but rather of
- the way you call SA on the receiving system. 
- the way your php command submits the mail to the MTA.

How is the mail inserted into the mail system?

regards,
wolfgang