diff --git a/CHANGELOG.md b/CHANGELOG.md index 018fdbcd..89bd5cf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ([#370](https://github.com/deltachat/chatmail/pull/370)) - migrate and remove sqlite database in favor of password/lastlogin tracking - in a user's maildir. this removes the need for "passdb" setting in ini file + in a user's maildir. This removes the need for "passdb_path" setting in ini file which was introduced through #351 below. ([#379](https://github.com/deltachat/chatmail/pull/379)) diff --git a/chatmaild/src/chatmaild/config.py b/chatmaild/src/chatmaild/config.py index 1da2e71c..9165750e 100644 --- a/chatmaild/src/chatmaild/config.py +++ b/chatmaild/src/chatmaild/config.py @@ -28,7 +28,6 @@ class Config: self.passthrough_senders = params["passthrough_senders"].split() self.passthrough_recipients = params["passthrough_recipients"].split() self.mailboxes_dir = Path(params["mailboxes_dir"].strip()) - self.passdb_path = Path(params["passdb_path"].strip()) self.filtermail_smtp_port = int(params["filtermail_smtp_port"]) self.postfix_reinject_port = int(params["postfix_reinject_port"]) self.iroh_relay = params.get("iroh_relay") @@ -37,6 +36,9 @@ class Config: self.privacy_pdo = params.get("privacy_pdo") self.privacy_supervisor = params.get("privacy_supervisor") + # old unused option (except for first migration from sqlite to maildir store) + self.passdb_path = Path(params.get("passdb_path", "/home/vmail/passdb.sqlite")) + def _getbytefile(self): return open(self._inipath, "rb") diff --git a/chatmaild/src/chatmaild/ini/chatmail.ini.f b/chatmaild/src/chatmaild/ini/chatmail.ini.f index c78f8059..fea7b9cd 100644 --- a/chatmaild/src/chatmaild/ini/chatmail.ini.f +++ b/chatmaild/src/chatmaild/ini/chatmail.ini.f @@ -45,9 +45,6 @@ passthrough_recipients = xstore@testrun.org groupsbot@hispanilandia.net # Directory where user mailboxes are stored mailboxes_dir = /home/vmail/mail/{mail_domain} -# user address sqlite database path -passdb_path = /home/vmail/passdb.sqlite - # where the filtermail SMTP service listens filtermail_smtp_port = 10080 diff --git a/chatmaild/src/chatmaild/tests/plugin.py b/chatmaild/src/chatmaild/tests/plugin.py index c704686b..ee0baab2 100644 --- a/chatmaild/src/chatmaild/tests/plugin.py +++ b/chatmaild/src/chatmaild/tests/plugin.py @@ -17,8 +17,7 @@ def make_config(tmp_path): def make_conf(mail_domain): basedir = tmp_path.joinpath(f"vmail/{mail_domain}") basedir.mkdir(parents=True, exist_ok=True) - passdb = tmp_path.joinpath("vmail/passdb.sqlite") - overrides = dict(mailboxes_dir=str(basedir), passdb_path=str(passdb)) + overrides = dict(mailboxes_dir=str(basedir)) write_initial_config(inipath, mail_domain, overrides=overrides) return read_config(inipath) diff --git a/chatmaild/src/chatmaild/tests/test_config.py b/chatmaild/src/chatmaild/tests/test_config.py index 696f1e0a..fa09eda7 100644 --- a/chatmaild/src/chatmaild/tests/test_config.py +++ b/chatmaild/src/chatmaild/tests/test_config.py @@ -38,8 +38,7 @@ def test_config_userstate_paths(make_config, tmp_path): mailboxes_dir = config.mailboxes_dir passdb_path = config.passdb_path assert mailboxes_dir.name == "something.testrun.org" - assert passdb_path.name == "passdb.sqlite" - assert passdb_path.is_relative_to(tmp_path) + assert str(passdb_path) == "/home/vmail/passdb.sqlite" assert config.mail_domain == "something.testrun.org" path = config.get_user("user1@something.testrun.org").maildir assert not path.exists()