From 085c1ac4573c40f5e0042548cde0fd6a55896cc3 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 17 Feb 2015 16:48:33 +0100 Subject: [PATCH] Add %w to cache_key (dovecot's passdb args) This way, concurrent SOGo sessions using different PT can work --- .../e-smith/db/configuration/defaults/dovecot/PassDBArgs | 2 +- .../etc/e-smith/db/configuration/migrate/DovecotCacheKeys | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 root/etc/e-smith/db/configuration/migrate/DovecotCacheKeys diff --git a/root/etc/e-smith/db/configuration/defaults/dovecot/PassDBArgs b/root/etc/e-smith/db/configuration/defaults/dovecot/PassDBArgs index 723796a..649cc10 100644 --- a/root/etc/e-smith/db/configuration/defaults/dovecot/PassDBArgs +++ b/root/etc/e-smith/db/configuration/defaults/dovecot/PassDBArgs @@ -1 +1 @@ -cache_key=%n%r%l +cache_key=%n%r%l%w diff --git a/root/etc/e-smith/db/configuration/migrate/DovecotCacheKeys b/root/etc/e-smith/db/configuration/migrate/DovecotCacheKeys new file mode 100644 index 0000000..096a919 --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/DovecotCacheKeys @@ -0,0 +1,8 @@ +{ + # Add the plaintext password to the cache key so concurrent sessions + # from SOGo, using different CAS PT can work + my $args = $DB->get_prop('dovecot', 'PassDBArgs'); + if ($args && $args eq 'cache_key=%n%r%l'){ + $DB->set_prop('dovecot', 'PassDBArgs', 'cache_key=%n%r%l%w'); + } +}