Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th August 2007, 16:27
jmroth jmroth is offline
ISPConfig Developer
 
Join Date: Sep 2005
Posts: 191
Thanks: 1
Thanked 6 Times in 6 Posts
Question creation of spamassassin directory and user_prefs

Ehm... this new piece of code
Code:
  // Spamassassin directory anlegen
  if(!is_dir($web_path."/user/".$user_username."/.spamassassin")) {
        mkdir($web_path."/user/".$user_username."/.spamassassin", 0700);
        $mod->log->caselog("chown ".$user_username.":web".$web_doc_id." ".$web_path."/user/"
.$user_username."/.spamassassin");
  }
  if(!is_link($web_path."/user/".$user_username."/.spamassassin/user_prefs")) {
        symlink($web_path."/user/".$user_username."/.user_prefs",$web_path."/user/".$user_us
ername."/.spamassassin/user_prefs");
  }
I don't think this also works correctly the "admin user" where the homedir is not /home/www/webXX/user/webXX_user/ but only /home/www/webXX/
Reply With Quote
Sponsored Links
  #2  
Old 28th August 2007, 21:55
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,579
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Yes, the current implementation is only for non admin users.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 29th August 2007, 01:29
jmroth jmroth is offline
ISPConfig Developer
 
Join Date: Sep 2005
Posts: 191
Thanks: 1
Thanked 6 Times in 6 Posts
Default

Why did you do that?
I like your software, and I mean no disrespect at all. By why put a feature/hack in there that does not apply to all the cases (here: users). I now know its behavior but either do it completely or just leave it would be my way to do it...
Reply With Quote
  #4  
Old 29th August 2007, 01:59
jmroth jmroth is offline
ISPConfig Developer
 
Join Date: Sep 2005
Posts: 191
Thanks: 1
Thanked 6 Times in 6 Posts
Default

Oh well but instead of complaining why don't you just add code similar to this to your own from above :-)

Code:
  if($user["user_admin"]) {
    @unlink($web_path."/.spamassassin");
    symlink($web_path."/user/".$user_username."/.spamassassin/",
            $web_path."/.spamassassin");
  }
Reply With Quote
  #5  
Old 29th August 2007, 08:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,579
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
Originally Posted by jmroth
Why did you do that?
I like your software, and I mean no disrespect at all. By why put a feature/hack in there that does not apply to all the cases (here: users). I now know its behavior but either do it completely or just leave it would be my way to do it...
The faeture is experimental, ISPConfig 2.2.16 had to be released instantly due to a bug in Clamav, so there was no time for further testing it and I do not add any additional code that I'am not able to test extensively.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 29th August 2007, 08:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,579
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
Originally Posted by jmroth
Oh well but instead of complaining why don't you just add code similar to this to your own from above :-)

Code:
  if($user["user_admin"]) {
    @unlink($web_path."/.spamassassin");
    symlink($web_path."/user/".$user_username."/.spamassassin/",
            $web_path."/.spamassassin");
  }
Thanks, I will test it.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 29th August 2007, 10:15
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

So this bug / hack is not included in versions prior to 2.2.16?
Reply With Quote
  #8  
Old 29th August 2007, 10:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,579
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
Originally Posted by Ben
So this bug / hack is not included in versions prior to 2.2.16?
Its neither a bug nor a hack. Its a experimental function in 2.2.16 to implement links for spamd for non admin users.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 29th August 2007, 10:28
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Ah ok, so if I do not make use of that exp. feature there won't be any problems?
Reply With Quote
  #10  
Old 29th August 2007, 10:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,579
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
 
Default

Quote:
Originally Posted by Ben
Ah ok, so if I do not make use of that exp. feature there won't be any problems?
No. Even if you use this function, there are no problems. What jmroth pointed out is, that the function is just implemented for normal users and not administrators.

I agree with him that this was not a good solution to implement this for users only.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.