[Rspamd-Users] Calling rspamd over http with Java

Marcus Biel marcus at cleancodeacademy.com
Fri Jun 4 18:17:43 UTC 2021


Hi,

I have installed rspamd and now I am trying to send to it some messages for testing, according to:
https://rspamd.com/doc/architecture/protocol.html

I did a test once with curl, once with a Java client - with curl, I get a REJECT action with a score of 15.7 -
Using a self written Java client however, I get a score of 1.0 with NO ACTION.

Any idea what I did wrong?

Here the details:

1) CURL
curl --data-binary @- http://myserver:myPort/checkv2 -H < msg.test

response was:
{"is_skipped":false,"score":15.700000,"required_score":15.0,"action":"reject","symbols":{"ARC_NA":{"name":"ARC_NA","score":0.0,"metric_score":0.0,"description":"ARC signature absent"},"MISSING_FROM":{"name":"MISSING_FROM","score":2.0,"metric_score":2.0,"description":"Missing From: header"},"MISSING_DATE":{"name":"MISSING_DATE","score":1.0,"metric_score":1.0,"description":"Message date is missing"},"R_BAD_CTE_7BIT":{"name":"R_BAD_CTE_7BIT","score":3.500000,"metric_score":3.500000,"description":"Detects bad content-transfer-encoding for text parts","options":["7bit"]},"DMARC_NA":{"name":"DMARC_NA","score":0.0,"metric_score":0.0,"description":"No DMARC record","options":["No From header"]},"MISSING_MID":{"name":"MISSING_MID","score":2.500000,"metric_score":2.500000,"description":"Message id is missing"},"MISSING_SUBJECT":{"name":"MISSING_SUBJECT","score":2.0,"metric_score":2.0,"description":"Subject header is missing"},"MISSING_TO":{"name":"MISSING_TO","score":2.0,"metric_score":2.0,"description":"To header is missing"},"MIME_HTML_ONLY":{"name":"MIME_HTML_ONLY","score":0.200000,"metric_score":0.200000,"description":"Messages that have only HTML part"},"RCVD_COUNT_ZERO":{"name":"RCVD_COUNT_ZERO","score":0.0,"metric_score":0.0,"description":"Message has no Received headers","options":["0"]},"R_DKIM_NA":{"name":"R_DKIM_NA","score":0.0,"metric_score":0.0,"description":"Missing DKIM signature"},"MIME_TRACE":{"name":"MIME_TRACE","score":0.0,"metric_score":0.0,"options":["0:~"]},"HFILTER_HOSTNAME_UNKNOWN":{"name":"HFILTER_HOSTNAME_UNKNOWN","score":2.500000,"metric_score":2.500000,"description":"Unknown client hostname (PTR or FCrDNS verification failed)"}},"messages":{},"urls":["www.sometesturl.com","www.sometesturl.com"],"emails":["someemail at gmail.com","someemail"],"message-id":"undef","time_real":0.473708,"milter":{"remove_headers":{"X-Spam":0}}}%


——
2) Java client:
body = {"is_skipped":false,"score":1.0,"required_score":15.0,"action":"no action","symbols":{"ASN":{"name":"ASN","score":0.0,"metric_score":0.0,"options":["asn:3209, ipnet:178.0.0.0/12, country:DE"]},"R_SPF_FAIL":{"name":"R_SPF_FAIL","score":1.0,"metric_score":1.0,"description":"SPF verification failed","options":["-all"]}},"messages":{},"time_real":1.254071,"milter":{"remove_headers":{"X-Spam":0}}}
-

Thanks for your help!

Marcus


More information about the Users mailing list