You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Thomas UNG <th...@bobosoft.fr> on 2011/07/17 11:55:31 UTC

[PATCH] protocols-smtp / AuthCmdHandler

Hi,

I am exciting about james 3.0 project and I have it in production. I would 
like to suggest the following change in 
org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler.java

- // TODO: Make this string a more useful error message
- session.getLogger().error("AUTH method "+authType+" failed");
+ session.getLogger().error("AUTH method "+authType+" failed from " + user + 
"@" + session.getRemoteIPAddress());

The reason is to be able to analyse messages such as :

ERROR 17:43:37,421 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:37,697 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:38,027 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:38,244 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:38,477 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:38,806 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:38,981 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:39,117 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:39,414 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:39,722 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:40,011 | james.smtpserver | AUTH method LOGIN failed
ERROR 17:43:40,243 | james.smtpserver | AUTH method LOGIN failed

So I can ban them from my network ...

Thanks a lot !
Thomas 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [PATCH] protocols-smtp / AuthCmdHandler

Posted by Thomas UNG <th...@bobosoft.fr>.
No problem.

Thks !

-----Message d'origine----- 
From: Norman Maurer
Sent: Sunday, July 17, 2011 12:41 PM
To: James Developers List
Subject: Re: [PATCH] protocols-smtp / AuthCmdHandler

You can not commit until you was voted as committer. This usually
happens after someone shows enough interest for a project. So
contribution is the key ;)

For now just create a patch with your ide or use svn diff. And upload it.


Bye
Norman
2011/7/17, Thomas UNG <th...@bobosoft.fr>:
> Hey Norman,
>
> Some stupid question .... how I can commit ? Can't find the svn url and
> should I use the JIRA account login and password to commit ?
>
> Many thanks !
> Thomas
>
> -----Message d'origine-----
> From: Norman Maurer
> Sent: Sunday, July 17, 2011 12:10 PM
> To: James Developers List
> Subject: Re: [PATCH] protocols-smtp / AuthCmdHandler
>
> Make sense :)
>
> May I ask you to create a patch and upload it ?
> https://issues.apache.org/jira/browse/PROTOCOLS
>
>
> Bye,
> Norman
>
> Ps: You could write an HookResultHandler which listen for not
> successfully auths and then block the ips in a ConnectionHandler.
>
>
> 2011/7/17 Thomas UNG <th...@bobosoft.fr>:
>> Hi,
>>
>> I am exciting about james 3.0 project and I have it in production. I 
>> would
>> like to suggest the following change in
>> org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler.java
>>
>> - // TODO: Make this string a more useful error message
>> - session.getLogger().error("AUTH method "+authType+" failed");
>> + session.getLogger().error("AUTH method "+authType+" failed from " + 
>> user
>>
>> +
>> "@" + session.getRemoteIPAddress());
>>
>> The reason is to be able to analyse messages such as :
>>
>> ERROR 17:43:37,421 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:37,697 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,027 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,244 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,477 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,806 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,981 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:39,117 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:39,414 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:39,722 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:40,011 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:40,243 | james.smtpserver | AUTH method LOGIN failed
>>
>> So I can ban them from my network ...
>>
>> Thanks a lot !
>> Thomas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [PATCH] protocols-smtp / AuthCmdHandler

Posted by Norman Maurer <no...@googlemail.com>.
You can not commit until you was voted as committer. This usually
happens after someone shows enough interest for a project. So
contribution is the key ;)

For now just create a patch with your ide or use svn diff. And upload it.


Bye
Norman
2011/7/17, Thomas UNG <th...@bobosoft.fr>:
> Hey Norman,
>
> Some stupid question .... how I can commit ? Can't find the svn url and
> should I use the JIRA account login and password to commit ?
>
> Many thanks !
> Thomas
>
> -----Message d'origine-----
> From: Norman Maurer
> Sent: Sunday, July 17, 2011 12:10 PM
> To: James Developers List
> Subject: Re: [PATCH] protocols-smtp / AuthCmdHandler
>
> Make sense :)
>
> May I ask you to create a patch and upload it ?
> https://issues.apache.org/jira/browse/PROTOCOLS
>
>
> Bye,
> Norman
>
> Ps: You could write an HookResultHandler which listen for not
> successfully auths and then block the ips in a ConnectionHandler.
>
>
> 2011/7/17 Thomas UNG <th...@bobosoft.fr>:
>> Hi,
>>
>> I am exciting about james 3.0 project and I have it in production. I would
>> like to suggest the following change in
>> org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler.java
>>
>> - // TODO: Make this string a more useful error message
>> - session.getLogger().error("AUTH method "+authType+" failed");
>> + session.getLogger().error("AUTH method "+authType+" failed from " + user
>>
>> +
>> "@" + session.getRemoteIPAddress());
>>
>> The reason is to be able to analyse messages such as :
>>
>> ERROR 17:43:37,421 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:37,697 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,027 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,244 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,477 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,806 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:38,981 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:39,117 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:39,414 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:39,722 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:40,011 | james.smtpserver | AUTH method LOGIN failed
>> ERROR 17:43:40,243 | james.smtpserver | AUTH method LOGIN failed
>>
>> So I can ban them from my network ...
>>
>> Thanks a lot !
>> Thomas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [PATCH] protocols-smtp / AuthCmdHandler

Posted by Thomas UNG <th...@bobosoft.fr>.
Hey Norman,

Some stupid question .... how I can commit ? Can't find the svn url and 
should I use the JIRA account login and password to commit ?

Many thanks !
Thomas

-----Message d'origine----- 
From: Norman Maurer
Sent: Sunday, July 17, 2011 12:10 PM
To: James Developers List
Subject: Re: [PATCH] protocols-smtp / AuthCmdHandler

Make sense :)

May I ask you to create a patch and upload it ?
https://issues.apache.org/jira/browse/PROTOCOLS


Bye,
Norman

Ps: You could write an HookResultHandler which listen for not
successfully auths and then block the ips in a ConnectionHandler.


2011/7/17 Thomas UNG <th...@bobosoft.fr>:
> Hi,
>
> I am exciting about james 3.0 project and I have it in production. I would
> like to suggest the following change in
> org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler.java
>
> - // TODO: Make this string a more useful error message
> - session.getLogger().error("AUTH method "+authType+" failed");
> + session.getLogger().error("AUTH method "+authType+" failed from " + user 
> +
> "@" + session.getRemoteIPAddress());
>
> The reason is to be able to analyse messages such as :
>
> ERROR 17:43:37,421 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:37,697 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,027 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,244 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,477 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,806 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,981 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,117 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,414 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,722 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:40,011 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:40,243 | james.smtpserver | AUTH method LOGIN failed
>
> So I can ban them from my network ...
>
> Thanks a lot !
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [PATCH] protocols-smtp / AuthCmdHandler

Posted by Thomas UNG <th...@bobosoft.fr>.
Hi Norman,

Sure I am going to a create a case and submit the patch right now. About the 
HookResultHandler, I will do it later.

Best Regards,
Thomas

-----Message d'origine----- 
From: Norman Maurer
Sent: Sunday, July 17, 2011 12:10 PM
To: James Developers List
Subject: Re: [PATCH] protocols-smtp / AuthCmdHandler

Make sense :)

May I ask you to create a patch and upload it ?
https://issues.apache.org/jira/browse/PROTOCOLS


Bye,
Norman

Ps: You could write an HookResultHandler which listen for not
successfully auths and then block the ips in a ConnectionHandler.


2011/7/17 Thomas UNG <th...@bobosoft.fr>:
> Hi,
>
> I am exciting about james 3.0 project and I have it in production. I would
> like to suggest the following change in
> org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler.java
>
> - // TODO: Make this string a more useful error message
> - session.getLogger().error("AUTH method "+authType+" failed");
> + session.getLogger().error("AUTH method "+authType+" failed from " + user 
> +
> "@" + session.getRemoteIPAddress());
>
> The reason is to be able to analyse messages such as :
>
> ERROR 17:43:37,421 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:37,697 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,027 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,244 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,477 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,806 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,981 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,117 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,414 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,722 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:40,011 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:40,243 | james.smtpserver | AUTH method LOGIN failed
>
> So I can ban them from my network ...
>
> Thanks a lot !
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [PATCH] protocols-smtp / AuthCmdHandler

Posted by Norman Maurer <no...@googlemail.com>.
Make sense :)

May I ask you to create a patch and upload it ?
https://issues.apache.org/jira/browse/PROTOCOLS


Bye,
Norman

Ps: You could write an HookResultHandler which listen for not
successfully auths and then block the ips in a ConnectionHandler.


2011/7/17 Thomas UNG <th...@bobosoft.fr>:
> Hi,
>
> I am exciting about james 3.0 project and I have it in production. I would
> like to suggest the following change in
> org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler.java
>
> - // TODO: Make this string a more useful error message
> - session.getLogger().error("AUTH method "+authType+" failed");
> + session.getLogger().error("AUTH method "+authType+" failed from " + user +
> "@" + session.getRemoteIPAddress());
>
> The reason is to be able to analyse messages such as :
>
> ERROR 17:43:37,421 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:37,697 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,027 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,244 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,477 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,806 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:38,981 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,117 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,414 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:39,722 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:40,011 | james.smtpserver | AUTH method LOGIN failed
> ERROR 17:43:40,243 | james.smtpserver | AUTH method LOGIN failed
>
> So I can ban them from my network ...
>
> Thanks a lot !
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org