On Wed, 2006-03-29 at 08:50 -0800, Kenneth Kim wrote: > 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?
I believe what you are asking is whether the spamd socket connection can be reused for multiple messages. The answer is no, each processed message requires the overhead of a new socket to spamd. To do what you seem to want to do would require a multi-threaded connection caching server to encapsulate the spamassassin/spamd objects. This is analogous to the mimedefang-multiplexor (and probably lots of other anti-spam software that uses spamassassin) that run a number of spamassassin objects in separate threads.
signature.asc
Description: This is a digitally signed message part