On Tue, Mar 10, 2009 at 2:53 AM, Lilianne E. Blaze <
lilianne(a)lilianne-blaze.net> wrote:
And before someone says it's open source and I
should stop bitching and
submit a patch - I _did_ submit a patch months ago :/
Is this the patch:
http://www.lilianne-blaze.net/temp_downloads/xwiki-mailsender%20patch%20v3/
Have you submitted it as an enhancement at
http://jira.xwiki.org/ adding
your patches as attachment? Does this patch work with 1.8RC2?
IMHO, there's so much going on at
Xwiki.org JIRA is the only reasonable way
they can get a handle on all the enhancements, fixes, bugs and figure out a
roadmap to include them in future releases.
Also, I was thinking, until your patch gets integrated, it might be simpler
to let XWiki talk unauthenticated to SMTP bound only to localhost (not
public): Then have sendmail/exim/qmail running locally, listening to inbound
smtp connections. The localhost mail daemon would then relay messages from
localhost to an authenticated external SMTP server (e.g.. gmail) by
customizing the local mail sending daemon to jump through whatever hoops is
needed. e.g. TLS, auth, passwords, etc. That way xwiki can concentrate on
being a wiki, and let the vagaries of connecting to different mail daemons
be a system administration task for whoever is admining the server.
Perhaps that is the logic behind not including more elaborate mail-sending
functionality in XWiki -- it can be handled by an external program....
However, I must agree that authenticated email is pretty much the defacto
standard and that XWiki needs to support this directly in the future.
Also, you said:
registration mails still go via deprecated
XWiki.sendMessage, which is
using Apache Commons SMTPClient (made obsolete by JavaMail ages ago) and
has no support for username/password and extra properties.
This seems to contradict Sergiu's statement from a previous mail:
The mailsender plugin uses JavaMail as the internal mail sender. Reading a
bit about the SSL/TLS support in it, I found that
basically what you need
to do is define mail.smtp.starttls.enable=true.
http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp
/package-summary.html
also lists mail.smtp.ssl.protocols and mail.smtp.ssl.ciphersuites as
SSL-related properties.
Also, in order to be able to use secure sockets, the JSSE library must
be present in the classpath (I think it is with standard JDKs), and the
host must be able to accept the server's certificate.
About the configuration part, the mailsender uses the
javamail_extra_props property in your global XWikiPreferences as a
standard .properties file (you will need to define it in the
XWikiPreferences class, as a TextArea property).
So, basically what you need to do is:
1. Edit the XWiki.XWikiPreferences class and add a TextArea property
named javamail_extra_props
2. Edit the XWiki.XWikiPreferences object and enter in it:
mail.smtp.starttls.enable=true
3. Find out what else needs to be done on the JVM side to make TLS work.
So which approach will work best?