Kenneth Kim wrote:
> I've found that SpamAssassin will not return a score until I close
> socket writing. Once i've closed the writing, in order to get a score
> for the next message, I have to reopen the connection in php to send
> another message to SA. I hope I'm wrong about this, but currently I'm
> bottle necking at because I have to reopen the connection. Is there
> anyway for me to get a score w/o having to close socket writing?
> Possibly a command I can send at the end/after each message?

You should switch to using spamd directly if you want to do this with sockets.

You can find the protocol that spamd speaks on it's TCP socket in the PROTOCOL
docs that come with SA.
http://spamassassin.apache.org/full/3.1.x/dist/spamd/PROTOCOL

The "spamassassin" command line script is particularly inefficent for this kind
of thing, and can handle only one message per call. Spamc has the same
one-message-per-call limit.

Reply via email to