DirectAdmin Forums

Go Back   DirectAdmin Forums > Announcements > Official DirectAdmin Announcements

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2007, 01:38 AM
DirectAdmin Support DirectAdmin Support is offline
Administrator
 
Join Date: Feb 2003
Posts: 6,693
Email Level Plugin

Hello,

version 0.1-beta

Due to popular demand, I've created a basic Email Level plugin.
The plugin allows users to install some php scripts into their accounts which then allows any pop account to login to those scripts to access their pop account setup.

It shows them their current disk usage, ability to change their password, set vacation messages (without bugging the webmaster), and provides them with the 3 links to the webmail programs.

To disable any of the webmail programs, set them to false in the "include/config.php" file.

Installation:

1) To install the plugin:
Admin Level -> Plugin Manager.
Enter the url:

http://www.directadmin.com/email_level.tar.gz

type in your password, and click "Add Plugin".

2) After that, Users will see the "Email Level installer" link in the User Level.
They can click it, and click "Create" to install it. Change values as desired.

Note: NO username or password are required. The email/password do the authenticating. Also, system accounts don't work, so stick with virtual accounts (eg pop@domain.com)

Note, during the creation of this plugin a bug was found and fixed:
http://www.directadmin.com/features.php?id=836
It will be avaiable for the next DA release.
Note that the plugin is able to handle the bug so you won't notice it affecting anything.

Please provide all bugs and feedback in this thread
and avoid emailing us questions about it, as if you have a question, I'm sure someone else will have the same quetion too, as we don't want to be replying to the same emails over and over

Go easy on it, as it's 0.1-beta.

Bug Note: I did notice a random error when viewing the vacation message, but it didn't always show up. I wasn't able to duplicate it on all boxes, so I'm not sure if it's specific to just that one box and the php compile.. etc.. so if you see "socket returned no error, but there is data missing. Try reloading this page", let me know in this thread, with your system details. I debugged it quite a bit, but DA was doing it's job, and the httpsocket.php was functioning properly as far as I could tell. Again, this may just be isolated to the 1 build system. Just giving you a heads up

John
Reply With Quote
  #2  
Old 11-30-2007, 02:28 AM
welch welch is offline
Verified User
 
Join Date: Aug 2004
Posts: 95
Nicely done. This will work. Thanks
Reply With Quote
  #3  
Old 11-30-2007, 07:29 AM
rldev rldev is offline
Verified User
 
Join Date: May 2004
Posts: 1,074
Can you post some screen shots?
Reply With Quote
  #4  
Old 11-30-2007, 08:07 AM
rldev rldev is offline
Verified User
 
Join Date: May 2004
Posts: 1,074
I get a blank screen when logging in.
Reply With Quote
  #5  
Old 11-30-2007, 11:55 AM
pucky pucky is offline
Verified User
 
Join Date: Sep 2006
Posts: 552
I really dont get the concept of what i could be used for.
Reply With Quote
  #6  
Old 11-30-2007, 12:41 PM
rldev rldev is offline
Verified User
 
Join Date: May 2004
Posts: 1,074
The concept is that if you have an account that has 20 email accounts, this interface will allow each email user to log into their individual email control panel to change things like password, autoresponder, etc.
Reply With Quote
  #7  
Old 11-30-2007, 01:23 PM
iceuk626 iceuk626 is offline
Verified User
 
Join Date: May 2006
Location: United Kingdom
Posts: 261
Installation went ok, after i entered my email and password on the login page to try it out i just get a 500 internal error.
Reply With Quote
  #8  
Old 11-30-2007, 02:41 PM
DirectAdmin Support DirectAdmin Support is offline
Administrator
 
Join Date: Feb 2003
Posts: 6,693
Quote:
Originally Posted by iceuk626 View Post
Installation went ok, after i entered my email and password on the login page to try it out i just get a 500 internal error.
I take it then you're running suphp. Check the /var/log/suphp.log for clues as to why it's complaining. It's probably either the user/group or permissions of the copied files. Check the log and check to see what the permissions are.

Attached are some screenshots.. note fc6.com isn't ours, nor is it "real" in this case, it's just a fake domain on our fedora 6 box on an internal network.

John
Attached Thumbnails
Click image for larger version

Name:	emaillevel.jpg
Views:	2163
Size:	34.1 KB
ID:	586   Click image for larger version

Name:	vacation.jpg
Views:	1576
Size:	27.5 KB
ID:	587  
Reply With Quote
  #9  
Old 11-30-2007, 08:52 PM
jlandes's Avatar
jlandes jlandes is offline
Verified User
 
Join Date: Dec 2005
Location: Lewistown, Pennsylvania, USA
Posts: 618
DA,

I think this is a great start. Thanks.
__________________
Sincerely yours,
Jeremy Landes
jlandes[at]landeserve.com
Do you want to donate to me? It would be much appreciated.
Reply With Quote
  #10  
Old 12-01-2007, 01:45 AM
pucky pucky is offline
Verified User
 
Join Date: Sep 2006
Posts: 552
Error about not being able to find private_html which is interesting because this is created by DA when a site is created is it not so it should be there.

No futher tests were done (Freebsd). After this error i quit.
Reply With Quote
  #11  
Old 12-01-2007, 05:41 AM
karl0smoo karl0smoo is offline
Verified User
 
Join Date: Apr 2007
Posts: 21
Install went fine after creating/setting permissions on private_html, apart from when trying to view i got the following, any suggestions wouldbe great.


Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/userhere/:/tmp:/usr/local/lib/php/) in /public_html/email/login.php on line 9

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in
/public_html/email/login.php on line 9

Thanks.
Reply With Quote
  #12  
Old 12-02-2007, 02:48 PM
DirectAdmin Support DirectAdmin Support is offline
Administrator
 
Join Date: Feb 2003
Posts: 6,693
Quote:
Originally Posted by karl0smoo View Post
Install went fine after creating/setting permissions on private_html, apart from when trying to view i got the following, any suggestions wouldbe great.


Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/userhere/:/tmp:/usr/local/lib/php/) in /public_html/email/login.php on line 9

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in
/public_html/email/login.php on line 9

Thanks.
Hello,

/var/tmp isn't the default tmp path the php.ini.
You'd want to check your php.ini and make sure you've got:
Code:
session.save_path = /tmp
in it.

For CLI php:
/usr/local/lib/php.ini

For suPhp:
/usr/local/etc/php5/cgi/php.ini


OR
change your templates to include /var/tmp in the openbasedir path.
http://help.directadmin.com/item.php?id=2

John
Reply With Quote
  #13  
Old 12-03-2007, 03:59 AM
twv twv is offline
Verified User
 
Join Date: Oct 2003
Posts: 89
How hard would it be to adapt this plugin to let email users manage their spamassassin settings?
Reply With Quote
  #14  
Old 12-03-2007, 07:47 AM
DirectAdmin Support DirectAdmin Support is offline
Administrator
 
Join Date: Feb 2003
Posts: 6,693
Very hard considering the spamassassin settings are not a per pop option. The S.A. settings are only per system account.

John
Reply With Quote
  #15  
Old 12-03-2007, 09:08 AM
jlandes's Avatar
jlandes jlandes is offline
Verified User
 
Join Date: Dec 2005
Location: Lewistown, Pennsylvania, USA
Posts: 618
John,

In your plugin file, there is a directory called data. I believe this is the directory that contains the files that get installed into the user's public_html directory. Instead of installing this as a plugin, can we just take the files from this data directory and place them into /var/www/html/email_panel and then setup an alias called something like email or user in the server's main httpd.conf file? Then, there would be no need for each user to install this and it would be available for the whole server. Is that possible?
__________________
Sincerely yours,
Jeremy Landes
jlandes[at]landeserve.com
Do you want to donate to me? It would be much appreciated.

Last edited by jlandes; 12-03-2007 at 09:11 AM.
Reply With Quote
  #16  
Old 12-03-2007, 10:28 AM
DirectAdmin Support DirectAdmin Support is offline
Administrator
 
Join Date: Feb 2003
Posts: 6,693
Yes you can.
If you run suPhp though, you'd have to set them up with the webapps user.

John
Reply With Quote
  #17  
Old 12-03-2007, 11:05 AM
jlandes's Avatar
jlandes jlandes is offline
Verified User
 
Join Date: Dec 2005
Location: Lewistown, Pennsylvania, USA
Posts: 618
I like this idea rather than requiring each user to install the files to their public_html directory. One single install that can be managed by the server admin and also one place that DA would need to update if changes were made. I think this is probably the best method, rather than doing it as a plugin. I'll give this a try and see if it works. Thanks John.
__________________
Sincerely yours,
Jeremy Landes
jlandes[at]landeserve.com
Do you want to donate to me? It would be much appreciated.
Reply With Quote
  #18  
Old 12-03-2007, 08:01 PM
pucky pucky is offline
Verified User
 
Join Date: Sep 2006
Posts: 552
Quote:
Originally Posted by DirectAdmin Support View Post
Yes you can.
If you run suPhp though, you'd have to set them up with the webapps user.

John
I guess you didnt see my error

Error about not being able to find private_html

After installing and trying to enable it on a domain.
Reply With Quote
  #19  
Old 12-03-2007, 08:26 PM
jlandes's Avatar
jlandes jlandes is offline
Verified User
 
Join Date: Dec 2005
Location: Lewistown, Pennsylvania, USA
Posts: 618
pucky,

Is your private_html directory a symlink to public_html or is it a separate directory? Also, what's the owner and permissions on that vs. your public_html directory? Just trying to help gather some information for troubleshooting. Thanks.
__________________
Sincerely yours,
Jeremy Landes
jlandes[at]landeserve.com
Do you want to donate to me? It would be much appreciated.
Reply With Quote
  #20  
Old 12-03-2007, 08:29 PM
pucky pucky is offline
Verified User
 
Join Date: Sep 2006
Posts: 552
The creation of all files and directories should be standard. In other words i created a domain then tried to install the plugin on the domain. No errors should appear in regarding to anything. Its a standard installation of CREATE DOMAIN.
Reply With Quote
Reply

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 Off
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:40 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
DirectAdmin © 2007 JBMC Software