Menu

Vacation notification cleanup

2008-07-21
2013-01-23
  • megabaldios

    megabaldios - 2008-07-21

    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?

     
    • GingerDog

      GingerDog - 2008-07-21

      looks like a bug ; could you create a ticket in the tracker for it?

       
    • Adam

      Adam - 2008-07-29

      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'");
       

       
      • Christian Boltz

        Christian Boltz - 2008-08-01

        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.

         

Log in to post a comment.