=2) { list($host,$dompart)=$expl; // We search for a 'squirrelmail' subdomain in that domain $db->query("SELECT * FROM sub_domaines s WHERE s.domaine='".addslashes($dompart)."' AND s.type='roundcube';"); if ($db->next_record()) { $domain=$db->Record; return "http://".$domain["sub"].(($domain["sub"])?".":"").$domain["domaine"]; } } $i++; } while (strpos($dompart,'.')!==false); } // not found: search for a webmail in the admin user account $db->query("SELECT * FROM sub_domaines s WHERE s.compte=2000 AND s.type='roundcube';"); if ($db->next_record()) { $domain=$db->Record; return "http://".$domain["sub"].(($domain["sub"])?".":"").$domain["domaine"]; } } /* ----------------------------------------------------------------- */ /** Hook called when an email is REALLY deleted (by the cron, not just in the panel) * @param mail_id integer the ID of the mail in the AlternC database * @param fullmail string the deleted mail himself in the form of john@domain.tld * @return boolean */ function hook_mail_delete_for_real($mail_id, $fullmail) { // FIXME do something ! // Include Roundcube configuration // Delete from the roundcube configuration // Use cleandb.sh filled by roundcube ? printvar($mail_id); printvar($fullmail); } } /* Class Roundcube */