From aac4d536143169243a1a121e2f880b58de2ba6fd Mon Sep 17 00:00:00 2001 From: fpiccinali Date: Sat, 24 Oct 2015 19:15:08 +0200 Subject: [PATCH 1/8] documentation about --debug --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 71cd68b..69507cf 100644 --- a/README.rst +++ b/README.rst @@ -23,3 +23,5 @@ By default, the following components are installed: * Postfix * Dovecot * Amavis (with SpamAssassin and ClamAV) + +If you want to follow details of installation process, use --debug From a2a948d3da75b000aac89738aaf9208196e98fdb Mon Sep 17 00:00:00 2001 From: fpiccinali Date: Sun, 25 Oct 2015 06:22:43 +0100 Subject: [PATCH 2/8] mend --- README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.rst b/README.rst index 69507cf..9607224 100644 --- a/README.rst +++ b/README.rst @@ -25,3 +25,9 @@ By default, the following components are installed: * 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 +```` From bbc2874adea2caa4c6c0a557b8797bf995dd3d18 Mon Sep 17 00:00:00 2001 From: fpiccinali Date: Sun, 25 Oct 2015 06:22:43 +0100 Subject: [PATCH 3/8] mise en page --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 69507cf..cdee5c6 100644 --- a/README.rst +++ b/README.rst @@ -25,3 +25,10 @@ By default, the following components are installed: * 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 +``` From aa0732b7805ebcf2cd094b2b4bd6688a01ed561b Mon Sep 17 00:00:00 2001 From: fpiccinali Date: Sun, 25 Oct 2015 06:28:10 +0100 Subject: [PATCH 4/8] mise en page --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index a66c932..cdee5c6 100644 --- a/README.rst +++ b/README.rst @@ -28,7 +28,6 @@ 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 From 7dceb6c0a4b70274a94ab894f6fb51f744fbf616 Mon Sep 17 00:00:00 2001 From: Fabrice Piccinali Date: Sun, 25 Oct 2015 06:32:04 +0100 Subject: [PATCH 5/8] mise en page --- README.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index cdee5c6..61ce1c0 100644 --- a/README.rst +++ b/README.rst @@ -26,9 +26,7 @@ By default, the following components are installed: 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: +At the end of the process, you should consider updating virus database with this command:: -``` -freshclam -/etc/init.d/clamav-daemon restart -``` + freshclam + /etc/init.d/clamav-daemon restart From b6a974347531b383e5c1896c7a9335910f2dfcbb Mon Sep 17 00:00:00 2001 From: emsit Date: Sun, 25 Oct 2015 16:45:55 +0100 Subject: [PATCH 6/8] Fix MySQL syntax error (amavis_mysql_2.10.1.sql) --- .../scripts/files/amavis/amavis_mysql_2.10.1.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modoboa_installer/scripts/files/amavis/amavis_mysql_2.10.1.sql b/modoboa_installer/scripts/files/amavis/amavis_mysql_2.10.1.sql index 0cb3d82..a7f2d3c 100644 --- a/modoboa_installer/scripts/files/amavis/amavis_mysql_2.10.1.sql +++ b/modoboa_installer/scripts/files/amavis/amavis_mysql_2.10.1.sql @@ -162,7 +162,8 @@ CREATE TABLE msgs ( subject varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '', -- mail Subject header field, UTF8 host varchar(255) NOT NULL, -- hostname where amavisd is running - PRIMARY KEY (partition_tag,mail_id) + PRIMARY KEY (partition_tag,mail_id), + INDEX (mail_id), FOREIGN KEY (sid) REFERENCES maddr(id) ON DELETE RESTRICT ) ENGINE=InnoDB; CREATE INDEX msgs_idx_sid ON msgs (sid); @@ -191,7 +192,7 @@ CREATE TABLE msgrcpt ( wl char(1) DEFAULT ' ', -- sender whitelisted by this recip bspam_level float, -- per-recipient (total) spam level smtp_resp varchar(255) DEFAULT '', -- SMTP response given to MTA - PRIMARY KEY (partition_tag,mail_id,rseqnum) + PRIMARY KEY (partition_tag,mail_id,rseqnum), FOREIGN KEY (rid) REFERENCES maddr(id) ON DELETE RESTRICT, FOREIGN KEY (mail_id) REFERENCES msgs(mail_id) ON DELETE CASCADE ) ENGINE=InnoDB; @@ -208,7 +209,7 @@ CREATE TABLE quarantine ( mail_id varbinary(16) NOT NULL, -- long-term unique mail id chunk_ind integer unsigned NOT NULL, -- chunk number, starting with 1 mail_text blob NOT NULL, -- store mail as chunks of octets - PRIMARY KEY (partition_tag,mail_id,chunk_ind) + PRIMARY KEY (partition_tag,mail_id,chunk_ind), FOREIGN KEY (mail_id) REFERENCES msgs(mail_id) ON DELETE CASCADE ) ENGINE=InnoDB; From 1e91b3618e6618f8286fe4161f2787430d0b494b Mon Sep 17 00:00:00 2001 From: emsit Date: Sun, 25 Oct 2015 17:07:08 +0100 Subject: [PATCH 7/8] Fix MySQL create tables problem (amavis_mysql_2.7.1.sql) Tables msgrcpt and quarantine were not created during installation.. --- modoboa_installer/scripts/files/amavis/amavis_mysql_2.7.1.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/modoboa_installer/scripts/files/amavis/amavis_mysql_2.7.1.sql b/modoboa_installer/scripts/files/amavis/amavis_mysql_2.7.1.sql index 710d290..4b6bc23 100644 --- a/modoboa_installer/scripts/files/amavis/amavis_mysql_2.7.1.sql +++ b/modoboa_installer/scripts/files/amavis/amavis_mysql_2.7.1.sql @@ -165,6 +165,7 @@ CREATE TABLE msgs ( -- mail Subject header field, UTF8 host varchar(255) NOT NULL, -- hostname where amavisd is running PRIMARY KEY (partition_tag,mail_id), + INDEX (mail_id), FOREIGN KEY (sid) REFERENCES maddr(id) ON DELETE RESTRICT ) ENGINE=InnoDB; CREATE INDEX msgs_idx_sid ON msgs (sid); From 508754c961d1a18e08cbb41df90066189b86a69a Mon Sep 17 00:00:00 2001 From: emsit Date: Sat, 31 Oct 2015 14:00:50 +0100 Subject: [PATCH 8/8] Fix Webmail [AUTHENTICATIONFAILED] on MySQL Fix Webmail (['[AUTHENTICATIONFAILED] Authentication failed.']) with MySQL database. --- modoboa_installer/scripts/dovecot.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/modoboa_installer/scripts/dovecot.py b/modoboa_installer/scripts/dovecot.py index 36dc586..9bbf8b9 100644 --- a/modoboa_installer/scripts/dovecot.py +++ b/modoboa_installer/scripts/dovecot.py @@ -50,20 +50,19 @@ class Dovecot(base.Installer): def post_run(self): """Additional tasks.""" - if self.dbengine != "postgres": - return - dbname = self.config.get("modoboa", "dbname") - dbuser = self.config.get("modoboa", "dbuser") - dbpassword = self.config.get("modoboa", "dbpassword") - backend = database.get_backend(self.config) - backend.load_sql_file( - dbname, dbuser, dbpassword, - self.get_file_path("install_modoboa_postgres_trigger.sql") - ) - backend.load_sql_file( - dbname, dbuser, dbpassword, - self.get_file_path("fix_modoboa_postgres_schema.sql") - ) + if self.dbengine == "postgres": + dbname = self.config.get("modoboa", "dbname") + dbuser = self.config.get("modoboa", "dbuser") + dbpassword = self.config.get("modoboa", "dbpassword") + backend = database.get_backend(self.config) + backend.load_sql_file( + dbname, dbuser, dbpassword, + self.get_file_path("install_modoboa_postgres_trigger.sql") + ) + backend.load_sql_file( + dbname, dbuser, dbpassword, + self.get_file_path("fix_modoboa_postgres_schema.sql") + ) for f in glob.glob("{}/*".format(self.get_file_path("conf.d"))): shutil.copy(f, "{}/conf.d".format(self.config_dir))