Justin Mason wrote:
Adam Lanier writes:
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.
for what it's worth, the overhead of UNIX domain sockets is a lot less.
among other problems, unix sockets can't be used if the client and the
server are in disjoint jails. even if the server isn't jailed, if
multiple jailed apps need to access it, there is a problem (the server
needs to create a socket per jail). now, what if you add a new app? you
need to restart/reload the server. but then, what happens to other apps?
who may started a connection... not easy.
This reminds that during system boot: syslog needs ntp, ntp needs syslog
and dns, dns needs time and syslog (and I'm not talking about other
services). it works, but...