[Dovecot] post login script
Hello all,
I am testing postlogin script with dovecot 2.
I works but i would like that the imap and pop session get executed even if the post-login script fail.
my postlogin script is very simple:
#/etc/dovecot/conf.d/10-master.conf
service imap {
executable = imap imap-postlogin
} # service imap-postlogin {
executable = script-login /usr/local/bin/postlogin.sh
unix_listener imap-postlogin { } }
service pop3 {
executable = pop3 imap-postlogin
}
#/usr/local/bin/postlogin.sh echo "UPDATE mailbox SET last_login = now() WHERE username = '$USER'" | mysql -upostlogin -pXXXXXXXX postfixadmin exec "$@"
Thanks in advance
Osvaldo
Am 28.10.2011 12:49, schrieb Osvaldo Alvarez Pozo:
Hello all,
I am testing postlogin script with dovecot 2.
I works but i would like that the imap and pop session get executed even if the post-login script fail.
my postlogin script is very simple:
#/etc/dovecot/conf.d/10-master.conf
service imap {
executable = imap imap-postlogin
} # service imap-postlogin {
executable = script-login /usr/local/bin/postlogin.sh
unix_listener imap-postlogin { } }
service pop3 {
executable = pop3 imap-postlogin
}
#/usr/local/bin/postlogin.sh echo "UPDATE mailbox SET last_login = now() WHERE username = '$USER'" | mysql -upostlogin -pXXXXXXXX postfixadmin exec "$@"
Thanks in advance
Osvaldo
i have it like this
service pop3 {
executable = pop3 pop3-postlogin }
service pop3-postlogin { executable = script-login /usr/local/bin/postlogin_pop3.sh user = root unix_listener pop3-postlogin { } }
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
Hello,
Thanks for your naswer, but there is no difference bettwen your conf & mine execpt for the name of service.
Thanks again
Osvaldo
2011/10/28 Robert Schetterer robert@schetterer.org:
Am 28.10.2011 12:49, schrieb Osvaldo Alvarez Pozo:
Hello all,
I am testing postlogin script with dovecot 2.
I works but i would like that the imap and pop session get executed even if the post-login script fail.
my postlogin script is very simple:
#/etc/dovecot/conf.d/10-master.conf
service imap {
executable = imap imap-postlogin
} # service imap-postlogin {
executable = script-login /usr/local/bin/postlogin.sh
unix_listener imap-postlogin { } }
service pop3 {
executable = pop3 imap-postlogin
}
#/usr/local/bin/postlogin.sh echo "UPDATE mailbox SET last_login = now() WHERE username = '$USER'" | mysql -upostlogin -pXXXXXXXX postfixadmin exec "$@"
Thanks in advance
Osvaldo
i have it like this
service pop3 {
executable = pop3 pop3-postlogin }
service pop3-postlogin { executable = script-login /usr/local/bin/postlogin_pop3.sh user = root unix_listener pop3-postlogin { } }
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
Am 31.10.2011 08:51, schrieb Osvaldo Alvarez Pozo:
Hello,
Thanks for your naswer, but there is no difference bettwen your conf & mine execpt for the name of service.
Thanks again
are you sure ? i have 2 different ( extra ) login scripts not only one fitting for imap and pop3 but you only asked for pop3
Osvaldo
2011/10/28 Robert Schetterer robert@schetterer.org:
Am 28.10.2011 12:49, schrieb Osvaldo Alvarez Pozo:
Hello all,
I am testing postlogin script with dovecot 2.
I works but i would like that the imap and pop session get executed even if the post-login script fail.
my postlogin script is very simple:
#/etc/dovecot/conf.d/10-master.conf
service imap {
executable = imap imap-postlogin
} # service imap-postlogin {
executable = script-login /usr/local/bin/postlogin.sh
unix_listener imap-postlogin { } }
service pop3 {
executable = pop3 imap-postlogin
}
#/usr/local/bin/postlogin.sh echo "UPDATE mailbox SET last_login = now() WHERE username = '$USER'" | mysql -upostlogin -pXXXXXXXX postfixadmin exec "$@"
Thanks in advance
Osvaldo
i have it like this
service pop3 {
executable = pop3 pop3-postlogin }
service pop3-postlogin { executable = script-login /usr/local/bin/postlogin_pop3.sh user = root unix_listener pop3-postlogin { } }
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On Fri, 2011-10-28 at 12:49 +0200, Osvaldo Alvarez Pozo wrote:
Hello all,
I am testing postlogin script with dovecot 2.
I works but i would like that the imap and pop session get executed even if the post-login script fail.
How/why would the script fail?
#/usr/local/bin/postlogin.sh echo "UPDATE mailbox SET last_login = now() WHERE username = '$USER'" | mysql -upostlogin -pXXXXXXXX postfixadmin exec "$@"
Looks like it would always exec $@ even if mysql update fails.
participants (3)
-
Osvaldo Alvarez Pozo
-
Robert Schetterer
-
Timo Sirainen