clubhost
Verified User
I have just installed DWmail on my server. My server has a Direct Admin Control panel and I'm sure anyone who has install DWmail on an Direct Admin Server would most likely been annoyed how DWmail changes the username that has been entered.
Direct Admin uses a short username without the domain as the main email account on each domain, but then additional email accounts on those domains require the full email address as the username. DWmail handles it one way or the other not both. I have developed a way around this.
The second issue. if you install a single copy of DWmail on your server that can be used by each domain IE www.domain.com/webmail DWmail prefers the use of Localhost as the default domain or for you to use advanced login to enter it each time. I've included here a way to dynamically set the default domain depending on the url you used.
edit dologin.php - Line 32 - under the "require" lines
ADD
edit dologin.php - Line 265
change from
edit includes/config.inc.php - Line 189
change
edit includes/config.inc.php - approx line 447
set
I hope this helps
Regards
Brian.
Direct Admin uses a short username without the domain as the main email account on each domain, but then additional email accounts on those domains require the full email address as the username. DWmail handles it one way or the other not both. I have developed a way around this.
The second issue. if you install a single copy of DWmail on your server that can be used by each domain IE www.domain.com/webmail DWmail prefers the use of Localhost as the default domain or for you to use advanced login to enter it each time. I've included here a way to dynamically set the default domain depending on the url you used.
edit dologin.php - Line 32 - under the "require" lines
ADD
// Direct Admin username fix - record entry
if (isset($_POST['u'])) {
$orige = $_POST['u'] ;
}
edit dologin.php - Line 265
change from
to$_SESSION['sess_u'] = $u;
$_SESSION['sess_u'] = $orige;
edit includes/config.inc.php - Line 189
change
to$DefaultDomain = 'localhost';
//// DIRECT ADMIN - DYNAMIC DOMAIN NAME
$sn = $_SERVER['SERVER_NAME'] ;
$snlen = strlen($sn) ;
$DefaultDomain = (substr($sn,0,3)=="www")? substr($sn,4,($snlen-4)):$sn ;
//$DefaultDomain = 'localhost';
edit includes/config.inc.php - approx line 447
set
$DWmailMode = 1;
I hope this helps
Regards
Brian.