View Full Version : Email Level Plugin
DirectAdmin Support
11-30-2007, 02:38 AM
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
welch
11-30-2007, 03:28 AM
Nicely done. This will work. Thanks
rldev
11-30-2007, 08:29 AM
Can you post some screen shots?
rldev
11-30-2007, 09:07 AM
I get a blank screen when logging in.
pucky
11-30-2007, 12:55 PM
I really dont get the concept of what i could be used for.
rldev
11-30-2007, 01:41 PM
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.
iceuk626
11-30-2007, 02:23 PM
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.
DirectAdmin Support
11-30-2007, 03:41 PM
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
jlandes
11-30-2007, 09:52 PM
DA,
I think this is a great start. Thanks. :)
pucky
12-01-2007, 02:45 AM
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.
karl0smoo
12-01-2007, 06:41 AM
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.
DirectAdmin Support
12-02-2007, 03:48 PM
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:session.save_path = /tmpin 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?
DirectAdmin Support
12-03-2007, 08:47 AM
Very hard considering the spamassassin settings are not a per pop option. The S.A. settings are only per system account.
John
jlandes
12-03-2007, 10:08 AM
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?
DirectAdmin Support
12-03-2007, 11:28 AM
Yes you can.
If you run suPhp though, you'd have to set them up with the webapps user.
John
jlandes
12-03-2007, 12:05 PM
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
12-03-2007, 09:01 PM
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.
jlandes
12-03-2007, 09:26 PM
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.
pucky
12-03-2007, 09:29 PM
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.
elvandar
12-04-2007, 04:01 AM
Hello,
The inbox stats are displayed twice in the overview... and indeed I would prefer a 'general' approach to this (being that it lives next to squirrelmail etc in /var/www/html).
//Remko
Dillard
01-04-2008, 03:32 AM
Nice plugin!
We were looking for something like this for some clients with many users, so they can manage their users themselves.
However, after logging in, I get a blank screen and in the log-files I find a 302 notice when posting data to the index.php. Probably some redirect is not yet found, but I'll look into this later this weekend.
Jensemann
01-04-2008, 06:21 AM
No problem on my setup. It works wonderfull... thanks for the tool!
Nice plug in,
One thing I am having issue with is when I try to log in I get a .index.php file trying to save to my HD (or open).
It might something simple I am overlooking, but can someone help me?
Eduard
01-05-2008, 05:01 PM
Hello,
I install this plugin, i dont have an error at install but when i try to autentificate with my email adress and password i have this message: Email Login Page
You have entered and invalid email or password
Please enter your Username and Password
i try to autentificate this: - user@domain.com & pass
- user & pass
But is not working, any sugestion?
DirectAdmin Support
01-05-2008, 07:00 PM
Nice plug in,
One thing I am having issue with is when I try to log in I get a .index.php file trying to save to my HD (or open).
It might something simple I am overlooking, but can someone help me?
Usually means php isn't working at all.. not an issue with the plugin, but a more major issue with the php setup.
Make sure the domain has php turned on in the domain settings, and also try /webmail to see if that works.
John
Eduard
01-06-2008, 10:58 AM
Hy,
Yes the PHP is turned on for all my domains and the /webmail is working fine.
Have any sugestion?
Eduard.
DirectAdmin Support
01-06-2008, 11:35 AM
Try creating an info.php file with<?
phpinfo();
?>and then few the info.php through apache. If that doesn't work, also try <?php
phpinfo();
?>Also check for any .htaccess files, or any apache handlers you may have added through DA for php files.
John
Eduard
01-06-2008, 11:52 AM
Hy again, The PHP is working fine, when i access www.domain.com/email/ it is loading the index, with the screen login but i cant login to any email say the password or username is incorect.
Eduard
DirectAdmin Support
01-06-2008, 11:54 AM
Test the exact same email/password with /webmail.
Also make sure you have an updated version of DirectAdmin.
John
Eduard
01-06-2008, 12:02 PM
Hy, adn tnx for answer.
I test same email & password to webmail and is working fine,
the DA version is 1.31.2
Eduard
DirectAdmin Support
01-06-2008, 12:10 PM
Ok, then check the /var/log/directadmin/error.log for clues.
Also run DA in debug mode to see if you can spot anything as well:cd /usr/local/directadmin
killall -9 directadmin
./directadmin b800You'll get a lot of output, so try and sift through as best you can. Note if, you need to paste any of that output to the forum, make sure you remove or block the password snips, as that would be insecure ;)
John
SajtXL
01-06-2008, 04:22 PM
No problem on my setup. It works perfect.. thanks for the plugin! :)
Eduard
01-07-2008, 02:19 AM
Hy,
I found the problem, when i install email level filter in /include/config.php is set the port 2222, and my port to directadmin is another because i change them.
Modify in /usr/local/directadmin/plugins/email_level/data/include/config.php
<?
$host="localhost";
$port="PORT-FOR-ACCESS-DA";
$ssl=false;
$show_roundcube=true;
$show_squirrelmail=true;
$show_uebimiau=true;
?>
Eduard.
Dillard
01-07-2008, 10:00 AM
I did solve my issue as well (blank screen after login).
Since we redirect all traffic to port 2222 over SSL, it's necesarry to enable SSL in the config-file :)
So, that fixed my issue...
Works well by the way!
mattb
01-07-2008, 07:41 PM
Installed and works well.
Using the "/var/www/html" site-wide install method.
TYVM... love it.. and so will the users! :D
mikec
01-24-2008, 11:29 AM
Nice Plug-in... Just want to know if there is any way to configure so that when the user is logged into the /email gui and he clicks on the wmail client of his/her choice they don't get prompted for user/pass again?
Also has anyone tried skinning this plug-in?
jlandes
01-24-2008, 02:52 PM
I had thought about trying to skin the plug-in to match the Enhanced skin in DA. But, I have not done that yet. :(
hostpc.com
01-31-2008, 07:11 PM
Install went fine, plugin works fine
However, tried to edit the config file to disable Uebimiau .. but it still shows up.
Thanks,
Nick
Eduard
01-31-2008, 11:46 PM
Hello,
If u want to disable webmiau edit :
nano /usr/local/directadmin/plugins/email_level/data/include/config
$show_uebimiau=false;
Eduard.
hostpc.com
01-31-2008, 11:51 PM
Yes, we found the config file, however making it false and restarting DA resulted in nothing.
The link is still there
Thanks,
Nick
Sheldon
02-10-2008, 12:26 PM
Hello all,
When I tried to activate this inside the user account by clicking create link or whatever it locked up my system and I had to call in to the DC and ask for a remote reboot!
Running PHP 5 with Apache 2
Any advice?
ssi.inc
02-14-2008, 10:52 PM
Yes, we found the config file, however making it false and restarting DA resulted in nothing.
The link is still there
Click on the "Email Level Installer" link in the "Advanced Features" of your control panel, Click "Create".
Basically, reinstall the plugin at the user level. That will solve your problem.
kktsang
03-13-2008, 09:39 PM
can I setup forward for that email address in the plugin ?
Thanks.
albatroz
05-19-2008, 10:25 AM
How did you integrate Roundcube in the equation?
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
Mattie
06-01-2008, 08:46 AM
Is it possible to let the users create e-mail accounts?
jlasman
06-01-2008, 11:37 AM
Users can create email accounts.
Users are people who own domains.
Do you mean is it possible for email-accounts (someone with one email account) to create another email account?
No.
Jeff
tim874536
06-15-2008, 08:50 PM
A bug!
Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 8192 bytes) in /home/username/domains/domain.com/public_html/email/include/httpsocket.php on line 250
Server:
Apache 1.3.37 Running
PHP Version 5.2.2
DirectAdmin 1.32.1 Running
Exim 4.67 Running
MySQL 4.1.21 Running
Named 9.2.4 Running
ProFTPd 1.3.0a Running
sshd Running
vm-Pop3d 1.1.7f-DA-2 Running
jlasman
06-16-2008, 02:53 PM
What were you running when you got this?
Jeff
tim874536
06-16-2008, 08:48 PM
i just installed this plug-in in admin level, enabled it in one of my client account
after that, i just entered http://xxx.com/email in IE and this message was shown out
jlasman
06-17-2008, 08:11 AM
When I attempt to visit your link I get a warning that it's an adult site. So I disabled the link.
Please check here (http://homepages.tesco.net./~J.deBoynePollard/FGA/dont-obscure-your-dns-data.html).
The problem is probably that you don't have a high enough limit set in your php.ini file.
Jeff
tim874536
06-18-2008, 02:37 AM
When I attempt to visit your link I get a warning that it's an adult site. So I disabled the link.
Please check here (http://homepages.tesco.net./~J.deBoynePollard/FGA/dont-obscure-your-dns-data.html).
The problem is probably that you don't have a high enough limit set in your php.ini file.
Jeff
first, i am sorry that make you confuse
my site is not that xxx.com, i just want to tell u that xxx is a domain name with tld .com
second, i have tried today, and the problem is still here..
and what is your suggest in php.ini??
my php config
http://61.238.149.199/phpinfo_.php
Scormen
06-18-2008, 12:05 PM
Hi all,
I have succesfull installed the plugin, but when someone want to login, he is asked to "open or saved" the file index.php. I have never saw this problem, with other PHP scripts I have no problem.
Thanks,
Kris
dannygoh
06-22-2008, 08:47 PM
Hello,
How can this instaill in server-wide?
jlasman
06-23-2008, 07:57 PM
I have succesfull installed the plugin, but when someone want to login, he is asked to "open or saved" the file index.php. I have never saw this problem, with other PHP scripts I have no problem.
Generally this means the user is not allowed to run PHP.
Jeff
Mattie
06-24-2008, 02:51 AM
Is it possible to create "e-mail only" accounts. So the user's dont have ftp and stuff?
jlandes
06-24-2008, 06:14 AM
Virtual e-mail accounts, by default, do not have FTP and other services.
Scormen
06-24-2008, 09:27 AM
Generally this means the user is not allowed to run PHP.
Jeff
Hmm, not this time I think, PHP is working fine with other scripts.
Kris
jlasman
06-24-2008, 11:47 AM
I'm not a webprogrammer so perhaps someone else will respond, but perhaps it's using some kind of header that's not recognized by your httpd.conf file.
Jeff
bruin03
06-25-2008, 01:49 AM
Would someone kindly explain how to use this once installed?
Thank you. :)
cyberneticos
06-25-2008, 07:11 AM
Congrats on this plugin.
We were using some home-made script for password changing (a mod of that password changing page) but we'd rather use this plugin since it's a DA maintained plugin (or would be)
Can't seem to load the screenshots. Can you check your links ?
thanks !!
hklcf
06-26-2008, 10:42 PM
try it first..
rutekp
07-01-2008, 12:01 PM
I install it but when i write login and pass a see "Page not found" in my browser and in apache logs i have:
[Tue Jul 01 19:48:07 2008] [notice] child pid 5935 exit signal Segmentation fa
ult (11)
[Tue Jul 01 19:48:09 2008] [notice] child pid 10070 exit signal Segmentation f
ault (11)
What PHP version it require ?
My DA is on other port then 2222 but i change it in config.php
jlestrade
07-16-2008, 10:41 AM
Yeah!. Good Plugin!. Congratulations!.
I'm using it right now, if I find some bugs the comment here.:)
Julian
empowering
07-22-2008, 10:42 AM
1. IMHO this should be installed server wide and not per customer. Makes it harder to maintain the code. In our case we've taken the code off the control panel and making it available on our support web site. It autodetects the the server and connects to that server to login.
2. Looking at the source code, while it works, I hope to god the control panel code is much better developed and has more error checking. It appears this was developed very quickly and hope the reason why the code looks this way.
3. DA is aware of this bug.... If you use the Email API calls remotely it does not work if SSL is disabled. It only works if SSL is enabled.
nclot1
08-02-2008, 11:13 AM
This is a good starts ;). It works perfect on our new server. All the while we're using http://www.domain.com:2222/CMD_CHANGE_EMAIL_PASSWORD to enable our users to change email password without logging in.
This is what we're looking for so that it'll ease the site owner / webmaster.
Better still if DA can upgrade this plugin so that a site owner can manage his users ie create / delete / edit without logging in. There are some reasons for this. Here's the scenario:
We are a web design company offering affordable services in our region. Our main business is in webdesign and not the webhosting. But recently we are upgrading ourselves slowly by offering webhosting as well. Our target mainly for our current clients as a starting.
Therefore we offer a very attractive package with free hosting for the first year. The package is on our higher class design but with a lower price. The catch is that we don't give the client to access the control panel so they'll not get the source files. If they wish to move hosting, then they'll have to pay the exit fee ie the difference between our higher class with the lower class. This way we'll have a long term revenue by having a repeat sales on the yearly hosting fee. And our hosting is still among the cheapest in our region.
Therefore if they'll need to add users, at this stage they'll have to contact us and we'll do it for them for free. So if DA can upgrade this plugin to enable the site owner (super user for this email login) to manage their users (But must have a different login details to the DA Control panel, otherwise he'll still be able to login to the CP), these will be a GREAT plugin as it'll reduce our workload. :) . We hope the DA team will have a positive move on this idea as this is good for a webdesign company to start offering webhosting and earn the revenue yearly. We're not sure for other region but this marketing strategies work well in our region.
DirectAdmin Support
08-02-2008, 11:52 PM
Hello,
Creating new email accounts from within an email account editor is far beyond the scope of this plugin.
However, what you're looking for already does exist (on the DA side anyway)
It's the API for email accounts. You'd have to write the client side of it to interface with DA, but it would allow you to create email accounts without giving them a DA login.
Info:
http://www.directadmin.com/api.html
http://www.directadmin.com/api.html#email
Here is a sample for creating DA users, just to give you an idea of how it works:
http://www.directadmin.com/sample_api.txt
John
Przemek
08-17-2008, 01:27 AM
Could you add the support for AtMail webmail?
getUP
08-17-2008, 01:49 AM
Could you add the support for AtMail webmail?
AtMail is already supported by custombuild. What do you mean exactly?
Przemek
08-17-2008, 01:51 AM
I mean the Email Level Plugin. I have AtMail installed but in the Email Level Plugin only links to Roundcube, Squirrelmail and Uebimiau are being displayed. I had to modify the code to show Atmail link.
donkeyKICK
09-06-2008, 12:22 PM
The install seemed to go fine for me, but when I go to www.mysite/email (http://www.mysite/email) the page comes up, but when I enter my email/pass I just get "page cannot be displayed" error. The files are there, so I don't know what I am missing... could be lack of sleep
donkeyKICK
09-06-2008, 01:45 PM
In my apache error log, I get:
[Sat Sep 6 12:14:48 2008] [notice] child pid 10077 exit signal Segmentation fault (11)
Snoopy
09-11-2008, 07:16 PM
Hi all
im trying to get the email plugin to work but am getting this error and cant find how to fix it.
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/cybernet/:/tmp:/usr/local/lib/php/)
Can anybody tell me how to solve this..
Im using the recent version of DA and on Freebsd7.0
ben29
10-16-2008, 04:19 AM
hi man
first thanks
but
i got blank page after i do "CREATE"
donkeyKICK
10-16-2008, 11:28 AM
I still haven't been able to get it to work... I just gave up on it.
youds
10-16-2008, 04:03 PM
Brilliant - these features are what makes DirectAdmin awesome for me!!
You spelt modification wrong in the footer though
donkeyKICK
10-16-2008, 04:04 PM
How were you able to get it to work?
youds
10-16-2008, 06:44 PM
I installed the plugin as directed, edited the files on the server to better suit my needs, then deleted the plugin because the files in the plugin don't actually take into account what web mails are installed or the theme of DA etc
I'm now running this plugin from /var/www/html/settings and all the webmail.domain.com domains are reflecting this.
donkeyKICK
10-16-2008, 06:49 PM
So it won't work out of the box? What did you edit specifically to get it to work? Is there a how-to that I missed?
youds
10-16-2008, 07:04 PM
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.
???
I edited the files it outputs on the server then deleted the plugin, I edited all of them I think
donkeyKICK
10-16-2008, 07:06 PM
How did you edit them? I did steps 1) & 2), but still I get "page can not be displayed" when I enter my user/pass.
remikk
10-18-2008, 09:09 AM
I also have blank page after I put e-mail and password.
Thank you! This is exactly what I have been looking for - AWESOME!
I have this up and running (works great BTW) and am working on some heavy customization (look & feel). I am curious to learn how difficult it would be to have the success/error messages for Password Changes & Updating Vacation Messages appear on the same page rather than refreshing to a new page? (just like how the login page messages are currently displayed)
Does anyone have any recommendations or suggestions?
Thanks for any assistance you can provide!
(programming is not my strong suit :o)
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.