mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
18 lines
398 B
Python
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')
|