On Mon, 17 May 1999, Manomohan K Kalathil wrote:
...
>
> I am working on a mail program which uses the Java Mail API. We
> are using servlets to connect to the mail-server (Linux Red-Hat 5.2). Our
> user home directories are placed in different directories like /home1 ,
> /home2, /home3 and so on. Is there any method by which we can retrieve
> the user's home directory on the mail server? We donot want to use the
> /etc/password file and search for the user home.
On linux may use java.lang.Runtime.exec() call to get the output of the
following command line:
/bin/bash -c '/bin/ls -d ~username '
where "username" must be a real user - "root", "john",...
--------------
One better way is to use imap and dont bother about "where" the
mail folders are... let the imapd handle these problems..
Advantages:
- you will not implement bugs already fixed in imapd
(think only on how to handle/implement locks when other local or remote
concurent mailers access the same folder)
- servlet engine needs no more to run on the same host with the
one that keeps user mailboxes, folders...
- it is standard, portable. Works with NT's or other mail-servers too,
thus you can make more money by selling it ;-)
Trouble:
- you need to use IMAP...and know it.
Cezar
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html