You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Anton Melser <me...@gmail.com> on 2007/04/25 15:33:39 UTC

parsing the summary

Hi,
I am writing a programme which needs to parse the summary (_SUMMARY_)
returned by SA, and after combing the docs couldn't find relevant
specs. It appears that the lines are a fixed length, but I couldn't be
sure... is there anywhere I can get the specs so my parser doesn't do
silly things?
Cheers
Anton

Re: parsing the summary

Posted by Matt Kettler <mk...@verizon.net>.
Anton Melser wrote:
> Hi,
> I am writing a programme which needs to parse the summary (_SUMMARY_)
> returned by SA, and after combing the docs couldn't find relevant
> specs. It appears that the lines are a fixed length, but I couldn't be
> sure... is there anywhere I can get the specs so my parser doesn't do
> silly things?
> Cheers
> Anton
>
AFAIK, there's no set-in-stone format for _SUMMARY_.

This field is intended to be human readable, not machine readable.

Most folks that need to parse parse the spamd logs, or the regular
X-Spam-Status header.

Re: R: parsing the summary

Posted by Matt Kettler <mk...@verizon.net>.
Giampaolo Tomassoni wrote:
>> -----Messaggio originale-----
>> Da: Anton Melser [mailto:melser.anton@gmail.com]
>>
>> Hi,
>> I am writing a programme which needs to parse the summary (_SUMMARY_)
>> returned by SA, and after combing the docs couldn't find relevant
>> specs. It appears that the lines are a fixed length, but I couldn't be
>> sure... is there anywhere I can get the specs so my parser doesn't do
>> silly things?
>>     
>
> The only spec I see about is this:
>
> 	"%s %-22s %s%s\n%s"
>
> (From PerMsgStatus.pm line no.2784 as per v.3.1.8)
>   

And more to the point, that's not a spec, its an implementation.

The format could change at any time, should the devs feel that it would
be more readable if they did so.

R: parsing the summary

Posted by Giampaolo Tomassoni <g....@libero.it>.
> -----Messaggio originale-----
> Da: Anton Melser [mailto:melser.anton@gmail.com]
> 
> Hi,
> I am writing a programme which needs to parse the summary (_SUMMARY_)
> returned by SA, and after combing the docs couldn't find relevant
> specs. It appears that the lines are a fixed length, but I couldn't be
> sure... is there anywhere I can get the specs so my parser doesn't do
> silly things?

The only spec I see about is this:

	"%s %-22s %s%s\n%s"

(From PerMsgStatus.pm line no.2784 as per v.3.1.8)


> Cheers
> Anton

Cheers,

Giampaolo

PS: No answer often means: "What is he asking about?"