[Dovecot] post login script

Timo Sirainen tss at iki.fi
Fri Nov 4 22:30:13 EET 2011


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.




More information about the dovecot mailing list