diff --git a/bureau/class/m_mail.php b/bureau/class/m_mail.php index fa2e709f..70799953 100644 --- a/bureau/class/m_mail.php +++ b/bureau/class/m_mail.php @@ -852,12 +852,22 @@ ORDER BY * @access private */ function hook_dom_add_mx_domain($domain_id) { - global $err, $mem, $L_FQDN; + global $err, $mem, $L_FQDN,$db; $err->log("mail","hook_dom_add_mx_domain",$domain_id); - return $this->create_alias($domain_id, 'postmaster', $mem->user['login'].'@'.$L_FQDN ); + + $db->query("SELECT value FROM variable where name='mailname_bounce';"); + if (!$db->next_record()) { + $err->raise("mail",_("The email %s does not exist, it can't be deleted"),$mail); + return false; + } + $mailname=$db->f("value"); + printvar($mailname); + + return $this->create_alias($domain_id, 'postmaster', $mem->user['login'].'@'.$mailname ); } + /* ----------------------------------------------------------------- */ /** hook function called by AlternC-upnp to know which open * tcp or udp ports this class requires or suggests