]> git.pld-linux.org Git - packages/dovecot.git/blame - dovecot.spec
- rel 3; initialize auth settings earlier if we want custom per protocol settings...
[packages/dovecot.git] / dovecot.spec
CommitLineData
6865becd
JB
1#
2# Conditional build:
3ee251c0 3%bcond_without gssapi # without GSSAPI support
f4230487
JB
4%bcond_without ldap # without LDAP auth
5%bcond_without mysql # without MySQL auth
6%bcond_without pgsql # without PostgreSQL auth
b60b3e8a 7%bcond_without sqlite # without SQLite3 auth
f4230487 8%bcond_without sasl # without SASL auth
8e04a4c1 9
b8f6d56a 10Summary: IMAP and POP3 server written with security primarily in mind
7ad305a6 11Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
b8f6d56a 12Name: dovecot
3b27ca27 13Version: 2.2.13
1b80c26c 14Release: 3
660b9616 15Epoch: 1
ba932ed4 16License: MIT (libraries), LGPL v2.1 (the rest)
b8f6d56a 17Group: Networking/Daemons
946ce37d 18Source0: http://dovecot.org/releases/2.2/%{name}-%{version}.tar.gz
3b27ca27 19# Source0-md5: a3eb1c0b1822c4f2b0fe9247776baa71
8d47df47
TO
20Source1: %{name}.pamd
21Source2: %{name}.init
22Source3: %{name}.sysconfig
1fd90052 23Source4: %{name}.tmpfiles
8d47df47 24Patch0: %{name}-config.patch
469a4531 25Patch1: %{name}-rpath.patch
1b80c26c 26Patch2: %{name}-auth-settings.patch
027cb77c 27URL: http://dovecot.org/
0928494a
JB
28BuildRequires: autoconf
29BuildRequires: automake
d9e4e4b3 30BuildRequires: bzip2-devel
f4230487 31%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
b7e03084 32BuildRequires: gettext-devel
1ab66923 33%{?with_gssapi:BuildRequires: heimdal-devel}
d9e4e4b3 34BuildRequires: libcap-devel
0928494a 35BuildRequires: libtool
f4230487 36%{?with_mysql:BuildRequires: mysql-devel}
2e75e92c 37%{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
6ceb4d17 38BuildRequires: openssl-devel >= 0.9.7d
6865becd 39BuildRequires: pam-devel
b7e03084 40BuildRequires: pkgconfig
f4230487 41%{?with_pgsql:BuildRequires: postgresql-devel}
9f0e9eb5 42BuildRequires: rpmbuild(macros) >= 1.647
930a78ad 43BuildRequires: sed >= 4.0
a0260ad9 44%{?with_sqlite:BuildRequires: sqlite3-devel}
d9e4e4b3 45BuildRequires: zlib-devel
8d47df47 46Requires(post,preun): /sbin/chkconfig
c1df1ed1
KK
47Requires(postun): /usr/sbin/groupdel
48Requires(postun): /usr/sbin/userdel
49Requires(pre): /bin/id
50Requires(pre): /usr/bin/getgid
51Requires(pre): /usr/sbin/groupadd
52Requires(pre): /usr/sbin/useradd
147a541c 53Requires: %{name}-libs = %{epoch}:%{version}-%{release}
50c4e802 54Requires: pam >= 0.79.0
c1df1ed1 55Provides: group(dovecot)
8d47df47 56Provides: imapdaemon
660b9616 57Provides: user(dovecot)
b8f6d56a
JB
58BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
4bf55e2e
JR
60%define no_install_post_check_so 1
61
b8f6d56a
JB
62%description
63Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
64written with security primarily in mind. Although it's written with C,
65it uses several coding techniques to avoid most of the common
66pitfalls.
67
68Dovecot can work with standard mbox and maildir formats and it's fully
69compatible with UW-IMAP and Courier IMAP servers as well as mail
70clients accessing the mailboxes directly. It's also planned to support
71storing mails in SQL databases.
72
73Dovecot is easy to set up and doesn't require special maintenance.
74Only thing you need is to get the authentication working properly - if
75your users are in /etc/passwd there's hardly anything you have to do.
76
77Dovecot should be pretty fast, mostly because of index files that
78Dovecot maintains; instead of having to scan through all the data in
8d47df47
TO
79mailbox, Dovecot can get most of the wanted information from index
80with little effort.
b8f6d56a
JB
81
82Status:
ddfebb5d 83- should be quite ready for use with normal IMAP clients
3fcc147b
KK
84- complete IMAP4rev1 and POP3 support
85- supports THREAD, SORT and IDLE extensions, required by many IMAP
86 webmails
87- complete TLS/SSL support
ddfebb5d 88- IPv6 ready
89- shared mailboxes aren't yet supported
3fcc147b
KK
90- Maildir++ quota is supported, bad hard filesystem quota can be
91 problematic
b8f6d56a 92
db6f7644
JR
93%description -l pl.UTF-8
94Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
95pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
96używa kilku technik kodowania zapobiegających większości popularnych
97pułapek.
0928494a 98
db6f7644
JR
99Dovecot może działać ze standardowymi formatami mbox i maildir, jest
100całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
101klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
102Planowana jest także obsługa przechowywania listów w bazach SQL.
0928494a 103
db6f7644
JR
104Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
105nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
106jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
107zmieniać.
0928494a 108
db6f7644 109Dovecot powinien być w miarę szybki, głównie z powodu plików
0928494a 110indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
db6f7644
JR
111wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
112większość potrzebnych informacji z indeksu.
0928494a
JB
113
114Stan:
db6f7644
JR
115- powinien być gotowy do użycia ze zwykłymi klientami IMAP
116- pełna obsługa IMAP4rev1 i POP3
117- obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
3fcc147b 118 webmaili IMAP
db6f7644
JR
119- obsługa IPv6
120- pełna obsługa TLS/SSL
121- quota Maildir++ jest obsługiwana, ale twarda quota na systemach
122 plików może być problematyczna
0928494a 123
ee9bfb11 124%package devel
f4f4ea9e 125Summary: Development package for Dovecot plugins
126Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla Dovecota
1f7b33f9 127Group: Development/Libraries
7fbaf96b 128Requires: %{name}-libs = %{epoch}:%{version}-%{release}
ee9bfb11
JS
129
130%description devel
f4f4ea9e 131Development package for Dovecot plugins.
d3be9b82
JB
132
133%description devel -l pl.UTF-8
f4f4ea9e 134Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
ee9bfb11 135
7fbaf96b 136%package libs
137Summary: Dovecot shared libraries
138Summary(pl.UTF-8): Współdzielone biblioteki Dovecota
139Group: Development/Libraries
7fbaf96b 140
cd10b3e9 141%description libs
7fbaf96b 142Dovecot shared libraries.
143
cd10b3e9 144%description libs -l pl.UTF-8
7fbaf96b 145Współdzielone biblioteki Dovecota.
146
b8f6d56a
JB
147%prep
148%setup -q
8d47df47 149%patch0 -p1
469a4531 150%patch1 -p1
1b80c26c 151%patch2 -p1
77217d94 152
301d0b92 153%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
b8f6d56a
JB
154
155%build
06cf0ac5 156touch config.rpath
b8f6d56a 157%{__libtoolize}
bcf4891d 158%{__aclocal} -I .
b8f6d56a
JB
159%{__autoconf}
160%{__autoheader}
161%{__automake}
6865becd 162%configure \
ba932ed4 163 --disable-static \
6865becd 164 %{?debug:--enable-debug} \
3082a74f 165 %{?with_ldap:--with-ldap=yes} \
f4230487
JB
166 %{?with_mysql:--with-mysql} \
167 %{?with_pgsql:--with-pgsql} \
a0260ad9 168 %{?with_sqlite:--with-sqlite} \
ff3fede5
AM
169 %{?with_gssapi:--with-gssapi=plugin} \
170 --with-sql=plugin \
171 --with-pam \
d9e4e4b3
AM
172 --with-zlib \
173 --with-bzlib \
174 --with-libcap \
6865becd 175 --with-ssl=openssl \
d3f43412 176 --with-moduledir=%{_libdir}/%{name}/plugins \
d9e4e4b3 177 --with-ssldir=/var/lib/openssl \
5152fa81 178 --sysconfdir=%{_sysconfdir} \
9f0e9eb5 179 --with-systemdsystemunitdir=%{systemdunitdir}
b8f6d56a
JB
180
181%{__make}
182
183%install
184rm -rf $RPM_BUILD_ROOT
1fd90052
JR
185install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
186 $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} \
187 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
b8f6d56a
JB
188
189%{__make} install \
190 DESTDIR=$RPM_BUILD_ROOT
191
d3f43412 192mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
b8f6d56a 193
8e04a4c1
ER
194cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
195install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
196cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
1fd90052 197install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
8d47df47
TO
198
199touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
200
4aef4380 201find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
bb75c55c 202
1fd90052
JR
203%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
204%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
1f7b33f9 205
b8f6d56a
JB
206%clean
207rm -rf $RPM_BUILD_ROOT
208
c1df1ed1
KK
209%pre
210%groupadd -g 172 dovecot
211%useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
74a997c5
AM
212%groupadd -g 254 dovenull
213%useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
c1df1ed1 214
8d47df47
TO
215%post
216/sbin/chkconfig --add dovecot
0182c7a5 217%service dovecot restart
9f0e9eb5 218%systemd_post dovecot.socket dovecot.service
8d47df47
TO
219
220%preun
221if [ "$1" = "0" ]; then
65d55d28 222 %service dovecot stop
8d47df47
TO
223 /sbin/chkconfig --del dovecot
224fi
9f0e9eb5 225%systemd_preun dovecot.service dovecot.socket
8d47df47 226
c1df1ed1
KK
227%postun
228if [ "$1" = "0" ]; then
229 %userremove dovecot
230 %groupremove dovecot
74a997c5
AM
231 %userremove dovenull
232 %groupremove dovenull
c1df1ed1 233fi
9f0e9eb5 234%systemd_reload
c1df1ed1 235
bc5d3bcd
AM
236%post libs -p /sbin/ldconfig
237%postun libs -p /sbin/ldconfig
238
a6b782c0
JR
239%triggerin -- pam
240# restart devocot if pam is upgraded
241# (dovecot is linked with old libpam but tries to open modules linked with new libpam)
242if [ "$2" != 1 ]; then
243 %service -q dovecot restart
244fi
245
28c2da72
JR
246%triggerpostun -- dovecot < 1:2.0.0
247# upgrading dovecot < 1.1
fdaf3880
PG
248echo "Configuration change default_mail_env -> mail_location"
249%{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
28c2da72 250# upgrading dovecot < 2.0
b897a7bd 251i=0
687a6849
AM
252for a in /etc/dovecot/dovecot-db-example.conf \
253 /etc/dovecot/dovecot-dict-sql-example.conf \
254 /etc/dovecot/dovecot-ldap-example.conf \
255 /etc/dovecot/dovecot-sql-example.conf \
256 /etc/dovecot/dovecot.conf; do
257 if [ -f "$a" ]; then
b897a7bd
AM
258 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
259 i=1
687a6849 260 echo "Trying to migrate $a config file to dovecot 2."
8c43f42b 261 cp -a "$a" "$a-1.2.org"
d31b09de
AM
262 :> "$a.log"
263 chmod 600 "$a.log"
8c43f42b 264 # convert config and prefix stderr lines with #
d31b09de 265 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
687a6849
AM
266 fi
267done
8c43f42b
AM
268if [ "$i" -eq 1 ]; then
269 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
270fi
fdaf3880 271
9f0e9eb5
AF
272%triggerpostun -- %{name} < 1:2.2.4-2
273%systemd_trigger dovecot.service dovecot.socket
274
b8f6d56a
JB
275%files
276%defattr(644,root,root,755)
277# COPYING contains some notes, not actual LGPL text
caf88cd1 278%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
bb75c55c
AM
279%attr(755,root,root) %{_bindir}/doveadm
280%attr(755,root,root) %{_bindir}/doveconf
281%attr(755,root,root) %{_bindir}/dsync
8d47df47 282%attr(755,root,root) %{_sbindir}/%{name}
15872051 283%attr(751,root,root) %dir %{_sysconfdir}/%{name}
c19c6ee3 284%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
bb75c55c
AM
285%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
286%attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
287%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
288%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
c5c6a170 289%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
290%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
291%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
8d47df47 292%attr(754,root,root) /etc/rc.d/init.d/%{name}
3b993680 293%attr(755,root,root) %{_libdir}/%{name}/aggregator
bb75c55c
AM
294%attr(755,root,root) %{_libdir}/%{name}/anvil
295%attr(755,root,root) %{_libdir}/%{name}/auth
ee9bfb11 296%attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply
bb75c55c 297%attr(755,root,root) %{_libdir}/%{name}/config
86cbda6a 298%attr(755,root,root) %{_libdir}/%{name}/decode2text.sh
ee9bfb11
JS
299%attr(755,root,root) %{_libdir}/%{name}/deliver
300%attr(755,root,root) %{_libdir}/%{name}/dict
bb75c55c
AM
301%attr(755,root,root) %{_libdir}/%{name}/director
302%attr(755,root,root) %{_libdir}/%{name}/dns-client
303%attr(755,root,root) %{_libdir}/%{name}/doveadm-server
304%attr(755,root,root) %{_libdir}/%{name}/dovecot-lda
ee9bfb11 305%attr(755,root,root) %{_libdir}/%{name}/gdbhelper
ee9bfb11
JS
306%attr(755,root,root) %{_libdir}/%{name}/imap
307%attr(755,root,root) %{_libdir}/%{name}/imap-login
946ce37d
AZ
308%attr(755,root,root) %{_libdir}/%{name}/imap-urlauth
309%attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-login
310%attr(755,root,root) %{_libdir}/%{name}/imap-urlauth-worker
86cbda6a
AM
311%attr(755,root,root) %{_libdir}/%{name}/indexer
312%attr(755,root,root) %{_libdir}/%{name}/indexer-worker
7e318864 313%attr(755,root,root) %{_libdir}/%{name}/ipc
bb75c55c
AM
314%attr(755,root,root) %{_libdir}/%{name}/lmtp
315%attr(755,root,root) %{_libdir}/%{name}/log
77ad1fc7 316%attr(755,root,root) %{_libdir}/%{name}/maildirlock
ee9bfb11
JS
317%attr(755,root,root) %{_libdir}/%{name}/pop3
318%attr(755,root,root) %{_libdir}/%{name}/pop3-login
156868fd 319%attr(755,root,root) %{_libdir}/%{name}/quota-status
ee9bfb11 320%attr(755,root,root) %{_libdir}/%{name}/rawlog
3b993680 321%attr(755,root,root) %{_libdir}/%{name}/replicator
bb75c55c
AM
322%attr(755,root,root) %{_libdir}/%{name}/script
323%attr(755,root,root) %{_libdir}/%{name}/script-login
324%attr(755,root,root) %{_libdir}/%{name}/ssl-params
86cbda6a
AM
325%attr(755,root,root) %{_libdir}/%{name}/stats
326%attr(755,root,root) %{_libdir}/%{name}/xml2text
d3be9b82 327%dir %{_libdir}/%{name}/plugins
ee9bfb11 328%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
ff3fede5 329%dir %{_libdir}/%{name}/plugins/auth
8e04a4c1 330%attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
ff3fede5 331%dir %{_libdir}/%{name}/plugins/dict
8e04a4c1 332%attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
bb75c55c 333%dir %{_libdir}/%{name}/plugins/doveadm
8e04a4c1 334%attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
9f0e9eb5
AF
335%{systemdunitdir}/dovecot.service
336%{systemdunitdir}/dovecot.socket
1fd90052 337/usr/lib/tmpfiles.d/%{name}.conf
e7291b43 338%dir /var/lib/dovecot
c1df1ed1 339%dir /var/run/dovecot
aade0d64 340%attr(750,root,dovenull) %dir /var/run/dovecot/login
ee9bfb11 341
bb75c55c
AM
342%{_mandir}/man1/deliver.1*
343%{_mandir}/man1/dove*.1*
344%{_mandir}/man1/dsync.1*
345%{_mandir}/man7/doveadm-search-query.7*
346
ee9bfb11
JS
347%files devel
348%defattr(644,root,root,755)
8e04a4c1 349%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
946ce37d 350%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
8e04a4c1
ER
351%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
352%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
30b6d006 353%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
8e04a4c1 354%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
94763843 355%{_libdir}/%{name}/%{name}-config
ee9bfb11 356%{_includedir}/%{name}
bb75c55c 357%{_aclocaldir}/dovecot.m4
7fbaf96b 358
359%files libs
360%defattr(644,root,root,755)
361%dir %{_libdir}/%{name}
8e04a4c1 362%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
946ce37d 363%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
8e04a4c1
ER
364%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
365%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
30b6d006 366%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
8e04a4c1
ER
367%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
368# Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
96e29b16 369# directory. This is why the following files are not %ghost
8e04a4c1 370%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
946ce37d 371%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
8e04a4c1
ER
372%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
373%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
30b6d006 374%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
8e04a4c1 375%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0
This page took 1.17928 seconds and 4 git commands to generate.