Commit 89ae27ac authored by Steven Mondji-Lerider's avatar Steven Mondji-Lerider

Updating domain mail creation to use the mailname_bounce variable for the first alias

parent 4a2cd849
......@@ -832,9 +832,18 @@ ORDER BY
* @access private
function hook_dom_add_mx_domain($domain_id) {
global $err, $mem, $L_FQDN;
global $err, $mem, $L_FQDN,$db;
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;
return $this->create_alias($domain_id, 'postmaster', $mem->user['login'].'@'.$mailname );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment