commit db0f2e62ca6d01a90bd6711223cf48556b41e6d3 Author: Daniel Berteaud Date: Wed May 13 15:19:40 2015 +0200 Initial commit diff --git a/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/76drop_sogo_response b/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/76drop_sogo_response new file mode 100644 index 0000000..ae74e4c --- /dev/null +++ b/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/76drop_sogo_response @@ -0,0 +1 @@ +drop_sogo_response diff --git a/root/usr/share/qpsmtpd/plugins/drop_sogo_response b/root/usr/share/qpsmtpd/plugins/drop_sogo_response new file mode 100644 index 0000000..4568c44 --- /dev/null +++ b/root/usr/share/qpsmtpd/plugins/drop_sogo_response @@ -0,0 +1,39 @@ +#!/usr/bin/perl -wT +=head1 NAME + +drop_sogo_response + +=head1 DESCRIPTION + +Drop email if it's a SOGo response for an appointment +and set it to NEEDS-ADCTION +Work around a problem in outlook dav where invitaions status are not correctly synced + +=head1 AUTHOR + +Daniel Berteaud + +=head1 LICENSE + +GNU GPL v2 (GNU General Public License) + +=cut + + +sub register { + my ($self, $qp, %arg) = @_; + $self->register_hook("data_post", "drop_sogo_response"); +} + + +sub drop_sogo_response { + my ($self, $transaction) = @_; + my $type = $transaction->header->get('X-SOGo-Message-Type') or return DECLINED; + $type =~ m/^calendar:invitation-reply$/ or return DECLINED; + my $subj = $transaction->header->get('Subject') or return DECLINED; + my $r = qr{=\?UTF-8\?q\?Sans_d=C3=A9cision}; + $subj =~ m/$r/m or return DECLINED; + $self->log(LOGINFO, "SOGo response detected, droping email"); + return DENY; +} + diff --git a/smeserver-qpsmtpd-oldwa.spec b/smeserver-qpsmtpd-oldwa.spec new file mode 100644 index 0000000..96ecf78 --- /dev/null +++ b/smeserver-qpsmtpd-oldwa.spec @@ -0,0 +1,43 @@ +%define name smeserver-qpsmtpd-oldwa +%define version 0.1.0 +%define release 0.beta1 + +Summary: Work around for OutlookDAV +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +License: GNU GPL (GNU General Public License) +Group: Mail +Source: %{name}-%{version}.tar.gz +BuildRoot: /var/tmp/%{realname}-%{version}-buildroot/ +BuildArch: noarch +Requires: smeserver-release >= 8 +BuildRequires: e-smith-devtools +AutoReqProv: no + +%description +Work Around a problem with OutlookDAV where invitations status are not synced correctly +with SOGo, which cause bogus meeting cancellations + +%changelog +* Wed May 13 2015 Daniel Berteaud - 0.1.0-1.sme +- initial release + +%prep +%setup -q -n %{name}-%{version} + +%build + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) +rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist + +%clean +cd .. +rm -rf %{name}-%{version} + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root) +