On 09/12/2019 15:39 nb via dovecot < dovecot@dovecot.org> wrote:


Hello,

My name is Noury, and I’m new here.
I’ve been using dovecot IMAP for years, but I want to do now some extra things.

I want to call a script from within dovecot, to build a suspicious IP addresses list when authentication fails.

I have tried the PostLoginScripting technic. It works fine but it doesn’t suit my needs. The script executes only after a successful login.
I want to execute my script only when auth fails. If I can execute a script and check into it if auth failed, I would be nice too.

A kind of « PreLoginScript"

Is there a way to achieve this?
I’m reading now auth.log file, but I would like to have a realtime processing.

Thanks in advance.

Noury

Try looking into https://wiki.dovecot.org/Authentication/Policy

It's probably easiest way to do this.
---
Aki Tuomi