Skip to main content

JavaMail licensing

  8 posts   Feedicon  
Replies: 7 - Last Post: October 03, 2009 06:55
by: Bill Shannon
showing 1 - 8 of 8
Posted: April 08, 2009 16:01 by andrzejkubik

I'm confused with licensing terms for JavaMail 1.4.2

On Kenai project website I can see following:

Source License: CDDL-1.0, BSD, GPL-2.0

Each license mentioned gives ability to change the code and redistribute binary version under specific terms. However when I go to source code I can see the LICENSE.txt file in doc/release directory which is more restrictive. Especially:

you distribute Redistributable complete and unmodified and only
bundled as part of Your Programs

Which license is applicable - one of the open source licenses, all open source, SUN license?
The actually question is: Can I modify the source code, compile package and distribute with my application of course keeping the terms of open source license?

Best Regards
Andrew Kubik
Posted: April 28, 2009 00:56 by Bill Shannon
The LICENSE.txt file is the license used for the binary release of JavaMail.
The source code is licensed under CDDL and GPL, or BSD, as described
in the header to each file.

So yes, you can modify the source according to the source code license,
compile the package, and distribute it with your application.

And I'm always interested in hearing about modifications that you think should
be part of a JavaMail release.
Posted: June 03, 2009 06:03 by champakdas
Hi Shanon,
We are using your javamail for our project. We extended the class SMTPTransport for our purpose and we are putting source code of java mail inside our project. We have modified the source also for our purpose. We are confused about the licensing part. Do we have to publish the code ? If we publish the code our application which uses java mail changed api shall have to be published also?
Posted: June 16, 2009 05:27 by Bill Shannon
Please read the license. If you can't understand it, consult a lawyer.

Yes, if you modify the code, you need to publish your modifications.

You do not need to publish the source code to your application.

I am not a lawyer, this is not legal advice.
Posted: October 01, 2009 15:27 by voidmain
I wanted to resurrect this thread because I think the project is violating its licenses, specifically the BSD license. I'd assume nearly everyone will want to license this projects binary and source under the BSD as it is the most flexible and I'd like the project to ensure this is allowed.

Currently, the none of the source files contain the correct BSD license header nor do they make reference to the ability to select the BSD license. The only file that references the BSD license is the doc/release/COPYRIGHT.txt file. The project specifically states that it can be licensed under the BSD license, but makes no further reference to that license. Therefore, it is currently not possible to license this project under the BSD license without written consent from Sun's legal department.

In order to provide the ability to license this project under the BSD license, all of the source code will need to be updated to include the BSD header. Furthermore, the BSD license grants a full binary redistribution and the current binary distribution does not include the BSD license file. The binary distribution also needs to be updated to include the BSD license in order to be compliant.

Can the project team update the source code and binary distribution to include this information so that the project is in compliance with the BSD license?
Posted: October 02, 2009 03:56 by Bill Shannon
I think you're confused.

Only parts of this project are licensed under the BSD license. In particular, the demo source code
is licensed under the BSD license to allow the most flexible reuse.

The majority of this project is licensed under the CDDL and GPL licenses.
Posted: October 02, 2009 17:33 by voidmain
Then the project should outline that in the distribution, source code and the homepage. I have a call in with the legal department of Sun to clarify this because posting on the project homepage that it uses the BSD license to me is identifying the entire project as a BSD project, not specific parts.

Nearly all open source project hosting sites indicate that you must identify your project's licenses when creating the project. The licenses you select are posted on the project's homepage and apply to the entire project. If you license parts of the project under different licenses, you should not put those licenses on the homepage. By placing the BSD license on the projects homepage, it specifies that the entire project is under that license.

Therefore, I feel that the project is in clear violation of that license. By that reasoning, the project would directly fall under BSD licensing and I would be able to delete all of your copyright and license information in the source, replace them with the BSD license that retains Sun's copyright and use that license without any legal implications.


On the other hand, the CDDL license seems to cover all uses of the libraries binary form and does allow distribution for both open and closed source applications. It also indicates that incorporation for the binary form into a application with a different licensing model is also fine and no additional licenses need to be purchased.

In case other folks are reading this thread, here's how to use the CDDL to distribute JavaMail with your application and charge people for your application:

- The Entitlement allows perpetual, unlimited, distribution for all the JAR files in the JavaMail binary download. This means you can distribute the JARs inside your application forever and any number of times you want. You must NOT modify the JAR files or replace one of the Sun JAR files with your own JAR file. You can also NOT modify the source code and recompile the binary without using the GPL. You must use the JAR files as is and only the JAR files that Sun ships. (i.e. you can't use someone else's IMAP implementation along with the Sun JavaMail JAR file)

- The License stipulates that you can only use the JAR files for internal Commercial Use. Normally this would mean that you would not be able to distribute the JAR files inside your products. However, the License indicates that if your Entitlement allows you other distribution options or permits, it overrides the License. Since the Entitlement for JavaMail expressly allows distribution and commercial uses, the Commercial Use part of the License does not apply.

Based on these two sections, you can ship the JavaMail JAR files with your software that uses a commercial license and allows you to charge a fee for your software without needing to buy anything from Sun.

Of course, I'm not a lawyer and this is not legal advice of any kind, but it will get you started when you talk to a lawyer about all these implications.
Posted: October 03, 2009 06:55 by Bill Shannon
You're seriously misinterpreting a simple list of licenses.

The list includes three licenses - CDDL, BSD, and GPL. Omitting any one of them would be incorrect as the
project uses all three licenses. Reading the list to mean that the entire project is licensed under all of these
licenses would also be incorrect. The list is merely a summary, an enumeration of the licenses used in some
way by the project. The full details of use of each of these licenses is provided within the project.

If you believe there's a better way to summarize the use of licenses within a project, you might want to send
that suggestion to the maintainers of
showing 1 - 8 of 8
Replies: 7 - Last Post: October 03, 2009 06:55
by: Bill Shannon
Please Confirm