I'm happy to have helped you with this. Sadly my JPA knowledge is not that important, hence I might not be able to answer all of your questions...
On 14/09/2019 04:27, Jerry Malcolm wrote: > Ignore my previous question. I dug further and realized that your auth > method is a lower-level replacement for the login method in the > commons.net sample. Still may have other questions... But I think I'm > good on this one for now. > > Thx > > > On 9/13/2019 12:43 PM, Jerry Malcolm wrote: >> Tellier, >> >> Sorry, I'm still missing something. I downloaded the commons-net >> package and looked at the IMAPMail sample code. It says to put the >> id/pw on the url: "Usage: IMAPMail >> imap[s]://username:password@server/"); I assume I would put my admin >> id:pw on the url. But then where do I specify the userid for the >> actual inbox I want to access? >> >> On 9/12/2019 11:01 PM, Tellier Benoit wrote: >>> If you are using commons-net, I succeeded to write: >>> >>> https://gist.github.com/chibenwa/abd12fd6c0b06cadd1de591e3ac792b9 >>> >>> That should be helping you! >>> >>> On 13/09/2019 10:40, Tellier Benoit wrote: >>>> Wich library are you using? >>>> >>>> On 13/09/2019 10:33, Jerry Malcolm wrote: >>>>> Thanks for the info, Tellier. I kinda lost you on the mpt tests... I >>>>> was looking for how to change the following code to include an >>>>> administrator id. I only have one field in the store.connect() method >>>>> for a user id, but I have an administrator id and the userid for the >>>>> target mailbox. How do I pass in both? >>>>> >>>>> try >>>>> { >>>>> session = Session.getInstance(props, null); >>>>> session.setDebug(debug); >>>>> store = session.getStore(protocol); >>>>> store.connect(host, port, user, password); >>>>> } >>>>> catch( Exception e) >>>>> { >>>>> log( "IMAPClient.connect() exception: " + e ); >>>>> throw(e); >>>>> } >>>>> >>>>> On 9/12/2019 10:10 PM, Tellier Benoit wrote: >>>>>> Hello Jerry, >>>>>> >>>>>> With the `administratorId`, you are able to use IMAP impersonation. >>>>>> >>>>>> IE to log in as another user. >>>>>> >>>>>> You should define it within usersrepository.xml. To see related >>>>>> "reading >>>>>> config" code: AbstractUsersRepository is the way to go. >>>>>> >>>>>> Agree that this needs example and documentation. I will do it >>>>>> straight >>>>>> away. >>>>>> >>>>>> For your IMAP call, MPT tests are going to be a gold mine, presenting >>>>>> you the exact syntax. >>>>>> mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/AuthenticatePlain.test >>>>>> >>>>>> >>>>>> >>>>>> Contains: >>>>>> >>>>>> C: 0007 AUTHENTICATE "PLAIN" {36+} >>>>>> # delegate\0imapuser\0password >>>>>> C: ZGVsZWdhdGUAaW1hcHVzZXIAcGFzc3dvcmQ= >>>>>> S: 0007 OK AUTHENTICATE completed. >>>>>> >>>>>> # Ensure we are delegate >>>>>> C: 0008 SELECT delegate >>>>>> SUB { >>>>>> S: \* FLAGS .* >>>>>> S: \* .* EXISTS >>>>>> S: \* .* RECENT >>>>>> S: \* OK \[UIDVALIDITY .*\] UIDs valid >>>>>> S: \* OK \[PERMANENTFLAGS .*\] Limited >>>>>> S: \* OK \[HIGHESTMODSEQ .*\] Highest >>>>>> S: \* OK \[UIDNEXT .*\] Predicted next UID >>>>>> } >>>>>> S: 0008 OK \[READ-WRITE\] SELECT completed\. >>>>>> >>>>>> Regarding your development issues, I'm really sorry. My >>>>>> environment is >>>>>> based on IntelliJ, and I encounter no issue. >>>>>> >>>>>> To be able to compile, I use maven 3.6.2 with JDK 11. >>>>>> >>>>>> Best regards, >>>>>> >>>>>> Benoit Tellier >>>>>> >>>>>> >>>>>> On 13/09/2019 09:53, Jerry Malcolm wrote: >>>>>>> Since it appears I'm not going to be able to build James 3.3.0 in >>>>>>> the >>>>>>> foreseeable future, I'm now moving to plan d, e, f, or >>>>>>> whatever... .I've >>>>>>> lost count. >>>>>>> >>>>>>> My goal now is to assess my possibilities of using James 3.3.0 >>>>>>> binaries >>>>>>> as-is and discarding the functionality I had hoped to re-add to >>>>>>> 3.3.0 >>>>>>> from 30b5 or moving the functionality to mailets that I can compile >>>>>>> outside of doing a full James build. >>>>>>> >>>>>>> One thing I had added to beta5 was the ability to have a super-user, >>>>>>> master-key id that could be used in my custom external imap mailbox >>>>>>> maintenance utilities. I've spent several hours digging through the >>>>>>> 3.3.0 source code, and I see code referencing "administratorId". >>>>>>> From >>>>>>> what I can deduce from the code, the Authenticator and Authorizator >>>>>>> classes seem to accept this administrator id as the equivalent of >>>>>>> the >>>>>>> master key I added to b5. So can I access UserABC's mailbox through >>>>>>> imap but use my administratorId and password? If that's the >>>>>>> case, then >>>>>>> that's exactly what I need. The problem is I can't find any >>>>>>> documentation on how to use administratorId. Where do I define >>>>>>> it? And >>>>>>> how do I pass it on imap calls using the javax.mail.Store and other >>>>>>> classes in javax.mail that I use to access imap? >>>>>>> >>>>>>> Jerry >>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> >>>>>>> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >>>>>>> For additional commands, e-mail: server-user-h...@james.apache.org >>>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >>>>>> For additional commands, e-mail: server-user-h...@james.apache.org >>>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >>>>> For additional commands, e-mail: server-user-h...@james.apache.org >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >>>> For additional commands, e-mail: server-user-h...@james.apache.org >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >>> For additional commands, e-mail: server-user-h...@james.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >> For additional commands, e-mail: server-user-h...@james.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org > For additional commands, e-mail: server-user-h...@james.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org