Changes between Version 6 and Version 7 of QuotasParBoite


Ignore:
Timestamp:
12/14/06 13:54:52 (7 years ago)
Author:
pierre-gilles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuotasParBoite

    v6 v7  
    4141{{{ 
    4242 mysql -usysusr -pmot_de_passe system -e "ALTER TABLE `mail_users` ADD `quota`  INT DEFAULT '104857600' NOT NULL ;" 
     43}}} 
     44 
     45Il faut en plus compiler une extension pour mysql afin que de disposer d'une fonction mailfilter. AlternC utilisant le transport local pour faire la délvrance nous devons sortir de ce shema afin de passer par un transport virtuel. 
     46 
     47{{{ 
     48tar zxvf mailfilter.tgz 
     49cd mailfilter 
     50make  
     51cp mailfiter.so /usr/lib/mysql-fct-mailfilter.so 
     52ldconfig  
     53mysql restart 
     54mysql -usysusr -pmot_de_passe -e "create function mailfilter returns string soname 'mysql-fct-mailfilter.so' ;" 
    4355}}} 
    4456 
     
    108120smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destination 
    109121 
    110 alias_maps = mysql:/etc/postfix/myalias.cf hash:/etc/aliases 
     122alias_maps = mysql:/etc/postfix/mymailinglists.cf mysql:/etc/postfix/myalias-only.cf hash:/etc/aliases 
    111123 
    112124default_privs = www-data 
     
    115127#Quota Postfix VDA 
    116128virtual_minimum_uid = 32 
    117 virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf 
     129virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf proxy:mysql:/etc/postfix/mygidunderscore.cf 
    118130virtual_uid_maps = static:33 
    119131virtual_transport = virtual 
    120132virtual_mailbox_base = / 
    121 virtual_mailbox_domains = proxy:mysql:/etc/postfix/mydomain.cf 
    122 virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf 
    123 virtual_alias_maps = proxy:mysql:/etc/postfix/myforward.cf 
     133virtual_alias_maps =  proxy:mysql:/etc/postfix/myredirections.cf proxy:mysql:/etc/postfix/mymixed.cf  
     134virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtualmaildirunderscore.cf proxy:mysql:/etc/postfix/myvirtualmaildir.cf  
     135virtual_mailbox_domains = proxy:mysql:/etc/postfix/mydomains.cf proxy:mysql:/etc/postfix/myunderscore.cf 
    124136virtual_alias_domains = 
     137append_at_myorigin = no 
     138append_dot_mydomain = no 
    125139virtual_mailbox_extended = yes 
    126140virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/myquota.cf 
     
    131145virtual_create_maildirsize = yes 
    132146virtual_overquota_bounce = yes 
    133 proxy_read_maps= $virtual_mailbox_limit_maps $virtual_gid_maps proxy:unix:passwd.byname $virtual_mailbox_domains $virtual_mailbox_maps $virtual_alias_maps 
     147proxy_read_maps= $virtual_gid_maps $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $virtual_mailbox_limit_maps  proxy:unix:passwd.byname  
    134148local_transport = local 
    135 mydestination =  %%fqdn%% 
     149mydestination =  
    136150}}} 
    137151 
    138 il faut éditer le fichier : /etc/alternc/templates/postfix/myvirtual.cf 
    139 {{{ 
    140 # 
    141 # %%warning_message%% 
    142 # 
    143  
    144 user = %%dbuser%% 
    145 password = %%dbpwd%% 
    146 hosts =%%dbhost%% 
    147 dbname = %%dbname%% 
    148 table = mail_users 
    149 select_field = CONCAT(path,"/Maildir/") 
    150 where_field = alias 
    151 }}} 
    152152 
    153153il faut éditer le fichier : /etc/alternc/templates/courier/authmysqlrc  
     
    157157}}} 
    158158 
    159 il faut créer et éditer le fichier : /etc/postfix/myquota.cf 
     159 
     160Ensuite il faut reprendre les fichiers de maps mysql pour postfix : 
    160161{{{ 
    161 user = sysusr 
    162 password = ---MODIFIER-POUR-LE-MDP-SQL--- 
    163 hosts =localhost 
    164 dbname = system 
    165 table = mail_users 
    166 select_field = quota 
    167 where_field = alias 
    168 }}} 
    169  
    170 il faut créer et éditer le fichier : /etc/postfix/myforward.cf 
    171 {{{ 
    172 user = sysusr 
    173 password = ---MODIFIER-POUR-LE-MDP-SQL--- 
    174 hosts =localhost 
    175 dbname = system 
    176 table = mail_domain 
    177 select_field = alias 
    178 where_field = mail  
    179 additional_conditions =  AND pop='0'  
     162tar zxvf conf.tgz  
     163cd conf 
     164for i in *  
     165sed -i s/MDP_SQL/A_REMPLACER_PAR_LE_VOTRE/ $i 
     166cp * /etc/postfix 
    180167}}} 
    181168 
    182169changer les droits : 
    183170{{{ 
    184 chmod 640 /etc/postfix/myforward.cf /etc/postfix/myquota.cf 
    185 chgrp postfix /etc/postfix/myforward.cf /etc/postfix/myquota.cf 
     171chmod 640 /etc/postfix/*.cf  
     172chgrp postfix /etc/postfix/*.cf 
    186173}}} 
    187174