/* dig in the spamd output and put the report in a multiline header, if requested */
- if( sscanf(CS spamd_buffer,"SPAMD/%7s 0 EX_OK\r\nContent-length: %*u\r\n\r\n%lf/%lf\r\n%n",
-+ if( sscanf(CS spamd_buffer,"SPAMD/%7s 0 EX_OK\r\n\r\nSpam: %*s ; %lf / %lf\r\nContent-length: %*u\r\n\r\n%n",
++ if( sscanf(CS spamd_buffer,"SPAMD/%7s 0 EX_OK\r\nSpam: %*s ; %lf / %lf\r\nContent-length: %*u\r\n\r\n%n",
spamd_version,&spamd_score,&spamd_threshold,&spamd_report_offset) != 3 ) {
/* try to fall back to pre-2.50 spamd output */
if (metric_res == NULL) {
if (task->proto == SPAMC_PROTO) {
r = rspamd_snprintf (outbuf, size,
- "Spam: False ; 0 / %.2f" CRLF, ms);
+ "Spam: False ; 0.00 / %.2f" CRLF, ms);
}
else {
if (task->proto_ver >= 11) {
ms = m->required_score;
rs = m->reject_score;
}
+ else if (metric_res == NULL) {
+ ms = m->required_score;
+ rs = m->reject_score;
+ }
if (!task->is_json) {
r = print_metric_data_rspamc (task, outbuf, sizeof (outbuf), NULL, m, ms, rs, action);