[Dovecot] about postlogin in dovecot2

Daniel Parthey daniel.parthey at informatik.tu-chemnitz.de
Sat Aug 11 18:19:20 EEST 2012


bmalik wrote:
> is there another post-login script that i can use on freebsd ?

You can use virtually any executable for post-login
if they communicate as expected.

First you should start simple and create a post-login script
consisting of just a few lines which just covers the case
of "access always granted to any user".

Once you got this working, you will be able to
extend your script with the required denial features.

Why are you executing any $DOVECOT_EXEC anyways?
The example scripts at http://wiki2.dovecot.org/PostLoginScripting
are just doing a exec "$@" to exec chained scripts.
It seems that dovecot already executes the service
binary, which then communicates with the script-login
process from "imap-postlogin" service via its
"imap-postlogin" socket:

service imap {
  # tell imap to do post-login lookup using a socket called "imap-postlogin"
  executable = imap imap-postlogin
}

# The service name below doesn't actually matter.
service imap-postlogin {
  # all post-login scripts are executed via script-login binary
  executable = script-login /usr/local/bin/postlogin.sh

  # the script process runs as the user specified here (v2.0.14+):
  user = $default_internal_user
  # this UNIX socket listener must use the same name as given to imap executable
  unix_listener imap-postlogin {
  }
}

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820



More information about the dovecot mailing list