Well, it seems yor james is awaiting the remote server from M$ to first log in 
to your server before it accepts e-mail from it. This could have some 
config-related reasons:
For james to work correct as not-open-relay you have to configure for wich 
domain it should work and accept mails for. As I don't know your domain let me 
use my own instead as an example.
So I have configured my james to only accept e-mails for my domain 
'cryptearth.de' only, unless I login with one of the set up user accounts to 
send e-mails. So any connection incomming from the outside world w/o login is 
only allowed to drop off mails for my domain. If the rcpt is someone else 
(someone tries to use my james as a relay) it gets denied, trashed, and the 
connected other end gets disconnected.
However, if I connect from a mail-client and first log in to one of my mail 
users (like cryptea...@cryptearth.de) with correct password, my connection gets 
elevated to an authrized state, by wich it allows my client to send out e-mails 
to.the world.

So to get it up and running, you first have to set up your domain correctly, so 
james will accept them as incomming mails for itself. Thus this have to set to 
what ever your outlook MX is set to use as rcpt when relaying mails to your 
james. Otherwise james will think it's someone un-authorized trying to send 
mails through you as an open relay.
Second: to receive any mail you have to setup at least one mailbox. You're doin 
this by adding at least one user-account related to the domain you set up in 
the form of username@domain - to wich your outlook-server has to send the 
emails to.

When you got this up and running it should be easy to add processing like spf, 
dkim, spam, av and the like.

hope it helps

Matt

---- Bhaswanth G schrieb ----

>Hi Matt,
>            Thanks for your message.  Yes, It can be anything, but stack
>does not provide much info, thats all I get in the logs. But the scenario
>is this, I used office 365 online email (outlook.office.com) and primary
>email server is office 365 exchange online. I configured a smarthost in
>exchange online settings to relay all emails to james. The email does come
>to james, but I want to understand first why is User='' in the following
>line.
>
>ERROR 15:43:02,529 | james.smtpserver | Id='-154756244' User='' Unable to
>process request
>is there any issue with it?
>
>-
>Bhaswanth G
>
>
>
>On Fri, Jul 21, 2017 at 9:46 PM cryptearth <cryptea...@cryptearth.de> wrote:
>
>> Hey Bhaswanth,
>>
>> I can't really tell wich end is closing the connection, but seems its
>> reset before the whole message is transfered. Use some like Wireshark to
>> see wich connections go from wich to where and who is closing it. Could be
>> your client but also M$ caused by incompatabilities.
>>
>> Try what's happen with different mail clients like Thunderbird or if james
>> work stand-alone w/o the remote server. It could also be mis-config of
>> domain or user. Or what also many got screwed by is failing DNS.
>>
>> Some points to test and look at - hard to figure from here with just this
>> stack.
>>
>>
>> so long
>>
>> Matt
>>
>> ---- Bhaswanth Gattineni schrieb ----
>>
>> >Hi Everyone,
>> >
>> >                    I am trying to relay emails from office365 to
>> >ApacheJames so that I can process them for our needs, but I am getting
>> >exception whenever it is trying to process, I am new to ApacheJames.
>> Please
>> >help with the following error. The same has been posted on Stackoverflow
>> ><
>> https://stackoverflow.com/questions/45239503/apache-james-relay-from-office-365-not-working
>> >
>> >as well.
>> >
>> >INFO  13:40:27,965 | org.apache.james.app.spring.JamesAppSpringMain |
>> >Apache James Server is successfully started in 12777 milliseconds.
>> >INFO  13:41:13,344 | james.smtpserver | Id='-2063079608' User=''
>> >Connection established from x.x.x.x
>> >INFO  13:41:14,849 | james.smtpserver | Id='-2063079608' User=''
>> >Successfully spooled mail
>> >Mail1500644474802-09d961d8-7a77-4f11-9784-7753f7268a6c from
>> >yem...@tdomain.com on
>> >mail-<replacedoffice365domain>.outbound.protection.outlook.com/x.x.x.x
>> >for [zem...@xdomain.io]
>> >ERROR 13:41:15,021 | james.smtpserver | Id='-2063079608' User=''
>> >Unable to process request
>> >java.io.IOException: Connection reset by peer
>> >    at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
>> >    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
>> >    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
>> >    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
>> >    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
>> >    at
>> org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
>> >    at
>> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
>> >    at
>> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
>> >    at
>> org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> >    at java.lang.Thread.run(Thread.java:748)
>> >INFO  13:41:15,044 | james.smtpserver | Id='-2063079608' User=''
>> >Connection closed for x.x.x.x
>> >ERROR 13:41:15,047 | james.smtpserver | Id='-2063079608' User=''
>> >Unable to process request
>> >java.nio.channels.ClosedChannelException
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:433)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:373)
>> >    at
>> org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
>> >    at
>> org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
>> >    at
>> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
>> >    at
>> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
>> >    at
>> org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> >    at java.lang.Thread.run(Thread.java:748)
>> >INFO  13:41:15,049 | james.smtpserver | Id='-2063079608' User=''
>> >Connection closed for x.x.x.x
>> >ERROR 13:41:15,049 | james.smtpserver | Id='-2063079608' User=''
>> >Unable to process request
>> >java.nio.channels.ClosedChannelException
>> >    at
>> org.jboss.netty.handler.stream.ChunkedWriteHandler.discard(ChunkedWriteHandler.java:168)
>> >    at
>> org.jboss.netty.handler.stream.ChunkedWriteHandler.flush(ChunkedWriteHandler.java:192)
>> >    at
>> org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:121)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
>> >    at
>> org.jboss.netty.handler.execution.ExecutionHandler.handleDownstream(ExecutionHandler.java:176)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
>> >    at org.jboss.netty.channel.Channels.write(Channels.java:704)
>> >    at org.jboss.netty.channel.Channels.write(Channels.java:671)
>> >    at
>> org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:347)
>> >    at
>> org.apache.james.protocols.netty.NettyProtocolTransport.writeToClient(NettyProtocolTransport.java:116)
>> >    at
>> org.apache.james.protocols.api.AbstractProtocolTransport.writeResponseToClient(AbstractProtocolTransport.java:150)
>> >    at
>> org.apache.james.protocols.api.AbstractProtocolTransport.writeResponse(AbstractProtocolTransport.java:67)
>> >    at
>> org.apache.james.protocols.netty.BasicChannelUpstreamHandler.messageReceived(BasicChannelUpstreamHandler.java:157)
>> >    at
>> org.apache.james.smtpserver.netty.SMTPChannelUpstreamHandler.messageReceived(SMTPChannelUpstreamHandler.java:61)
>> >    at
>> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>> >    at
>> org.jboss.netty.channel.SimpleChannelUpstreamHandler.messageReceived(SimpleChannelUpstreamHandler.java:124)
>> >    at
>> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>> >    at
>> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
>> >    at
>> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
>> >    at
>> org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> >    at java.lang.Thread.run(Thread.java:748)
>> >ERROR 13:41:15,050 | james.smtpserver | Id='-2063079608' User=''
>> >Unable to process request
>> >java.nio.channels.ClosedChannelException
>> >    at
>> org.jboss.netty.handler.stream.ChunkedWriteHandler.discard(ChunkedWriteHandler.java:168)
>> >    at
>> org.jboss.netty.handler.stream.ChunkedWriteHandler.flush(ChunkedWriteHandler.java:192)
>> >    at
>> org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:121)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
>> >    at
>> org.jboss.netty.handler.execution.ExecutionHandler.handleDownstream(ExecutionHandler.java:176)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
>> >    at org.jboss.netty.channel.Channels.write(Channels.java:704)
>> >    at org.jboss.netty.channel.Channels.write(Channels.java:671)
>> >    at
>> org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:347)
>> >    at
>> org.apache.james.protocols.netty.NettyProtocolTransport.close(NettyProtocolTransport.java:122)
>> >    at
>> org.apache.james.protocols.api.AbstractProtocolTransport.writeResponseToClient(AbstractProtocolTransport.java:159)
>> >    at
>> org.apache.james.protocols.api.AbstractProtocolTransport.writeResponse(AbstractProtocolTransport.java:67)
>> >    at
>> org.apache.james.protocols.netty.BasicChannelUpstreamHandler.messageReceived(BasicChannelUpstreamHandler.java:157)
>> >    at
>> org.apache.james.smtpserver.netty.SMTPChannelUpstreamHandler.messageReceived(SMTPChannelUpstreamHandler.java:61)
>> >    at
>> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>> >    at
>> org.jboss.netty.channel.SimpleChannelUpstreamHandler.messageReceived(SimpleChannelUpstreamHandler.java:124)
>> >    at
>> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>> >    at
>> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>> >    at
>> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
>> >    at
>> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
>> >    at
>> org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> >    at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> >    at java.lang.Thread.run(Thread.java:748)
>> >INFO  13:41:16,713 | james.mailetcontext | Storing mail
>>
>> >Mail1500644474802-09d961d8-7a77-4f11-9784-7753f7268a6c-to-xdomain.io-!275458
>> >in file://var/mail/address-error/
>> >
>> >
>> >Thanks,
>> >Bhaswanth
>> >--
>> >
>> >Thanks,
>> >Bhaswanth
>>
>-- 
>
>Thanks,
>Bhaswanth

Reply via email to