Merge pull request #26 from avengerx/confscripts
Improve default config files generation
This commit is contained in:
@@ -145,7 +145,7 @@ TLS_STARTTLS_PROTOCOL=TLS1
|
||||
# servers, and is optional for SSL/TLS clients. TLS_CERTFILE is usually
|
||||
# treated as confidential, and must not be world-readable.
|
||||
#
|
||||
TLS_CERTFILE=/etc/ssl/server/<SERVERNAME>.pem
|
||||
TLS_CERTFILE=/etc/ssl/postfix/server.pem
|
||||
|
||||
##NAME: TLS_TRUSTCERTS:0
|
||||
#
|
||||
@@ -159,7 +159,7 @@ TLS_CERTFILE=/etc/ssl/server/<SERVERNAME>.pem
|
||||
# to PEER or REQUIREPEER).
|
||||
#
|
||||
#
|
||||
# TLS_TRUSTCERTS=
|
||||
TLS_TRUSTCERTS=/etc/ssl/certs
|
||||
|
||||
##NAME: TLS_VERIFYPEER:0
|
||||
#
|
||||
|
||||
@@ -133,7 +133,7 @@ TLS_STARTTLS_PROTOCOL=TLS1
|
||||
# servers, and is optional for SSL/TLS clients. TLS_CERTFILE is usually
|
||||
# treated as confidential, and must not be world-readable.
|
||||
#
|
||||
TLS_CERTFILE=/etc/ssl/server/<SERVERNAME>.pem
|
||||
TLS_CERTFILE=/etc/ssl/postfix/server.pem
|
||||
|
||||
##NAME: TLS_TRUSTCERTS:0
|
||||
#
|
||||
@@ -147,7 +147,7 @@ TLS_CERTFILE=/etc/ssl/server/<SERVERNAME>.pem
|
||||
# to PEER or REQUIREPEER).
|
||||
#
|
||||
#
|
||||
# TLS_TRUSTCERTS=
|
||||
TLS_TRUSTCERTS=/etc/ssl/certs
|
||||
|
||||
##NAME: TLS_VERIFYPEER:0
|
||||
#
|
||||
|
||||
@@ -5,10 +5,10 @@ MYSQL_PORT 0
|
||||
MYSQL_DATABASE <SQL_DB>
|
||||
MYSQL_USER_TABLE mail_users
|
||||
MYSQL_CRYPT_PWFIELD password_enc
|
||||
MYSQL_UID_FIELD <VIRTUAL_UID_MAPS>
|
||||
MYSQL_GID_FIELD <VIRTUAL_GID_MAPS>
|
||||
MYSQL_UID_FIELD uid
|
||||
MYSQL_GID_FIELD gid
|
||||
MYSQL_LOGIN_FIELD username
|
||||
MYSQL_HOME_FIELD "<VIRTUAL_MAILBOX_BASE>"
|
||||
MYSQL_HOME_FIELD homedir
|
||||
MYSQL_MAILDIR_FIELD maildir
|
||||
MYSQL_QUOTA_FIELD (quota*1024*1024)
|
||||
MYSQL_AUXOPTIONS_FIELD CONCAT("allowimap=",imap,",allowpop3=",pop3)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = <SERVERNAME>
|
||||
myhostname = mail.$mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
@@ -36,8 +36,8 @@ smtpd_sender_restrictions = permit_mynetworks,
|
||||
smtpd_client_restrictions = permit_mynetworks,
|
||||
permit_sasl_authenticated,
|
||||
reject_unknown_client_hostname
|
||||
# Maximum size of Message in bytes (50MB)
|
||||
message_size_limit = 52428800
|
||||
# Maximum size of Message in bytes (512MB)
|
||||
message_size_limit = 536870912
|
||||
|
||||
## SASL Auth Settings
|
||||
smtpd_sasl_auth_enable = yes
|
||||
@@ -45,13 +45,13 @@ smtpd_sasl_local_domain = $myhostname
|
||||
broken_sasl_auth_clients = yes
|
||||
|
||||
# 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
|
||||
@@ -68,8 +68,8 @@ virtual_mailbox_limit = 0
|
||||
#smtp_tls_note_starttls_offer = yes
|
||||
## TLS for email client
|
||||
#smtpd_tls_security_level = may
|
||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
||||
#smtpd_tls_key_file = $smtpd_tls_cert_file
|
||||
#smtpd_tls_cert_file = /etc/ssl/postfix/server.pem
|
||||
#smtpd_tls_key_file = /etc/ssl/postfix/server.key
|
||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
||||
#smtpd_tls_loglevel = 1
|
||||
#smtpd_tls_received_header = yes
|
||||
|
||||
@@ -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>
|
||||
@@ -9,7 +9,7 @@ sendmail_path = /usr/sbin/sendmail
|
||||
mydomain = <SERVERNAME>
|
||||
|
||||
# should be different from $mydomain eg. "mail.$mydomain"
|
||||
myhostname = <SERVERNAME>
|
||||
myhostname = mail.$mydomain
|
||||
|
||||
mydestination = $myhostname,
|
||||
$mydomain,
|
||||
@@ -26,7 +26,7 @@ default_destination_concurrency_limit = 20
|
||||
local_destination_concurrency_limit = 2
|
||||
|
||||
# SMTPD Settings
|
||||
smtpd_banner = $myhostname ESMTP $mail_name (Gentoo/GNU)
|
||||
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
|
||||
smtpd_helo_required = yes
|
||||
smtpd_recipient_restrictions = permit_mynetworks,
|
||||
permit_sasl_authenticated,
|
||||
@@ -42,8 +42,8 @@ smtpd_sender_restrictions = permit_mynetworks,
|
||||
smtpd_client_restrictions = permit_mynetworks,
|
||||
permit_sasl_authenticated,
|
||||
reject_unknown_client
|
||||
# Maximum size of Message in bytes (50MB)
|
||||
message_size_limit = 52428800
|
||||
# Maximum size of Message in bytes (512MB)
|
||||
message_size_limit = 536870912
|
||||
|
||||
## SASL Auth Settings
|
||||
smtpd_sasl_auth_enable = yes
|
||||
@@ -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
|
||||
@@ -81,8 +81,9 @@ virtual_mailbox_limit = 0
|
||||
#smtp_use_tls = yes
|
||||
#smtp_tls_note_starttls_offer = yes
|
||||
## TLS for email client
|
||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
||||
#smtpd_tls_key_file = /etc/ssl/server/<SERVERNAME>.pem
|
||||
#smtpd_tls_cert_file = /etc/ssl/server/server.pem
|
||||
#smtpd_tls_key_file = /etc/ssl/server/server.key
|
||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
||||
#smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt # Just an example for CACert.org
|
||||
#smtpd_tls_auth_only = no
|
||||
#smtpd_tls_loglevel = 1
|
||||
|
||||
@@ -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