Skip to main content

spam_stats

Creates, updates, deletes, gets or lists a spam_stats resource.

Overview​

Namespam_stats
TypeResource
Idovh.ip.spam_stats

Fields​

The following fields are returned by SELECT queries:

Spam statistics about an IP address

NameDatatypeDescription
average_spamscoreintegerAverage spam score. (wire: averageSpamscore)
detected_spamsarrayDetailed list of the spams (wire: detectedSpams)
number_of_spamsintegerNumber of spams sent (wire: numberOfSpams)
timestampintegerTime when the IP address was blocked
totalintegerNumber of emails sent

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectfrom, ip, ip_spamming, toList spam statistics. Returns emails sent, spams detected and average spam score over the given period.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
fromstring (date-time)Start date
ipstring (ip-block)
ip_spammingstring (ipv4)IP address which is sending spam (wire: ipSpamming)
tostring (date-time)End date

SELECT examples​

List spam statistics. Returns emails sent, spams detected and average spam score over the given period.

SELECT
average_spamscore,
detected_spams,
number_of_spams,
timestamp,
total
FROM ovh.ip.spam_stats
WHERE from = '{{ from }}' -- required
AND ip = '{{ ip }}' -- required
AND ip_spamming = '{{ ip_spamming }}' -- required
AND to = '{{ to }}' -- required
;