Bulend Mali wrote:
i want to use login-intranet-imap.sh in order to restrict by emailaddress and ip address. i read it at http://wiki2.dovecot.org/PostLoginScripting. But there is an expression "mail_executable" in [dovecot1] conf. but there is no such thing in dovecot2. What is equivalent of it for dovecot2 ?
service imap { executable = imap imap-postlogin }
or
service pop3 { executable = pop3 pop3-postlogin }
I assume the exec "$@" in your login-intranet-imap.sh is there to execute the imap binary (or call it "mail executable") which handles the protocol traffic after your post-login script has done its work and granted access to the user.
If you would like to deny access, you should not execute the protocol handler, but simply exit 0, see "Denying connection from some IP/User" at http://wiki2.dovecot.org/PostLoginScripting