diff --git a/src/commands/eimap_command_capability.erl b/src/commands/eimap_command_capability.erl --- a/src/commands/eimap_command_capability.erl +++ b/src/commands/eimap_command_capability.erl @@ -25,8 +25,8 @@ new_command(parse_serverid) -> { <<"CAPABILITY">>, single_line_response }; new_command(_Args) -> { <<"CAPABILITY">>, multiline_response }. -process_line(<<"* CAPABILITY ", Data/binary>>, Acc) -> - [Data|Acc]; +process_line(<<"* CAPABILITY ", Data/binary>>, _Acc) -> + [Data]; process_line(_Data, Acc) -> Acc. formulate_response(ok, Response) -> { fini, Response }; diff --git a/src/eimap.erl b/src/eimap.erl --- a/src/eimap.erl +++ b/src/eimap.erl @@ -294,13 +294,8 @@ send_hello_string(Capabilities, ServerID, Receiver, ResponseToken, Passthrough, PassthroughReceiver) end, { next_state, idle, State#state{ current_command = undefined, server_id = ServerID } }; -handle_info({ { posttls_capabilities, Receiver, ResponseToken }, Capabilities }, _StateName, #state{ server_id = ServerID, passthrough = Passthrough, passthrough_recv = PassthroughReceiver } = State) -> - OurCapabilities = - case binary:match(Capabilities, <<"STARTTLS">>) of - nomatch -> <>; - _ -> Capabilities - end, - send_hello_string(OurCapabilities, ServerID, Receiver, ResponseToken, Passthrough, PassthroughReceiver), +handle_info({ { posttls_capabilities, Receiver, ResponseToken }, [Capabilities] }, _StateName, #state{ server_id = ServerID, passthrough = Passthrough, passthrough_recv = PassthroughReceiver } = State) -> + send_hello_string(Capabilities, ServerID, Receiver, ResponseToken, Passthrough, PassthroughReceiver), { next_state, idle, State#state{ current_command = none } }; handle_info({ { selected, MBox }, ok }, StateName, State) -> %%lager:info("~p Selected mbox ~p", [self(), MBox]),