My spamassassin is running on a remote server, no way to get around this at the moment. I am connecting to spamd on the remote server using sockets in php. Unfortunately I have to close the socket to get a response/spam score from the server. Is there any other way to promt a response from the server without closing the socket? I believe if I could figure this out, things could be sped up quite a bit. Is there a way to use spamc to maintain a connection to spamd, perhaps a way to send multiple messages?
--- mouss <[EMAIL PROTECTED]> wrote: > Matt Kettler wrote: > > 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. > > > > > > My understanding is that he is talking about spamd, which doesn't > allow > socket reuse. The protocol doc says: > After each side is done writing, it shuts down its side of the > connection. > > I don't know if there are hard design issues, but the socket could > be > used, that would be good. > > Another thing is that I can't find a way to get the SA headers (as > they > would be added by spamassassin) without having the full message > sent > back (SYMBOLS doesn't return the score of each test). or am I > missing > something? > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com