Hi, just one question agian. How to a give the right config the the HeloCmdHandler ? I tried:
if (m_heloResolv) { handlerConfig.addChild(Util.getValuedConfiguration("checkValidHelo", "" + m_heloResolv)); } But that does not the job. I think the problem is that it add it the the smtp config and not the HeloCmdHandler. Do i have to create a new Configuration instance for that ? The Rest of the junit test works :-) Its a really nice tool. bye Am Mittwoch, den 29.03.2006, 13:41 +0200 schrieb Norman Maurer: > Thx , great idea. Will do it soon and commit the patch. > > bye > > Am Mittwoch, den 29.03.2006, 13:36 +0200 schrieb Stefano Bagnara: > > Norman Maurer wrote: > > > Just start to write a junit test for this,, Now i notice a problem .. > > > The method helo(InetAddress) in SMTPProtocol needs a InetAddress but i > > > need to test it with not resolvable domains. So if i do a > > > InetAddress.getHostbyName("egjoerg.de"); an exception is thrown before > > > pass this to the HeloCmdHandler.. > > > > > > So i need to create an own witch extends the one which is used now.. Or > > > there are any other solutions ? > > > > I think you can provide your own extension of SMTPProtocol and you can > > promote to public the "protected void sendCommand(java.lang.String > > command, java.lang.String[] parameters) " method and use the sendCommand > > to send the "bad" helo. > > > > class MySMTPProtocol extends SMTPProtocol { > > > > // TODO: duplicate the constructor > > > > public void sendCommand(java.lang.String command, > > java.lang.String[] > > parameters) { > > super.sendCommand(command,parameters); > > } > > > > } > > > > Then replace > > > > SMTPProtocol smtpProtocol = new SMTPProtocol("127.0.0.1", > > m_smtpListenerPort); > > > > with: > > > > MySMTPProtocol smtpProtocol = new MySMTPProtocol("127.0.0.1", > > m_smtpListenerPort); > > > > Stefano > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > !EXCUBATOR:1,442a7218200621689820358!
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil