On 05/01/2012 03:15 PM, Cole Ferrier wrote:
Sorry, we are still on 2.3 because it works for us and is stable. and
haven't had a reason to migrate yet.. (is 3.0 stable?)
server 3 has still a few major bugs... so not for production atm.
Thanks for the link to the code..
The code is for 3, but it reads a 2.3 MailRepository, so you could get
some ideas from it.
We have a requirement for a feature in our non production environment to
conditionally send mail out. (so that we don't spam people)
We have implemented that by using a series of matchers to set attributes on
the message, then only call the mailet that does remote delivery if the
attribute is sent.
Then everything left over we just send to a repository called "notsent"
The testers now want a view of what wasn't sent and who it was slated to go
to, to confirm their tests. (all of the recipients on the messages are
BCC'ed so from the copy of the message they received, they can not deduce
if the system was going to send it to the right set of people)
I was thinking i'd build a simple java web page that just had a view of
"notsent". Or is there an easier way?
The point is that you will need to inject in your webapp the james 2.3
beans (with avalon). If you search on this mailing list and on the wiki,
you will find some stuff about this.
However, if you are using a file-based james mailrepository, it will be
easier to access directly the file via the JAVA api such as done in the
link above (you can do this from you servlet or whatever with the james
jar in your WEB-INF/lib). So back to your initial question, yes there is
a JAVA api to access directly the mail respository but I can't point the
methods as the javadoc is not published on the website
(http://james.apache.org/server/2).
Cole
On Tue, May 1, 2012 at 3:42 AM, Eric Charles<[email protected]> wrote:
On 04/30/2012 07:16 PM, Cole Ferrier wrote:
I was wondering if there is a Java API that i can deserialize the
FileObjectStore and FileStreamStore files
use case:
1) conditionally send mail to a repository instead of transmitting it.
2) user wants to see what was slated to be sent, and to whom.
Are you referring to classes from 2.3 version?
In 3.0, we have http://james.apache.org/**server/3/apidocs/org/apache/**
james/repository/file/**AbstractFileRepository.html<http://james.apache.org/server/3/apidocs/org/apache/james/repository/file/AbstractFileRepository.html>(with
FilePersistentObjectRepository
**, FilePersistentStreamRepository**)
I'm not sure to understand your usecases, but the conditional access is
already well covered by the mailet/matcher systems.
If you want to access via java code the mail files of 2.3, you can get
some inspiration from some code we wrote to import James 2.3 mails into
James 3.0 [1]
- [1]
https://svn.apache.org/repos/asf/james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/tool/James23Importer.java
----------------
On an aside, is there any wrong with using the file repository instead of
the database connectors? (do we get any extra functionality if we use the
database connectors?) Our low volume implementation has been in production
for over two years as is. Our setup allows this filesystem to be presented
to any individual server, and we can move the IP/DNS entry to it, and
bring
it up, without any dependency on any other infrastructure.
Are you asking for 2.3 or 3.0 server?
Can you also bring more context on your question?
Cole
Thx, Eric
--
eric | http://about.echarles.net | @echarles
------------------------------**------------------------------**---------
To unsubscribe, e-mail:
server-user-unsubscribe@james.**apache.org<[email protected]>
For additional commands, e-mail:
[email protected].**org<[email protected]>
--
eric | http://about.echarles.net | @echarles
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]