|
|
Ligne 19 : |
Ligne 19 : |
| CREATE DATABASE IF NOT EXISTS `postfix` ;<br /> | | CREATE DATABASE IF NOT EXISTS `postfix` ;<br /> |
| GRANT ALL PRIVILEGES ON `postfix` . * TO 'postfix'@'%'; }} | | GRANT ALL PRIVILEGES ON `postfix` . * TO 'postfix'@'%'; }} |
− |
| |
− | ==== Création du fichier mysql_relay_domains_maps.cf ====
| |
− |
| |
− | user = postfix
| |
− | password = motdepassebasemysqlpourpostfix
| |
− | hosts = 192.168.1.123
| |
− | dbname = postfix
| |
− | query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1'
| |
− |
| |
− | ==== Création du fichier mysql_virtual_alias_maps.cf ====
| |
− |
| |
− | user = postfix
| |
− | password = motdepassebasemysqlpourpostfix
| |
− | hosts = 192.168.1.123
| |
− | dbname = postfix
| |
− | query = SELECT goto FROM alias WHERE address='%s' AND active = 1
| |
− |
| |
− | ==== Création du fichier mysql_virtual_domains_maps.cf ====
| |
− |
| |
− | user = postfix
| |
− | password = motdepassebasemysqlpourpostfix
| |
− | hosts = 192.168.1.123
| |
− | dbname = postfix
| |
− | query = SELECT domain FROM domain WHERE domain='%s'
| |
− |
| |
− | ==== Création du fichier mysql_virtual_mailbox_limit_maps.cf ====
| |
− |
| |
− | user = postfix
| |
− | password = motdepassebasemysqlpourpostfix
| |
− | hosts = 192.168.1.123
| |
− | dbname = postfix
| |
− | query = SELECT quota FROM mailbox WHERE username='%s'
| |
− |
| |
− | ==== Création du fichier mysql_virtual_mailbox_maps.cf ====
| |
− |
| |
− | user = postfix
| |
− | password = motdepassebasemysqlpourpostfix
| |
− | hosts = 192.168.1.123
| |
− | dbname = postfix
| |
− | query = SELECT maildir FROM mailbox WHERE CONCAT(username,'@',domain)='%s' AND active = 1
| |
− |
| |
− | ==== Edition du fichier /etc/postfix/main.conf ====
| |
− |
| |
− | # Support Mysql
| |
− | virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
| |
− | virtual_gid_maps = static:5000
| |
− | virtual_mailbox_base = /home/vmail
| |
− | virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
| |
− | virtual_mailbox_limit = 51200000
| |
− | virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
| |
− | virtual_minimum_uid = 5000
| |
− | virtual_transport = virtual
| |
− | virtual_uid_maps = static:5000
| |
− | # Support du quota
| |
− | virtual_mailbox_limit = 504000000
| |
− | # virtual_create_maildirsize = yes
| |
− | # virtual_mailbox_extended = yes
| |