Email Level Plugin

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,500
Hello,

version 1.6
version 1.7 in testing

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 [email protected])

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 ;)


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
 
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.
 
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.
 
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
 

Attachments

  • emaillevel.jpg
    emaillevel.jpg
    34.1 KB · Views: 5,002
  • vacation.jpg
    vacation.jpg
    27.5 KB · Views: 3,763
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.
 
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.
 
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:
[B]session.save_path = /tmp[/B]
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
 
How hard would it be to adapt this plugin to let email users manage their spamassassin settings?
 
Very hard considering the spamassassin settings are not a per pop option. The S.A. settings are only per system account.

John
 
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?
 
Last edited:
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.
 
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.
 
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.
 
Back
Top