You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Charlie Hubbard <ch...@gmail.com> on 2011/12/03 23:47:13 UTC

How to receive email from another known server using authorizedAddresses?

I'm trying to send email from another server(s) to the James server.  I
know which set of servers will be sending email to the James server, but I
can't seem to get James to accept the email because JamesRcptCmdHandler
blocks the incoming mail.  I've turned off verifyIdentity, and removed the
handlerchain for FastRcptHandler.  After reading the James docs I thought
it would allow email receipt if the connection authenticated, OR if it was
in the authorizedAddresses.

http://james.apache.org/server/3/config-smtp-lmtp.html

Why does it keep rejecting the mail?

smtpserver.xml settings:

<smtpserver enabled="true">
    <bind>0.0.0.0:25</bind>
    <connectionBacklog>200</connectionBacklog>
    <tls socketTLS="false" startTLS="false"/>
    <connectiontimeout>360</connectiontimeout>
    <connectionLimit>0</connectionLimit>
    <connectionLimitPerIP>0</connectionLimitPerIP>
    <authorizedAddresses>*.google.com</authorizedAddresses>
    <authRequired>announce</authRequired>
    <verifyIdentity>false</verifyIdentity>
    <maxmessagesize>0</maxmessagesize>
    <addressBracketsEnforcement>true</addressBracketsEnforcement>
    <handlerchain enableJmx="true">
        <handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
    </handlerchain>
</smtpserver>

Logs:

2011-12-03 10:18:55,496 [pool-8-thread-26] DEBUG james.smtpserver  -
ID=5311415 Lookup command handler for command: RCPT
2011-12-03 10:18:55,497 [pool-8-thread-26] DEBUG james.smtpserver  -
ID=5311415 executing hook
org.apache.james.smtpserver.AuthRequiredToRelayRcptHook
2011-12-03 10:18:55,501 [pool-8-thread-26] DEBUG james.smtpserver  -
ID=5311415 executing hook
org.apache.james.protocols.smtp.core.log.HookResultLogger@1c3fd59
2011-12-03 10:18:55,502 [pool-8-thread-26] INFO  james.smtpserver  -
ID=5311415 org.apache.james.smtpserver.AuthRequiredToRelayRcptHook:
result=2 (DENY)
2011-12-03 10:18:55,502 [pool-8-thread-26] DEBUG james.smtpserver  -
ID=5311415 executing hook
org.apache.james.smtpserver.jmx.HookResultJMXMonitor@2e05f1
2011-12-03 10:18:55,502 [pool-8-thread-26] INFO  james.smtpserver  -
ID=5311415 org.apache.james.smtpserver.JamesRcptCmdHandler: [530 5.7.1
Authentication Required]
2011-12-03 10:18:55,564 [pool-8-thread-28] DEBUG james.smtpserver  -
ID=5311415 org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler
received: QUIT
2011-12-03 10:18:55,564 [pool-8-thread-28] DEBUG james.smtpserver  -
ID=5311415 Lookup command handler for command: QUIT
2011-12-03 10:18:55,565 [pool-8-thread-28] DEBUG james.smtpserver  -
ID=5311415 org.apache.james.protocols.smtp.core.QuitCmdHandler: [221 2.0.0
hostname redacted Service closing transmission channel]
2011-12-03 10:18:55,567 [pool-8-thread-29] DEBUG james.smtpserver  -
ID=5311415 Unable to process request
java.lang.NullPointerException
        at
org.jboss.netty.handler.stream.ChunkedWriteHandler.discard(ChunkedWriteHandler.java:185)
        at
org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:128)
        at
org.jboss.netty.handler.execution.ExecutionHandler.handleDownstream(ExecutionHandler.java:167)
        at org.jboss.netty.channel.Channels.write(Channels.java:611)
        at org.jboss.netty.channel.Channels.write(Channels.java:578)
        at
org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
        at
org.apache.james.protocols.impl.NettyProtocolTransport.writeToClient(NettyProtocolTransport.java:132)

I've noticed when it rejects it always prints out this NPE which is a known
issue with  Netty 3.2.5, and it fixed in Netty 3.2.6.  Any plans to upgrade?

https://issues.sonatype.org/browse/AHC-119

Thanks,
Charlie

Re: How to receive email from another known server using authorizedAddresses?

Posted by Norman Maurer <no...@googlemail.com>.
Hi there,

>     <authorizedAddresses>*.google.com</authorizedAddresses>

will not work. Wildcards are not supported here.

Bye,
Norman

2011/12/8 Charlie Hubbard <ch...@gmail.com>

> I really need some help on this one.  Anyone know what the problem is?
>
> TIA
> Charlie
>
> ps I saw that Netty was upgraded to 2.3.7 in Jira which would fix that NPE,
> but my original question is the more important one.
>
> On Sat, Dec 3, 2011 at 5:47 PM, Charlie Hubbard
> <ch...@gmail.com>wrote:
>
> >
> > I'm trying to send email from another server(s) to the James server.  I
> > know which set of servers will be sending email to the James server, but
> I
> > can't seem to get James to accept the email because JamesRcptCmdHandler
> > blocks the incoming mail.  I've turned off verifyIdentity, and removed
> the
> > handlerchain for FastRcptHandler.  After reading the James docs I thought
> > it would allow email receipt if the connection authenticated, OR if it
> was
> > in the authorizedAddresses.
> >
> > http://james.apache.org/server/3/config-smtp-lmtp.html
> >
> > Why does it keep rejecting the mail?
> >
> > smtpserver.xml settings:
> >
> > <smtpserver enabled="true">
> >     <bind>0.0.0.0:25</bind>
> >     <connectionBacklog>200</connectionBacklog>
> >     <tls socketTLS="false" startTLS="false"/>
> >     <connectiontimeout>360</connectiontimeout>
> >     <connectionLimit>0</connectionLimit>
> >     <connectionLimitPerIP>0</connectionLimitPerIP>
> >     <authorizedAddresses>*.google.com</authorizedAddresses>
> >     <authRequired>announce</authRequired>
> >     <verifyIdentity>false</verifyIdentity>
> >     <maxmessagesize>0</maxmessagesize>
> >     <addressBracketsEnforcement>true</addressBracketsEnforcement>
> >     <handlerchain enableJmx="true">
> >         <handler
> class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
> >     </handlerchain>
> > </smtpserver>
> >
> > Logs:
> >
> > 2011-12-03 10:18:55,496 [pool-8-thread-26] DEBUG james.smtpserver  -
> > ID=5311415 Lookup command handler for command: RCPT
> > 2011-12-03 10:18:55,497 [pool-8-thread-26] DEBUG james.smtpserver  -
> > ID=5311415 executing hook
> > org.apache.james.smtpserver.AuthRequiredToRelayRcptHook
> > 2011-12-03 10:18:55,501 [pool-8-thread-26] DEBUG james.smtpserver  -
> > ID=5311415 executing hook
> > org.apache.james.protocols.smtp.core.log.HookResultLogger@1c3fd59
> > 2011-12-03 10:18:55,502 [pool-8-thread-26] INFO  james.smtpserver  -
> > ID=5311415 org.apache.james.smtpserver.AuthRequiredToRelayRcptHook:
> > result=2 (DENY)
> > 2011-12-03 10:18:55,502 [pool-8-thread-26] DEBUG james.smtpserver  -
> > ID=5311415 executing hook
> > org.apache.james.smtpserver.jmx.HookResultJMXMonitor@2e05f1
> > 2011-12-03 10:18:55,502 [pool-8-thread-26] INFO  james.smtpserver  -
> > ID=5311415 org.apache.james.smtpserver.JamesRcptCmdHandler: [530 5.7.1
> > Authentication Required]
> > 2011-12-03 10:18:55,564 [pool-8-thread-28] DEBUG james.smtpserver  -
> > ID=5311415
> org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler
> > received: QUIT
> > 2011-12-03 10:18:55,564 [pool-8-thread-28] DEBUG james.smtpserver  -
> > ID=5311415 Lookup command handler for command: QUIT
> > 2011-12-03 10:18:55,565 [pool-8-thread-28] DEBUG james.smtpserver  -
> > ID=5311415 org.apache.james.protocols.smtp.core.QuitCmdHandler: [221
> 2.0.0
> > hostname redacted Service closing transmission channel]
> > 2011-12-03 10:18:55,567 [pool-8-thread-29] DEBUG james.smtpserver  -
> > ID=5311415 Unable to process request
> > java.lang.NullPointerException
> >         at
> >
> org.jboss.netty.handler.stream.ChunkedWriteHandler.discard(ChunkedWriteHandler.java:185)
> >         at
> >
> org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:128)
> >         at
> >
> org.jboss.netty.handler.execution.ExecutionHandler.handleDownstream(ExecutionHandler.java:167)
> >         at org.jboss.netty.channel.Channels.write(Channels.java:611)
> >         at org.jboss.netty.channel.Channels.write(Channels.java:578)
> >         at
> > org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
> >         at
> >
> org.apache.james.protocols.impl.NettyProtocolTransport.writeToClient(NettyProtocolTransport.java:132)
> >
> > I've noticed when it rejects it always prints out this NPE which is a
> > known issue with  Netty 3.2.5, and it fixed in Netty 3.2.6.  Any plans to
> > upgrade?
> >
> > https://issues.sonatype.org/browse/AHC-119
> >
> > Thanks,
> > Charlie
> >
>

Re: How to receive email from another known server using authorizedAddresses?

Posted by Charlie Hubbard <ch...@gmail.com>.
I really need some help on this one.  Anyone know what the problem is?

TIA
Charlie

ps I saw that Netty was upgraded to 2.3.7 in Jira which would fix that NPE,
but my original question is the more important one.

On Sat, Dec 3, 2011 at 5:47 PM, Charlie Hubbard
<ch...@gmail.com>wrote:

>
> I'm trying to send email from another server(s) to the James server.  I
> know which set of servers will be sending email to the James server, but I
> can't seem to get James to accept the email because JamesRcptCmdHandler
> blocks the incoming mail.  I've turned off verifyIdentity, and removed the
> handlerchain for FastRcptHandler.  After reading the James docs I thought
> it would allow email receipt if the connection authenticated, OR if it was
> in the authorizedAddresses.
>
> http://james.apache.org/server/3/config-smtp-lmtp.html
>
> Why does it keep rejecting the mail?
>
> smtpserver.xml settings:
>
> <smtpserver enabled="true">
>     <bind>0.0.0.0:25</bind>
>     <connectionBacklog>200</connectionBacklog>
>     <tls socketTLS="false" startTLS="false"/>
>     <connectiontimeout>360</connectiontimeout>
>     <connectionLimit>0</connectionLimit>
>     <connectionLimitPerIP>0</connectionLimitPerIP>
>     <authorizedAddresses>*.google.com</authorizedAddresses>
>     <authRequired>announce</authRequired>
>     <verifyIdentity>false</verifyIdentity>
>     <maxmessagesize>0</maxmessagesize>
>     <addressBracketsEnforcement>true</addressBracketsEnforcement>
>     <handlerchain enableJmx="true">
>         <handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
>     </handlerchain>
> </smtpserver>
>
> Logs:
>
> 2011-12-03 10:18:55,496 [pool-8-thread-26] DEBUG james.smtpserver  -
> ID=5311415 Lookup command handler for command: RCPT
> 2011-12-03 10:18:55,497 [pool-8-thread-26] DEBUG james.smtpserver  -
> ID=5311415 executing hook
> org.apache.james.smtpserver.AuthRequiredToRelayRcptHook
> 2011-12-03 10:18:55,501 [pool-8-thread-26] DEBUG james.smtpserver  -
> ID=5311415 executing hook
> org.apache.james.protocols.smtp.core.log.HookResultLogger@1c3fd59
> 2011-12-03 10:18:55,502 [pool-8-thread-26] INFO  james.smtpserver  -
> ID=5311415 org.apache.james.smtpserver.AuthRequiredToRelayRcptHook:
> result=2 (DENY)
> 2011-12-03 10:18:55,502 [pool-8-thread-26] DEBUG james.smtpserver  -
> ID=5311415 executing hook
> org.apache.james.smtpserver.jmx.HookResultJMXMonitor@2e05f1
> 2011-12-03 10:18:55,502 [pool-8-thread-26] INFO  james.smtpserver  -
> ID=5311415 org.apache.james.smtpserver.JamesRcptCmdHandler: [530 5.7.1
> Authentication Required]
> 2011-12-03 10:18:55,564 [pool-8-thread-28] DEBUG james.smtpserver  -
> ID=5311415 org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler
> received: QUIT
> 2011-12-03 10:18:55,564 [pool-8-thread-28] DEBUG james.smtpserver  -
> ID=5311415 Lookup command handler for command: QUIT
> 2011-12-03 10:18:55,565 [pool-8-thread-28] DEBUG james.smtpserver  -
> ID=5311415 org.apache.james.protocols.smtp.core.QuitCmdHandler: [221 2.0.0
> hostname redacted Service closing transmission channel]
> 2011-12-03 10:18:55,567 [pool-8-thread-29] DEBUG james.smtpserver  -
> ID=5311415 Unable to process request
> java.lang.NullPointerException
>         at
> org.jboss.netty.handler.stream.ChunkedWriteHandler.discard(ChunkedWriteHandler.java:185)
>         at
> org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:128)
>         at
> org.jboss.netty.handler.execution.ExecutionHandler.handleDownstream(ExecutionHandler.java:167)
>         at org.jboss.netty.channel.Channels.write(Channels.java:611)
>         at org.jboss.netty.channel.Channels.write(Channels.java:578)
>         at
> org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
>         at
> org.apache.james.protocols.impl.NettyProtocolTransport.writeToClient(NettyProtocolTransport.java:132)
>
> I've noticed when it rejects it always prints out this NPE which is a
> known issue with  Netty 3.2.5, and it fixed in Netty 3.2.6.  Any plans to
> upgrade?
>
> https://issues.sonatype.org/browse/AHC-119
>
> Thanks,
> Charlie
>