I am using vacation script with postfixadmin 2.2.0 (upgradede from 2.1.0). The problem is that disabling vacation the table "vacation_notification" is not cleaned, so if vacation is enabled again for that mailbox notifications are not sent for addresses already present in the table. How can I fix this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just encountered this error myself.
I have fixed it by updating edit-vacation.php, changed:
// retain vacation message if possible - i.e disable vacation away-ness.
$result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'");
$result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'");
to:
// retain vacation message if possible - i.e disable vacation away-ness.
$result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'");
$result = db_query("DELETE FROM $table_vacation_notification WHERE on_vacation='$fUsername'");
$result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'");
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using vacation script with postfixadmin 2.2.0 (upgradede from 2.1.0). The problem is that disabling vacation the table "vacation_notification" is not cleaned, so if vacation is enabled again for that mailbox notifications are not sent for addresses already present in the table. How can I fix this?
looks like a bug ; could you create a ticket in the tracker for it?
I just encountered this error myself.
I have fixed it by updating edit-vacation.php, changed:
// retain vacation message if possible - i.e disable vacation away-ness.
$result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'");
$result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'");
to:
// retain vacation message if possible - i.e disable vacation away-ness.
$result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'");
$result = db_query("DELETE FROM $table_vacation_notification WHERE on_vacation='$fUsername'");
$result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'");
Thanks for the patch - submitted to SVN r432.
BTW: users/vacation.php already contained the DELETE query, so this only affects cases where an admin disabled vacation.