From 511653d32710f90805941e81c04671fcc7b144f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=EF=BF=BD=EF=BF=BD?= Date: Thu, 27 Nov 2014 16:54:49 +0000 Subject: [PATCH] cleanup postlogin hooks in dovecot so they are uniform and always post-login, closes #1632 --- .../templates/dovecot/conf.d/95_alternc.conf | 18 ++++++++++++++++-- wheezy/95_alternc.conf | 19 ++++++++++++------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/etc/alternc/templates/dovecot/conf.d/95_alternc.conf b/etc/alternc/templates/dovecot/conf.d/95_alternc.conf index 5dcf7708..5c6839fc 100644 --- a/etc/alternc/templates/dovecot/conf.d/95_alternc.conf +++ b/etc/alternc/templates/dovecot/conf.d/95_alternc.conf @@ -192,7 +192,20 @@ protocol imap { } service imap { - executable = /usr/lib/alternc/popimap-log-login.sh /usr/lib/dovecot/imap + # tell imap to do post-login lookup using a socket called "imap-postlogin" + executable = imap postlogin +} + +# The service name below doesn't actually matter. +service postlogin { + # all post-login scripts are executed via script-login binary + executable = script-login /usr/lib/alternc/popimap-log-login.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 postlogin { + } } @@ -247,7 +260,8 @@ protocol pop3 { } service pop3 { - executable = /usr/lib/alternc/popimap-log-login.sh /usr/lib/dovecot/pop3 + # tell imap to do post-login lookup using a socket called "imap-postlogin" + executable = pop3 postlogin } # ---------------------------------------------------------------------------- diff --git a/wheezy/95_alternc.conf b/wheezy/95_alternc.conf index c4d66687..e14ae4f6 100644 --- a/wheezy/95_alternc.conf +++ b/wheezy/95_alternc.conf @@ -195,18 +195,22 @@ protocol imap { } service imap { - executable = imap imap-postlogin + # tell imap to do post-login lookup using a socket called "postlogin" + executable = imap postlogin vsz_limit = 512M } -service imap-postlogin { - executable = script-login /usr/lib/alternc/popimap-log-login.sh +# The service name below doesn't actually matter. +service postlogin { + # all post-login scripts are executed via script-login binary + executable = script-login /usr/lib/alternc/popimap-log-login.sh + # the script process runs as the user specified here (v2.0.14+): -# user = $default_internal_user + #user = $default_internal_user # this UNIX socket listener must use the same name as given to imap executable - unix_listener imap-postlogin { + unix_listener postlogin { } -} + } # ---------------------------------------------------------------------------- # 20-managesieve.conf @@ -259,7 +263,8 @@ protocol pop3 { } service pop3 { - executable = /usr/lib/alternc/popimap-log-login.sh /usr/lib/dovecot/pop3 + # tell imap to do post-login lookup using a socket called "postlogin" + executable = pop3 postlogin } # ----------------------------------------------------------------------------