From a6251aad9f2b8a6063f2287c4b86439853d99d3e Mon Sep 17 00:00:00 2001 From: theonlydoo Date: Thu, 6 Nov 2014 17:23:33 +0100 Subject: [PATCH] modification du dbpassword --- roles/mail/templates/config.inc.php | 2 +- roles/mail/templates/dbconfig.inc.php | 2 +- roles/mail/templates/dovecot-mysql.conf | 2 +- roles/mail/templates/mysql_relay_domains.cf | 2 +- roles/mail/templates/mysql_virtual_alias_maps.cf | 2 +- roles/mail/templates/mysql_virtual_mailbox_domains.cf | 2 +- roles/mail/templates/mysql_virtual_mailbox_maps.cf | 2 +- roles/mail/templates/root-postfix.sql | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/mail/templates/config.inc.php b/roles/mail/templates/config.inc.php index 3830b99..7aec1e8 100644 --- a/roles/mail/templates/config.inc.php +++ b/roles/mail/templates/config.inc.php @@ -33,7 +33,7 @@ $CONF['configured'] = true; // In order to setup Postfixadmin, you MUST specify a hashed password here. // To create the hash, visit setup.php in a browser and type a password into the field, // on submission it will be echoed out to you as a hashed value. -$CONF['setup_password'] = '{{ dbpassword }}'; +$CONF['setup_password'] = '{{ dbpassword.stdout }}'; } } diff --git a/roles/mail/templates/dbconfig.inc.php b/roles/mail/templates/dbconfig.inc.php index 48eb84f..db21bf5 100644 --- a/roles/mail/templates/dbconfig.inc.php +++ b/roles/mail/templates/dbconfig.inc.php @@ -11,7 +11,7 @@ ## above too. ## $dbuser='postfix'; -$dbpass='{{ dbpassword }}'; +$dbpass='{{ dbpassword.stdout }}'; } } $basepath=''; diff --git a/roles/mail/templates/dovecot-mysql.conf b/roles/mail/templates/dovecot-mysql.conf index 57987a5..6a66728 100644 --- a/roles/mail/templates/dovecot-mysql.conf +++ b/roles/mail/templates/dovecot-mysql.conf @@ -1,5 +1,5 @@ driver = mysql -connect = host=127.0.0.1 dbname=postfix user=postfix password={{ dbpassword }} +connect = host=127.0.0.1 dbname=postfix user=postfix password={{ dbpassword.stdout }} default_pass_scheme = MD5-CRYPT user_query = SELECT '/home/facteur/%d/%n' as home, 3000 AS uid, 3000 AS gid FROM mailbox WHERE username = '%u' password_query = SELECT password FROM mailbox WHERE username = '%u' diff --git a/roles/mail/templates/mysql_relay_domains.cf b/roles/mail/templates/mysql_relay_domains.cf index ac6d328..fd1c781 100644 --- a/roles/mail/templates/mysql_relay_domains.cf +++ b/roles/mail/templates/mysql_relay_domains.cf @@ -1,5 +1,5 @@ hosts = 127.0.0.1 user = postfix -password = {{ dbpassword }} +password = {{ dbpassword.stdout }} dbname = postfix query = SELECT domain FROM domain WHERE domain='%s' and backupmx = 1 diff --git a/roles/mail/templates/mysql_virtual_alias_maps.cf b/roles/mail/templates/mysql_virtual_alias_maps.cf index f293f72..ffafbea 100644 --- a/roles/mail/templates/mysql_virtual_alias_maps.cf +++ b/roles/mail/templates/mysql_virtual_alias_maps.cf @@ -1,5 +1,5 @@ hosts = 127.0.0.1 user = postfix -password = {{ dbpassword }} +password = {{ dbpassword.stdout }} dbname = postfix query = SELECT goto FROM alias WHERE address='%s' AND active = 1 diff --git a/roles/mail/templates/mysql_virtual_mailbox_domains.cf b/roles/mail/templates/mysql_virtual_mailbox_domains.cf index ab83de6..3e5204a 100644 --- a/roles/mail/templates/mysql_virtual_mailbox_domains.cf +++ b/roles/mail/templates/mysql_virtual_mailbox_domains.cf @@ -1,5 +1,5 @@ hosts = 127.0.0.1 user = postfix -password = {{ dbpassword }} +password = {{ dbpassword.stdout }} dbname = postfix query = SELECT domain FROM domain WHERE domain='%s' and backupmx = 0 and active = 1 diff --git a/roles/mail/templates/mysql_virtual_mailbox_maps.cf b/roles/mail/templates/mysql_virtual_mailbox_maps.cf index 1ca310b..887bbd6 100644 --- a/roles/mail/templates/mysql_virtual_mailbox_maps.cf +++ b/roles/mail/templates/mysql_virtual_mailbox_maps.cf @@ -1,5 +1,5 @@ hosts = 127.0.0.1 user = postfix -password = {{ dbpassword }} +password = {{ dbpassword.stdout }} dbname = postfix query = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1 diff --git a/roles/mail/templates/root-postfix.sql b/roles/mail/templates/root-postfix.sql index 00c8c91..b437195 100644 --- a/roles/mail/templates/root-postfix.sql +++ b/roles/mail/templates/root-postfix.sql @@ -1,4 +1,4 @@ CREATE DATABASE postfix; -GRANT ALL PRIVILEGES ON postfix.* TO 'postfix_admin'@'%' IDENTIFIED BY '{{ dbpassword.stdout }}'; -GRANT SELECT ON postfix.* TO 'postfix'@'%' IDENTIFIED BY '{{ dbpassword.stdout }}'; +GRANT ALL PRIVILEGES ON postfix.* TO 'postfix_admin'@'%' IDENTIFIED BY '{{ dbpassword.stdout.stdout }}'; +GRANT SELECT ON postfix.* TO 'postfix'@'%' IDENTIFIED BY '{{ dbpassword.stdout.stdout }}'; FLUSH PRIVILEGES;