public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
InetSocketAddress address = (InetSocketAddress) ctx.getChannel().getRemoteAddress();
getLogger(ctx.getChannel()).info("Connection established from " + address.getAddress().getHostAddress());
ImapResponseComposer response = new ImapResponseComposerImpl(new ChannelImapResponseWriter(ctx.getChannel()));
ctx.setAttachment(response);
// write hello to client
response.untagged().message("OK").message(hello).end();
super.channelConnected(ctx, e);
}