mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-25 07:47:05 +00:00
Add the quota column to the users table
This commit is contained in:
parent
e40566967e
commit
863e8895a0
12
README.md
12
README.md
@ -1,15 +1,17 @@
|
|||||||
Mail-in-a-Box with Quotas
|
Mail-in-a-Box with Quotas
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
This is an experimental implementation of Mail-in-a-box with quotas. Follow the directions below to install except
|
This is an experimental implementation of Mail-in-a-box with quotas. Follow the directions below to install except clone from this repository instead of the official repository.
|
||||||
clone from this repository instead of the official repository.
|
|
||||||
|
|
||||||
There is baisc support for quotas in the control panel now. To set quotas from the command line, set the `quota`
|
There is baisc support for quotas in the control panel now. To set quotas from the command line, either use `tools/mail.py` or set the `quota`
|
||||||
column for the user in the `users.sqlite` database. The `quota` column is text and allows for the `M` and `G` suffixes
|
column for the user in the `users.sqlite` database. If you modify `users` table using SQL note the following:
|
||||||
for megabytes and gigabytes respectively. No spaces should be used in the quota value (e.g. `2G` or `100M`).
|
|
||||||
|
* The `quota` column is text and allows for the `M` and `G` suffixes for megabytes and gigabytes respectively.
|
||||||
|
* No spaces should be used in the quota value (e.g. `2G` or `100M`).
|
||||||
|
|
||||||
Please report any bugs on github.
|
Please report any bugs on github.
|
||||||
|
|
||||||
|
|
||||||
Todo
|
Todo
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -22,6 +22,10 @@ if [ ! -f $db_path ]; then
|
|||||||
echo Creating new user database: $db_path;
|
echo Creating new user database: $db_path;
|
||||||
echo "CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT NOT NULL UNIQUE, password TEXT NOT NULL, extra, privileges TEXT NOT NULL DEFAULT '', quota TEXT NOT NULL DEFAULT '0');" | sqlite3 $db_path;
|
echo "CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT NOT NULL UNIQUE, password TEXT NOT NULL, extra, privileges TEXT NOT NULL DEFAULT '', quota TEXT NOT NULL DEFAULT '0');" | sqlite3 $db_path;
|
||||||
echo "CREATE TABLE aliases (id INTEGER PRIMARY KEY AUTOINCREMENT, source TEXT NOT NULL UNIQUE, destination TEXT NOT NULL, permitted_senders TEXT);" | sqlite3 $db_path;
|
echo "CREATE TABLE aliases (id INTEGER PRIMARY KEY AUTOINCREMENT, source TEXT NOT NULL UNIQUE, destination TEXT NOT NULL, permitted_senders TEXT);" | sqlite3 $db_path;
|
||||||
|
else
|
||||||
|
set +e
|
||||||
|
echo "ALTER TABLE users ADD COLUMN quota TEXT NOT NULL DEFAULT '0';" | sqlite3 $db_path;
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ### User Authentication
|
# ### User Authentication
|
||||||
|
Loading…
Reference in New Issue
Block a user