gchar scorebuf[32];
gboolean is_spam = FALSE;
const gchar *hdr_scanned, *hdr_spam;
- gchar *json_header, *json_header_encoded;
+ gchar *json_header, *json_header_encoded, *sc;
ar.data = input->str;
ar.len = input->len;
g_mime_object_append_header (GMIME_OBJECT (message), "X-Spam-Score",
scorebuf);
+ /* SA style stars header */
+ for (sc = scorebuf; sc < scorebuf + sizeof (scorebuf) - 1 && score > 0;
+ sc ++, score -= 1.0) {
+ *sc = '*';
+ }
+
+ *sc = '\0';
+ g_mime_object_append_header (GMIME_OBJECT (message), "X-Spam-Level",
+ scorebuf);
+
if (json || raw) {
/* We also append json data as a specific header */
if (json) {