Compare commits

..

6 Commits

Author SHA1 Message Date
Chad Furman e1ca862616
Merge 0408ec36b8 into a332be6a7b 2024-05-04 23:02:48 -04:00
Chad Furman 0408ec36b8
Merge branch 'main' into master 2024-05-04 23:02:44 -04:00
Chad Furman 0cd8e4db62 fixing imap sed script 2024-05-04 22:22:47 -04:00
Chad Furman 51c483117d fixing parens 2024-05-04 21:15:05 -04:00
Chad Furman 173501e8b0 fixing imap sed script 2024-05-04 21:02:09 -04:00
Chad Furman 39700387af fixing subprocess import 2024-05-04 14:27:11 -04:00
3 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,8 @@
# address entered by the user.
import os, sqlite3, re
import subprocess
import utils
from email_validator import validate_email as validate_email_, EmailNotValidError
import idna

View File

@ -67,9 +67,9 @@ tools/editconf.py /etc/dovecot/conf.d/10-mail.conf \
# Create, subscribe, and mark as special folders: INBOX, Drafts, Sent, Trash, Spam and Archive.
cp conf/dovecot/conf.d/15-mailboxes.conf /etc/dovecot/conf.d/
sed -i "s/#mail_plugins = .*/mail_plugins = \$mail_plugins quota/" /etc/dovecot/conf.d/10-mail.conf
if ! grep -q "mail_plugins = \$mail_plugins imap_quota" /etc/dovecot/conf.d/20-imap.conf; then
sed -i "s/mail_plugins = .*/mail_plugins = \$mail_plugins imap_quota/" /etc/dovecot/conf.d/20-imap.conf
sed -i "s/#mail_plugins =\(.*\)/mail_plugins =\1 \$mail_plugins quota/" /etc/dovecot/conf.d/10-mail.conf
if ! grep -q "mail_plugins.* imap_quota" /etc/dovecot/conf.d/20-imap.conf; then
sed -i "s/\(mail_plugins =.*\)/\1\n mail_plugins = \$mail_plugins imap_quota/" /etc/dovecot/conf.d/20-imap.conf
fi
# configure stuff for quota support

View File

@ -25,7 +25,7 @@ if [ ! -f "$db_path" ]; then
echo "CREATE TABLE mfa (id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER NOT NULL, type TEXT NOT NULL, secret TEXT NOT NULL, mru_token TEXT, label TEXT, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE);" | sqlite3 "$db_path";
echo "CREATE TABLE auto_aliases (id INTEGER PRIMARY KEY AUTOINCREMENT, source TEXT NOT NULL UNIQUE, destination TEXT NOT NULL, permitted_senders TEXT);" | sqlite3 "$db_path";
elif sqlite3 $db_path ".schema users" | grep --invert-match quota; then
echo "ALTER TABLE users ADD COLUMN quota TEXT NOT NULL DEFAULT '0';" | sqlite3 $db_path;
echo "ALTER TABLE users ADD COLUMN quota TEXT NOT NULL DEFAULT '0';" | sqlite3 $db_path;
fi
# ### User Authentication