Changeset 1936

Show
Ignore:
Timestamp:
09/09/07 22:33:30 (1 year ago)
Author:
benjamin
Message:

Checking MX when hosting a mail. Fixes #1074

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/trunk/bureau/class/m_dom.php

    r1905 r1936  
    741741   * @param integer $mx Nom fqdn du serveur mx, si le mx local est précisé, 
    742742   *  on héberge alors les mails du domaine. 
     743   * @param boolean $force Faut-il passer les checks DNS ou MX ? (admin only) 
    743744   * @return boolean appelle $mail->add_dom ou $ma->del_dom si besoin, en 
    744745   *  fonction du champs MX. Retourne FALSE si une erreur s'est produite, 
     
    746747   * 
    747748   */ 
    748   function edit_domain($dom,$dns,$mx) { 
     749  function edit_domain($dom,$dns,$mx,$force==0) { 
    749750    global $db,$err,$L_MX,$classes,$cuid; 
    750751    $err->log("dom","edit_domain",$dom); 
    751752    // Locked ? 
    752     if (!$this->islocked) { 
     753    if (!$this->islocked && !$force) { 
    753754      $err->raise("dom",3); 
    754755      return false; 
    755756    } 
    756     if ($dns == 1) { 
     757    if ($dns == 1 && !$force) { 
    757758      $this->dns=$this->whois($dom); 
    758759      $v=checkhostallow($dom,$this->dns); 
     
    793794       
    794795    //si gestion mx uniquement, vérification du dns externe 
    795     if ($dns=="0" && $gesmx=="1") { 
     796    if ($dns=="0" && $gesmx=="1" && !$force) { 
    796797      $vmx = $this->checkmx($dom,$mx); 
    797798      if ($vmx == 1) { 
    798         //aucun champ mx de spécifié sur le dns 
     799        // Aucun champ mx de spécifié sur le dns 
     800        $err->raise("dom",25); 
     801        return false; 
    799802      } 
    800803   
    801804      if ($vmx == 2) { 
    802         //serveur non spécifié parmi les champx mx 
     805        // Serveur non spécifié parmi les champx mx 
     806        $err->raise("dom",25); 
     807        return false; 
    803808      } 
    804809    } 
  • alternc/trunk/bureau/locales/manual.pot

    r1912 r1936  
    171171msgstr "" 
    172172 
     173#. There is no MX record pointing to this server, and you are asking us to host the Mail here  
     174msgid "err_dom_25" 
     175msgstr "" 
     176 
    173177#. - Entrez le nom du domaine que vous souhaitez héberger. Le nom de domaine  
    174178#. doit être complet, mais <b>sans le www.</b><br /> IMPORTANT : Si vous voulez  
  • alternc/trunk/debian/changelog

    r1930 r1936  
    11alternc (0.9.6.5-12) testing; urgency=low 
    22 
     3  * Fixing MX check when hosting a mail (#1706) 
    34  * Fixing dns / nodns issue (#772) 
    45  * using apache-modconf again ...