@@ -23,3 +23,10 @@ By default, the following components are installed:
|
|||||||
* Postfix
|
* Postfix
|
||||||
* Dovecot
|
* Dovecot
|
||||||
* Amavis (with SpamAssassin and ClamAV)
|
* Amavis (with SpamAssassin and ClamAV)
|
||||||
|
|
||||||
|
If you want to follow details of installation process, use --debug
|
||||||
|
|
||||||
|
At the end of the process, you should consider updating virus database with this command::
|
||||||
|
|
||||||
|
freshclam
|
||||||
|
/etc/init.d/clamav-daemon restart
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
|
|||||||
[database]
|
[database]
|
||||||
# Select database engine : postgres or mysql
|
# Select database engine : postgres or mysql
|
||||||
engine = postgres
|
engine = postgres
|
||||||
|
#engine = mysql
|
||||||
host = 127.0.0.1
|
host = 127.0.0.1
|
||||||
install = true
|
install = true
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class PostgreSQL(Database):
|
|||||||
"""Exec a postgresql query."""
|
"""Exec a postgresql query."""
|
||||||
cmd = "psql"
|
cmd = "psql"
|
||||||
if dbname and dbuser:
|
if dbname and dbuser:
|
||||||
|
self._setup_pgpass(dbname, dbuser, dbpassword)
|
||||||
cmd += " -h {} -d {} -U {} -w".format(self.dbhost, dbname, dbuser)
|
cmd += " -h {} -d {} -U {} -w".format(self.dbhost, dbname, dbuser)
|
||||||
utils.exec_cmd(
|
utils.exec_cmd(
|
||||||
"""{} -c "{}" """.format(cmd, query), sudo_user=self.dbuser)
|
"""{} -c "{}" """.format(cmd, query), sudo_user=self.dbuser)
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ class Modoboa(base.Installer):
|
|||||||
"INSERT INTO lib_parameter (name, value) VALUES ('{0}', '{1}')"
|
"INSERT INTO lib_parameter (name, value) VALUES ('{0}', '{1}')"
|
||||||
.format(name, value)
|
.format(name, value)
|
||||||
)
|
)
|
||||||
self.backend._exec_query(query, self.dbname, self.dbuser)
|
self.backend._exec_query(
|
||||||
|
query, self.dbname, self.dbuser, self.dbpasswd)
|
||||||
|
|
||||||
def post_run(self):
|
def post_run(self):
|
||||||
"""Additional tasks."""
|
"""Additional tasks."""
|
||||||
|
|||||||
@@ -48,8 +48,14 @@ class Postfix(base.Installer):
|
|||||||
self.dbengine, self.config.get("modoboa", "dbuser"),
|
self.dbengine, self.config.get("modoboa", "dbuser"),
|
||||||
self.config.get("modoboa", "dbpassword"),
|
self.config.get("modoboa", "dbpassword"),
|
||||||
self.dbhost, self.config.get("modoboa", "dbname"))
|
self.dbhost, self.config.get("modoboa", "dbname"))
|
||||||
|
extensions = self.config.get("modoboa", "extensions")
|
||||||
|
exts_with_maps = ["modoboa-admin", "modoboa-admin-relaydomains",
|
||||||
|
"modoboa-postfix-autoreply"]
|
||||||
|
extensions = [ext for ext in exts_with_maps if ext in extensions]
|
||||||
|
if not extensions:
|
||||||
|
return
|
||||||
cmd = (
|
cmd = (
|
||||||
"{} {} postfix_maps --dbtype {} --extensions all --dburl {} {}"
|
"{} {} postfix_maps --dbtype {} --extensions {} --dburl {} {}"
|
||||||
.format(python_path, script_path, self.dbengine, db_url,
|
.format(python_path, script_path, self.dbengine,
|
||||||
self.config_dir))
|
" ".join(extensions), db_url, self.config_dir))
|
||||||
utils.exec_cmd(cmd)
|
utils.exec_cmd(cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user