The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Boxtrapper errors saving lists

Discussion in 'General Discussion' started by danimal, May 2, 2005.

  1. danimal

    danimal Well-Known Member

    Joined:
    Jul 14, 2003
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    Hello!

    So, is it just me, or is boxtrapper unable to save lists when used as an end-user via the webmail control panel?

    If I log into webmail, then choose boxtrapper, then edit the whitelist and make a change, and then hit the SAVEbutton, I see a page with this:

    SAVELIST

    and the changes aren't stored. So... I did some digging and found a file called "webmailboxtrapper.cgi" Sure enough, I found these lines:

    } elsif ($bxaction eq "savelist") {
    print "SAVELIST\n";
    }

    Oh boy. That looks like what happens when a developer puts in a note to "code it later." This isn't broken... it's NOT EVEN IMPLEMENTED! *sigh*

    The deep irony is that the list management when I'm logged into the cpanel for that domain does work. So they (the developers) have actually coded the ability to edit a list in a form and save it properly... they just didn't copy the code to the email management tools.

    I guess I could hack this code, now that I know where to look... but this seems like a fairly major oversight! (Unless I'm missing something).

    Any thoughts out there? Any advice? Anyone already fixed this in the code? I really, really like the "theory" of boxtrapper, but it isn't done enough and fine-tuned enough to roll it out to all of my hosted clients yet. *big sigh*

    Thanks, All!

    -Danimal :cool:
     
  2. Ralph

    Ralph Registered

    Joined:
    May 15, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    similar problem

    Perhaps we are using different versions of boxtrapper (how do I know which version I am using?), but I find I can save entries to the whitelist but if I am working through the queue and mark an email to be whitelisted, it releases the email from the queue but doesnt added the address to the white list. This happens which ever way I access boxtrapper.

    Where are the two scripts you mention?

    Are the developpers listening to this or are we all complaining to one another?
     
  3. danimal

    danimal Well-Known Member

    Joined:
    Jul 14, 2003
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    hmmm...

    Ralph,

    It's possible, I suppose. I'm running the latest STABLE version of cpanel and WHM. I wonder, do you have root access to your machine? If so, could you go take a look at this file:

    Code:
    /usr/local/cpanel/base/webmailboxtrapper.cgi
    In particular, near the very bottom (line 182 in my copy), there is the following line:

    Code:
    print "SAVELIST\n";
    It is part of this chunk:
    Code:
    } elsif ($bxaction eq "savelist") {
         print "SAVELIST\n";
    }
    
    Can you see what your copy of webmailboxtrapper.cgi has there? Maybe just search for "savelist" in the file and see what it does. Anyone else please feel free to post as well. I'm figuring that I'll have to code this myself until the cPanel/WHM folks get to it, but if it's already been fixed and for some reason my file isn't up to date, maybe I can take care of it that way (update it or plug in the code from someone else's copy).

    Thanks all!

    -Danimal :cool:

    P.S. BTW, the other file I can't find... it's the one that is called when you are editing a whitelist (or other list) through cpanel, not webmail. That's why this is so frustrating... "they" obviously coded the saving the lists correctly, but only in the "admin" (i.e. cpanel) part, not in the "end user" (i.e. webmail) part. *sigh*
     
  4. qbert220

    qbert220 Member

    Joined:
    Feb 7, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I have this problem also, but I am able to manually save whitelists. I'm using cPanel 10.2.0-RELEASE 82

    My code in webmailboxtrapper.cgi looks like this (starting at line 258):

    Code:
    } elsif ($bxaction eq "savelist") {
       my ($homedir,$domain) = BoxTrapper_getaccountinfo($account);
       my ($emaildir,$emaildeliverdir) = BoxTrapper_getemaildirs($account,$homedir);
    
       my $file = "";
       if ($FORM{'list'} eq "forwardlist") {
          $file = "${emaildir}/.boxtrapper/forward-list.txt";
       }
       if ($FORM{'list'} eq "whitelist") {
          $file = "${emaildir}/.boxtrapper/white-list.txt";
       }
       if ($FORM{'list'} eq "blacklist") {
          $file = "${emaildir}/.boxtrapper/black-list.txt";
       }
       if ($FORM{'list'} eq "ignorelist") {
          $file = "${emaildir}/.boxtrapper/ignore-list.txt";
       }
       open(LIST,">", $file);
       print LIST $FORM{'page'};
       close(LIST);
       if ( $FORM{'list'} ne "forwardlist" ) {
          BoxTrapper_cleanlist($file);
       }
       print "<p>" . $Cpanel::Lang::LANG{$lang}{'saveconfirm-BoxTrapper'} . "</p>\n";
    }
    qbert
     
  5. danimal

    danimal Well-Known Member

    Joined:
    Jul 14, 2003
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    Thank You!

    qbert,

    Thank you thank you thank you!

    That was the code I needed. I was just about to code it myself but it's nice to have the actual code. I have no idea why my copy of that .cgi file is wrong. It makes me wonder if other things like that are broken that shouldn't be. hmmm...

    Anyway, I appreciate the post. I may yet be able to offer boxtrapper to my hosted clients now! :D

    -Danimal :cool:

    P.S. FWIW I'm switching to RELEASE instead of STABLE and updating. I'll see if that fixes this issue anyway.

    UPDATE: switched to RELEASE. Updated to latest RELEASE. didn't make a lick of difference. I.e. webmailboxtrapper.cgi is still broken. I've plugged in the above code and it now works mostly (the "BoxTrapper_cleanlist" function isn't working, though, but I just commented it out for now. Also $lang couldn't be dereferenced).

    Interesting note: it appears that the options from the queue to release an email and whitelist the address are working just fine! So the deep irony is that we both have broken BoxTrapper systems, but broken in completely non-intersecting ways. Oy! *roll eyes*
     
    #5 danimal, May 18, 2005
    Last edited: May 18, 2005
Loading...

Share This Page