Move to Spam Option problem

Discussion in 'General' started by Cracklefish, Mar 18, 2009.

  1. Cracklefish

    Cracklefish Member

    I need some help understanding the instructions in the "/how-to-add-a-move-to-spam-option-to-your-ispconfig-installation"

    The system is SUSE 11.0 with the Perfect Server config.

    The modification to /root/ispconfig/scripts/lib/classes/ispconfig_procmail.lib.php is:

    Code:
    if(is_file('/home/admispconfig/ispconfig/tools/spamassassin/usr/local/bin/spamassassin')){
    @@ -302,6 +333,7 @@
       // Variablen zuweisen
       $mod->tpl->assign( array(PREFS_FILE =>
    $web_path."/user/".$user_username."/.user_prefs",
                                SPAM_COMMENT => $spam_comment,
                                SPAM_COMMAND => $spam_command,
                                SPAMASSASSIN_PATH => $spamassassin_path,
                                                        USERNAME =>
    $user_username));
    However my file looks slightly different around line 330

    Code:
    if(is_file('/home/admispconfig/ispconfig/tools/spamassassin/usr/local/bin/spamassassin')){
        $spamassassin_path = '/home/admispconfig/ispconfig/tools/spamassassin/usr/local/bin/spamassassin';
      } else {
        $spamassassin_path = '/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin';
      }
    
      // Variablen zuweisen
      $mod->tpl->assign( array(PREFS_FILE => $web_path."/user/".$user_username."/.user_prefs",
                               SPAM_COMMENT => $spam_comment,
                               SPAMASSASSIN_PATH => $spamassassin_path,
                                                       USERNAME => $user_username));
    
      $mod->tpl->parse(TABLE, table);
    
     
  2. falko

    falko Super Moderator ISPConfig Developer

    I haven't tried it, but it seems as if you have to add
    SPAM_COMMAND => $spam_command,
    to the $mod->tpl->assign stanza.
     
  3. Cracklefish

    Cracklefish Member

    Actually, I have all the modifications with the exception of the @@ ...@@ bit installed because I didn't understand what to do, as my original script is different to the Howto version.

    Currently, move does not function and all spam is accepted.

    Strangely the original script terminates '} }' ie. the '?>' is missing and both the braces are orphans.

    In its unmodified form it ran ok but now I get the following:

    Parse error: syntax error, unexpected $end, expectiing T-FUNCTION in .../ispconfig_procmail.lib.php on line 427

    ie the terminating orphaned '}'

    I hope this makes sense.
     
    Last edited: Mar 20, 2009

Share This Page