Merge branch 'master' of github.com:modoboa/modoboa-installer

This commit is contained in:
Antoine Nguyen
2015-10-31 14:43:08 +01:00
4 changed files with 25 additions and 17 deletions

View File

@@ -23,3 +23,10 @@ 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
At the end of the process, you should consider updating virus database with this command::
freshclam
/etc/init.d/clamav-daemon restart

View File

@@ -50,8 +50,7 @@ class Dovecot(base.Installer):
def post_run(self):
"""Additional tasks."""
if self.dbengine != "postgres":
return
if self.dbengine == "postgres":
dbname = self.config.get("modoboa", "dbname")
dbuser = self.config.get("modoboa", "dbuser")
dbpassword = self.config.get("modoboa", "dbpassword")

View File

@@ -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;

View File

@@ -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);