incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Wolf" <dave.w...@gmail.com>
Subject Re: teaching mailing to JSPWiki
Date Sun, 27 Jan 2008 02:33:55 GMT
Hi,

I updated my source from CVS, added the username & password attributes, and
it works like a charm!

Thank you Florian for tracking this down!

On a Workflow process related note, I'd like to propose that we add an
enhancement so that when a user is denied access, an email with an
explanation is sent. Andrew, would you have any issues with such an
enhancement?

Thanks all,

Dave

On Jan 23, 2008 4:35 PM, Florian Holeczek <florian@holeczek.de> wrote:

> Now that I've posted the bug part of the solution to JIRA JSPWIKI-102,
> the rest follows here.
>
> My configuration now is:
>
> conf/server.xml in section GlobalNamingResources:
> ---
>    <Resource name="mail/Session" auth="Container"
>              type="javax.mail.Session"
>              username="xy@somewhere.de"
>              password="secret"
>              mail.user="xy@somewhere.de"
>               mail.password="secret"
>              mail.smtp.host="smtp.1und1.de"
>              mail.smtp.auth="true"
>               mail.smtp.starttls.enable="true"
>              description="globale Mailresource für meinen Tomcat-Server
> zum Verschicken über 1und1" />
> ---
> If anything goes wrong, you may want to add a line mail.debug="true"
> to this section.
> As you see, I'm using an SMTP mail server that requires authentication
> and supports TLS. The problem with this configuration is that it won't
> work if only the mail.user/password are set. These aren't
> automatically used for authentication, so authentication fails (an
> AuthenticationFailedException is thrown).
> Therefore, you have to set username/password to the same values (or
> values that authenticate you properly).
> I got this information from here:
> http://forum.java.sun.com/thread.jspa?threadID=615393&messageID=3422166
>
> Next you have to link this global resource into JSPWiki's Context.
> I did this via webapps/<jspwiki>/META-INF/context.xml (Tomcat 6), but
> there are several possibilities to do this. Additionally, these differ
> in different versions.
> ---
> <Context path="/jspwiki" debug="false">
>
>        <ResourceLink name="mail/Session"
>                global="mail/Session"
>                type="javax.mail.Session" />
>
> </Context>
> ---
>
> Then you'll have to uncomment the following section in JSPWiki's
> web.xml descriptor:
> ---
>   <resource-ref>
>     <description>Resource reference to a container-managed JNDI JavaMail
> factory for sending e-mails.</description>
>     <res-ref-name>mail/Session</res-ref-name>
>     <res-type>javax.mail.Session</res-type>
>      <res-auth>Container</res-auth>
>   </resource-ref>
> ---
>
> If your mail factory's resource name differs from "mail/Session",
> you'll have to set this name in jspwiki.properties:
> ---
> jspwiki.mail.jndiname=mail/Session
> ---
>
> As Dave already mentioned, depending on your configuration you may
> have to delete JSPWiki's activation.jar and mail.jar.
> activation.jar isn't needed if your servlet container runs with Java
> 1.6+. mail.jar isn't needed if it's already contained in the servlet
> container's library path.
>
> Dave, please give it another try with these hints. I'm quite sure it
> will work :-)
> Then, we can publish this on some wiki page.
> Janne, where to put it?
>
> Regards,
>  Florian
>
>


-- 
Dave Wolf
H: 303-377-9537
M: 303-956-9106

"Our lives begin to end the day we become silent about things that matter."
--Dr. Martin Luther King Jr.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message