Dovecot Anti-Abuse Shield (1.2)

Download OpenAPI specification:Download

License: GPL2

An API to the Dovecot Anti-Abuse Shield to prevent brute-force and abuse of mail systems

“addBLEntry”

“Add a blacklist entry for an IP and/or login“

Request Body schema: application/json

Provide IP and/or login

expire_secs
integer
ip
string
login
string
reason
string

Responses

Request samples

Content type
application/json
{
  • "expire": 3600,
  • "ip": "127.0.0.1",
  • "reason": "“Too many bad passwords”"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

allow

Query whether a login should be allowed

Request Body schema: application/json

Login Tuple for allow command

object (LTAttrs)
login
required
string
pwhash
required
string
remote
required
string

Responses

Request samples

Content type
application/json
{
  • "attrs": {
    },
  • "login": "joe.bloggs",
  • "pwhash": "cc04",
  • "remote": "192.168.1.2",
  • "success": true
}

Response samples

Content type
application/json
{
  • "msg": "string",
  • "r_attrs": {
    },
  • "status": 0
}

“delBLEntry”

“Delete a blacklist entry for an IP and/or login“

Request Body schema: application/json

Provide IP and/or login

ip
string
login
string

Responses

Request samples

Content type
application/json
{
  • "ip": "127.0.0.1"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

getBL

Get the list of all blacklisted IPs and/or Logins

Responses

Response samples

Content type
application/json
{
  • "bl_entries": [
    ]
}

getDBStats

Get the db stats for an IP and/or login

Request Body schema: application/json

Provide IP and/or login

ip
string
login
string

Responses

Request samples

Content type
application/json
{
  • "ip": "127.0.0.1"
}

Response samples

Content type
application/json
{
  • "blacklisted": true,
  • "key_name": "string",
  • "stats": {
    }
}

ping

Ping the server to ensure it is operational

Responses

Response samples

Content type
application/json
{
  • "status": "ok"
}

report

Creates a new report about a login (successful or unsuccessful)

Request Body schema: application/json

Login Tuple for report command

object (LTAttrs)
login
required
string
policy_reject
boolean
pwhash
required
string
remote
required
string
success
required
boolean

Responses

Request samples

Content type
application/json
{
  • "login": "joe.bloggs",
  • "pwhash": "cc04",
  • "remote": "192.168.1.2",
  • "success": true
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

reset

Reset the stats and any blacklist entry for an IP and/or login

Request Body schema: application/json

Provide IP and/or login

ip
string
login
string

Responses

Request samples

Content type
application/json
{
  • "ip": "127.0.0.1"
}

Response samples

Content type
application/json
{
  • "status": "ok"
}