Menu

vacation notification

Inle
2007-10-07
2013-01-23
  • Inle

    Inle - 2007-10-07

    HY
    I'm triyng to configure vacation notification but I get this error (when i try to create the table vacation_notification

    ERROR 1005 (HY000) at line 2: Can't create table './postfix/vacation_notification.frm' (errno: 150)
    Thanks

     
    • GingerDog

      GingerDog - 2007-10-08

      Looks like a nice MySQL error :)

      It could be a permissions issue in /var/lib/mysql[/data] ?

       
    • Inle

      Inle - 2007-10-08

      problem solved.

      I have made svn upin the postfixadmin directory, so when I tried to create the  new table vacation_notification there was a problem related to the fact table vacation has been changed in order to colaborate with table notification. So I deleted the actual table notification and I created the new one, after that i could create table vacation_notification.

      Thanks anyway

       
    • Inle

      Inle - 2007-10-08

      Hi
      Here I'm again.
      Now I am in face of the real problem configuring virtual vacation.
      The mail does not arrive to destination. The localuser receive the mail but the sender never receive the mail send by vacation.pl the debug logs shows that

      ====== 2007/10/08 12:18:22 ======
      [STRIP RECIPIENTS]:  | <168296.68108.qm@web27701.mail.ukl.yahoo.com> | filier@exemple.com
      ====== 2007/10/08 12:18:22 ======
      [FOUND VACATION]:  | <168296.68108.qm@web27701.mail.ukl.yahoo.com> | tes456@yahoo.es | filier@exemple.com | filier@exemple.com

      Thanks In advance.

       
    • GingerDog

      GingerDog - 2007-10-09

      I'd need to see more logs, I'm afraid.

       
    • Inle

      Inle - 2007-10-11

      Hy I know am late here are other logs..
      Oct 11 15:37:05 mail postfix/pipe[5423]: 0CD7D374A1: to=<user@mydomain>, relay=dovecot, delay=0.12, delays=0.07/0.01/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service)
      Oct 11 15:37:05 mail dovecot: imap-login: Login: user=<user2@mydomain>, method=PLAIN,
      Oct 11 15:37:05 mail postfix/pipe[5424]: 0CD7D374A1: to=<user#mydomain@autoreply.mydomain>, orig_to=<user@mydomain>, relay=vacation, delay=0.24, delays=0.07/0.02/0/0.15, dsn=2.0.0, status=sent (delivered via vacation service)
      Oct 11 15:37:05 mail postfix/qmgr[3399]: 0CD7D374A1: removed.

      Thanks

       
    • Inle

      Inle - 2007-10-11

      I works now , but there is a bug. when I desactivate vacation the script vacation.php adds a second coma insted of removing the firstone to the register goto in the table alias. that's why it was not working for me. I would like to fix it myself but I am not a programmer.
      Thanks

       
    • Inle

      Inle - 2007-10-11

      I think the problem is here a piece from vacation.php
      .
      .
      // add the goto record back in...
      $comma = '';
      if(strlen($tGoto) > 1) {
      $comma = ',';
      }
      $goto = $tGoto . $comma . $vacation_goto;

      $result = db_query ("UPDATE $table_alias SET goto='$goto',modified=NOW() WHERE address='$USERID_USERNAME'");
      if ($result['rows'] != 1)
      {
      $error = 1;
      $tMessage = $PALANG['pUsersVacation_result_error'];
      }
      .
      .
      Anyone could take a look? if a user deactivate vacation the goto field should return to normal. actualy this is wath happen:

      mysql> select * from alias where address='user@mydomain';
      +-----------------+-----------------+---------------------+---------------------+---------------------+--------+
      | address | goto | domain | created | modified | active |
      +--------------------------+------------------------------+---------------------+---------------------+--------+
      | user@mydomain | user@mydomain,, | mydomain | 2007-09-23 06:06:39 | 2007-10-11 18:58:45 | 1 |
      +--------------------------+------------------------------+---------------------+---------------------+--------+

      but normally thr goto field should be like this:

      +-----------------+-----------------+---------------------+---------------------+---------------------+--------+
      | address | goto | domain | created | modified | active |
      +--------------------------+------------------------------+---------------------+---------------------+--------+
      | user@mydomain | user@mydomain | mydomain | 2007-09-23 06:06:39 | 2007-10-11 18:58:45 | 1 |
      +--------------------------+------------------------------+---------------------+---------------------+--------+

      Any Idea?
      Thanks

       
      • Christian Boltz

        Christian Boltz - 2007-10-12

        Good catch. The code looked like this (partly pseudocode for better understanding)

        $tGoto = goto_column_from_database;
        //only one of these will do something, first handles address at beginning and middle, second at end, third if it's the only alias record.
        $goto= preg_replace ( "/$vacation_goto,/", '', $tGoto);
        $goto= preg_replace ( "/,$vacation_goto/", '', $tGoto);
        $goto= preg_replace ( "/$vacation_goto/", '', $tGoto);

        This means: Each statement uses $tGoto as base and saves its result in $goto. In other words: the last one (that doesn't remove the comma) wins ;-)

        I just fixed this in SVN - the second and third statement now use $goto instead of $tGoto.

        (In case you still have some superflous commas in your database left, go to the "edit alias" page and click the save button. This should fix the affected alias.)

         
    • GingerDog

      GingerDog - 2007-10-16

      Thanks for catching the goto comma bug :)
      David

       
    • Inle

      Inle - 2007-10-24

      You are welcome
      :-)

       

Log in to post a comment.