Hey Jason,
it seems you either didn't attached the source or don't have permission
to (idk - maybe a list admin could help about this).
So, either you use services like pastebin, an online repo, host it on a
server - or for achive purpose post it here in the mail list.
About your log4j: only add one line, either info or debug - depend on
how deep you need. Finer levels like debug include higher levels like info.
As for exceptions: always print the whole stacktrace - the bit you
posted only says the nested reason is a NPE - but not if it's the main
issue or if there're any other issues. And please try to post it as
TEXTMODE mail excluding those fancy CSS crap - it makes it hard to read
on different devices.
As I've scanned the header you send from jasonxc...@yahoo.com.INVALID -
this doesn't seem right - please check your mail client config. This
could be a reason why your attachements didn't come through.
Matt
Am 04.07.2019 um 05:34 schrieb Jason Tjankilisan:
Hi
So I was reading this tutorial about creating your own custom Mailet
https://james.apache.org/server/3/dev-extend-mailet.html, and from
what i have read, Mailet is a component that process the mail that is
going through the server and can output log whenever something happen
with the Email. Im interested in trying this tutorial to understand
better of mailet works.
So I follow the tutorial, but I had trouble understanding the tutorial
from the lack imagery. Here’s what I’ve done so far
* Create a java file just like in the “Logging” and add Init ,
Destroy, getMailetInfo function as the “Configuration” said they
must have that.
* Unzip the james-server-mailets-3.3.0.jar from james/lib to get the
function.
* Put all on it in one place and use Ant Compile (I didn’t know
anything about Apache Ant but my friend set it up for me and just
to type ant when I want to compile) to build it and created the
jar file from the custom mailet.
* Put the jar file into james/lib
* Edit the log4j.properties as mention in the code : added this
* # Experimental
o log4j.logger.com.test=INFO, CONS, FILE
o log4j.logger.com.test=DEBUG, CONS, FILE
o # ------------
* Edit the mailetcontainer.xml and comment out the one near that as
last time I tried it, the connection refused when both of those
are active.
<!-- Send remaining mails to the transport processor for either local
or remote delivery -->
<mailet match="All" class="com.test.CustomMeiletTestClassName"/>
<!--
<mailet match="All" class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
Some problem occur , the connection still refused and these error show
up at log whenever I use my CustomMeiletTest:
INFO14:31:16,495|
org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor|
Mailet com.test.CustomMeiletTestinstantiated.
WARN14:31:16,515|
org.apache.james.container.spring.context.JamesServerApplicationContext|
/Exception/encountered during context initialization - cancelling
refresh attempt:
/org.springframework.beans.factory.BeanCreationException/:
*Error*creating bean with name 'mailprocessor': Invocation of init
method failed; nested exception is /javax.mail.MessagingException/:
Unable to setup routing for MailetMatcherPairs;
nested exception is:
/java.lang.NullPointerException/
I attach the java code since writing it here gonna make the mail look
so large. Can anyone help what did I do wrong or maybe misunderstand?
Sorry for any wrong word, and thank you for the help.
Sincerely, Jason
Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
Windows 10
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org