diff --git a/modoboa_installer/scripts/dovecot.py b/modoboa_installer/scripts/dovecot.py index a1fb175d..ec0f52a7 100644 --- a/modoboa_installer/scripts/dovecot.py +++ b/modoboa_installer/scripts/dovecot.py @@ -60,7 +60,7 @@ def get_packages(self): if package.backend.FORMAT == "deb": if "pop3" in self.config.get("dovecot", "extra_protocols"): packages += ["dovecot-pop3d"] - return super(Dovecot, self).get_packages() + packages + return super().get_packages() + packages def install_packages(self): """Preconfigure Dovecot if needed.""" @@ -139,7 +139,8 @@ def post_run(self): self.get_file_path("fix_modoboa_postgres_schema.sql") ) for f in glob.glob("{}/*".format(self.get_file_path("conf.d"))): - utils.copy_file(f, "{}/conf.d".format(self.config_dir)) + if os.path.isfile(f): + utils.copy_file(f, "{}/conf.d".format(self.config_dir)) # Make postlogin script executable utils.exec_cmd("chmod +x /usr/local/bin/postlogin.sh") # Only root should have read access to the 10-ssl-keys.try