Hello,

I would like to implement a client for spamd and while reading Mail-SpamAssassin-3.2.5/spamd/PROTOCOL I doubt on some places what is actually meant.

The first line the client supposed to send (line 12 in the PROTOCOL file) is
        PROCESS SPAMC/1.2\r\n
and later it is described (line 27 of PROTOCOL file) as

        The first line from spamc is the command for spamd to
        execute (PROCESS a message is the command in protocol<=1.3)
        followed by the protocol version.

Now, the initial example contains "SPAMC/" but the description does not mention them, so I am not sure what shall be send.

Later on the client (spamc) is supposed to send headers to spamd:

               spamc --> PROCESS SPAMC/1.2\r\n
               spamc --> Content-length: <size>\r\n
  (optional)   spamc --> User: <username>\r\n
               spamc --> [optional \r\n-delimited headers...]
               spamc --> \r\n [blank line]
               spamc --> --message sent here--

When is it meant the headers from the spamd protocol, and when MIME/RFC2822 headers? Does the [optional \r\n-delimited headers...] line foresee extension of the spamd protocol, for things other than User: and Content-length:, or is it meant for the RFC2822 headers? Asking by example, what is correct to send:

        Content-length: 1000\r\n
        \r\n
        Received: ...
        Date: ...
        From: Peter
        \r\n
        Hello Peter,...\r\n

or rahter

        Content-length: 1000\r\n
        Received: ...
        Date: ...
        From: Peter
        \r\n    
        Hello Peter,...\r\n
        
? Hence, are the MIME headers part of the "message body" in terms of the spamd protocol, or count as spamd-headers, too?

Is the protocol case sensitive or case insensitive for the words "Content-Length" and "User"?

The command HEADERS is described as "Same as PROCESS, but return only modified headers, not body". Later on one can read "HEADERS returns the same as PROCESS, up to and including the double-newline separator between message headers and body -- but stops there."

Does HEADERS return all headers ("the same as PROCESS"), or "only modified headers" with the same FORMAT as PROCESS?

Thanks in advance for you answers,
        Дилян

Reply via email to