Updating domain mail creation to use the mailname_bounce variable for the first alias
This commit is contained in:
parent
dfbcd0d861
commit
813c953544
|
@ -852,10 +852,20 @@ ORDER BY
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function hook_dom_add_mx_domain($domain_id) {
|
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);
|
$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 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue