<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 17 Oct 2018, at 20.09, bes <<a href="mailto:bes.internal@gmail.com" class="">bes.internal@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Refer to<br class=""><a href="https://dovecot.org/pipermail/dovecot/2015-March/099971.html" class="">https://dovecot.org/pipermail/dovecot/2015-March/099971.html</a><br class="">https://wiki.dovecot.org/PasswordDatabase<br class="">I tried to repeat the same thing.<br class="">Set these passdb:<br class=""><br class="">passdb {<br class=""> args = /myscript.sh ip=%r<br class=""> driver = checkpassword<br class=""> result_failure = return-fail<br class=""> result_success = continue<br class="">}<br class="">passdb {<br class=""> args = /etc/dovecot/dovecot-sql.conf.ext ( my working auth method )<br class=""> driver = sql<br class="">}<br class=""><br class="">Created executable /myscript.sh:<br class="">#!/bin/sh<br class="">exit 1<br class=""></div></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">While I'm not sure why this does not work I'm was wondering if a deny-passdb would be more </div><div class="">efficient to implement this blacklisting as executing a script on each login attempt is awfully slow. </div><div class=""><br class=""></div><div class="">Instead I would do something like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> # check deny passwd for ip address first</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> passdb {</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> driver = passwd-file</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> args = username_format=%r /etc/dovecot/ip-deny-list</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> deny = yes</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> auth_verbose = no</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> result_success = return-fail</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""> }</span></div></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; background-color: rgb(255, 255, 255);" class="">and then just create </span><span style="background-color: rgb(255, 255, 255);" class="">/etc/dovecot/ip-deny-list with one ip address per line.</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="background-color: rgb(255, 255, 255);" class="">Sami</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div></body></html>