From bc2f912e427cde346ae81b69ffc8fa803e5bf12b Mon Sep 17 00:00:00 2001
From: Zhang Huangbin
Date: Sat, 12 Dec 2015 20:11:58 +0800
Subject: [PATCH] AUpdate upgrade tutorial: add new column 'delete_date' in SQL
table 'iredadmin.deleted_mailboxes' (LDAP backends) or
'vmail.deleted_mailboxes' (SQL backends).
---
.../upgrade/0-upgrade.iredmail.0.9.2-0.9.3.md | 61 ++++++++++++++++++-
html/upgrade.iredmail.0.9.2-0.9.3.html | 55 +++++++++++++++--
2 files changed, 109 insertions(+), 7 deletions(-)
diff --git a/en_US/upgrade/0-upgrade.iredmail.0.9.2-0.9.3.md b/en_US/upgrade/0-upgrade.iredmail.0.9.2-0.9.3.md
index f6562fb7..59d44593 100644
--- a/en_US/upgrade/0-upgrade.iredmail.0.9.2-0.9.3.md
+++ b/en_US/upgrade/0-upgrade.iredmail.0.9.2-0.9.3.md
@@ -8,6 +8,9 @@ __This is still a DRAFT document, do NOT apply it.__
> We offer remote upgrade service, check [the price](../support.html) and [contact us](../contact.html).
+* 2015-12-12: Add new column `delete_date` in SQL table
+ `iredadmin.deleted_mailboxes` (LDAP backends) or
+ `vmail.deleted_mailboxes` (SQL backends).
* 2015-12-12: [OPTIONAL] Postfix: Remove one non-spam HELO identity in helo restriction
* 2015-12-03: Web server: Enable HSTS (HTTP Strict Transport Security) support
* 2015-12-01: SOGo: Fix improper settings in Apache/Nginx config file
@@ -720,6 +723,23 @@ mysql> CREATE TABLE outbound_wblist (rid integer unsigned NOT NULL, sid integer
After table created, please restart iRedAPD service.
+### Add new column `delete_date` in SQL table `iredadmin.deleted_mailboxes`
+
+We need a SQL column to store the date we schedule to delete the mailbox after
+removing mail account. This new column might be used by iRedAdmin and other
+scripts used to delete mailboxes.
+
+Please connect to MySQL server as MySQL root user, create new table:
+
+```
+$ mysql -uroot -p
+sql> USE iredadmin;
+sql> ALTER TABLE deleted_mailbox ADD COLUMN delete_date DATE NOT NULL DEFAULT '0000-00-00';
+sql> CREATE INDEX idx_delete_date ON deleted_mailboxes (delete_date);
+```
+
+That's it.
+
## MySQL/MariaDB backend special
### Add new SQL columns in `vmail` database: `alias.is_alias`, `alias.alias_to`
@@ -780,6 +800,21 @@ mysql> CREATE TABLE outbound_wblist (rid integer unsigned NOT NULL, sid integer
After table created, please restart iRedAPD service.
+### Add new column `delete_date` in SQL table `vmail.deleted_mailboxes`
+
+We need a SQL column to store the date we schedule to delete the mailbox after
+removing mail account. This new column might be used by iRedAdmin and other
+scripts used to delete mailboxes.
+
+Please connect to MySQL server as MySQL root user, create new table:
+
+```
+$ mysql -uroot -p
+sql> USE vmail;
+sql> ALTER TABLE deleted_mailbox ADD COLUMN delete_date DATE NOT NULL DEFAULT '0000-00-00';
+sql> CREATE INDEX idx_delete_date ON deleted_mailboxes (delete_date);
+```
+
### [OPTIONAL] SOGo: enable isolated per-domain global address book
iRedMail doesn't enable global address book by default, this step will help
@@ -881,9 +916,9 @@ to store white/blacklists for outbound message, required by iRedAPD plugin
Please switch to PostgreSQL daemon user, then execute SQL commands to import it:
- * On Linux, PostgreSQL daemon user is `postgres`.
- * On FreeBSD, PostgreSQL daemon user is `pgsql`.
- * On OpenBSD, PostgreSQL daemon user is `_postgresql`.
+* On Linux, PostgreSQL daemon user is `postgres`.
+* On FreeBSD, PostgreSQL daemon user is `pgsql`.
+* On OpenBSD, PostgreSQL daemon user is `_postgresql`.
```
# su - postgres
@@ -893,6 +928,26 @@ sql> CREATE TABLE outbound_wblist (rid integer NOT NULL CHECK (rid >= 0), sid in
After table created, please restart iRedAPD service.
+### Add new column `delete_date` in SQL table `vmail.deleted_mailboxes`
+
+We need a SQL column to store the date we schedule to delete the mailbox after
+removing mail account. This new column might be used by iRedAdmin and other
+scripts used to delete mailboxes.
+
+Please switch to PostgreSQL daemon user, then execute SQL commands to import it:
+
+* On Linux, PostgreSQL daemon user is `postgres`.
+* On FreeBSD, PostgreSQL daemon user is `pgsql`.
+* On OpenBSD, PostgreSQL daemon user is `_postgresql`.
+
+```
+# su - postgres
+$ psql -d vmail
+sql> ALTER TABLE deleted_mailbox ADD COLUMN delete_date DATE NOT NULL DEFAULT '0000-00-00';
+sql> CREATE INDEX idx_delete_date ON deleted_mailboxes (delete_date);
+```
+
+That's it.
### [OPTIONAL] SOGo: enable isolated per-domain global address book
iRedMail doesn't enable global address book by default, this step will help
diff --git a/html/upgrade.iredmail.0.9.2-0.9.3.html b/html/upgrade.iredmail.0.9.2-0.9.3.html
index df436822..73e8f05b 100644
--- a/html/upgrade.iredmail.0.9.2-0.9.3.html
+++ b/html/upgrade.iredmail.0.9.2-0.9.3.html
@@ -41,17 +41,20 @@
Fixed: improper ACL control
Fixed: Dovecot Master User doesn't work with ACL plugin
Add new SQL table outbound_wblist in amavisd database
+Add new column delete_date in SQL table iredadmin.deleted_mailboxes
MySQL/MariaDB backend special
PostgreSQL backend special
@@ -65,6 +68,9 @@
We offer remote upgrade service, check the price and contact us.
+- 2015-12-12: Add new column
delete_date
in SQL table
+ iredadmin.deleted_mailboxes
(LDAP backends) or
+ vmail.deleted_mailboxes
(SQL backends).
- 2015-12-12: [OPTIONAL] Postfix: Remove one non-spam HELO identity in helo restriction
- 2015-12-03: Web server: Enable HSTS (HTTP Strict Transport Security) support
- 2015-12-01: SOGo: Fix improper settings in Apache/Nginx config file
@@ -691,6 +697,18 @@ mysql> CREATE TABLE outbound_wblist (rid integer unsigned NOT NULL, sid integ
After table created, please restart iRedAPD service.
+Add new column delete_date
in SQL table iredadmin.deleted_mailboxes
+We need a SQL column to store the date we schedule to delete the mailbox after
+removing mail account. This new column might be used by iRedAdmin and other
+scripts used to delete mailboxes.
+Please connect to MySQL server as MySQL root user, create new table:
+
$ mysql -uroot -p
+sql> USE iredadmin;
+sql> ALTER TABLE deleted_mailbox ADD COLUMN delete_date DATE NOT NULL DEFAULT '0000-00-00';
+sql> CREATE INDEX idx_delete_date ON deleted_mailboxes (delete_date);
+
+
+That's it.
MySQL/MariaDB backend special
Add new SQL columns in vmail
database: alias.is_alias
, alias.alias_to
iRedMail-0.9.3 offers per-user alias address support, that means mail user
@@ -743,6 +761,17 @@ mysql> CREATE TABLE outbound_wblist (rid integer unsigned NOT NULL, sid integ
After table created, please restart iRedAPD service.
+Add new column delete_date
in SQL table vmail.deleted_mailboxes
+We need a SQL column to store the date we schedule to delete the mailbox after
+removing mail account. This new column might be used by iRedAdmin and other
+scripts used to delete mailboxes.
+Please connect to MySQL server as MySQL root user, create new table:
+$ mysql -uroot -p
+sql> USE vmail;
+sql> ALTER TABLE deleted_mailbox ADD COLUMN delete_date DATE NOT NULL DEFAULT '0000-00-00';
+sql> CREATE INDEX idx_delete_date ON deleted_mailboxes (delete_date);
+
+
[OPTIONAL] SOGo: enable isolated per-domain global address book
iRedMail doesn't enable global address book by default, this step will help
you enable isolated per-domain global address book.
@@ -828,16 +857,34 @@ sql> INSERT INTO alias (address, goto, is_alias, alias_to, domain)
to store white/blacklists for outbound message, required by iRedAPD plugin
amavisd_wblist
.
Please switch to PostgreSQL daemon user, then execute SQL commands to import it:
-* On Linux, PostgreSQL daemon user is `postgres`.
-* On FreeBSD, PostgreSQL daemon user is `pgsql`.
-* On OpenBSD, PostgreSQL daemon user is `_postgresql`.
-
+
+- On Linux, PostgreSQL daemon user is
postgres
.
+- On FreeBSD, PostgreSQL daemon user is
pgsql
.
+- On OpenBSD, PostgreSQL daemon user is
_postgresql
.
+
# su - postgres
$ psql -d cluebringer -d amavisd
sql> CREATE TABLE outbound_wblist (rid integer NOT NULL CHECK (rid >= 0), sid integer NOT NULL CHECK (sid >= 0), wb varchar(10) NOT NULL, PRIMARY KEY (rid,sid));
After table created, please restart iRedAPD service.
+Add new column delete_date
in SQL table vmail.deleted_mailboxes
+We need a SQL column to store the date we schedule to delete the mailbox after
+removing mail account. This new column might be used by iRedAdmin and other
+scripts used to delete mailboxes.
+Please switch to PostgreSQL daemon user, then execute SQL commands to import it:
+
+- On Linux, PostgreSQL daemon user is
postgres
.
+- On FreeBSD, PostgreSQL daemon user is
pgsql
.
+- On OpenBSD, PostgreSQL daemon user is
_postgresql
.
+
+# su - postgres
+$ psql -d vmail
+sql> ALTER TABLE deleted_mailbox ADD COLUMN delete_date DATE NOT NULL DEFAULT '0000-00-00';
+sql> CREATE INDEX idx_delete_date ON deleted_mailboxes (delete_date);
+
+
+That's it.
[OPTIONAL] SOGo: enable isolated per-domain global address book
iRedMail doesn't enable global address book by default, this step will help
you enable isolated per-domain global address book.