I am going to write my own webmail ... can anyone help me???

jeffery

Verified User
Joined
Jan 13, 2004
Messages
279
I just want to know how can I write a webmail that can ..

know the email password of directadmin's account
(that is able to login DA's Email Account)

and fetch the email content of DA's email account.

They should be located in some where in Linux but I am not so familiar with this~

Thanks for your help!
 
This sounds like a undertaking that might be a bit harder than it sounds like. Currently this is no API to retrieve mail.
 
existenz said:
This sounds like a undertaking that might be a bit harder than it sounds like. Currently this is no API to retrieve mail.

You can get the username and go through the email files without having anything in DA, you could probably just somehow get the auth from DA and put it into a webmail system...... Creating a whole webmail system seems far to much work for whats involved.

If it was a one user thing for an admin to view all emails, that could be done fairly easily (but probably isn't the best of ideas anyway)

Chris
 
Actually getting the password and finding the mbox format email file are quite simple. It's all the rest that's complex.

If you really know how to create your own webmail client and all you need to know is where the passwords and mbox file are located:

The password file for each domain is at:

/etc/virtual/example.com/passwd

where example.com needs to be replaced by the domain name. The file is owned by mail:mail, but you can change the group ownership to anything you want without affecting webmail's abillity to change the file. The coding is the same as is used in /etc/shadow, so you should be able to kluge up some PAM authentication scheme.

You'll have to allow your webmail client to accept logins as:

[email protected]

and parse out the local part (username) and the domain name (example.com), to know where to look for the password.

The mailboxes themselves are located in

/var/spool/virtual/nobaloney.net/username

where username is the name of the mbox file.

The mbox file is owned by the username of the domain owner and the group is mail. You CANNOT change either of these.

If this doesn't give you the information you need to create your own webmail client, then you probably couldn't do it for "straight" linux either.

Jeff
 
Back
Top