Correction template dovecot + configuration d'installation

This commit is contained in:
Steven Mondji-Lerider 2012-05-04 08:57:23 +00:00
parent 4ed5bd918f
commit b26cb694b9
4 changed files with 13 additions and 7 deletions

View File

@ -1,3 +1,4 @@
# Postfix Configuration options
# Used by alternc.install with postconf # Used by alternc.install with postconf
home_mailbox = Maildir/ home_mailbox = Maildir/
smtpd_banner = $myhostname ESMTP smtpd_banner = $myhostname ESMTP
@ -5,6 +6,7 @@ header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks body_checks = regexp:/etc/postfix/body_checks
local_destination_concurrency_limit = 8 local_destination_concurrency_limit = 8
default_destination_concurrency_limit = 10 default_destination_concurrency_limit = 10
# TLS options
smtpd_use_tls = yes smtpd_use_tls = yes
smtpd_tls_dcert_file = /etc/alternc/apache.pem smtpd_tls_dcert_file = /etc/alternc/apache.pem
smtpd_tls_dkey_file = $smtpd_tls_dcert_file smtpd_tls_dkey_file = $smtpd_tls_dcert_file
@ -14,16 +16,20 @@ smtpd_tls_cert_file = $smtpd_tls_dcert_file
smtpd_tls_loglevel = 0 smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s smtpd_tls_session_cache_timeout = 3600s
smtp_use_tls = yes
smtp_tls_dcert_file = $smtpd_tls_dcert_file smtp_tls_dcert_file = $smtpd_tls_dcert_file
smtp_tls_dkey_file = $smtpd_tls_dcert_file smtp_tls_dkey_file = $smtpd_tls_dcert_file
smtp_tls_CApath = $smtpd_tls_CApath smtp_tls_CApath = $smtpd_tls_CApath
smtpd_tls_auth_only = yes smtpd_tls_auth_only = yes
#SASL options
smtpd_sasl_auth_enable = yes smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = postfix smtpd_sasl_local_domain = postfix
smtpd_sasl_security_options = noanonymous smtpd_sasl_security_options = noanonymous
enable_sasl_authentification = yes enable_sasl_authentification = yes
broken_sasl_auth_clients = yes broken_sasl_auth_clients = yes
smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth
smtpd_sasl_auth_enable=yes
#Virtual Maping
alias_maps = hash:/etc/aliases alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases alias_database = hash:/etc/aliases
virtual_alias_maps = proxy:mysql:/etc/postfix/myalias.cf virtual_alias_maps = proxy:mysql:/etc/postfix/myalias.cf

View File

@ -116,11 +116,11 @@ default_pass_scheme = MD5
# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u' # user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u' # user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
# #
user_query = SELECT mailbox.path AS home, domaines.compte AS uid, domaines.compte AS gid FROM mailbox JOIN address ON address.id = mailbox.address_id JOIN domaines on domaines.id = address.domain_id WHERE address.address = '%n' user_query = SELECT mailbox.path AS home, domaines.compte AS uid, 1998 AS gid FROM mailbox JOIN address ON address.id = mailbox.address_id JOIN domaines on domaines.id = address.domain_id WHERE address.address = '%n'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use # If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll # userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_" # also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example: # string. For example:
password_query = SELECT user, password, userdb_home, userdb_uid, userdb_gid,userdb_quota_rule FROM dovecot_view where user= '%u'; password_query = SELECT user, password, userdb_home, userdb_uid, 1998 AS userdb_gid,userdb_quota_rule FROM dovecot_view where user= '%u';

View File

@ -290,9 +290,9 @@ if [ "$slave" = "1" ]; then
else else
postfix_conf=/etc/alternc/postfix.cf postfix_conf=/etc/alternc/postfix.cf
fi fi
while read line ; do grep -v '^\ *#' $postfix_conf |while read line ; do
postconf -e "$line" postconf -e "$line"
done < "$postfix_conf" done
# Conviguring delivery used bu Postfix FIXME change script name # Conviguring delivery used bu Postfix FIXME change script name
echo `/usr/bin/postfix-add-policy dovecot pipe DRhu vmail:vmail '/usr/bin/sudo /usr/lib/dovecot/deliver -f ${sender} -d ${recipient} '` echo `/usr/bin/postfix-add-policy dovecot pipe DRhu vmail:vmail '/usr/bin/sudo /usr/lib/dovecot/deliver -f ${sender} -d ${recipient} '`

View File

@ -52,7 +52,7 @@ Example:
% sudo postfix-policy-add policyd noboby /usr/bin/policyd % sudo postfix-policy-add policyd noboby /usr/bin/policyd
Adds the following to master.cf: Adds the following to master.cf:
""" + makepolicy('policyd','method','flags', 'nobody', '/usr/bin/policyd') + """ """ + makepolicy('policyd','method','flags', 'user', '/usr/bin/policyd') + """
To output this usage message: To output this usage message:
% postfix-add-policy % postfix-add-policy
""" """
@ -89,7 +89,7 @@ if __name__ == '__main__':
shutil.copy2('/etc/postfix/master.cf', \ shutil.copy2('/etc/postfix/master.cf', \
'/etc/postfix/master.cf.working') '/etc/postfix/master.cf.working')
# Add stuff in # Add stuff in
stuff = makepolicy(policyname, user, method, flags, argv) stuff = makepolicy(policyname, method, flags, user, argv)
# Append stuff to the working copy: # Append stuff to the working copy:
newmaster = open('/etc/postfix/master.cf.working', mode='a') newmaster = open('/etc/postfix/master.cf.working', mode='a')