On 17 May 2018 at 00:17 Sami Ketola < sami.ketola@dovecot.fi> wrote:




On 16 May 2018, at 22.18, Marc Perkel < marc@perkel.com> wrote:

Is it possible to run a bash script for authentication where a 0 exit code indicates success and a non-zero is failure? What I'm trying to do is create a shadow IMAP server that authenticates against a different server. That way my server will use the same passwords as an existing server.

So what I would need is for dovecot to pass the username and password to my script, I attempt to log in remotely and if I succeed I allow access on my side. My side will be used to configure black lists and where spam is dragged from their side to my side. (I'm a spam filtering company)


Lua passdb https://wiki.dovecot.org/AuthDatabase/Lua < https://wiki.dovecot.org/AuthDatabase/Lua> on dovecot 2.3 can be used or if you can make your external server act as auth policy server, then you could use https://wiki.dovecot.org/Authentication/Policy < https://wiki.dovecot.org/Authentication/Policy> available since dovecot 2.2.25

Sami

Or you can use passdb imap. https://wiki.dovecot.org/PasswordDatabase/IMAP
---
Aki Tuomi