mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-27 01:45:58 +03:00
[GH-ISSUE #462] Sqlite3 support #445
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#445
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/462
Originally assigned to: @tonioo on GitHub.
Originally created by Ricardo Padilha on 2013-09-27T10:27:43Z
These are the steps required to have an sqlite3-based deployment using Modoboa+Postfix+Dovecot, based on virtual users.
Assumptions:
Global variables:
$NAME = name of the modoboa deployment
$FOLDER = folder where modoboa will be deployed
$SQLITE = complete path to the file of the sqlite3 database, e.g., /home/user/modoboa.sqlite
$MAILBOXES = mailboxes folder
$UID, $GID = uid/gid of the vmail user/group
Replace appropriately in the files below.
Modoboa configuration
Deploy modoboa using the standard command: "modoboa-admin.py deploy $NAME --syncdb"
Then provide the following parameters:
After this, you can start modoboa.
Postfix configuration
Make sure main.cf contains these lines:
virtual_mailbox_domains = sqlite:/etc/postfix/sql-domains.cf virtual_mailbox_maps = sqlite:/etc/postfix/sql-mailboxes.cf virtual_alias_domains = sqlite:/etc/postfix/sql-domain-aliases.cf virtual_alias_maps = sqlite:/etc/postfix/sql-aliases.cf, sqlite:/etc/postfix/sql-domain-aliases-mailboxes.cf, sqlite:/etc/postfix/sql-catchall-aliases.cfContent of /etc/postfix/sql-aliases.cf:
Content of /etc/postfix/sql-catchall-aliases.cf
Content of /etc/postfix/sql-domain-aliases-mailboxes.cf
Content of /etc/postfix/sql-domain-aliases.cf
Content of /etc/postfix/sql-domains.cf
Content of /etc/postfix/sql-mailboxes.cf
Dovecot configuration
Make sure that /etc/dovecot/dovecot.conf contains this:
userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } dict { quota = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext }Content of /etc/dovecot/dovecot-sql.conf.ext
driver = sqlite connect = $SQLITE default_pass_scheme = CRYPT password_query = SELECT email AS user, password FROM admin_user WHERE email='%u' and is_active=1 user_query = SELECT '$MAILBOXES/%u' AS home, $UID as uid, $GID as gid, ('*:bytes=' || mb.quota || 'M') AS quota_rule FROM admin_mailbox mb INNER JOIN admin_domain dom ON mb.domain_id=dom.id WHERE mb.address='%n' AND dom.name='%d' iterate_query = SELECT email AS username FROM admin_userContent of /etc/dovecot/dovecot-dict-sql.conf.ext
driver = sqlite connect = $SQLITE map { pattern = priv/quota/storage table = admin_quota username_field = username value_field = bytes } map { pattern = priv/quota/messages table = admin_quota username_field = username value_field = messages } map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } }@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-09-27T18:12:07Z
Applied in changeset commit:8bb753e89003309a67370419a9c5cb6c0f9bf28b.