From c69b0858d498e05422bff46c4bbe0ef02487f229 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Wed, 11 Sep 2024 21:31:59 -0400 Subject: [PATCH] first --- .gitattributes | 3 ++ Makefile | 19 ++++++++++ README.md | 15 ++++++++ roundcube-fail2ban-1.4.tar.gz | 3 ++ roundcube-plugin-fail2ban.spec | 68 ++++++++++++++++++++++++++++++++++ 5 files changed, 108 insertions(+) create mode 100644 .gitattributes create mode 100644 Makefile create mode 100644 README.md create mode 100644 roundcube-fail2ban-1.4.tar.gz create mode 100644 roundcube-plugin-fail2ban.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a3b625f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.tar.xz filter=lfs diff=lfs merge=lfs -text diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3c0b5aa --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +NAME := roundcube-plugin-fail2ban +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md new file mode 100644 index 0000000..74a52b9 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# roundcube-plugin-fail2ban + +SMEServer Koozali local git repo for roundcube-plugin-fail2ban + +## Source +https://github.com/texxasrulez/roundcube_fail2ban + +## Bugzilla +Show list of Koozali outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=roundcube-plugin-fail2ban&product=SME%20Server%2011.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +RoundCube Fail2Ban Plugin is a small plugin that will display a failed login attempts in your syslog or userlogins log file. Using this information Fail2Ban will be able to block a user for a set amount of time. The best part, the block is happening at the IP level and blocks the IP address, not the user they are trying to log in as. + +This plugin does not install or run Fail2Ban, but only provides the program with the needed log entries. Fail2Ban has to be installed and configured independent of this plugin so that it watches Roundcube's logs for failed logins. diff --git a/roundcube-fail2ban-1.4.tar.gz b/roundcube-fail2ban-1.4.tar.gz new file mode 100644 index 0000000..56f5765 --- /dev/null +++ b/roundcube-fail2ban-1.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5eae9ac23a1b94092fc7f96b73467905d9845739448a1b4dbb9ce7913bd7e63b +size 14166 diff --git a/roundcube-plugin-fail2ban.spec b/roundcube-plugin-fail2ban.spec new file mode 100644 index 0000000..78042cd --- /dev/null +++ b/roundcube-plugin-fail2ban.spec @@ -0,0 +1,68 @@ +%define name roundcube-plugin-fail2ban +%define version 1.4 +%define release 1 +Summary: Provides context Menu to Roundcube. +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +#https://github.com/corbosman/fail2ban +Source: roundcube-fail2ban-%{version}.tar.gz +License: GNU General Public License Version 3+ +Group: SMEserver/addon +BuildRoot: %{_tmppath}/%{name}-buildroot +Prefix: %{_prefix} +BuildArchitectures: noarch +BuildRequires: smeserver-devtools +Requires: smeserver-release >= 11.0 +AutoReqProv: no + +%description +Roundcube Webmail is a browser-based multilingual IMAP client with an +application-like user interface. It provides full functionality +expected from an e-mail client, including MIME support, address book, +folder manipulation and message filters. + +This plugin lets you impersonate another user using the dovecot master user feature. + +WARNING: please only use for user support or similar operational issues. I recommend +you always get approval. Using this without consent may be illegal in some countries. +For more information about this feature read: http://wiki.dovecot.org/Authentication/MasterUsers + +The default separator character used is '*', but you can set a different one using the plugin config file. + +%changelog +* Wed Sep 11 2024 Jean-Philippe Pialasse 1.4-1.sme +- initial release for SME 11 + +%prep + +%setup -q -n fail2ban-%{version} + +%build +#perl createlinks + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/share/roundcubemail/plugins/fail2ban/ +( find . -depth -print | cpio -dump $RPM_BUILD_ROOT/usr/share/roundcubemail/plugins/fail2ban/) +rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ +> %{name}-%{version}-filelist +#echo "%doc COPYING" >> %{name}-%{version}-filelist +#--dir 'attr(755,user,grp)' \ +#--file 'attr(755,root,root)' \ + +%clean +cd .. +rm -rf roundcube-fail2ban-%{version} + +%pre + +%preun + +%post + +%postun +#uninstall +%files -f %{name}-%{version}-filelist +%defattr(-,root,root)