Spamassassin client
    Brian Ablaza 
    bablaza at stargroup1.com
       
    Tue May  6 07:31:33 PDT 2003
    
    
  
Would it be possible to create a spamc client for spamassassin in 
Frontier? I think Frontier could act as a front end to a spam 
detection web service.
 From spamd (spamassassin daemon) ReadMe:
---------
The protocol for communication between spamc/spamd is somewhat HTTP like.  The
conversation looks like:
                    spamc --> PROCESS SPAMC/1.2
                    spamc --> Content-length: <size>
   (optional)   spamc --> User: <username>
                    spamc --> \r\n [blank line]
                    spamc --> --message sent here--
                    spamd --> SPAMD/1.1 0 EX_OK
                    spamd --> Content-length: <size>
                    spamd --> \r\n [blank line]
                    spamd --> --processed message sent here--
After each side is done writing, it shuts down its side of the connection.
The first line from spamc is the command for spamd to execute (PROCESS a
message is the command in protocol<=1.2) followed by the protocol version
The first line of the response from spamd is the protocol version (note this is
SPAMD here, where it was SPAMC on the other side) followed by a response code
from sysexits.h followed by a response message string which describes the error
if there was one.  If the response code is not 0, then the processed message
will not be sent, and the socket will be closed after the first line is sent.
---------
If I use the standard httpClient to connect to spamd (on port 783, 
the standard spamd port) I get a properly formed error, so I know 
spamd is listening and can respond. But if I alter httpClient to 
match the commands above, the stream times out.
Any interest here?
-- 
Brian Ablaza
Chief Technology Officer and Partner
The Star Group
(856) 488-5500
bablaza at stargroup1.com
    
    
More information about the Frontier-Users
mailing list