You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Raghavendra Setty <ra...@tarangtech.com> on 2006/09/25 11:14:16 UTC

POP3 message retrieval

Hi all,

I am using James - pop3. Below are the steps i am using to retrieve the
mails from server:

Store store = session.getStore("pop3");
store.connect("localhost", userName, password);
inbox = store.getFolder("INBOX");

The password what i get for a particular user from "users" table is
encrypted (SHA).

What should i do so that i can retrieve mails of the user. Please help
me to resolve this issue.

Thanks in advance,
Rag Setty




This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved

Re: POP3 message retrieval

Posted by Stefano Bagnara <ap...@bago.org>.
Raghavendra Setty wrote:
> Hi all,
> 
> I am using James - pop3. Below are the steps i am using to retrieve the
> mails from server:
> 
> Store store = session.getStore("pop3");
> store.connect("localhost", userName, password);
> inbox = store.getFolder("INBOX");
> 
> The password what i get for a particular user from "users" table is
> encrypted (SHA).
> 
> What should i do so that i can retrieve mails of the user. Please help
> me to resolve this issue.

You have to use the real password and not the one encrypted by James for 
its checks.

If you have a james user with username "foo" and password "bar" you 
simply use store.connect("localhost","foo","bar").

Simply ignore the SHA hash that James use for the password check: this 
is an internal thing.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: POP3 message retrieval

Posted by Joachim Draeger <jd...@gmx.de>.
Hi,

Raghavendra Setty schrieb:


> I am using James - pop3. Below are the steps i am using to retrieve the
> mails from server:
> 
> Store store = session.getStore("pop3");
> store.connect("localhost", userName, password);
> inbox = store.getFolder("INBOX");

> The password what i get for a particular user from "users" table is
> encrypted (SHA).

AFAIK(!) James does not support storing plain passwords into the users table
out-of-the-box.
Without the plain password you can't connect to the pop3 Server because you 
can't recalculate the plain password from the SHA hash. (That's why SHA is used.)

So you have the following possibilities

1. I'm wrong and it is possibible to tell James to store plain passwords
2. You hack James to use plain passwords (start somewhere at 
JamesUsersJdbcRepository)
3. you get the plain password from another source
4. you read the mails directly, without javamail, from DB/File

Joachim


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: POP3 message retrieval

Posted by Norman Maurer <nm...@byteaction.de>.
Hi

Joachim Draeger schrieb:
> Hi,
>
> Raghavendra Setty schrieb:
>
>
>> I am using James - pop3. Below are the steps i am using to retrieve the
>> mails from server:
>>
>> Store store = session.getStore("pop3");
>> store.connect("localhost", userName, password);
>> inbox = store.getFolder("INBOX");
>
>> The password what i get for a particular user from "users" table is
>> encrypted (SHA).
>
> AFAIK(!) James does not support storing plain passwords into the users 
> table
> out-of-the-box.
> Without the plain password you can't connect to the pop3 Server 
> because you can't recalculate the plain password from the SHA hash. 
> (That's why SHA is used.)
Well it whould be nonsense to encrypt passwords if it whould be so easy 
to decrypt it :-P
>
> So you have the following possibilities
>
> 1. I'm wrong and it is possibible to tell James to store plain passwords

No you are right ;-)
> 2. You hack James to use plain passwords (start somewhere at 
> JamesUsersJdbcRepository)
We will add support for more encryption modes. I think we will also add 
clear storage.

> 3. you get the plain password from another source
This is the best solution ,,
> 4. you read the mails directly, without javamail, from DB/File
also possible
>
> Joachim 

bye
Norman



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org