Sunil Mohan Adapa baa44e91a2
*: Update imports statements from plinth to freedombox
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2026-08-28 07:35:18 -04:00

18 lines
398 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""Utilities to configure Dovecot."""
import apt
from freedombox.utils import Version
def is_version_24():
"""Return the currently installed version of Dovecot."""
cache = apt.Cache()
try:
version = cache['dovecot-core'].installed.version
except KeyError:
return True
return Version(version) >= Version('1:2.4')