Projects
Kolab:Winterfell
guam
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 43
View file
guam.spec
Changed
@@ -18,21 +18,22 @@ %{!?_unitdir: %global _unitdir /usr/lib/systemd/system} -%define lock_version() %{1}%{?_isa} = %(rpm -q --queryformat "%{VERSION}" %{1}) +%define lock_version() %{1}%{?_isa} = %(rpm -q --queryformat "%%{VERSION}" %{1}) Name: guam -Version: 0.9.0 -Release: 2%{?dist} +Version: 0.9.4 +Release: 1%{?dist} Summary: A Smart Reverse IMAP Proxy Group: System Environment/Daemons License: GPLv3+ URL: https://kolab.org/about/guam -Source0: %{name}-%{version}.tar.gz -Source1: sys.config +Source0: https://mirror.kolabenterprise.com/pub/releases/guam-%{version}.tar.gz +Source100: plesk.sys.config -Patch1: make-it-very-easy-on-rebar3.patch +Patch9991: make-it-very-easy-on-rebar3.patch +Patch9992: guam-priv-no-delete.patch BuildRequires: erlang >= 17.4 BuildRequires: erlang-asn1 @@ -60,6 +61,10 @@ BuildRequires: erlang-stdlib BuildRequires: erlang-syntax_tools BuildRequires: erlang-syslog >= 1.0.3 +%if 0%{?rhel} +BuildRequires: erlang-test_server +BuildRequires: erlang-webtool +%endif BuildRequires: erlang-tools BuildRequires: erlang-wx BuildRequires: erlang-xmerl @@ -99,7 +104,10 @@ %prep %setup -q -%patch1 -p1 +%patch9991 -p1 +%patch9992 -p1 + +sed -i 's/"0\.9\.0"/"%{version}"/' rebar.config %build @@ -132,7 +140,7 @@ %{buildroot}%{_var}/log/%{name}/ # Configuration -install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/sys.config +install -m 644 %{SOURCE100} %{buildroot}%{_sysconfdir}/%{name}/sys.config # Service scripts %if 0%{?with_systemd} @@ -151,6 +159,10 @@ cp -a _build/default/rel/%{name}/lib/%{realname}-%{version}/ebin/ %{buildroot}%{_erllibdir}/%{name}-%{version}/ cp -a _build/default/rel/%{name}/releases/ %{buildroot}%{_erllibdir}/%{name}-%{version}/ +%if 0%{?plesk} +install -m 644 -p %{SOURCE100} %{buildroot}%{_sysconfdir}/guam/sys.config +%endif + pushd %{buildroot}%{_erllibdir}/%{name}-%{version}/releases/%{version}/ ln -sfv ../../../../../../..%{_sysconfdir}/%{name}/sys.config sys.config mv vm.args ../../../../../../..%{_sysconfdir}/%{name}/vm.args @@ -169,15 +181,30 @@ # Hopeless on -0.9 rebar3 eunit -v || : +%pre +if [ $1 == 1 ]; then + /usr/sbin/groupadd --system %{guam_group} 2> /dev/null || : + /usr/sbin/useradd -c "Guam Service" -d /opt/kolab_guam -g %{guam_group} \ + -s /sbin/nologin --system %{guam_user} 2> /dev/null || : +fi + %postun %if 0%{?with_systemd} %systemd_postun %endif +if [ $1 == 0 ]; then + /usr/sbin/userdel %{guam_user} 2>/dev/null || : + /usr/sbin/groupdel %{guam_group} 2>/dev/null || : +fi %if 0%{?with_systemd} %post %systemd_post %{name}.service +if [ ! -f "/etc/guam/dh_2048.pem" ]; then + openssl gendh -out /etc/guam/dh_2048.pem -2 2048 >/dev/null 2>&1 +fi + %preun %systemd_preun %{name}.service @@ -189,6 +216,10 @@ %post chkconfig --add %{name} >/dev/null 2>&1 || : +if [ ! -f "/etc/guam/dh_2048.pem" ]; then + openssl gendh -out /etc/guam/dh_2048.pem -2 2048 >/dev/null 2>&1 +fi + %posttrans test -f /etc/sysconfig/guam-disable-posttrans || \ %{_sbindir}/service restart %{name} 2>&1 || : @@ -209,10 +240,19 @@ %endif %changelog -* Fri Mar 03 2017 Timotheus Pokorra <tp@tbits.net> - 0.9.0-2 -- fix symbolic links to guam binary, it is called guam not kolab_guam +* Sun Apr 15 2018 Christoph Erhardt <kolab@sicherha.de> - 0.9.4-1 +- Release version 0.9.4 + +* Tue Feb 27 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.9.2-3 +- Allow empty lines in commands + +* Mon Jun 26 2017 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.9.2-2 +- Fix T25795 + +* Mon Jun 19 2017 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.9.2-1 +- Release version 0.9.2 -* Tue Jul 12 2016 Aaron Seigo <seigo@kolabsystems.com> - 0.8.3-1 +* Tue Jul 12 2016 Aaron Seigo <seigo@kolabsystems.com> - 0.8.3-1 - Release of version 0.8.3 * Fri Jul 8 2016 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.8.2-2
View file
debian.changelog
Changed
@@ -1,16 +1,40 @@ -guam (0.9.0-1mic1) unstable; urgency=medium +guam (0.9.4-1) unstable; urgency=medium - * fix debian build - * renamed kolab_guam -> guam - * add bin/guam symlinks + * Release of version 0.9.4 - -- hede <kolab983@der-he.de> Sun, 25 Jun 2017 21:26:56 +0000 + -- Christoph Erhardt <kolab@sicherha.de> Sun, 15 Apr 2017 23:14:48 +0200 -guam (0.9.0-1) unstable; urgency=medium +guam (0.9.2-4) unstable; urgency=medium - * Release of 0.9.0 + * Allow empty lines in commands - -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Mon, 21 Nov 2016 06:06:06 +0100 + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Tue, 27 Feb 2018 06:06:06 +0600 + +guam (0.9.2-3) unstable; urgency=medium + + * Rebuild + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Tue, 29 Aug 2017 06:06:06 +0600 + +guam (0.9.2-2) unstable; urgency=medium + + * Fix potentially empty responses + * Fix T25795 / IDLE passthrough + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Mon, 26 Jun 2017 06:06:06 +0600 + +guam (0.9.2-1) unstable; urgency=medium + + * Release of version 0.9.2 + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Mon, 19 Jun 2017 06:06:06 +0600 + +guam (0.8.3-1.3) unstable; urgency=medium + + * Ship a different default config for Plesk + * Unmask service if masked + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 8 Feb 2017 12:12:12 +0100 guam (0.8.3-1) unstable; urgency=medium
View file
debian.control
Changed
@@ -3,7 +3,7 @@ Priority: extra Maintainer: Christoph Erhardt <kolab@sicherha.de> Standards-Version: 3.9.6 -Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), erlang (>= 17.4), erlang-eimap (>= 0.3.0), erlang-goldrush, erlang-lager, erlang-lager-syslog, erlang-reltool, erlang-rebar3 (>= 3.3.2) +Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), erlang (>= 17.4), erlang-bbmustache, erlang-eimap (>= 0.3.0), erlang-goldrush, erlang-lager, erlang-lager-syslog, erlang-reltool, psa | bash, erlang-rebar3 (>= 3.3.2) Homepage: https://kolab.org/about/guam Package: guam @@ -11,7 +11,7 @@ Section: mail Depends: ${misc:Depends}, erlang-base (>= 17.4) | erlang-base-hipe (>= 17.4), - erlang-eimap (>= 0.1.2), + erlang-eimap (>= 0.3.0), erlang-goldrush, erlang-lager, erlang-lager-syslog
View file
debian.rules
Changed
@@ -8,6 +8,7 @@ dh $@ --with=systemd override_dh_auto_build: + sed -i 's/"0\.9\.0"/"$(DEB_VERSION_UPSTREAM)"/' rebar.config export DEBUG=1 export HEX_OFFLINE=1 rebar3 release \
View file
debian.tar.gz/postinst
Added
@@ -0,0 +1,14 @@ +#!/bin/bash + +case "$1" in + configure) + if [ ! -f "/etc/guam/dh_2048.pem" ]; then + openssl gendh -out /etc/guam/dh_2048.pem -2 2048 >/dev/null 2>&1 + fi + + if [ -L "/etc/systemd/system/guam.service" ]; then + systemctl unmask guam || : + fi + ;; +esac +
View file
guam-0.9.0.tar.gz/.gitignore
Deleted
@@ -1,15 +0,0 @@ -*.beam -.rebar -erl_crash.dump -ebin -deps -db -log -.*.swp -Mnesia* -test.spec -cover.spec -test_logs -rel/ -_build -rebar.lock
View file
guam-0.9.0.tar.gz/CHANGELOG.md -> guam-0.9.4.tar.gz/CHANGELOG.md
Changed
@@ -11,6 +11,24 @@ ### Fixed ### Security +## [0.9.4] - 2018-02-19 +### Fixed +- Support empty lines from the client + +## [0.9.3] - 2017-05-03 +### Fixed +- With a properly crafted folder list, clients could receive empty lines + in filtered folder listings + +## [0.9.2] - 2017-03-21 +### Fixed +- Fix client message processing when there are no active rules + +## [0.9.1] - 2016-02-20 +### Fixed +- Improve SSL connection accepts (prevent timing errors on the socket) +- Support fragmentary messages from clients (e.g. tag in one packet, cmd in another) + ## [0.9.0] - 2016-07-29 ### Added - bind to a network interface (rather than an IP/host) with net_iface
View file
guam-0.9.0.tar.gz/Makefile -> guam-0.9.4.tar.gz/Makefile
Changed
@@ -18,6 +18,5 @@ cat cover.spec.in | sed -e "s,@PATH@,$(PWD)," > $(PWD)/cover.spec -test: test.spec guam - mkdir -p test_logs - ct_run -pa $(PWD)/apps/*/ebin -pa $(PWD)/deps/*/ebin -spec test.spec -erl_args -config $(PWD)/apps/kolab_guam/test/test.config -s kolab_guam +test: test.spec all + $(REBAR) ct --cover --readable --allow_user_terms
View file
guam-0.9.0.tar.gz/apps/kolab_guam/src/kolab_guam.app.src -> guam-0.9.4.tar.gz/apps/kolab_guam/src/kolab_guam.app.src
Changed
@@ -2,7 +2,7 @@ {application, kolab_guam, [ {description, "IMAP session proxy"}, - {vsn, "0.9.0"}, + {vsn, "0.9.4"}, {registered, []}, {applications, [ kernel,
View file
guam-0.9.0.tar.gz/apps/kolab_guam/src/kolab_guam_rule.erl -> guam-0.9.4.tar.gz/apps/kolab_guam/src/kolab_guam_rule.erl
Changed
@@ -17,10 +17,19 @@ -module(kolab_guam_rule). --callback new(Args :: any()) -> any(). --callback applies(ConnectionDetails :: list(), Buffer :: binary(), State :: any()) -> { true, State :: any() } | - { false, State :: any() } | - { notyet, State :: any() }. --callback apply_to_client_message(ImapSession :: pid(), Command :: binary(), State :: any()) -> { ProcessedCommand :: binary(), State :: any() }. --callback apply_to_server_message(ImapSession :: pid(), Command :: binary(), State :: any()) -> { ProcessedCommand :: binary(), State :: any() }. --callback imap_data(ResponseToken :: any(), Response :: any(), State :: any()) -> State ::any(). +-callback new(Args :: any()) -> + State :: any(). + +-callback applies(ConnectionDetails :: list(), Buffer :: binary(), SplitBinary :: { Tag :: binary(), Command :: binary(), Data :: binary() }, State :: any()) -> + { true, State :: any() } | + { false, State :: any() } | + { notyet, State :: any() }. + +-callback apply_to_client_message(ImapSession :: pid(), Command :: binary(), SplitBinary :: { Tag :: binary(), Command :: binary(), Data :: binary() }, State :: any()) -> + { ProcessedCommand :: binary(), State :: any() }. + +-callback apply_to_server_message(ImapSession :: pid(), Command :: binary(), State :: any()) -> + { ProcessedCommand :: binary(), State :: any() }. + +-callback imap_data(ResponseToken :: any(), Response :: any(), State :: any()) -> + State :: any().
View file
guam-0.9.0.tar.gz/apps/kolab_guam/src/kolab_guam_session.erl -> guam-0.9.4.tar.gz/apps/kolab_guam/src/kolab_guam_session.erl
Changed
@@ -27,7 +27,8 @@ %% state record definition -record(state, { listen_socket, socket = undefined, super_pid, tls_config = [], client_implicit_tls = false, client_tls_active = false, server_config = [], - rules_active = [], rules_deciding = [], imap_session = undefined, inflator, deflator }). + rules_active = [], rules_deciding = [], imap_session = undefined, inflator, deflator, buffered_client_data = <<>>, + current_command_split = undefined, command_split_reset_trigger = reset_for_next_client_command }). %% public API start_link(SupervisorPID, ListenSocket, ImapConfig, ImplicitTLS, TLSConfig, Rules) -> gen_server:start_link(?MODULE, [SupervisorPID, ListenSocket, ImapConfig, ImplicitTLS, TLSConfig, Rules], []). @@ -101,7 +102,8 @@ %lager:debug("FROM SERVER: ~s", [Data]), { ModifiedData, CurrentlyActiveRules } = apply_ruleset_serverside(ImapSession, Data, ActiveRules), relay_response(Socket, postprocess_server_data(Deflator, ModifiedData), TLS), - { noreply, State#state{ rules_active = CurrentlyActiveRules } }; + NewSplitCommand = update_split_command_state(ModifiedData, State), + { noreply, State#state{ rules_active = CurrentlyActiveRules, current_command_split = NewSplitCommand } }; handle_info({ 'EXIT', PID, _Reason }, #state { imap_session = PID } = State) -> { stop, normal, State#state{ imap_session = undefined } }; handle_info(Info, State) -> @@ -122,6 +124,30 @@ { ok, State }. %% private API + +%% update_split_command_state updates the split_command being held on to when we get a server response +%% in the case of "transactional" messages (such as authentication) where the client and server enter a bidirectional conversation +%% that is goverened by rules outside the the usual IMAP call/response pattern, we need to wait for the end of the server response +%% since this is relatively expensive due to having to scan the data for the tagged server response, and is not necessary for all other +%% IMAP commands, we shortcircuit when the command does not trigger a "transactional" interaction between client and server, and instead +%% just always reset the split data state at that point +update_split_command_state(Data, #state{ command_split_reset_trigger = reset_on_server_response, current_command_split = CurrentCommandSplit }) -> + case CurrentCommandSplit of + undefined -> undefined; + { Tag, _Command, _Data } -> + case binary:match(Data, <<Tag/binary, " ">>) of + nomatch -> CurrentCommandSplit; + { 0, _ } -> undefined; + { Start, _ } -> + case binary:at(Data, Start - 1) of + $\n -> undefined; + _ -> CurrentCommandSplit + end + end + end; +update_split_command_state(_Data, _State) -> + undefined. + accept_client(#state{ client_implicit_tls = true, tls_config = TLSConfig, listen_socket = ListenSocket, super_pid = SupervisorPID }) -> AcceptSocket = accept_socket(ListenSocket, SupervisorPID), %% prep for the next listen @@ -150,12 +176,12 @@ close_socket(true, _TLS, Socket) -> ssl:close(Socket); close_socket(_ImplicitTLS, _TLS, Socket) -> gen_tcp:close(Socket). -process_client_data(Socket, Data, #state{ rules_deciding = UndecidedRules, tls_config = TLSConfig, client_tls_active = TLS, rules_active = ActiveRules, socket = Socket, imap_session = ImapSession, inflator = Inflator, deflator = Deflator, server_config = ServerConfig } = State) -> +process_client_data(Socket, Data, #state{ rules_deciding = UndecidedRules, tls_config = TLSConfig, client_tls_active = TLS, rules_active = ActiveRules, socket = Socket, imap_session = ImapSession, inflator = Inflator, deflator = Deflator, server_config = ServerConfig, current_command_split = CurrentCommandSplit } = State) -> %%TODO: multipacket input from clients % TODO: refactor so starttls and compress commands can be made into rules - PreprocessData = preprocess_client_data(Inflator, Data), + PreprocessData = preprocess_client_data(Inflator, Data, State), %lager:info("FROM CLIENT: ~s", [PreprocessData]), - { TLSActive, CurrentSocket, CurrentInflator, CurrentDeflator, CurrentUndecidedRules, CurrentActiveRules } = + { TLSActive, CurrentSocket, CurrentInflator, CurrentDeflator, CurrentUndecidedRules, CurrentActiveRules, DataToBuffer, SplitCommand, SplitResetTrigger } = case check_for_transmission_change_commands(TLS, TLSConfig, PreprocessData, Deflator, Socket) of { socket_upgraded, SSLSocket } -> %% if we have upgraded our socket, then do so to the backend if that hasn't happened auomatically @@ -163,27 +189,39 @@ false -> eimap:starttls(ImapSession, undefined, undefined); _ -> ok end, - { true, SSLSocket, Inflator, Deflator, UndecidedRules, ActiveRules }; + { true, SSLSocket, Inflator, Deflator, UndecidedRules, ActiveRules, <<>>, undefined, undefined }; { compression, NewInflator, NewDeflator } -> eimap:compress(ImapSession), % TODO: make optional - { TLS, Socket, NewInflator, NewDeflator, UndecidedRules, ActiveRules }; + { TLS, Socket, NewInflator, NewDeflator, UndecidedRules, ActiveRules, <<>>, undefined, undefined }; nochange -> %%lager:debug("... now applying rules"), - { ModifiedData, NewUndecidedRules, NewActiveRules } = apply_ruleset_clientside(ImapSession, Socket, PreprocessData, UndecidedRules, ActiveRules), + { ModifiedData, NewSplitCommand, NewSplitResetTrigger, NewUndecidedRules, NewActiveRules, PostAction } = apply_ruleset_clientside(ImapSession, Socket, PreprocessData, CurrentCommandSplit, UndecidedRules, ActiveRules), %%lager:info("The modified data is: ~s", [ModifiedData]), %lager:info("The post-processed data is: ~s", [PostProcessed]), - eimap:passthrough_data(ImapSession, ModifiedData), - { TLS, Socket, Inflator, Deflator, NewUndecidedRules, NewActiveRules} + BufferThisData = + case PostAction of + perform_passthrough -> + eimap:passthrough_data(ImapSession, ModifiedData), + <<>>; + buffer_data -> + Data + end, + { TLS, Socket, Inflator, Deflator, NewUndecidedRules, NewActiveRules, BufferThisData, NewSplitCommand, NewSplitResetTrigger } end, set_socket_active(TLSActive, CurrentSocket), + PrevBuffered = State#state.buffered_client_data, { noreply, State#state{ rules_deciding = CurrentUndecidedRules, rules_active = CurrentActiveRules, socket = CurrentSocket, client_tls_active = TLSActive, - inflator = CurrentInflator, deflator = CurrentDeflator } }. + inflator = CurrentInflator, deflator = CurrentDeflator, + buffered_client_data = <<PrevBuffered/binary, DataToBuffer/binary>>, + current_command_split = SplitCommand, + command_split_reset_trigger = SplitResetTrigger } }. -preprocess_client_data(undefined, Data) -> - Data; -preprocess_client_data(Z, Data) -> - joined(zlib:inflate(Z, Data), <<>>). +preprocess_client_data(undefined, Data, #state{ buffered_client_data = Buffered }) -> + <<Buffered/binary, Data/binary>>; +preprocess_client_data(Z, Data, #state{ buffered_client_data = Buffered }) -> + Inflated = joined(zlib:inflate(Z, Data), <<>>), + <<Buffered/binary, Inflated/binary>>. postprocess_server_data(undefined, Data) -> %% we aren't compressing so there is nothing to do @@ -222,27 +260,53 @@ { ModifiedData, ModifiedRuleState } = Module:apply_to_server_message(ImapSession, ServerData, RuleState), apply_next_rule_serverside(ImapSession, ModifiedData, [{ Module, ModifiedRuleState } | ActiveRulesAcc], ActiveRules). -apply_ruleset_clientside(ImapSession, Socket, ClientData, UndecidedRules, CurrentlyActiveRules) -> - { StillUndecided, NewlyActive } = check_undecided(Socket, ClientData, UndecidedRules), +apply_ruleset_clientside(_ImapSession, _Socket, ClientData, _CurrentCommandSplit, [], []) -> + { ClientData, [], [], [], [], perform_passthrough }; +apply_ruleset_clientside(ImapSession, Socket, ClientData, CurrentCommandSplit, UndecidedRules, CurrentlyActiveRules) -> + { PostAction, SplitCommand, SplitResetTrigger } = + case CurrentCommandSplit of + undefined -> + %We first have to check whether the command is an empty line. In such a case split_command_into_components would return an empty command, + %even though the command is complete. + case ClientData of + <<"\r\n">> -> { perform_passthrough, CurrentCommandSplit, reset_for_next_client_command }; + _ -> + case eimap_utils:split_command_into_components(ClientData) of + { _Tag, <<>>, <<>> } -> { buffer_data, undefined, reset_for_next_client_command }; + { _Tag, Command, _Data } = Split -> { perform_passthrough, Split, when_to_reset_split(Command) } + end + end; + _ -> { perform_passthrough, CurrentCommandSplit, reset_for_next_client_command } + end, + { StillUndecided, NewlyActive } = check_undecided(Socket, ClientData, SplitCommand, UndecidedRules), ActiveRules = CurrentlyActiveRules ++ NewlyActive, - { ModifiedData, ActiveRulesRun } = apply_next_rule_clientside(ImapSession, ClientData, [], ActiveRules), - { ModifiedData, StillUndecided, ActiveRulesRun }. - -check_undecided(Socket, ClientData, Rules) -> check_next_undecided_rule(Socket, ClientData, Rules, { [], [] }). -check_next_undecided_rule(_Socket, _ClientData, [], Accs) -> Accs; -check_next_undecided_rule(Socket, ClientData, [Rule|Rules], { UndecidedAcc, NewActiveAcc }) -> + %lager:info("Active Rules: ~p", [ActiveRules]), + { ModifiedData, ActiveRulesRun } = apply_next_rule_clientside(ImapSession, ClientData, SplitCommand, [], ActiveRules), + { ModifiedData, SplitCommand, SplitResetTrigger, StillUndecided, ActiveRulesRun, PostAction }. + +when_to_reset_split(<<"AUTHENTICATE">>) -> reset_on_server_response; +when_to_reset_split(<<"authenticate">>) -> reset_on_server_response; +when_to_reset_split(_) -> reset_for_next_client_command. + +check_undecided(_Socket, _ClientData, undefined, Rules) -> + %% if we do not have a properly split command ... do nothing! + { Rules, [] }; +check_undecided(Socket, ClientData, SplitCommand, Rules) -> check_next_undecided_rule(Socket, ClientData, SplitCommand, Rules, { [], [] }). +check_next_undecided_rule(_Socket, _ClientData, _SplitCommand, [], Accs) -> Accs; +check_next_undecided_rule(Socket, ClientData, SplitCommand, [Rule|Rules], { UndecidedAcc, NewActiveAcc }) -> { Module, RuleState } = Rule, %%lager:debug("Does ~p apply with state ~p? let's find out!", [Module, RuleState]), - check_next_undecided_rule(Socket, ClientData, Rules, applies(Module, Module:applies(Socket, ClientData, RuleState), UndecidedAcc, NewActiveAcc)). + Application = Module:applies(Socket, ClientData, SplitCommand, RuleState), + check_next_undecided_rule(Socket, ClientData, SplitCommand, Rules, applies(Module, Application, UndecidedAcc, NewActiveAcc)). applies(Module, { true, RuleState }, UndecidedAcc, NewActiveAcc) -> { UndecidedAcc, [{ Module, RuleState }|NewActiveAcc] }; applies(_Module, { false, _RuleState }, UndecidedAcc, NewActiveAcc) -> { UndecidedAcc, NewActiveAcc }; applies(Module, { notyet, RuleState }, UndecidedAcc, NewActiveAcc) -> { [{ Module, RuleState }|UndecidedAcc], NewActiveAcc }. -apply_next_rule_clientside(_ImapSession, ClientData, ActiveRulesAcc, []) -> { ClientData, lists:reverse(ActiveRulesAcc) }; -apply_next_rule_clientside(ImapSession, ClientData, ActiveRulesAcc, [{ Module, RuleState }|Rules]) -> - { Data, NewState } = Module:apply_to_client_message(ImapSession, ClientData, RuleState), - apply_next_rule_clientside(ImapSession, Data, [{ Module, NewState } | ActiveRulesAcc], Rules). +apply_next_rule_clientside(_ImapSession, ClientData, _SplitCommand, ActiveRulesAcc, []) -> { ClientData, lists:reverse(ActiveRulesAcc) }; +apply_next_rule_clientside(ImapSession, ClientData, SplitCommand, ActiveRulesAcc, [{ Module, RuleState }|Rules]) -> + { Data, NewState } = Module:apply_to_client_message(ImapSession, ClientData, SplitCommand, RuleState), + apply_next_rule_clientside(ImapSession, Data, SplitCommand, [{ Module, NewState } | ActiveRulesAcc], Rules). relay_response(Socket, Data, false) -> %lager:debug("Sending over non-secure socket ..."), @@ -265,6 +329,7 @@ start_client_tls(TLSConfig, Deflator, Socket, Tag) -> Response = <<Tag/binary, " OK Begin TLS negotiation now\r\n">>, relay_response(Socket, postprocess_server_data(Deflator, Response), false), + inet:setopts(Socket, [{ active, false }]), %% must be set to active false, otherwise can fail depending on timing { ok, SSLSocket } = ssl:ssl_accept(Socket, TLSConfig), { socket_upgraded, SSLSocket }.
View file
guam-0.9.0.tar.gz/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl -> guam-0.9.4.tar.gz/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl
Changed
@@ -16,22 +16,23 @@ %% along with this program. If not, see <http://www.gnu.org/licenses/>. -module(kolab_guam_rule_filter_groupware). --export([new/1, applies/3, imap_data/3, apply_to_client_message/3, apply_to_server_message/3]). +-export([new/1, applies/4, imap_data/3, apply_to_client_message/4, apply_to_server_message/3]). -behavior(kolab_guam_rule). --record(state, { blacklist = [], tag = <<>>, active = false, last_chunk = <<>>, - trigger_commands = [<<"LIST">>, <<"list">>, <<"XLIST">>, <<"xlist">>, <<"LSUB">>, <<"lsub">>]}). +-include("kolab_guam_rule_filter_groupware.hrl"). new(_Config) -> #state { blacklist = undefined }. -applies(_ConnectionDetails, Buffer, State) -> - { _Tag, Command, Data } = eimap_utils:split_command_into_components(Buffer), - %lager:debug("********** Checking ...~n Command: ~s ~s", [Command, Data]), - { apply_if_id_matches(Command, Data, State), State }. +applies(_ConnectionDetails, _Buffer, { _Tag, Command, Data }, State) -> + Applies = apply_if_id_matches(Command, Data, State), + %lager:debug("********** Checking ...~n Command: ~s ~s, Result ~p", [Command, Data, Applies]), + { Applies, State }. -apply_to_client_message(ImapSession, Buffer, State) -> - { Tag, Command, Data } = eimap_utils:split_command_into_components(Buffer), - { Active, StateTag }= +apply_to_client_message(_ImapSession, Buffer, undefined, State) -> + { Buffer, State }; + +apply_to_client_message(ImapSession, Buffer, { Tag, Command, Data }, State) -> + { Active, StateTag } = case is_triggering_command(Command, Data, State) of true -> fetch_metadata(ImapSession, State), { true, Tag }; _ -> { false, <<>> } @@ -66,25 +67,32 @@ fetch_metadata(_ImapSession, _State) -> ok. apply_if_id_matches(<<"ID">>, Data, _State) -> - apply_if_found_kolab(binary:match(Data, <<"/Kolab">>)); + apply_if_found_kolab(string:str(string:to_lower(binary_to_list(Data)), "/kolab")); apply_if_id_matches(Command, Data, State) -> case is_triggering_command(Command, Data, State) of true -> true; _ -> notyet end. -apply_if_found_kolab(nomatch) -> true; +apply_if_found_kolab(0) -> true; apply_if_found_kolab(_) -> false. +possibly_append_newline(<<>>) -> <<>> ; +possibly_append_newline(Response) -> <<Response/binary, "\r\n">> . + filter_folders(<<>>, State) -> { <<>>, State#state{ active = true } }; filter_folders(Buffer, #state{ last_chunk = LeftOvers } = State) -> + % Add the left overs from the previous buffer to the current buffer FullBuffer = <<LeftOvers/binary, Buffer/binary>>, + % From that buffer, only take the complete lines and save off the remainder. { FullLinesBuffer, LastChunk } = eimap_utils:only_full_lines(FullBuffer), + % Create a list so we can filter the individual folders ListResponses = binary:split(FullLinesBuffer, <<"\r\n">>, [ global ]), { Response, More } = filter_folders(State, ListResponses, { <<>>, true }), %io:format("Filtered ... ~p~n", [Response]), - { <<Response/binary, "\r\n">>, State#state { active = More, last_chunk = LastChunk } }. + %Note that the last list item does not contain \r\n, so that needs to be added unless we filtered the complete content. + { possibly_append_newline(Response), State#state { active = More, last_chunk = LastChunk } }. filter_folders(_State, [], Return) -> Return; filter_folders(_State, _Folders, { Acc, false }) -> { Acc, false };
View file
guam-0.9.4.tar.gz/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.hrl
Added
@@ -0,0 +1,3 @@ +-record(state, { blacklist = [], tag = <<>>, active = false, last_chunk = <<>>, + trigger_commands = [<<"LIST">>, <<"list">>, <<"XLIST">>, <<"xlist">>, <<"LSUB">>, <<"lsub">>]}). +
View file
guam-0.9.0.tar.gz/apps/kolab_guam/test/kolab_guam_rules_SUITE.erl -> guam-0.9.4.tar.gz/apps/kolab_guam/test/kolab_guam_rules_SUITE.erl
Changed
@@ -21,7 +21,8 @@ -compile(export_all). % required for common_test to work --include("ct.hrl"). +-include_lib("common_test/include/ct.hrl"). +-include("../src/rules/kolab_guam_rule_filter_groupware.hrl"). %%%%%%%%%%%%%%%%%%%%%%%%%%% %% common test callbacks %% @@ -54,36 +55,96 @@ % c("apps/kolab_guam/test/kolab_guam_sup_tests.erl"). eunit:test(kolab_guam_sup_tests). kolab_guam_rule_filter_groupware_responsefiltering_test(_TestConfig) -> + %% Data to be fed into the test, one tuple per iteration + %% Tuple format: { [] = folder_blacklist, input_data, correct_output } Data = [ { + [ + {<<"Calendar">>, <<"Calendar/">>}, + {<<"Calendar/Personal Calendar">>, <<"Calendar/Personal Calendar/">>}, + {<<"Configuration">>, <<"Configuration/">>}, + {<<"Contacts">>, <<"Contacts/">>}, + {<<"Contacts/Personal Contacts">>, <<"Contacts/Personal Contacts/">>}, + {<<"Files">>, <<"Files/">>}, + {<<"Journal">>, <<"Journal/">>}, + {<<"Notes">>, <<"Notes/">>}, + {<<"Tasks">>, <<"Tasks/">>} + ], <<"* LIST (\\Noinferiors \\Subscribed) \"/\" INBOX\r\n* LIST (\\Subscribed) \"/\" Archive\r\n* LIST (\\Subscribed \\HasChildren) \"/\" Calendar\r\n* LIST (\\Subscribed) \"/\" \"Calendar/Personal Calendar\"\r\n* LIST (\\Subscribed) \"/\" Configuration\r\n* LIST (\\Subscribed \\HasChildren) \"/\" Contacts\r\n* LIST (\\Subscribed) \"/\" \"Contacts/Personal Contacts\"\r\n* LIST (\\Subscribed) \"/\" Drafts\r\n* LIST (\\Subscribed) \"/\" Files\r\n* LIST (\\Subscribed) \"/\" Journal\r\n* LIST (\\Subscribed) \"/\" Notes\r\n* LIST (\\Subscribed) \"/\" Sent\r\n* LIST (\\Subscribed) \"/\" Spam\r\n* LIST (\\Subscribed) \"/\" Tasks\r\n* LIST (\\Subscribed) \"/\" Trash\r\n7 OK Completed (0.000 secs 15 calls)\r\n">>, <<"* LIST (\\Noinferiors \\Subscribed) \"/\" INBOX\r\n* LIST (\\Subscribed) \"/\" Archive\r\n* LIST (\\Subscribed) \"/\" Drafts\r\n* LIST (\\Subscribed) \"/\" Sent\r\n* LIST (\\Subscribed) \"/\" Spam\r\n* LIST (\\Subscribed) \"/\" Trash\r\n7 OK Completed (0.000 secs 15 calls)\r\n">> } ], + + %% setup boilerplate Config = {}, %%TODO? State = kolab_guam_rule_filter_groupware:new(Config), ServerConfig = kolab_guam_sup:default_imap_server_config(), { ok, ImapSession } = eimap:start_link(ServerConfig), - { _, ReadyState } = kolab_guam_rule_filter_groupware:apply_to_client_message(ImapSession, <<"7 list (subscribed) \"\" \"*\" return (special-use)">>, State), - lists:foreach(fun({ Input, Filtered }) -> { Filtered, NewState } = kolab_guam_rule_filter_groupware:apply_to_server_message(ImapSession, Input, ReadyState) end, Data). + + %% create the rule, ready for testing + ClientData = <<"7 list (subscribed) \"\" \"*\" return (special-use)">>, + Split = eimap_utils:split_command_into_components(ClientData), + { _, ReadyState } = kolab_guam_rule_filter_groupware:apply_to_client_message(ImapSession, ClientData, Split, State), + + %% run the dataset through the rule + lists:foreach(fun({ Blacklist, Input, Filtered }) -> + BlacklistState = ReadyState#state{ blacklist = Blacklist }, + { Filtered, _NewState } = kolab_guam_rule_filter_groupware:apply_to_server_message(ImapSession, Input, BlacklistState) end, + Data). kolab_guam_rule_filter_groupware_responsefiltering_multipacket_test(_TestConfig) -> + %% Data to be fed into the test, one tuple per iteration + %% Tuple format: { [ input_packets ] = complete_message, correct_output } Data = [ { [ + {<<"Calendar">>, <<"Calendar/">>}, + {<<"Calendar/Personal Calendar">>, <<"Calendar/Personal Calendar/">>}, + {<<"Configuration">>, <<"Configuration/">>}, + {<<"Contacts">>, <<"Contacts/">>}, + {<<"Contacts/Personal Contacts">>, <<"Contacts/Personal Contacts/">>}, + {<<"Files">>, <<"Files/">>}, + {<<"Journal">>, <<"Journal/">>}, + {<<"Notes">>, <<"Notes/">>}, + {<<"Tasks">>, <<"Tasks/">>} + ], + [ <<"* LIST (\\Noinferiors \\Subscribed) \"/\" INBOX\r\n* LIST (\\Subscribed) \"/\" Archive\r\n* LIST (\\Subscribed \\HasChildren) \"/\" Calendar\r\n* LIST (\\Subscribed) \"/\" \"Calendar/Personal Calendar\"\r\n* LIST (\\Subscribed) \"/\" Configuration\r\n* LIST (\\Subscribed \\HasChildren) \"/\" Contacts\r\n* LIST (\\Subscribed) \"/\" \"Contacts/Personal Contacts\"\r\n* LIST (\\Subscribed) \"/\" Drafts\r\n* LIST (\\Subscribed) \"/\" Files\r\n* LIST (\\Subscribed) \"/\" Journal\r\n* LIST (\\Subscribed)">>, <<"\"/\" Notes\r\n* LIST (\\Subscribed) \"/\" Sent\r\n* LIST (\\Subscribed) \"/\" Spam\r\n* LIST (\\Subscribed) \"/\" Tasks\r\n* LIST (\\Subscribed) \"/\" Trash\r\n7 OK Completed (0.000 secs 15 calls)\r\n">> ], <<"* LIST (\\Noinferiors \\Subscribed) \"/\" INBOX\r\n* LIST (\\Subscribed) \"/\" Archive\r\n* LIST (\\Subscribed) \"/\" Drafts\r\n* LIST (\\Subscribed) \"/\" Sent\r\n* LIST (\\Subscribed) \"/\" Spam\r\n* LIST (\\Subscribed) \"/\" Trash\r\n7 OK Completed (0.000 secs 15 calls)\r\n">> + }, + %Filter complete packet + { + [ + {<<"Calendar">>, <<"Calendar/">>} + ], + [ + <<"* LIST (\\Subscribed \\HasChildren) \"/\" Calendar\r\n">>, + <<"7 OK Completed (0.000 secs 15 calls)\r\n">> + ], + <<"7 OK Completed (0.000 secs 15 calls)\r\n">> } ], + %% setup boilerplate Config = {}, %%TODO? State = kolab_guam_rule_filter_groupware:new(Config), - { _, ReadyState } = kolab_guam_rule_filter_groupware:apply_to_client_message(<<"7 list (subscribed) \"\" \"*\" return (special-use)">>, State), - lists:foreach(fun({ Input, Filtered }) -> Filtered = filter_groupware_packets(ReadyState, Input, <<>>) end, Data). + ServerConfig = kolab_guam_sup:default_imap_server_config(), + { ok, ImapSession } = eimap:start_link(ServerConfig), + + %% create the rule, ready for testing + ClientData = <<"7 list (subscribed) \"\" \"*\" return (special-use)">>, + Split = eimap_utils:split_command_into_components(ClientData), + { _, ReadyState } = kolab_guam_rule_filter_groupware:apply_to_client_message(ImapSession, ClientData, Split, State), + + %% run the dataset through the rule + lists:foreach(fun({ Blacklist, Input, Filtered }) -> + BlacklistState = ReadyState#state{ blacklist = Blacklist }, + Filtered = filter_groupware_packets(ImapSession, BlacklistState, Input, <<>>) end, + Data). -filter_groupware_packets(_ReadyState, [], Buffer) -> Buffer; -filter_groupware_packets(ReadyState, [Input|More], Buffer) -> - { Processed, State } = kolab_guam_rule_filter_groupware:apply_to_server_message(Input, ReadyState), - filter_groupware_packets(State, More, <<Buffer/binary, Processed/binary>>). +filter_groupware_packets(_ImapSession, _ReadyState, [], Buffer) -> Buffer; +filter_groupware_packets(ImapSession, ReadyState, [Input|More], Buffer) -> + { Processed, State } = kolab_guam_rule_filter_groupware:apply_to_server_message(ImapSession, Input, ReadyState), + filter_groupware_packets(ImapSession, State, More, <<Buffer/binary, Processed/binary>>).
View file
guam-0.9.0.tar.gz/apps/kolab_guam/test/kolab_guam_sup_SUITE.erl -> guam-0.9.4.tar.gz/apps/kolab_guam/test/kolab_guam_sup_SUITE.erl
Changed
@@ -21,17 +21,32 @@ -compile(export_all). % required for common_test to work --include("ct.hrl"). +-include_lib("common_test/include/ct.hrl"). %%%%%%%%%%%%%%%%%%%%%%%%%%% %% common test callbacks %% %%%%%%%%%%%%%%%%%%%%%%%%%%% % Specify a list of all unit test functions -all() -> [imap_server_config_test, imap_server_settings_to_config_test]. +all() -> [default_imap_server_config_test, imap_server_config_test]. % required, but can just return Config. this is a suite level setup function. init_per_suite(Config) -> + application:set_env(kolab_guam, imap_servers, [ + { default, [ + { host, "192.168.56.102" }, + { port, 994 }, + { tls, true } + ] + }, + { test_default, [ + { host, "192.168.56.101" }, + { port, 993 }, + { tls, false } + ] + } + ] + ), Config. % required, but can just return Config. this is a suite level tear down function. @@ -48,8 +63,6 @@ end_per_testcase(_TestCase, Config) -> Config. -% c("apps/kolab_guam/test/kolab_guam_sup_tests.erl"). eunit:test(kolab_guam_sup_tests). - default_imap_server_config_test(_TestConfig) -> Expected = [ { host, "192.168.56.102" }, { port, 994 }, { tls, true } ], Expected = kolab_guam_sup:default_imap_server_config().
View file
guam-0.9.0.tar.gz/priv/sys.config -> guam-0.9.4.tar.gz/priv/sys.config
Changed
@@ -33,7 +33,9 @@ }, { tls_config, [ - { certfile, "/etc/pki/tls/private/localhost.pem" } + { certfile, "/etc/pki/tls/private/localhost.pem" }, + { cacertfile, "/etc/pki/tls/private/localhost.ca.pem" }, + { keyfile, "/etc/pki/tls/private/localhost.key" } ] } ] @@ -50,7 +52,9 @@ }, { tls_config, [ - { certfile, "/etc/pki/tls/private/localhost.pem" } + { certfile, "/etc/pki/tls/private/localhost.pem" }, + { cacertfile, "/etc/pki/tls/private/localhost.ca.pem" }, + { keyfile, "/etc/pki/tls/private/localhost.key" } ] } ]
View file
guam.dsc
Changed
@@ -2,13 +2,13 @@ Source: guam Binary: guam Architecture: any -Version: 0.9.0-1 +Version: 0.9.4-1 Maintainer: Christoph Erhardt <kolab@sicherha.de> Homepage: https://kolab.org/about/guam Standards-Version: 3.9.6 -Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), erlang (>= 17.4), erlang-bbmustache, erlang-eimap (>= 0.3.0), erlang-goldrush, erlang-lager, erlang-lager-syslog, erlang-reltool, erlang-rebar3 (>= 3.3.2) +Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), erlang (>= 17.4), erlang-bbmustache, erlang-eimap (>= 0.3.0), erlang-goldrush, erlang-lager, erlang-lager-syslog, erlang-reltool, psa | bash, erlang-rebar3 (>= 3.3.2) Package-List: guam deb mail extra Files: - 00000000000000000000000000000000 0 guam-0.9.0.tar.gz + 00000000000000000000000000000000 0 guam-0.9.4.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
View file
plesk.sys.config
Added
@@ -0,0 +1,180 @@ +%% Example configuration for Guam. +[ + { + kolab_guam, [ + { + imap_servers, [ + { + imap, [ + { host, "127.0.0.1" }, + { port, 9143 }, + { tls, no } + ] + }, + { + imaps, [ + { host, "127.0.0.1" }, + { port, 9993 }, + { tls, true } + ] + } + ] + }, + { + listeners, [ + { + imap, [ + { port, 143 }, + { imap_server, imap }, + { + rules, [ + { filter_groupware, [] } + ] + }, + { + tls_config, [ + { certfile, "/etc/dovecot/private/dovecot.pem" }, + { dhfile, "/etc/guam/dh_2048.pem" }, + { verify, verify_none }, + { versions, [ 'tlsv1.2', 'tlsv1.1', tlsv1] }, + { fail_if_no_peer_cert, false }, + { honor_cipher_order, true }, + { ciphers, [ + "ECDHE-ECDSA-AES256-GCM-SHA384", + "ECDHE-RSA-AES256-GCM-SHA384", + "ECDHE-ECDSA-AES256-SHA384", + "ECDHE-RSA-AES256-SHA384", + "ECDHE-ECDSA-DES-CBC3-SHA", + "ECDH-ECDSA-AES256-GCM-SHA384", + "ECDH-RSA-AES256-GCM-SHA384", + "ECDH-ECDSA-AES256-SHA384", + "ECDH-RSA-AES256-SHA384", + "DHE-DSS-AES256-GCM-SHA384", + "DHE-DSS-AES256-SHA256", + "AES256-GCM-SHA384", + "AES256-SHA256", + "ECDHE-ECDSA-AES128-GCM-SHA256", + "ECDHE-RSA-AES128-GCM-SHA256", + "ECDHE-ECDSA-AES128-SHA256", + "ECDHE-RSA-AES128-SHA256", + "ECDH-ECDSA-AES128-GCM-SHA256", + "ECDH-RSA-AES128-GCM-SHA256", + "ECDH-ECDSA-AES128-SHA256", + "ECDH-RSA-AES128-SHA256", + "DHE-DSS-AES128-GCM-SHA256", + "DHE-DSS-AES128-SHA256", + "AES128-GCM-SHA256", + "AES128-SHA256", + "ECDHE-ECDSA-AES256-SHA", + "ECDHE-RSA-AES256-SHA", + "DHE-DSS-AES256-SHA", + "ECDH-ECDSA-AES256-SHA", + "ECDH-RSA-AES256-SHA", + "AES256-SHA", + "ECDHE-ECDSA-AES128-SHA", + "ECDHE-RSA-AES128-SHA", + "DHE-DSS-AES128-SHA", + "ECDH-ECDSA-AES128-SHA", + "ECDH-RSA-AES128-SHA", + "AES128-SHA" + ] + }, + { client_renegotiation, false }, + { secure_renegotiate, true } + ] + } + ] + }, + { + imaps, [ + { port, 993 }, + { implicit_tls, true }, + { imap_server, imaps }, + { + rules, [ + { filter_groupware, [] } + ] + }, + { + tls_config, [ + { certfile, "/etc/dovecot/private/dovecot.pem" }, + { dhfile, "/etc/guam/dh_2048.pem" }, + { verify, verify_none }, + { versions, [ 'tlsv1.2', 'tlsv1.1', tlsv1] }, + { fail_if_no_peer_cert, false }, + { honor_cipher_order, true }, + { ciphers, [ + "ECDHE-ECDSA-AES256-GCM-SHA384", + "ECDHE-RSA-AES256-GCM-SHA384", + "ECDHE-ECDSA-AES256-SHA384", + "ECDHE-RSA-AES256-SHA384", + "ECDHE-ECDSA-DES-CBC3-SHA", + "ECDH-ECDSA-AES256-GCM-SHA384", + "ECDH-RSA-AES256-GCM-SHA384", + "ECDH-ECDSA-AES256-SHA384", + "ECDH-RSA-AES256-SHA384", + "DHE-DSS-AES256-GCM-SHA384", + "DHE-DSS-AES256-SHA256", + "AES256-GCM-SHA384", + "AES256-SHA256", + "ECDHE-ECDSA-AES128-GCM-SHA256", + "ECDHE-RSA-AES128-GCM-SHA256", + "ECDHE-ECDSA-AES128-SHA256", + "ECDHE-RSA-AES128-SHA256", + "ECDH-ECDSA-AES128-GCM-SHA256", + "ECDH-RSA-AES128-GCM-SHA256", + "ECDH-ECDSA-AES128-SHA256", + "ECDH-RSA-AES128-SHA256", + "DHE-DSS-AES128-GCM-SHA256", + "DHE-DSS-AES128-SHA256", + "AES128-GCM-SHA256", + "AES128-SHA256", + "ECDHE-ECDSA-AES256-SHA", + "ECDHE-RSA-AES256-SHA", + "DHE-DSS-AES256-SHA", + "ECDH-ECDSA-AES256-SHA", + "ECDH-RSA-AES256-SHA", + "AES256-SHA", + "ECDHE-ECDSA-AES128-SHA", + "ECDHE-RSA-AES128-SHA", + "DHE-DSS-AES128-SHA", + "ECDH-ECDSA-AES128-SHA", + "ECDH-RSA-AES128-SHA", + "AES128-SHA" + ] + }, + { client_renegotiation, false }, + { secure_renegotiate, true } + ] + } + ] + } + ] + } + ] + }, + + { + lager, [ + { + handlers, [ + { lager_console_backend, debug }, + { lager_syslog_backend, ["guam", mail, info] }, + { lager_file_backend, [ { file, "log/error.log"}, { level, error } ] }, + { lager_file_backend, [ { file, "log/console.log"}, { level, info } ] } + ] + } + ] + }, + + %% SASL config + { + sasl, [ + { sasl_error_logger, { file, "log/sasl-error.log" } }, + { errlog_type, error }, + { error_logger_mf_dir, "log/sasl" }, % Log directory + { error_logger_mf_maxbytes, 10485760 }, % 10 MB max file size + { error_logger_mf_maxfiles, 5 } % 5 files max + ] + } +].
View file
sys.config
Deleted
@@ -1,78 +0,0 @@ -%% Example configuration for Guam. -[ - { - kolab_guam, [ - { - imap_servers, [ - { - imaps, [ - { host, "127.0.0.1" }, - { port, 9993 }, - { tls, true } - ] - } - ] - }, - { - listeners, [ - { - imap, [ - { port, 143 }, - { imap_server, imaps }, - { - rules, [ - { filter_groupware, [] } - ] - }, - { - tls_config, [ - { certfile, "/etc/pki/cyrus-imapd/cyrus-imapd.pem" } - ] - } - ] - }, - { - imaps, [ - { port, 993 }, - { implicit_tls, true }, - { imap_server, imaps }, - { - rules, [ - { filter_groupware, [] } - ] - }, - { - tls_config, [ - { certfile, "/etc/pki/cyrus-imapd/cyrus-imapd.pem" } - ] - } - ] - } - ] - } - ] - }, - - { - lager, [ - { - handlers, [ - { lager_console_backend, warning }, - { lager_file_backend, [ { file, "log/error.log"}, { level, error } ] }, - { lager_file_backend, [ { file, "log/console.log"}, { level, info } ] } - ] - } - ] - }, - - %% SASL config - { - sasl, [ - { sasl_error_logger, { file, "log/sasl-error.log" } }, - { errlog_type, error }, - { error_logger_mf_dir, "log/sasl" }, % Log directory - { error_logger_mf_maxbytes, 10485760 }, % 10 MB max file size - { error_logger_mf_maxfiles, 5 } % 5 files max - ] - } -].
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.