]>
Commit | Line | Data |
---|---|---|
6865becd JB |
1 | # |
2 | # Conditional build: | |
f4230487 JB |
3 | %bcond_without ldap # without LDAP auth |
4 | %bcond_without mysql # without MySQL auth | |
5 | %bcond_without pgsql # without PostgreSQL auth | |
b60b3e8a | 6 | %bcond_without sqlite # without SQLite3 auth |
f4230487 | 7 | %bcond_without sasl # without SASL auth |
6865becd | 8 | # |
b8f6d56a | 9 | Summary: IMAP and POP3 server written with security primarily in mind |
7ad305a6 | 10 | Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie |
b8f6d56a | 11 | Name: dovecot |
63253bca | 12 | Version: 1.0.3 |
ad378b53 | 13 | Release: 1 |
b798e3ac | 14 | License: LGPL v2.1 and MIT |
b8f6d56a | 15 | Group: Networking/Daemons |
16f8378c | 16 | Source0: http://dovecot.org/releases/1.0/%{name}-%{version}.tar.gz |
63253bca | 17 | # Source0-md5: 1d7cc3c4964789554553e7e4ea3f82b4 |
8d47df47 TO |
18 | Source1: %{name}.pamd |
19 | Source2: %{name}.init | |
20 | Source3: %{name}.sysconfig | |
21 | Patch0: %{name}-config.patch | |
63253bca | 22 | #Patch1: %{name}-dspam-plugin.patch |
027cb77c | 23 | URL: http://dovecot.org/ |
0928494a JB |
24 | BuildRequires: autoconf |
25 | BuildRequires: automake | |
f4230487 | 26 | %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0} |
684bdb24 | 27 | BuildRequires: krb5-devel |
b7e03084 | 28 | BuildRequires: gettext-devel |
0928494a | 29 | BuildRequires: libtool |
f4230487 | 30 | %{?with_mysql:BuildRequires: mysql-devel} |
c06c1041 | 31 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} |
6ceb4d17 | 32 | BuildRequires: openssl-devel >= 0.9.7d |
6865becd | 33 | BuildRequires: pam-devel |
b7e03084 | 34 | BuildRequires: pkgconfig |
f4230487 | 35 | %{?with_pgsql:BuildRequires: postgresql-devel} |
930a78ad | 36 | BuildRequires: sed >= 4.0 |
a0260ad9 | 37 | %{?with_sqlite:BuildRequires: sqlite3-devel} |
8d47df47 | 38 | Requires(post,preun): /sbin/chkconfig |
c1df1ed1 KK |
39 | Requires(postun): /usr/sbin/groupdel |
40 | Requires(postun): /usr/sbin/userdel | |
41 | Requires(pre): /bin/id | |
42 | Requires(pre): /usr/bin/getgid | |
43 | Requires(pre): /usr/sbin/groupadd | |
44 | Requires(pre): /usr/sbin/useradd | |
50c4e802 | 45 | Requires: pam >= 0.79.0 |
c1df1ed1 KK |
46 | Provides: group(dovecot) |
47 | Provides: user(dovecot) | |
8d47df47 | 48 | Provides: imapdaemon |
b8f6d56a JB |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
51 | %description | |
52 | Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems, | |
53 | written with security primarily in mind. Although it's written with C, | |
54 | it uses several coding techniques to avoid most of the common | |
55 | pitfalls. | |
56 | ||
57 | Dovecot can work with standard mbox and maildir formats and it's fully | |
58 | compatible with UW-IMAP and Courier IMAP servers as well as mail | |
59 | clients accessing the mailboxes directly. It's also planned to support | |
60 | storing mails in SQL databases. | |
61 | ||
62 | Dovecot is easy to set up and doesn't require special maintenance. | |
63 | Only thing you need is to get the authentication working properly - if | |
64 | your users are in /etc/passwd there's hardly anything you have to do. | |
65 | ||
66 | Dovecot should be pretty fast, mostly because of index files that | |
67 | Dovecot maintains; instead of having to scan through all the data in | |
8d47df47 TO |
68 | mailbox, Dovecot can get most of the wanted information from index |
69 | with little effort. | |
b8f6d56a JB |
70 | |
71 | Status: | |
ddfebb5d | 72 | - should be quite ready for use with normal IMAP clients |
3fcc147b KK |
73 | - complete IMAP4rev1 and POP3 support |
74 | - supports THREAD, SORT and IDLE extensions, required by many IMAP | |
75 | webmails | |
76 | - complete TLS/SSL support | |
ddfebb5d | 77 | - IPv6 ready |
78 | - shared mailboxes aren't yet supported | |
3fcc147b KK |
79 | - Maildir++ quota is supported, bad hard filesystem quota can be |
80 | problematic | |
b8f6d56a | 81 | |
db6f7644 JR |
82 | %description -l pl.UTF-8 |
83 | Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych, | |
84 | pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C, | |
85 | używa kilku technik kodowania zapobiegających większości popularnych | |
86 | pułapek. | |
0928494a | 87 | |
db6f7644 JR |
88 | Dovecot może działać ze standardowymi formatami mbox i maildir, jest |
89 | całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z | |
90 | klientami pocztowymi bezpośrednio dostającymi się do skrzynek. | |
91 | Planowana jest także obsługa przechowywania listów w bazach SQL. | |
0928494a | 92 | |
db6f7644 JR |
93 | Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego |
94 | nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie - | |
95 | jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic | |
96 | zmieniać. | |
0928494a | 97 | |
db6f7644 | 98 | Dovecot powinien być w miarę szybki, głównie z powodu plików |
0928494a | 99 | indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania |
db6f7644 JR |
100 | wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać |
101 | większość potrzebnych informacji z indeksu. | |
0928494a JB |
102 | |
103 | Stan: | |
db6f7644 JR |
104 | - powinien być gotowy do użycia ze zwykłymi klientami IMAP |
105 | - pełna obsługa IMAP4rev1 i POP3 | |
106 | - obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele | |
3fcc147b | 107 | webmaili IMAP |
db6f7644 JR |
108 | - obsługa IPv6 |
109 | - pełna obsługa TLS/SSL | |
110 | - quota Maildir++ jest obsługiwana, ale twarda quota na systemach | |
111 | plików może być problematyczna | |
0928494a | 112 | |
b8f6d56a JB |
113 | %prep |
114 | %setup -q | |
8d47df47 | 115 | %patch0 -p1 |
63253bca | 116 | #%patch1 -p1 |
77217d94 | 117 | |
3fcc147b | 118 | %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf |
b8f6d56a JB |
119 | |
120 | %build | |
06cf0ac5 | 121 | touch config.rpath |
b8f6d56a JB |
122 | %{__libtoolize} |
123 | %{__aclocal} | |
124 | %{__autoconf} | |
125 | %{__autoheader} | |
126 | %{__automake} | |
6865becd JB |
127 | %configure \ |
128 | %{?debug:--enable-debug} \ | |
f4230487 JB |
129 | %{?with_ldap:--with-ldap} \ |
130 | %{?with_mysql:--with-mysql} \ | |
131 | %{?with_pgsql:--with-pgsql} \ | |
132 | %{?with_sasl:--with-cyrus-sasl2} \ | |
a0260ad9 | 133 | %{?with_sqlite:--with-sqlite} \ |
e7291b43 | 134 | --with-gssapi \ |
6865becd | 135 | --with-ssl=openssl \ |
c19c6ee3 AM |
136 | --with-ssl-dir=/var/lib/openssl \ |
137 | --sysconfdir=/etc/%{name} | |
b8f6d56a JB |
138 | |
139 | %{__make} | |
140 | ||
141 | %install | |
142 | rm -rf $RPM_BUILD_ROOT | |
8d47df47 | 143 | install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} |
e7291b43 KK |
144 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}} |
145 | install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} | |
b8f6d56a JB |
146 | |
147 | %{__make} install \ | |
442c32c1 | 148 | moduledir=%{_libdir}/%{name}/plugins \ |
b8f6d56a JB |
149 | DESTDIR=$RPM_BUILD_ROOT |
150 | ||
c19c6ee3 | 151 | mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf} |
b8f6d56a | 152 | |
8d47df47 TO |
153 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name} |
154 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
155 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
156 | ||
157 | touch $RPM_BUILD_ROOT/etc/security/blacklist.imap | |
158 | ||
b8f6d56a JB |
159 | %clean |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
c1df1ed1 KK |
162 | %pre |
163 | %groupadd -g 172 dovecot | |
164 | %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot | |
165 | ||
8d47df47 TO |
166 | %post |
167 | /sbin/chkconfig --add dovecot | |
168 | if [ -f /var/lock/subsys/dovecot ]; then | |
169 | /etc/rc.d/init.d/dovecot restart >&2 | |
170 | else | |
171 | echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon." | |
172 | fi | |
173 | ||
174 | %preun | |
175 | if [ "$1" = "0" ]; then | |
176 | if [ -f /var/lock/subsys/dovecot ]; then | |
177 | /etc/rc.d/init.d/dovecot stop >&2 | |
178 | fi | |
179 | /sbin/chkconfig --del dovecot | |
180 | fi | |
181 | ||
c1df1ed1 KK |
182 | %postun |
183 | if [ "$1" = "0" ]; then | |
184 | %userremove dovecot | |
185 | %groupremove dovecot | |
186 | fi | |
187 | ||
b8f6d56a JB |
188 | %files |
189 | %defattr(644,root,root,755) | |
190 | # COPYING contains some notes, not actual LGPL text | |
caf88cd1 | 191 | %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt |
8d47df47 | 192 | %attr(755,root,root) %{_sbindir}/%{name} |
442c32c1 | 193 | %attr(755,root,root) %{_sbindir}/%{name}pw |
c19c6ee3 AM |
194 | %attr(750,root,root) %dir %{_sysconfdir}/%{name} |
195 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
c5c6a170 | 196 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name} |
197 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap | |
198 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
8d47df47 TO |
199 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
200 | %attr(755,root,root) %{_libdir}/%{name} | |
e7291b43 | 201 | %dir /var/lib/dovecot |
c1df1ed1 KK |
202 | %dir /var/run/dovecot |
203 | %attr(750,root,dovecot) %dir /var/run/dovecot/login |