Sunil Mohan Adapa 6eb5980f84
email_server: aliases: Minor refactoring to DB schema
- Use the IntergrityError exception instead of a complex query to ignore an
already existing alias.

- When retrieving existing aliases, use explicit list of columns instead of * so
that schema updates adding columns won't fail the code using the row results.

- Use terminology used by post fix. "name" for the name of the alias. "value"
for the mapping.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-30 16:15:44 -04:00

6 lines
209 B
CFEngine3

# SPDX-License-Identifier: AGPL-3.0-or-later
# Maintained by FreedomBox, do not edit.
dbpath = /var/lib/postfix/freedombox-aliases/aliases.sqlite3
query = SELECT value FROM alias WHERE name='%s' AND status=1