Update scripts for postfix+courier and postfix+dovecot for gentoo.
Changes here include: - shorten some repetitive commands (gentoo.inc.php) - maps uid/gid from database instead of statically on main.cf - maps 'homedir' from database instead of statically in vmail_mailbox_base (concatenates 'homedir' and 'maildir' columns from mail_users table) - update mysql query files to use strictly postfix 2.2+ new format (in accordance to http://www.postfix.org/mysql_table.5.html)
This commit is contained in:
@@ -58,13 +58,13 @@ virtual_transport = dovecot
|
||||
dovecot_destination_recipient_limit = 1
|
||||
|
||||
# Virtual delivery settings
|
||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||
virtual_mailbox_base = /
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
||||
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
|
||||
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
||||
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
||||
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uid_maps.cf
|
||||
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gid_maps.cf
|
||||
|
||||
# Local delivery settings
|
||||
local_transport = local
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
query = select destination from mail_virtual where email = '%s' and trim(destination) <> ''
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
expansion_limit = 1
|
||||
query = select gid from mail_users where email = '%s'
|
||||
hosts = <SQL_HOST>
|
||||
@@ -1,8 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
query = select domain from panel_domains where domain = '%s' and isemaildomain = '1'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = (quota*1024*1024)
|
||||
where_field = email
|
||||
hosts = <SQL_HOST>
|
||||
expansion_limit = 1
|
||||
query = select (quota*1024*1024) from mail_users where email = '%s'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
expansion_limit = 1
|
||||
query = select concat(homedir,maildir) from mail_users where email = '%s'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
expansion_limit = 1
|
||||
query = select uid from mail_users where email = '%s'
|
||||
hosts = <SQL_HOST>
|
||||
Reference in New Issue
Block a user