Squirrelmail OK

Roundcube TODO
This commit is contained in:
Alan Garcia 2013-02-07 16:06:41 +00:00
parent e695678a4c
commit f7532b0ada
2 changed files with 25 additions and 6 deletions

View File

@ -73,10 +73,9 @@ class m_roundcube {
* @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 ?
// Use cleandb.sh filled by roundcube ? http://trac.roundcube.net/browser/github/bin/cleandb.sh
printvar($mail_id);
printvar($fullmail);
}

View File

@ -65,9 +65,29 @@ class m_squirrelmail {
}
/* ----------------------------------------------------------------- */
/** 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) {
$fullmail2 = str_replace('@','_',$fullmail); // fullname with _ instead of @ (compatibility)
$todel = array (
"$fullmail.abook",
"$fullmail.pref",
"$fullmail2.abook",
"$fullmail2.pref");
foreach ( $todel as $t ) {
if (file_exists($t) ) {
@unlink("/var/lib/squirrelmail/data/$t");
}
}
} // hook_mail_delete_for_real
} /* Class Squirrelmail */