<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<br>
</div>
<blockquote type="cite">
<div>
On 17 May 2018 at 00:17 Sami Ketola <
<a href="mailto:sami.ketola@dovecot.fi">sami.ketola@dovecot.fi</a>> wrote:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<blockquote type="cite">
<div>
On 16 May 2018, at 22.18, Marc Perkel <
<a href="mailto:marc@perkel.com">marc@perkel.com</a>> wrote:
</div>
<div>
<br>
</div>
<div>
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.
</div>
<div>
<br>
</div>
<div>
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)
</div>
<div>
<br>
</div>
</blockquote>
<div>
<br>
</div>
<div>
Lua passdb
<a href="https://wiki.dovecot.org/AuthDatabase/Lua" rel="noopener" target="_blank">https://wiki.dovecot.org/AuthDatabase/Lua</a> <
<a href="https://wiki.dovecot.org/AuthDatabase/Lua" rel="noopener" target="_blank">https://wiki.dovecot.org/AuthDatabase/Lua</a>> on dovecot 2.3 can be used or if you can make your external server act as auth policy server, then you could use
<a href="https://wiki.dovecot.org/Authentication/Policy" rel="noopener" target="_blank">https://wiki.dovecot.org/Authentication/Policy</a> <
<a href="https://wiki.dovecot.org/Authentication/Policy" rel="noopener" target="_blank">https://wiki.dovecot.org/Authentication/Policy</a>> available since dovecot 2.2.25
</div>
<div>
<br>
</div>
<div>
Sami
</div>
</blockquote>
<div>
<br>
</div>
<div>
Or you can use passdb imap. https://wiki.dovecot.org/PasswordDatabase/IMAP
</div>
<div class="io-ox-signature">
---
<br>Aki Tuomi
</div>
</body>
</html>