<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 16 May 2018, at 22.18, Marc Perkel <<a href="mailto:marc@perkel.com" class="">marc@perkel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">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.<br class=""><br class="">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)<br class=""><br class=""></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">Lua passdb <a href="https://wiki.dovecot.org/AuthDatabase/Lua" class="">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" class="">https://wiki.dovecot.org/Authentication/Policy</a> available since dovecot 2.2.25</div><div class=""><br class=""></div><div class="">Sami</div><div class=""><br class=""></div></body></html>