Changeset 3144


Ignore:
Timestamp:
05/02/12 15:03:48 (13 months ago)
Author:
squidly
Message:

full templating of postfix and dovecot + little bugfixes

Location:
alternc/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/class/m_mail_localbox.php

    r3135 r3144  
    6363    $err->log("localbox","set_localbox"); 
    6464    $path="mail/"; 
    65     //if(!$db->query("select distinct left(ad.address,1) as letter,d.domaine from address ad,where ad.id = $mail_id ;")); 
    6665    if(!$db->query("select distinct left(ad.address,1) as letter,ad.address ,d.domaine from address ad, domaines d where ad.domain_id = d.id  and ad.id = $mail_id order by letter;")); 
    6766 
     
    7170    $path="/var/alternc/mail/".$db->f('letter')."/".$db->f('address')."_".$db->f('domaine'); 
    7271    //FIXME faire un touch de la maildir si dovecot ne sait pas le faire. 
    73     if(!$db->query("INSERT into mailbox (address_id,path) values ($mail_id,'$path');"));      
     72    if(!$db->query("INSERT into mailbox (address_id,path,quota) values ($mail_id,'$path',50);"));      
    7473 
    7574  } 
  • alternc/trunk/debian/alternc.postinst

    r3142 r3144  
    5757    chown -R vmail:vmail /var/alternc/mail 
    5858    chmod u+w /var/alternc/mail 
    59  
     59    chmod -R g+w /var/alternc/mail 
    6060 
    6161    # build local.sh if it does not exist 
  • alternc/trunk/debian/changelog

    r3139 r3144  
     1alternc (1.1+nmu3) stable; urgency=low 
     2 
     3  * Templating full configuration of postfix & dovecot  
     4  * bugfixes in mysql database configuration  
     5  * adding default quota (to use with dovecot) in local mailbox creation   
     6 
     7 -- Squidly <squidly@nnx.com>  Wed, 02 May 2012 14:51:49 +0200 
     8 
    19alternc (1.1+nmu2) stable; urgency=low 
    210 
  • alternc/trunk/etc/alternc/templates/dovecot/dovecot-dict-quota.conf

    r3137 r3144  
    11 
    2 connect host=%%dbhost%% dbname=%%dbname%% user=%%dbuser%% password=%%dbpwd%% 
     2connect host=%%dbhost%% dbname=%%dbname%% user=%%db_mail_user%% password=%%db_mail_pwd%% 
    33#connect = host=localhost dbname=mails user=testuser password=pass 
    44 
  • alternc/trunk/etc/alternc/templates/dovecot/dovecot-sql.conf

    r3142 r3144  
    6868# http://wiki.dovecot.org/Authentication/PasswordSchemes 
    6969# 
    70 default_pass_scheme = PLAIN-MD5 
     70default_pass_scheme = MD5 
    7171 
    7272# passdb query to retrieve the password. It can return fields: 
  • alternc/trunk/etc/alternc/templates/dovecot/dovecot.conf

    r3142 r3144  
    11961196  #   quota_rule = *:storage=1048576 
    11971197     quota_rule = *:storage=100M 
     1198     quota_rule2 = Trash:storage=10M 
    11981199  #   quota_rule2 = Trash:storage=102400 
    11991200  # User has now 1GB quota, but when saving to Trash mailbox the user gets 
     
    12131214  # Note that % needs to be escaped as %%, otherwise "% " expands to empty. 
    12141215  #   quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 
    1215   #   quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 
    12161216  #   quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 
    1217      quota_warning = storage=80%% /usr/local/bin/quota-warning.sh 80 
     1217     quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 
     1218     quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 
    12181219  #quota = maildir 
    12191220  quota = dict:user::proxy::quotadict 
  • alternc/trunk/etc/alternc/templates/postfix/mydomain.cf

    r3142 r3144  
    77hosts =%%dbhost%% 
    88dbname = %%dbname%% 
    9 query = select domaines.domaine from domaines join address on address.id=domaines.id where concat(address.address,'@',domaines.domaine)='%s' and gesmx=1; 
    10  
     9query = select domaines.domaine from domaines where domaine='%s' and gesmx=1; 
  • alternc/trunk/install/alternc.install

    r3142 r3144  
    4343if [ -d /etc/postfix ]; then 
    4444    CONFIG_FILES="$CONFIG_FILES etc/postfix/myalias.cf etc/postfix/myrelay.cf 
    45                   etc/postfix/mydomain.cf etc/postfix/mygid.cf 
     45                  etc/postfix/mydomain.cf etc/postfix/mygid.cf etc/postfix/myquota.cf 
    4646                  etc/postfix/myvirtual.cf etc/postfix/sasl/smtpd.conf" 
    4747fi 
     
    5555if [ -e /etc/default/saslauthd ]; then 
    5656    CONFIG_FILES="$CONFIG_FILES etc/default/saslauthd" 
     57fi 
     58 
     59if [ -e /etc/dovecot/dovecot.conf ]; then 
     60    CONFIG_FILES="$CONFIG_FILES etc/dovecot/dovecot.conf etc/dovecot/dovecot-sql.conf etc/dovecot/dovecot-dict-quota.conf" 
    5761fi 
    5862 
     
    265269 
    266270# Attribute the correct rights to critical postfix files 
    267 if [ -e /etc/postfix/myalias.cf -o -e /etc/postfix/mydomain.cf -o -e /etc/postfix/mygid.cf -o -e /etc/postfix/myvirtual.cf -o -e /etc/postfix/myrelay.cf ]; then 
     271if [ -e /etc/postfix/myalias.cf -o -e /etc/postfix/mydomain.cf -o -e /etc/postfix/mygid.cf -o -e /etc/postfix/myvirtual.cf -o -e /etc/postfix/myrelay.cf -o -e /etc/postfix/myquota.cf ]; then 
    268272    chown root:postfix /etc/postfix/my* 
    269273    chmod 640 /etc/postfix/my* 
  • alternc/trunk/install/mysql.sql

    r3142 r3144  
    246246  `update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Update date, for technical usage only. 
    247247  PRIMARY KEY (`id`), 
    248   UNIQUE INDEX `domain_id_idx` (`domain_id`), 
    249   UNIQUE KEY `address` (`address`) 
     248  UNIQUE INDEX `fk_domain_id` (`domain_id`,`address`) 
    250249) COMMENT = 'This is the main address table. It represents an address as in RFC2822'; 
    251250 
Note: See TracChangeset for help on using the changeset viewer.