[Building Sakai] EmailService patch

Adrian Fish a.fish at lancaster.ac.uk
Wed Aug 12 02:12:33 PDT 2009


I've attached a patch for the 2.5.x version of OneWayHash.java in 
user/user-impl. It basically uses StringUtil to trim the outputs of 
MimeUtility, as per David's instruction in 
http://jira.sakaiproject.org/browse/KNL-239, and cured my strange 
problem with internal user accounts getting locked out.

I'm going to patch MailTool next, as I need to repeat the SSL and auth 
process there.

Cheers,

Adrian.

Adrian Fish wrote:
> I suppose I should add that SSL does not work with javamail 1.3.1. I 
> couldn't get it to work anyway. Hence the need for 1.4.2.
>
> Cheers,
>
> Adrian.
>
> Adrian Fish wrote:
>> Hi David,
>>
>> Ah, okay. That would explain why one of my test logins keeps getting 
>> lost :) I've been rebuilding the stack quite frequently recently and 
>> just thought that I had damaged the database somehow. I'll have a 
>> play with patching OneWayHasEncode, as you suggested in the ticket.
>>
>> Many, many thanks for pointing that out.
>>
>> Cheers,
>>
>> Adrian.
>>
>> David Horwitz wrote:
>>> Hi Adrian,
>>>
>>> You may have problems with the UserDirectory service and mail-1.4.2 
>>> - at
>>> least we had to change code in it to get it to work in the current 
>>> trunk
>>> kernel.
>>>
>>> Have a look at:
>>> http://jira.sakaiproject.org/browse/KNL-239 for what had to be changed
>>> (it had to do with password hashing)
>>>
>>> Also if you update mail you need to update activation.
>>>
>>> D
>>>
>>> Adrian Fish wrote:
>>>  
>>>> Hi All,
>>>>
>>>> I've attached an svn diff file for Sakai 2.5.x's email service. This
>>>> patch adds a set of attributes to the BasicEmailService class. 
>>>> These are:
>>>>
>>>> m_smtpUser
>>>> m_smtpPassword
>>>> m_smtpUseSSL
>>>> m_smtpDebug
>>>>
>>>> These can be set from sakai.properties, like this:
>>>>
>>>> smtpUser at org.sakaiproject.email.api.EmailService=<SMTP_USER>
>>>> smtpPassword at org.sakaiproject.email.api.EmailService=<SMTP_PASSWORD>
>>>> smtpUseSSL at org.sakaiproject.email.api.EmailService=true
>>>> smtpDebug at org.sakaiproject.email.api.EmailService=true
>>>>
>>>> Two methods in the class have changed, sendMail and sendToUsers, the
>>>> changes involving setting up the Session properties to use
>>>> authentication and perhaps SSL.
>>>>
>>>> To use this patch against 2.5.x you need to remove old versions of
>>>> mail.jar (in my case it was mail-1.3.1.jar) and make sure that 1.4.2
>>>> gets placed in shared by maven.
>>>>
>>>> I've tested this against gmail using authentication and SSL, and it
>>>> works. What I've not tested is that Digests still work okay, but they
>>>> should as BaseDigestService uses the send, and consequently the
>>>> sendMail method which I've patched.
>>>>
>>>> To apply it, cd into your 2.5.x SAKAI_SRC/email directory, copy
>>>> email.diff in, and run this:
>>>>
>>>> patch -p0 < email.diff
>>>>
>>>> You should hopefully get some output like this:
>>>>
>>>> patching file email-shared-deploy/pom.xml
>>>> patching file email-impl/.classpath
>>>> patching file
>>>> email-impl/impl/src/java/org/sakaiproject/email/impl/BasicEmailService.java 
>>>>
>>>>
>>>> patching file email-impl/impl/pom.xml
>>>> patching file email-api/.classpath
>>>> patching file email-api/api/pom.xml
>>>>
>>>> Any problems, drop me a line.
>>>>
>>>> Cheers,
>>>>
>>>> Adrian.
>>>>
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>
>>>> TO UNSUBSCRIBE: send email to 
>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of 
>>>> "unsubscribe"
>>>>     
>>>
>>>   
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to 
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of 
>> "unsubscribe"
>

-- 
==================================
Adrian Fish
Software Engineer
Centre for e-Science
Bowland Tower South C Floor
Lancaster University
Lancaster
LA1 4YW
email: a.fish at lancaster.ac.uk

http://confluence.sakaiproject.org/display/YAFT/Yaft
http://confluence.sakaiproject.org/display/BLOG/Home
http://confluence.sakaiproject.org/display/AGORA/Home

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: OneWayHash.diff
Url: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090812/0e73cdc9/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a_fish.vcf
Type: text/x-vcard
Size: 289 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090812/0e73cdc9/attachment.vcf 


More information about the sakai-dev mailing list