View Full Version : webmail
NickRac
05-24-2003, 10:09 PM
Sorry for not giving you a long post but I was reading through other posts and I too would like to see some form of webmail intergrated with DirectAdmin, DirectAdmin lacking this is one of the few things holding me back from purchasing it now.
DirectAdmin Sales
05-24-2003, 10:13 PM
Thanks for the suggestion Nick, it has been noted!
outpernet
05-27-2003, 07:16 AM
me too
Darth
06-03-2003, 03:56 PM
I noticed:
/usr/local/directadmin/scripts/packages/webmail.tar.gz
README.TXT
----------------------------------------------------
OVERVIEW
----------------------------------------------------
UebiMiau is a web-based e-mail client written in PHP
;)
DirectAdmin Sales
06-03-2003, 04:05 PM
We *just* added webmail support. You should all see it in your e-mail menu now. More webmail clients are coming when we have the time!
Mark
thehostworks
06-04-2003, 05:55 AM
?? i dont see it ??
weird, i added a new user and i saw it, but when i logged in as admin, and clicked user panel,it wasnt there.. ??
NickRac
06-04-2003, 06:13 AM
Why can't I log in to the webmail w/ my admin account?
thehostworks
06-04-2003, 06:14 AM
I cant either, also i created a new user, and still cannot login.
loopforever
06-04-2003, 07:58 AM
For those that can't log in, you need to use:
Username: user@domain.com
Password: Your password
Everything seems cool except for writing new e-mails. They cannot be sent because of this error:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/webmail/newmsg.php:15) in /var/www/html/webmail/newmsg.php on line 118
Other than that, good work guys :)!
NickRac
06-04-2003, 10:48 AM
Originally posted by loopforever
For those that can't log in, you need to use:
Username: user@domain.com
Password: Your password
Everything seems cool except for writing new e-mails. They cannot be sent because of this error:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/webmail/newmsg.php:15) in /var/www/html/webmail/newmsg.php on line 118
Other than that, good work guys :)!
I did do that but I still can't log in my admin account.
The Prohacker
06-04-2003, 11:12 AM
Originally posted by NickRac
I did do that but I still can't log in my admin account.
Just a side note.. The username is made from within the user CP..
When creating a mailbox the username is like this: mailbox@domain.com
NickRac
06-04-2003, 11:19 AM
Originally posted by The Prohacker
Just a side note.. The username is made from within the user CP..
When creating a mailbox the username is like this: mailbox@domain.com
I guess I wasn't clear when saying "I did do that but I still can't log in my admin account." Let me rephrase slightly.
When logging in I did type user@domain.com and the password, but still I could not log-in. I can't go and create the user becuase it has already been created.
The Prohacker
06-04-2003, 11:21 AM
Originally posted by NickRac
I guess I wasn't clear when saying "I did do that but I still can't log in my admin account." Let me rephrase slightly.
When logging in I did type user@domain.com and the password, but still I could not log-in. I can't go and create the user becuase it has already been created.
Ahh sorry.. My bad :D
DirectAdmin Support
06-04-2003, 11:39 AM
Hello,
Sorry for the dealy.
There is a note in the versions.html file about re-saving a user's password to write the ~/.shadow file. For each system user, exim has to find their passwords, which are stored in /etc/shadow, however this file is not readable to mail, so we had to make a copy of the password stored elsewhere on the system. This copy will be stored in ~/.shadow, which isn't created for users who had an older version of DirectAdmin. In order for DirectAdmin to write this file for you, all you need to do it simply resave your password throught the panel.
It's also important to note the login formats. Many of you will already know this, but I'll just re-state it.
For system accounts (the username used to log into directadmin)
username: username
For virtual pop accounts (any additional pop accounts created through DirectAdmin)
username: username@domain.com
Again, sorry for the delay on this and not making the "you must do this for it to work" more available. For any new users, the ~/.shadow file should be created automatically, no need for password saving.
John
NickRac
06-04-2003, 11:41 AM
Originally posted by The Prohacker
Ahh sorry.. My bad :D
No problem, please excuse my being rude to you...girlfriend problems et me angry at the world ;)
DirectAdmin Support
06-04-2003, 11:55 AM
Ok,
I've actually just been trying it out and some servers arn't working, as you said. I'm looking into it right now.
John
DirectAdmin Support
06-04-2003, 12:22 PM
Just an update.. this is a very weird error. UebiMiau uses pop3 to log in... and logging in works fine from an email client but the loopback isn't going. Checking the pop3 logs, it shows 127.0.0.1 as connecting, but then disconnecting... I wish vm-pop3d had more descriptive log errors! :)
Anyway I'll keep on looking.
John
The Prohacker
06-04-2003, 01:04 PM
On the servers having problems.. Go into the Uebimau config.php and enable debug to 1..
And see if that helps you find the problem..
DirectAdmin Support
06-04-2003, 01:51 PM
Ok, thanks, that speeds things up. Its a config issue... uebimiau wants to know beforehand what format the login will be; either username, or username@domain. I'll see if there is a config option for both, else, ill just recode it to work the way i want it :)
And the php error mentioned above is a result of turning on the debug.. will always happen when you activate debug. (its off by default). The problem lies in the fact that the username is not being sent at all when @domain.com is not added.
John
The Prohacker
06-04-2003, 01:59 PM
Originally posted by DirectAdmin Support
Ok, thanks, that speeds things up. Its a config issue... uebimiau wants to know beforehand what format the login will be; either username, or username@domain. I'll see if there is a config option for both, else, ill just recode it to work the way i want it :)
I think it will need a recode for that to work.. I did a quick run down in the config and it seems to only allow you to use it one way...
Edit: Just for giggles.. Try editing:
config.php:
$mail_detect_login_type = "%user%@%domain%";
To:
$mail_detect_login_type = "%user%";
I'll give it a try on my server in a second..
DirectAdmin Support
06-04-2003, 02:03 PM
Yes, that should work to get "username" working, but then username@domain.com will stop :)
I want both to work.. why can't uebimiau read my mind :)
The Prohacker
06-04-2003, 02:12 PM
Originally posted by DirectAdmin Support
Yes, that should work to get "username" working, but then username@domain.com will stop :)
I want both to work.. why can't uebimiau read my mind :)
Right.. But really what we need to do is make Uebimiau from spliting mailbox@domain.com and to keep it the same, so that if the user enters username or mailbox then just %user% would be what they entered.. I gotta look at the source some more :D
DirectAdmin Support
06-04-2003, 02:16 PM
Just note, vm-pop3d only wants "username" for unix accounts and "username@domain.com" for virtuals... so username must stay in that form..
The Prohacker
06-04-2003, 02:18 PM
Alright I got it... I think..
Change in config.php:
$one_for_all_login_type = "%user%@%domain$";
To:
$one_for_all_login_type = "%user%";
Save and exit..
Then in /inc/inc.php:
Find:
if(ereg("(.*)@(.*)",$f_email,$regs)) {
$f_user = $regs[1];
$domain = $regs[2];
if($one_for_all_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$one_for_all_login_type));
}
Replace with:
//if(ereg("(.*)@(.*)",$f_email,$regs)) {
// $f_user = $regs[1];
// $domain = $regs[2];
// if($one_for_all_login_type != "") $f_user = eregi_replace("%user%",$f_user,eregi_replace("%domain%",$domain,$one_for_all_login_type));
//}
$f_user = $f_email;
Needs some beta testing but works on my servers...
DirectAdmin Support
06-04-2003, 02:21 PM
Thats exactly what I was looking for.. you are pretty quick :D
John
The Prohacker
06-04-2003, 02:24 PM
Arrrgh....
Users can login.. But can't seem to send email because the domain isn't being defined for just the username.. Hmm...
Afraid to make the system assume server_name because a user might be using
www.hostsdomain.com/webmail/
The Prohacker
06-04-2003, 02:28 PM
Is there like a user's folder with DirectAdmin?
Like /usr/local/directadmin/users
and there is a file with the username, and inside would be the domain associated with it?
Thats the only way I can think of fixing this.. Is that the system username is looked up to on the server to get the correct domain...
The Prohacker
06-04-2003, 02:35 PM
Not sure if I made myself clear in my last post.. Thinking very fast here :)
When a user logs in.. It would check if in the format of mailbox@domain.com
If it is, go ahead and proccess the login..
If it doesn't have the @ in the username, which is safe to assume since unix usernames can't have that as part of the name :D
Then to check if the user exists on the system itself..
I would prolly assume some where like:
/var/directadmin/users/$username
And inside that file being DOMAIN: domain.com..
We grep that out and plug that into the varible $f_domain or whatever uebimiau uses :D
And go on our marry way... Its kinda slow to do the file load but only possible way I know of getting the domain associated with a unix username.. If the varible $_SERVER[server_name] was used, then any unix user on the server could goto another domain and send email from that domain.. Say unixname@hostsdomain.com unixname@othercustomer.com
Not a good thing :D
DirectAdmin Support
06-04-2003, 02:36 PM
yes ../users/username/domain.list
but its not readable by apache.
I'm trying a method of leaving the ereg stuff and just stomping over f_user = f_email after the if ereg {} .. so that domain willl be defined if it exists.
The Prohacker
06-04-2003, 02:39 PM
Originally posted by DirectAdmin Support
yes ../users/username/domain.list
but its not readable by apache.
I'm trying a method of leaving the ereg stuff and just stomping over f_user = f_email after the if ereg {} .. so that domain willl be defined if it exists.
But when somone just uses 'username' the system can't figure out what domain to append to the end for a complete email address..
The only other way to fix this would be to when a domain is added have the uebimiau config file updated with the correct array with the domain and server information.. But then users could still goto other domains and login via their unix system name and send email from that domain...
This is gonna be a fun one for the books :D
DirectAdmin Support
06-04-2003, 02:46 PM
/etc/virtual/domainowners
holds all domains and the system username associated with it.
domain.com: username
.. would have to do a reverse lookup, but its readable by all... 644
The Prohacker
06-04-2003, 02:53 PM
Originally posted by DirectAdmin Support
/etc/virtual/domainowners
holds all domains and the system username associated with it.
domain.com: username
.. would have to do a reverse lookup, but its readable by all... 644
I'll do a quick code write up, I won't be able to test it really but if I give ya the source, I'm sure you can figure out how to tweak it and make it work...
DirectAdmin Support
06-04-2003, 02:57 PM
wow, you really don't need to do that :) but if you "feel the need", by all means, be my guest.
The Prohacker
06-04-2003, 03:02 PM
Originally posted by DirectAdmin Support
wow, you really don't need to do that :) but if you "feel the need", by all means, be my guest.
Well I suggested Uebimiau so I brought it upon myself :D
$arrUserfile = file("/etc/virtual/domainowners");
foreach ($arrUserfile as $line) {
list($domainC, $usernameC) = explode(':', chop($line));
$usernameC = ltrim($usernameC, " ");
if($usernameC == $f_user) {
$f_domain = $domainC;
break;
}
}
The check would need to be something like that.. Its not tested but it looks about right.. And should be close with the varible names... Coding from memory :D
DirectAdmin Support
06-04-2003, 03:06 PM
ok, I'll insert that. Thanks again.
The Prohacker
06-04-2003, 03:08 PM
Originally posted by DirectAdmin Support
ok, I'll insert that. Thanks again.
You'll need to check varible names.. Because I'm sure I had to miss something.. That coded way to easy :D
My pleasure to help..
The Prohacker
06-04-2003, 03:15 PM
Alright..
If we do it this way.. There might need to be a change made to DirectAdmin and how it creates email accounts...
As of right now.. When the unix user sends an email it will come from user@domain.com.. To make this more clear I'll use one of my names..
prohack@domain.com
But what if I created a pop3 user in DirectAdmin with the username prohack@domain.com.. I as the domain root user could send email, and then never receive the reply because its being sent to that pop3 box.. Thats considering I give it to someone else for some reason..
So there would need to be a check to make sure you can't make an extra pop3 box called prohack@domain.com.. I know its unlikely to happen, but it helps to idiot proof things :D
DirectAdmin Support
06-04-2003, 03:19 PM
it wouldn't let you create that account because it already does a check to make sure that you don't do that.
The Prohacker
06-04-2003, 03:21 PM
Originally posted by DirectAdmin Support
it wouldn't let you create that account because it does a check to make sure that you don't do that.
Alright good.. I was just walking around my room thinking of future support requests because of something like that :D
DirectAdmin Sales
06-04-2003, 05:32 PM
For those who have been following this thread:
Webmail is working perfectly now. :)
If you are having any kind of sign in error, first change your password in the control panel and then change it back. This should fix it.
Mark
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.