mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-25 08:43:36 +00:00
- Postfix has the ability to use sqlite3 databases directly. There is no need to synchronize to a hash db and then use that. - Store the aliases database in /var/lib/postfix/. This will make backup and restore easier and remove dependence on FreedomBox and its data directory. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
13 lines
377 B
Python
13 lines
377 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Privileged operations for managing aliases."""
|
|
|
|
import pathlib
|
|
import shutil
|
|
|
|
|
|
def action_setup():
|
|
"""Create a the sqlite3 database to be managed by FreedomBox."""
|
|
path = pathlib.Path('/var/lib/postfix/freedombox-aliases/')
|
|
path.mkdir(mode=0o750, exist_ok=True)
|
|
shutil.chown(path, user='plinth', group='postfix')
|