dovecot i managesieve
Pawel Dlugosz
pawel at dlugosz.eu
Fri Sep 5 14:20:37 CEST 2008
Poprawiony spec.
Teraz wszystko ląduje w jednym
katalogu.
Niepotrzebne makra wywalone.
Dodany opis PL.
ManageSieve w osobnej paczce.
--
Pozdrawiam,
Paweł 'duddits' Długosz
.::http://dlugosz.eu::.
-------------- next part --------------
Index: dovecot.spec
===================================================================
RCS file: /cvsroot/SPECS/dovecot.spec,v
retrieving revision 1.96
diff -u -r1.96 dovecot.spec
--- dovecot.spec 5 Sep 2008 11:40:16 -0000 1.96
+++ dovecot.spec 5 Sep 2008 12:20:24 -0000
@@ -1,13 +1,17 @@
# $Revision: 1.96 $, $Date: 2008/09/05 11:40:16 $
#
# Conditional build:
-%bcond_with gssapi # with GSSAPI support
-%bcond_without ldap # without LDAP auth
-%bcond_without mysql # without MySQL auth
-%bcond_without pgsql # without PostgreSQL auth
-%bcond_without sqlite # without SQLite3 auth
-%bcond_without sasl # without SASL auth
-#
+%bcond_with gssapi # with GSSAPI support
+%bcond_without ldap # without LDAP auth
+%bcond_without mysql # without MySQL auth
+%bcond_without pgsql # without PostgreSQL auth
+%bcond_without sqlite # without SQLite3 auth
+%bcond_without sasl # without SASL auth
+%bcond_with managesieve # with managesieve daemon
+
+%define msubver 0.10.3
+%define dsver 1.1.5
+
Summary: IMAP and POP3 server written with security primarily in mind
Summary(pl.UTF-8): Serwer IMAP i POP3 pisany gĹĂłwnie z myĹlÄ
o bezpieczeĹstwie
Name: dovecot
@@ -21,7 +25,10 @@
Source1: %{name}.pamd
Source2: %{name}.init
Source3: %{name}.sysconfig
+Source4: http://www.rename-it.nl/%{name}/1.1/%{name}-1.1-managesieve-%{msubver}.tar.gz
+Source5: http://dovecot.org/releases/sieve/dovecot-sieve-%{dsver}.tar.gz
Patch0: %{name}-config.patch
+Patch1: http://www.rename-it.nl/%{name}/1.1/%{name}-%{version}-managesieve-%{msubver}.diff.gz
URL: http://dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -124,10 +131,60 @@
%description devel -l pl.UTF-8
Pakiet programistyczny do tworzenia wtyczek dla dovecota.
+%package managesieve-%{msubver}
+Summary: Dovecot Managesieve daemon for sieve scripts
+Summary(pl.UTF-8): Demon Managesieve do obsĹugi skryptĂłw sieve
+Group: Networking/Daemons
+Requires: %{name} >= %{version}
+Requires: %{name}-sieve
+
+%description managesieve-%{msubver}
+The Sieve plugin for Dovecot's deliver LDA expects a user's Sieve
+script to reside somewhere in the user's directory (~/.dovecot.sieve
+by default). If the user is to be able to change his sieve script,
+he needs shell or FTP access to his home directory, which is not
+always desirable. This is especially applicable to mail servers with
+virtual users. As a solution, the ManageSieve protocol was proposed
+to manage sieve scripts on the server without the need for direct
+file system access by the users. Additionally, the Sieve scripts
+are compiled before they are installed, making sure that the uploaded
+script is valid. This prevents a user from inadvertently installing
+a broken Sieve script. The protocol specification still has a draft
+status, but it is already supported by quite a few (web)mail clients.
+Dovecot now supports ManageSieve by means of an external patch and
+package.
+
+%description managesieve-%{msubver} -l pl.UTF-8
+Wtyczka Sieve do LDA Dovecot'a wymaga by skrypty sieve uĹźytkownikĂłw
+znajdowaĹy siÄ gdzieĹ w ich katalogach domowych (domyĹlnie w
+~/.dovecot.sieve). Normalnie by mĂłc modyfikowaÄ taki skrypt
+uĹźytkownik powinien mieÄ dostÄp shell lub FTP do swojego konta,
+co nie zawsze jest poĹźÄ
dane. Dotyczy to zwĹaszcza serwerĂłw
+pocztowych z kontami wirtualnymi. ProtokóŠManageSieve jest
+rozwiÄ
zaniem, ktĂłre umozliwia obsĹugÄ skryptĂłw sieve bez
+koniecznoĹci posiadania bezpoĹredniego dostÄpu do systemu.
+Dodatkowo skrypty sieve przed zainstalowaniem sÄ
kompilowane,
+co zabezpiecza przed zapisaniem zepsutego zestawu komend.
+Specyfikacja tego protokoĹu ciÄ
gle jeszcze znajduje siÄ w fazie
+rozwojowej, ale jest juĹź wspierana przez kilku klientĂłw poczty
+(takĹźe webmail).
+Obecnie wsparcie dla ManageSieve w Dovecot realizowane jest
+przez zewnÄtrzny patch i dodatkowy pakiet.
+
%prep
-%setup -q
+%setup -q -T -b 0
+
+%if %{with managesieve}
+%setup -q -D -T -a 4
+%setup -q -D -T -a 5
+%endif
+
%patch0 -p1
+%if %{with managesieve}
+%patch1 -p1
+%endif
+
%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
%build
@@ -153,6 +210,20 @@
%{__make}
+%if %{with managesieve}
+cd %{name}-sieve-%{dsver}
+%configure \
+ --with-dovecot=../../%{name}-%{version}
+%{__make}
+cd ..
+cd %{name}-1.1-managesieve-%{msubver}
+%configure \
+ --with-dovecot=../../%{name}-%{version} \
+ --with-dovecot-sieve=../dovecot-sieve-%{dsver}
+%{__make}
+cd ..
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
@@ -169,6 +240,13 @@
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+%if %{with managesieve}
+cd %{name}-1.1-managesieve-%{msubver}
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+cd ..
+%endif
+
touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/imap}/*.la
@@ -223,12 +301,14 @@
%defattr(644,root,root,755)
# COPYING contains some notes, not actual LGPL text
%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
+%{_datadir}/doc/%{name}/*
%attr(755,root,root) %{_sbindir}/%{name}
%attr(755,root,root) %{_sbindir}/%{name}pw
%attr(750,root,root) %dir %{_sysconfdir}/%{name}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-ldap-example.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-sql-example.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-db-example.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
@@ -267,6 +347,12 @@
%defattr(644,root,root,755)
%{_libdir}/%{name}-devel
%{_includedir}/%{name}
+
+%if %{with managesieve}
+%files managesieve-%{msubver}
+%attr(755,root,root) %{_libdir}/%{name}/managesieve
+%attr(755,root,root) %{_libdir}/%{name}/managesieve-login
+%endif
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
More information about the pld-devel-pl
mailing list