Posted by Josh, Last modified by on 03 December 2010 02:25 PM
|
|
Why is my SMTP service restarting? Problem In versions 10.1.3 or earlier of IceWarp server, it’s possible to create a domain alias loop which will lead to an SMTP service crash. Consider this scenario: You have a domain alias domain1.com pointing to domain alias domain2.com which in turn points back to domain alias domain1.com. When the message is sent to one of these domains, it winds up in the loop. Domain Aliases
Solution<p< strong=""> Even if you have already upgraded to version 10.2, the installation will not preserve your domain aliases. If you suspect that this may be a problem for you, then you should make sure that your server doesn’t contain cross referenced domain aliases. This can be done manually, or via this PHP script:
<?
/**
* Example - checking for cross referenced Domain aliases which are possible in IceWarp version 10.1
* and older versions and causes SMTP to crash
*
*/
echo "List all domains with aliases
// Invoke Global API COM object - "IceWarpServer.APIObject"
if (!($com = new COM("IceWarpServer.APIObject")))
{
echo "API couldn't be invoked";
return;
}
// Get domain count
$domCount = $com->GetDomainCount();
for ($i = 0; $i < $domCount; $i++)
{
$domain = $com->OpenDomain($com->GetDomain($i));
$domAliasType = $domain->GetProperty("D_Type");
// Type 2 is Domain alias
if ( $domAliasType == 2 )
{
$domName = $domain->Name;
$domValue = $domain->GetProperty("D_DomainValue");
// index them
$array["$domName"] = $domValue;
foreach ($array as $index => $value) {
// cross reference checking
if (($domValue == $index) && ($domName == $array[$index])) $arraydup["$domName"] = $domValue;
}
echo " Domain: $domName \t Alias: $domValue";
}
}
if (empty($arraydup)) {
echo "No first level cross references found.";
} else {
echo "Cross references found:
print_r($arraydup);
}
?>
Run this script from the console or from the web. It prints all domain aliases and tries to find any existing loops (two domain aliases referring to each other). |
Comments
0 comments
Please sign in to leave a comment.