diff --git a/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl b/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl --- a/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl +++ b/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl @@ -31,8 +31,13 @@ apply_to_client_message(ImapSession, Buffer, State) -> { Tag, Command, Data } = eimap_utils:split_command_into_components(Buffer), { Active, StateTag }= - if Command =:= <<"LIST">>; Command =:= <<"list">>; Command =:= <<"XLIST">>; Command =:= <<"xlist">> -> - case binary:match(Data, <<"\"*\"">>) of + if Command =:= <<"LIST">>; + Command =:= <<"list">>; + Command =:= <<"XLIST">>; + Command =:= <<"xlist">>; + Command =:= <<"LSUB">>; + Command =:= <<"lsub">> -> + case binary:match(Data, <<"*">>) of nomatch -> { false, <<>> }; _ -> fetch_metadata(ImapSession, State), @@ -65,10 +70,14 @@ true; apply_if_id_matches(<<"XLIST">>, _Data) -> true; +apply_if_id_matches(<<"LSUB">>, _Data) -> + true; apply_if_id_matches(<<"list">>, _Data) -> true; apply_if_id_matches(<<"xlist">>, _Data) -> true; +apply_if_id_matches(<<"lsub">>, _Data) -> + true; apply_if_id_matches(<<"ID">>, Data) -> apply_if_found_kolab(binary:match(Data, <<"/Kolab">>)); apply_if_id_matches(_Command, _Data) -> notyet. @@ -93,6 +102,7 @@ filter_folder(_State, <<>>, Acc) -> { Acc, true }; filter_folder(State, <<"* LIST ", Details/binary>> = Response, Acc) -> { filter_on_details(State, Response, Acc, Details), true }; filter_folder(State, <<"* XLIST ", Details/binary>> = Response, Acc) -> { filter_on_details(State, Response, Acc, Details), true }; +filter_folder(State, <<"* LSUB ", Details/binary>> = Response, Acc) -> { filter_on_details(State, Response, Acc, Details), true }; filter_folder(#state{ tag = Tag }, Response, Acc) -> HasMore = case byte_size(Tag) =< byte_size(Response) of