Dovecot Anti-Abuse Shield (1.0)

Download OpenAPI specification:Download

License: GPL2

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

allow

post /?command=allow
http://doesnotexist.dovecot.fi/?command=allow

Query whether a login should be allowed

Request Body schema: application/json
attrs
object (LTAttrs)
login
required
string
pwhash
required
string
remote
required
string

Responses

200

report reponse

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "attrs":
    {
    },
  • "login": "joe.bloggs",
  • "pwhash": "cc04",
  • "remote": "192.168.1.2",
  • "success": true
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "msg": "Too many failed passwords",
  • "status": -1
}

getBL

get /?command=getBL
http://doesnotexist.dovecot.fi/?command=getBL

Get the list of all blacklisted IPs and/or Logins

Responses

200

getBL reponse

default

unexpected error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "bl_entries":
    [
    ]
}

getDBStats

post /?command=getDBStats
http://doesnotexist.dovecot.fi/?command=getDBStats

Get the db stats for an IP and/or login

Request Body schema: application/json
ip
string
login
string

Responses

200

getDBStats reponse

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "ip": "127.0.0.1"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "blacklisted": true,
  • "key_name": "string",
  • "stats":
    {
    }
}

ping

get /?command=ping
http://doesnotexist.dovecot.fi/?command=ping

Ping the server to ensure it is operational

Responses

200

ping reponse

default

unexpected error

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

report

post /?command=report
http://doesnotexist.dovecot.fi/?command=report

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

Request Body schema: application/json
attrs
object (LTAttrs)
login
required
string
policy_reject
boolean
pwhash
required
string
remote
required
string
success
required
boolean

Responses

200

report reponse

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "login": "joe.bloggs",
  • "pwhash": "cc04",
  • "remote": "192.168.1.2",
  • "success": true
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}

reset

post /?command=reset
http://doesnotexist.dovecot.fi/?command=reset

Reset the stats for an IP and/or login

Request Body schema: application/json
ip
string
login
string

Responses

200

reset reponse

default

unexpected error

Request samples

application/json
Copy
Expand all Collapse all
{
  • "ip": "127.0.0.1"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "status": "ok"
}