]> git.pld-linux.org Git - packages/courier.git/blob - courier.spec
- unified: removed _initrddir macro usage
[packages/courier.git] / courier.spec
1 # TODO
2 # - build fails due auto* macros on ac/th
3 # - doesn't -webadmin need webserver integration?
4 # - use rc-scripts in %%post scriptlets
5 # - unpackaged files:
6 #   /etc/courier/webmlmrc
7 #   /usr/bin/webmlmd
8 #   /usr/bin/webmlmd.rc
9 #   /usr/lib/courier/courier/webmail/webmlm
10 #   /usr/sbin/aliaslookup
11 #   /usr/share/man/man1/webmlmd.1.gz
12 #   /usr/share/man/man8/aliaslookup.8.gz
13 #
14 # Conditional build:
15 %bcond_without  fam             # with fam support
16 %bcond_with     tests           # without tests
17 #
18 Summary:        Courier mail server
19 Summary(pl.UTF-8):      Serwer poczty Courier
20 Name:           courier
21 Version:        0.61.2
22 Release:        2
23 License:        GPL
24 Group:          Networking/Daemons
25 Source0:        http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
26 # Source0-md5:  fdd7a26614cba68aa223e481bd7d5eb4
27 Patch0:         %{name}-openssl-path.patch
28 Patch1:         %{name}-withoutfam.patch
29 Patch2:         %{name}-maildir.patch
30 Patch3:         %{name}-sendmail_dir.patch
31 Patch4:         %{name}-start_scripts.patch
32 Patch5:         %{name}-certs.patch
33 Patch6:         %{name}-db.patch
34 URL:            http://www.courier-mta.org/
35 BuildRequires:  autoconf
36 BuildRequires:  automake
37 BuildRequires:  courier-authlib-devel >= 0.61
38 BuildRequires:  expect
39 %{?with_fam:BuildRequires:      fam-devel}
40 BuildRequires:  gettext-devel
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  libtool
43 BuildRequires:  mailcap
44 BuildRequires:  openldap-devel >= 2.3.0
45 BuildRequires:  openssl-devel >= 0.9.7d
46 BuildRequires:  openssl-tools >= 0.9.7d
47 BuildRequires:  openssl-tools-perl >= 0.9.7d
48 BuildRequires:  pam-devel
49 BuildRequires:  pcre-devel
50 BuildRequires:  perl-devel
51 BuildRequires:  rpmbuild(macros) >= 1.268
52 BuildRequires:  sed >= 4.0
53 BuildRequires:  sysconftool
54 Requires(post,preun):   /sbin/chkconfig
55 Requires:       rc-scripts
56 Requires:       perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
57 Provides:       smtpdaemon
58 Obsoletes:      smtpdaemon
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %define         _datadir        %{_prefix}/share/courier
62 %define         _libdir         %{_prefix}/%{_lib}/%{name}
63 %define         _libexecdir     %{_libdir}
64 %define         _localstatedir  /var/spool/courier
65 %define         _sysconfdir     /etc/courier
66 %define         _certsdir       %{_sysconfdir}/certs
67
68 %define         _webapps        /etc/webapps
69 %define         _cgibindir      %{_prefix}/lib/cgi-bin
70 %define         _imagedir       %{_datadir}/sqwebmail/images
71 %define         _imageurl       /webmail
72
73 %description
74 Courier is a fully functional mail server, that can completely take
75 over the mail services normally provided by sendmail, Qmail, or any
76 other mail server. Although Courier does not support all legacy
77 features of existing mail servers, the number of obsoleted functions
78 is very small, and there are better, and more robust, alternatives
79 available.
80
81 Courier implements many SMTP extensions: DSN, PIPELINING, 8BITMIME.
82 Courier also implements several new SMTP extensions for mailing list
83 management and spam filtering.
84
85 %description -l pl.UTF-8
86 Courier jest w pełni funkcjonalnym serwerem poczty, może całkowicie
87 zastąpić usługi pocztowe dawane przez sendmail, Qmaila i inne serwery.
88 Wprawdzie Courier nie ma wszystkich możliwości istniejących serwerów,
89 ilość nie obsługiwanych funkcji jest bardzo mała, i są dostępne lepsze
90 alternatywy.
91
92 Courier zawiera wiele rozszerzeń SMTP: DSN, PIPELINING, 8BITMIME. Ma
93 także nowe rozszerzenia SMTP dla pocztowych list dyskusyjnych i
94 filtrowania spamu.
95
96 %package pop3d
97 Summary:        Courier Integrated POP3 server
98 Summary(pl.UTF-8):      Zintegrowany serwer POP3 do Couriera
99 Group:          Networking/Daemons/POP3
100 Requires(post): openssl-tools >= 0.9.7d
101 Requires:       %{name} = %{version}-%{release}
102 Provides:       pop3daemon
103 Obsoletes:      pop3daemon
104
105 %description pop3d
106 This package installs Courier mail server's integrated POP3 server,
107 which allows you to download mail from your mailbox using any POP3
108 client. Courier's POP3 server can only be used to download mail from
109 maildir mailboxes. This server does not support mailbox files. If you
110 do not need the ability to download your mail using a POP3 client, you
111 do not need to install this package.
112
113 %description pop3d -l pl.UTF-8
114 Ten pakiet zawiera zintegrowany serwer POP3 do Couriera, pozwalający
115 na ściąganie poczty ze skrzynki przy pomocy dowolnego klienta POP3.
116 Serwer POP3 Couriera może być używany tylko ze skrzynkami Maildir, nie
117 obsługuje skrzynek w postaci pojedynczych plików.
118
119 %package imapd
120 Summary:        Courier Integrated IMAP server
121 Summary(pl.UTF-8):      Zintegrowany serwer IMAP do Couriera
122 Group:          Networking/Daemons
123 Requires(post): openssl-tools >= 0.9.7d
124 Requires:       %{name} = %{version}-%{release}
125 Obsoletes:      courier-imap
126 Obsoletes:      courier-imap-common
127
128 %description imapd
129 This package installs Courier mail server's integrated IMAP server. If
130 you do not need the ability to download your mail using an IMAP mail
131 client, you do not need to install this package. Courier's IMAP server
132 can only be used to download mail from maildir mailboxes. This server
133 does not support mailbox files.
134
135 This package requires that Courier must be already installed, this is
136 NOT the standalone version of the Courier-IMAP server, and you cannot
137 install both this package, and the standalone version of Courier-IMAP.
138 If you have the standalone version of the Courier-IMAP server already
139 installed, installing this package will automatically remove the
140 standalone version.
141
142 %description imapd -l pl.UTF-8
143 Ten pakiet zawiera zintegrowany serwer IMAP do Couriera. Pozwala
144 ściągać pocztę przy pomocy klienta IMAP. Serwer IMAP Couriera może być
145 używany tylko ze skrzynkami Maildir, nie obsługuje skrzynek w postaci
146 pojedynczych plików.
147
148 Ten pakiet wymaga serwera Courier, to NIE jest samodzielna wersja
149 serwera Courier-IMAP. Nie można też instalować jednocześnie tego
150 pakietu i samodzielnej wersji Courier-IMAP. Zainstalowanie tego
151 pakietu automatycznie odinstaluje Courier-IMAP jeśli był zinstalowany.
152
153 %package webadmin
154 Summary:        Courier Integrated HTTP administraton panel
155 Summary(pl.UTF-8):      Panel administracyjny przez HTTP dla Couriera
156 Group:          Networking/Daemons
157 Requires:       %{name} = %{version}-%{release}
158 Requires:       filesystem >= 3.0-11
159 Requires:       webapps
160 Requires:       webserver = apache
161 Conflicts:      apache-base < 2.2.0-8
162 Conflicts:      apache1 < 1.3.34-5.11
163
164 %description webadmin
165 This is a web-based administration tool. Webadmin is a web CGI
166 application.
167
168 %description webadmin -l pl.UTF-8
169 Webadmin jest narzędziem administracyjnym obsługiwanym przez WWW.
170
171 %package webmail
172 Summary:        Courier Integrated HTTP (webmail) server
173 Summary(pl.UTF-8):      Zintegrowany serwer poczty przez HTTP (webmail) do Couriera
174 Group:          Networking/Daemons
175 Requires:       %{name} = %{version}-%{release}
176 Requires:       filesystem >= 3.0-11
177 Requires:       webapps
178 Requires:       webserver = apache
179 Conflicts:      apache-base < 2.2.0-8
180 Conflicts:      apache1 < 1.3.34-5.11
181
182 %description webmail
183 This package installs Courier mail server's integrated HTTP webmail
184 server. If you do not need the ability to access your mail using a web
185 browser, you do not need to install this package. Courier's webmail
186 server can only be used to download mail from maildir mailboxes. This
187 server does not support mailbox files.
188
189 This is the same server that's distributed separately under the name
190 of SqWebMail, however its configuration is customized for the Courier
191 mail server.
192
193 %description webmail -l pl.UTF-8
194 Ten pakiet zawiera zintegrowany serwer poczty przez HTTP (webmail) dla
195 Couriera, pozwalający na dostęp do poczty za pomocą przeglądarki WWW.
196 Serwer webmail Couriera może być używany tylko ze skrzynkami Maildir,
197 nie obsługuje skrzynek w postaci pojedynczych plików.
198
199 Jest to ten sam serwer, co dystrybuowany oddzielnie pod nazwą
200 SqWebMail, ale jego konfiguracja jest dostosowana do serwera Courier.
201
202 %package maildir-tools
203 Summary:        Tools for mail folders in Maildir format
204 Summary(pl.UTF-8):      Narzędzia do zarządzania skrzynkami Maildir
205 Group:          Applications/Mail
206 Requires:       %{name} = %{version}-%{release}
207
208 %description maildir-tools
209 This package contains tools for mail folders in Maildir format.
210
211 %description maildir-tools -l pl.UTF-8
212 Ten pakiet zawiera narzędzia do zarządzania folderami w formacie
213 Maildir.
214
215 %package mlm
216 Summary:        Courier Integrated Mailing List Manager
217 Summary(pl.UTF-8):      Zintegrowany zarządca list dyskusyjnych do Couriera
218 Group:          Applications/Mail
219 Requires:       %{name} = %{version}-%{release}
220
221 %description mlm
222 This package installs couriermlm - a mailing list manager for the
223 Courier mail server. If you do not need the ability to manage mailing
224 lists, you do not need to install this package.
225
226 couriermlm is used to set up, maintain, and run a mailing list.
227 couriermlm automatically processes subscription and unsubscription
228 requests, and removes undeliverable addresses from the subscription
229 rolls. Mailing lists managed by couriermlm require zero human
230 administrative oversight. couriermlm supports digests, write-only
231 posting aliases, and moderated mailing lists.
232
233 %description mlm -l pl.UTF-8
234 Ten pakiet zawiera couriermlm - program do zarządzania listami
235 dyskusyjnymi dla Couriera. couriermlm jest używany do konfigurowania,
236 zarządzania i prowadzenia pocztowej listy dyskusyjnej. Automatycznie
237 obsługuje żądania zapisywania i wypisywania oraz usuwa z listy
238 niedziałające adresy subskrybentów. Listy obsługiwane przez couriermlm
239 nie wymagają pracy administratora. couriermlm obsługuje digesty,
240 aliasy pocztowe tylko do wysyłania i listy moderowane.
241
242 %package maildrop
243 Summary:        Courier Integrated mail filter
244 Summary(pl.UTF-8):      Zintegrowany filtr poczty do Couriera
245 Group:          Applications/Mail
246 Requires:       %{name} = %{version}-%{release}
247
248 %description maildrop
249 This package installs Courier mail server's integrated mail filter.
250 You need to install this package if you want to be able to filter your
251 incoming mail.
252
253 %description maildrop -l pl.UTF-8
254 Ten pakiet zawiera zintegrowany filtr poczty dla Couriera. Jest
255 potrzebny do filtrowania przychodzącej poczty.
256
257 %prep
258 %setup -q
259 #%patch0 -p1
260 %{!?with_fam:%patch1 -p1}
261 %patch2 -p1
262 %patch3 -p1
263 %patch4 -p1
264 %patch5 -p1
265 %patch6 -p1
266
267 echo "
268 Alias /webmail %{_imagedir}
269 <Directory %{_imagedir}>
270         AllowOverride None
271         Options None
272         # FIXME: is allow from all the most safest way?
273         Allow from all
274 </Directory>
275 " > apache.conf
276
277 %build
278 # we don't want fax module
279 rm -rf courier/module.fax
280 cp -f /usr/share/automake/config.sub webmail
281
282 # Change Makefile.am files and force recreate Makefile.in's.
283 OLDDIR=`pwd`
284 find -type f -a \( -name configure.in -o -name configure.ac \) | while read FILE; do
285         cd "`dirname "$FILE"`"
286
287         if [ -f Makefile.am ]; then
288                 sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am
289         fi
290
291         %{__libtoolize}
292         %{__aclocal}
293         %{__autoconf}
294         if grep -q AC_CONFIG_HEADER configure.in; then
295                 %{__autoheader}
296         fi
297         %{__automake}
298
299         cd "$OLDDIR"
300 done
301
302 %configure \
303         --localstatedir=%{_localstatedir} \
304         --sysconfdir=%{_sysconfdir} \
305         --mandir=%{_mandir} \
306         --enable-imagedir=%{_imagedir} \
307         --enable-imageurl=%{_imageurl} \
308         --with-certsdir=%{_certsdir} \
309         --with-db=db \
310         --with-mailer=%{_sbindir}/sendmail \
311         --with-mailuser=daemon \
312         --with-mailgroup=daemon \
313         --with-mailuid=2 \
314         --with-mailgid=2
315
316 %{__make} -j1
317 %{!?with_tests:%{__make} -j1 check}
318
319 %install
320 rm -rf $RPM_BUILD_ROOT
321 umask 022
322 install -d -p $RPM_BUILD_ROOT/etc/{cron.hourly,pam.d,rc.d/init.d} \
323         $RPM_BUILD_ROOT{%{_prefix}/lib,%{_cgibindir},%{_webapps}/courier-webmail,%{_sysconfdir}/hosteddomains} \
324         $RPM_BUILD_ROOT{/etc/cron.hourly,%{_certsdir}}
325
326 %{__make} -j1 install \
327         DESTDIR=$RPM_BUILD_ROOT
328
329 # fix pam problem
330 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.authpam
331 for X in imap esmtp pop3 webmail calendar
332 do
333         cat > $RPM_BUILD_ROOT/etc/pam.d/$X <<'EOF'
334 #%PAM-1.0
335 auth    required        pam_unix.so shadow nullok
336 account required        pam_unix.so
337 session required        pam_unix.so
338 EOF
339 done
340
341 # delete dead links
342 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dotforward.1 \
343 $RPM_BUILD_ROOT%{_mandir}/man1/rmail.1 \
344 $RPM_BUILD_ROOT%{_mandir}/man8/esmtpd-msa.8 \
345 $RPM_BUILD_ROOT%{_mandir}/man8/makesmtpaccess-msa.8 \
346 $RPM_BUILD_ROOT%{_mandir}/man8/filterctl.8 \
347 $RPM_BUILD_ROOT%{_mandir}/man8/makeuucpneighbors.8 \
348 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3login.8
349
350 # make man links
351 echo '.so dot-forward.1' > $RPM_BUILD_ROOT%{_mandir}/man1/dotforward.1
352 echo '.so sendmail.1' > $RPM_BUILD_ROOT%{_mandir}/man1/rmail.1
353 echo '.so esmtpd.8' > $RPM_BUILD_ROOT%{_mandir}/man8/esmtpd-msa.8
354 echo '.so courierfilter.8' > $RPM_BUILD_ROOT%{_mandir}/man8/filterctl.8
355 echo '.so makesmtpaccess.8' > $RPM_BUILD_ROOT%{_mandir}/man8/makesmtpaccess-msa.8
356 echo '.so courieruucp.8' > $RPM_BUILD_ROOT%{_mandir}/man8/makeuucpneighbors.8
357 echo '.so courierpop3d.8' > $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3login.8
358
359 %{__make} install-perms
360
361 # Move webmail and webadmin to cgibindir
362 mv -f $RPM_BUILD_ROOT%{_libdir}/courier/webmail/webmail \
363         $RPM_BUILD_ROOT%{_cgibindir}/webmail
364 mv -f $RPM_BUILD_ROOT%{_libdir}/courier/webmail/webadmin \
365         $RPM_BUILD_ROOT%{_cgibindir}/webadmin
366
367 # install a cron job to clean out webmail's cache
368 install webmail/cron.cmd $RPM_BUILD_ROOT/etc/cron.hourly/courier-webmail-cleancache
369
370 # Move .html documentation back to build dir, so that RPM will move it to
371 # the appropriate docdir
372
373 rm -rf htmldoc
374 mkdir htmldoc
375 mv -f $RPM_BUILD_ROOT%{_datadir}/htmldoc/* htmldoc
376 chmod a-w htmldoc/*
377
378 # Manually set POP3DSTART and IMAPDSTART to yes, they'll go into a separate
379 # package, so after it's installed they should be runnable.
380
381 sed -i 's/^POP3DSTART.*/POP3DSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
382 sed -i 's/^POP3DSSLSTART.*/POP3DSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
383 sed -i 's/^IMAPDSTART.*/IMAPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
384 sed -i 's/^IMAPDSSLSTART.*/IMAPDSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
385
386 # Want to have esmtpd running by default
387 sed -i 's/^ESMTPDSTART.*/ESMTPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/esmtpd.dist
388
389 # run script from install-configure (make config files)
390 for confdist in `awk ' $5 == "config" && $1 ~ /\.dist$/ { print $1 }' <permissions.dat`
391 do %{__perl} ././sysconftool $RPM_BUILD_ROOT$confdist
392 done
393
394 # make locals, esmtpacceptmailfor.dir/default
395 touch $RPM_BUILD_ROOT%{_sysconfdir}/esmtpacceptmailfor.dir/default
396 touch $RPM_BUILD_ROOT%{_sysconfdir}/locals
397
398 # file with important options
399 cat > $RPM_BUILD_ROOT%{_sysconfdir}/bofh <<EOF
400 # enable this option if you want to pass bad converted mails
401 # opt BOFHBADMIME=accept
402 EOF
403
404 # Make password and unsecureok (files for webadmin)
405 touch $RPM_BUILD_ROOT%{_sysconfdir}/webadmin/password
406 touch $RPM_BUILD_ROOT%{_sysconfdir}/webadmin/unsecureok
407
408 # create file me to put localdomain
409 touch $RPM_BUILD_ROOT%{_sysconfdir}/me
410
411 # create calendarmode
412 touch $RPM_BUILD_ROOT%{_sysconfdir}/calendarmode
413
414 install courier.sysvinit $RPM_BUILD_ROOT/etc/rc.d/init.d/courier
415
416 # sendmail soft links
417 ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_prefix}/lib/sendmail
418
419 # fix rmail link
420 rm -f $RPM_BUILD_ROOT%{_bindir}/rmail
421 ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/rmail
422
423 # This link by default is missing
424 ln -sf %{_datadir}/esmtpd-ssl $RPM_BUILD_ROOT%{_sbindir}/esmtpd-ssl
425
426 # for apache
427 install apache.conf $RPM_BUILD_ROOT%{_webapps}/courier-webmail/apache.conf
428 install apache.conf $RPM_BUILD_ROOT%{_webapps}/courier-webmail/httpd.conf
429
430 # remove unpackaged files
431 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.dist
432 rm -rf $RPM_BUILD_ROOT%{_datadir}/faxmail
433 rm -f $RPM_BUILD_ROOT%{_datadir}/courierwebadmin/*fax*
434
435 %clean
436 rm -rf $RPM_BUILD_ROOT
437
438 %triggerin -- courier < 0.45.5
439 echo
440 echo Directory with certificates has changed to %{_certsdir}
441 echo
442
443 %post
444 if [ "$1" = "1" ]; then
445         [ -s %{_sysconfdir}/me ] || /bin/hostname -f > %{_sysconfdir}/me
446         %banner -e %{name} <<'EOF'
447
448 Now courier will refuse to accept SMTP messages except to localhost
449 add hosts to %{_sysconfdir}/esmtpacceptmailfor.dir/default
450 run makeacceptmailfor
451
452 Add hosts to %{_sysconfdir}/locals you want to accept mail for
453 run makealiases
454
455 Enter user, who should receive mail for root, mailer-daemon and postmaster
456 into %{_sysconfdir}/aliases/system
457
458 Default maildir is in ~/Mail/Maildir
459
460 EOF
461 fi
462
463 /sbin/chkconfig --add courier
464 %service courier restart
465
466 %preun
467 if [ "$1" = "0" ]; then
468         %service courier stop
469         /sbin/chkconfig --del courier
470 fi
471
472 %post imapd
473 # TODO: use rc-scripts here
474 if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
475         %{_sbindir}/imapd stop
476         %{_sbindir}/imapd start
477 else
478         echo
479         echo 'Type "%{_sbindir}/imapd start" to start imapd server'
480         echo
481 fi
482 if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
483         %{_sbindir}/imapd-ssl stop
484         %{_sbindir}/imapd-ssl start
485 else
486         echo
487         echo Type "%{_sbindir}/imapd-ssl start" to start imapd-ssl server
488         echo
489 fi
490
491 %preun imapd
492 if [ "$1" = "0" ]; then
493         if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
494                 %{_sbindir}/imapd stop
495         fi
496         if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
497                 %{_sbindir}/imapd-ssl stop
498         fi
499 fi
500
501 %post pop3d
502 if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
503         %{_sbindir}/pop3d stop
504         %{_sbindir}/pop3d start
505 else
506         echo
507         echo 'Type "%{_sbindir}/pop3d start" to start pop3d server'
508         echo
509 fi
510 if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
511         %{_sbindir}/pop3d-ssl stop
512         %{_sbindir}/pop3d-ssl start
513 else
514         echo
515         echo 'Type "%{_sbindir}/pop3d-ssl start" to start pop3d-ssl server'
516         echo
517 fi
518
519 %preun pop3d
520 if [ "$1" = "0" ]; then
521         if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
522                 %{_sbindir}/pop3d stop
523         fi
524         if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
525                 %{_sbindir}/pop3d-ssl stop
526         fi
527 fi
528
529 %post webadmin
530 if [ "$1" = "1" ]; then
531         echo
532         echo Remember to put your webadmin password to %{_sysconfdir}/webadmin/password
533         echo
534 fi
535
536 %post webmail
537 if [ "$1" = "1" ]; then
538         echo
539         echo If you want to have calendar starting by default then
540         echo put word net to %{_sysconfdir}/calendarmode
541         echo
542 fi
543 if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
544         %{_sbindir}/webmaild stop
545         %{_sbindir}/webmaild start
546 else
547         echo
548         echo 'Type "%{_sbindir}/webmaild start" to start webmail server'
549         echo
550 fi
551
552 %preun webmail
553 if [ "$1" = "0" ]; then
554         if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
555                 %{_sbindir}/webmaild stop
556         fi
557 fi
558
559 %triggerin webmail -- apache1 < 1.3.37-3, apache1-base
560 %webapp_register apache courier-webmail
561
562 %triggerun webmail -- apache1 < 1.3.37-3, apache1-base
563 %webapp_unregister apache courier-webmail
564
565 %triggerin webmail -- apache < 2.2.0, apache-base
566 %webapp_register httpd courier-webmail
567
568 %triggerun webmail -- apache < 2.2.0, apache-base
569 %webapp_unregister httpd courier-webmail
570
571 %triggerpostun webmail -- courier-webmail < 0.52.2-0.2
572 # migrate from apache-config macros
573 if [ -f /etc/courier/apache-courier.conf.rpmsave ]; then
574         if [ -d /etc/apache/webapps.d ]; then
575                 cp -f %{_webapps}/courier-webmail/apache.conf{,.rpmnew}
576                 cp -f /etc/courier/apache-courier.conf.rpmsave %{_webapps}/courier-webmail/apache.conf
577         fi
578
579         if [ -d /etc/httpd/webapps.d ]; then
580                 cp -f %{_webapps}/courier-webmail/httpd.conf{,.rpmnew}
581                 cp -f /etc/courier/apache-courier.conf.rpmsave %{_webapps}/courier-webmail/httpd.conf
582         fi
583         rm -f /etc/courier/apache-courier.conf.rpmsave
584 fi
585
586 # migrating apache-config symlinks
587 if [ -L /etc/apache/conf.d/99_courier.conf ]; then
588         rm -f /etc/apache/conf.d/99_courier.conf
589         /usr/sbin/webapp register apache courier-webmail
590         %service -q apache reload
591 fi
592 if [ -L /etc/httpd/httpd.conf/99_courier.conf ]; then
593         rm -f /etc/httpd/httpd.conf/99_courier.conf
594         /usr/sbin/webapp register httpd courier-webmail
595         %service -q httpd reload
596 fi
597
598 %files
599 %defattr(644,root,root,755)
600 %doc AUTHORS BENCHMARKS ChangeLog INSTALL NEWS README TODO htmldoc/[adehqstu]*
601 %doc htmldoc/courierperl* htmldoc/courier.html htmldoc/courier[fltu]*
602 %doc htmldoc/local* htmldoc/mailbot* htmldoc/mailq* htmldoc/make*
603 %doc htmldoc/mime* htmldoc/mkesmtpd* htmldoc/modules* htmldoc/preline*
604 %{_mandir}/man1/sendmail.1*
605 %{_mandir}/man1/preline.1*
606 %{_mandir}/man1/cancelmsg.1*
607 %{_mandir}/man1/lockmail.1*
608 %{_mandir}/man1/mailbot.1*
609 %{_mandir}/man1/makemime.1*
610 %{_mandir}/man1/mimegpg.1*
611 %{_mandir}/man1/makedat.1*
612 %{_mandir}/man1/testmxlookup.1*
613 %{_mandir}/man1/dot-forward.1*
614 %{_mandir}/man1/couriertls.1*
615 %{_mandir}/man1/mailq*
616 %{_mandir}/man1/couriertcpd*
617 %{_mandir}/man1/dotforward.1*
618 %{_mandir}/man1/rmail.1*
619 %{_mandir}/man5/dot-courier.5*
620 %{_mandir}/man7/localmailfilter.7*
621 %{_mandir}/man8/courierfilter.8*
622 %{_mandir}/man8/courierperlfilter.8*
623 %{_mandir}/man8/dupfilter.8*
624 %{_mandir}/man8/courier.8*
625 %{_mandir}/man8/courierldapaliasd.8*
626 %{_mandir}/man8/deliverquota.8*
627 %{_mandir}/man8/esmtpd.8*
628 %{_mandir}/man8/makeacceptmailfor.8*
629 %{_mandir}/man8/makehosteddomains.8*
630 %{_mandir}/man8/mkesmtpdcert.8*
631 %{_mandir}/man8/makealiases.8*
632 %{_mandir}/man8/makepercentrelay.8*
633 %{_mandir}/man8/makesmtpaccess.8*
634 %{_mandir}/man8/submit.8*
635 %{_mandir}/man8/courieruucp.8*
636 %{_mandir}/man8/esmtpd-msa.8*
637 %{_mandir}/man8/filterctl.8*
638 %{_mandir}/man8/makesmtpaccess-msa.8*
639 %{_mandir}/man8/makeuucpneighbors.8*
640 %attr(755,daemon,daemon) %dir %{_sysconfdir}
641 %attr(750,daemon,daemon) %dir %{_certsdir}
642 %attr(755,daemon,daemon) %dir %{_sysconfdir}/hosteddomains
643 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/me
644 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldapaddressbook
645 %attr(755,daemon,daemon) %dir %{_sysconfdir}/aliasdir
646 %attr(750,daemon,daemon) %dir %{_sysconfdir}/aliases
647 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/enablefiltering
648 %attr(755,daemon,daemon) %dir %{_sysconfdir}/smtpaccess
649 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smtpaccess/default
650 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpacceptmailfor.dir/default
651 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bofh
652 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locals
653 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/courierd
654 %attr(640,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/aliases/system
655 %{_sysconfdir}/quotawarnmsg.example
656 %dir %{_libdir}
657 %dir %{_libdir}/courier
658 %dir %{_datadir}
659 %attr(755,root,root) %dir %{_datadir}/courierwebadmin
660 %{_datadir}/courierwebadmin/admin-15*
661 %dir %{_libdir}/filters
662 %attr(755,daemon,daemon) %{_libdir}/filters/*
663 %attr(755,daemon,daemon) %{_datadir}/perlfilter-*.pl
664 %attr(755,bin,bin) %dir %{_localstatedir}
665 %attr(770,daemon,daemon) %dir %{_localstatedir}/tmp
666 %attr(750,daemon,daemon) %dir %{_localstatedir}/msgs
667 %attr(750,daemon,daemon) %dir %{_localstatedir}/msgq
668 %attr(750,daemon,daemon) %dir %{_localstatedir}/filters
669 %attr(750,daemon,daemon) %dir %{_localstatedir}/allfilters
670 %attr(750,daemon,daemon) %dir %{_sysconfdir}/filters
671 %attr(750,daemon,daemon) %dir %{_sysconfdir}/filters/active
672 %attr(754,root,daemon) %{_datadir}/filterctl
673 %attr(754,root,daemon) %{_sbindir}/filterctl
674 %attr(754,root,daemon) %{_sbindir}/courierfilter
675 %dir %{_libdir}/courier/modules
676 %dir %{_libdir}/courier/modules/uucp
677 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.uucp
678 %attr(755,root,root) %{_libdir}/courier/modules/uucp/courieruucp
679 %attr(755,root,root) %{_sbindir}/makeuucpneighbors
680 %attr(755,root,root) %{_datadir}/makeuucpneighbors
681 %dir %{_libdir}/courier/modules/local
682 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.local
683 %attr(755,root,root) %{_libdir}/courier/modules/local/courierlocal
684 %attr(755,root,root) %{_libdir}/courier/modules/local/courierdeliver
685 %attr(755,root,root) %{_bindir}/preline
686 %dir %{_libdir}/courier/modules/esmtp
687 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.esmtp
688 %attr(750,root,daemon) %{_libdir}/courier/modules/esmtp/courieresmtp
689 %attr(750,root,daemon) %{_libdir}/courier/modules/esmtp/courieresmtpd
690 %attr(755,root,root) %{_libdir}/courier/modules/esmtp/addcr
691 %attr(755,root,root) %{_sbindir}/courieresmtpd
692 %attr(755,root,root) %{_bindir}/addcr
693 %attr(755,root,root) %{_sbindir}/esmtpd
694 %attr(755,root,root) %{_datadir}/esmtpd
695 %attr(755,root,root) %{_sbindir}/esmtpd-ssl
696 %attr(755,root,root) %{_datadir}/esmtpd-ssl
697 %attr(755,root,root) %{_sbindir}/makesmtpaccess
698 %attr(755,root,root) %{_datadir}/makesmtpaccess
699 %attr(755,root,root) %{_sbindir}/makeacceptmailfor
700 %attr(755,root,root) %{_datadir}/makeacceptmailfor
701 %attr(755,root,root) %{_sbindir}/makepercentrelay
702 %attr(755,root,root) %{_datadir}/makepercentrelay
703 %attr(755,root,root) %{_sbindir}/mkesmtpdcert
704 %attr(755,root,root) %{_datadir}/mkesmtpdcert
705 %attr(755,root,root) %{_sbindir}/esmtpd-msa
706 %attr(755,root,root) %{_sbindir}/makesmtpaccess-msa
707 %attr(755,root,root) %{_sbindir}/sharedindexinstall
708 %attr(755,root,root) %{_sbindir}/sharedindexsplit
709 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd
710 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd-msa
711 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd-ssl
712 %attr(755,daemon,daemon) %dir %{_sysconfdir}/esmtpacceptmailfor.dir
713 %attr(755,daemon,daemon) %dir %{_sysconfdir}/esmtppercentrelay.dir
714 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd.cnf
715 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpauthclient
716 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsndelayed.txt
717 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsndelivered.txt
718 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnfailed.txt
719 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnrelayed.txt
720 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnfooter.txt
721 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnsubjectnotice.txt
722 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnsubjectwarn.txt
723 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnheader.txt
724 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.dsn
725 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rfcerr*.txt
726 %dir %{_libdir}/courier/modules/dsn
727 %attr(755,root,root) %{_libdir}/courier/modules/dsn/courierdsn
728 %attr(4550,daemon,daemon) %{_libdir}/courier/submitmkdir
729 %attr(750,daemon,daemon) %{_libdir}/courier/courierd
730 %attr(750,daemon,daemon) %{_libdir}/courier/aliasexp
731 %attr(750,daemon,daemon) %{_libdir}/courier/aliascombine
732 %attr(750,daemon,daemon) %{_libdir}/courier/aliascreate
733 %attr(750,daemon,daemon) %{_libdir}/courier/submit
734 %attr(755,daemon,daemon) %{_libdir}/courier/makedatprog
735 %attr(6555,daemon,daemon) %{_bindir}/cancelmsg
736 %attr(755,root,root) %{_sbindir}/courier
737 %attr(755,root,root) %{_datadir}/courierctl.start
738 %attr(755,root,root) %{_bindir}/couriertls
739 %attr(755,root,root) %{_sbindir}/couriertcpd
740 %attr(755,root,root) %{_bindir}/courier-config
741 %attr(755,root,root) %{_bindir}/deliverquota
742 %attr(755,root,root) %{_bindir}/dotforward
743 %attr(755,root,root) %{_bindir}/lockmail
744 %attr(755,root,root) %{_bindir}/mailbot
745 %attr(2755,daemon,daemon) %{_bindir}/mailq
746 %attr(750,root,daemon) %{_datadir}/makealiases
747 %attr(750,root,daemon) %{_sbindir}/makealiases
748 %attr(755,root,root) %{_datadir}/makedat
749 %attr(755,root,root) %{_bindir}/makedat
750 %attr(755,root,root) %{_datadir}/makehosteddomains
751 %attr(755,root,root) %{_sbindir}/makehosteddomains
752 %attr(755,root,root) %{_bindir}/makemime
753 %attr(755,root,root) %{_bindir}/mimegpg
754 %attr(4755,root,root) %{_bindir}/rmail
755 %attr(755,root,root) %{_sbindir}/showconfig
756 %attr(750,root,daemon) %{_sbindir}/showmodules
757 %attr(4755,root,root) %{_sbindir}/sendmail
758 %attr(755,root,root) %{_bindir}/testmxlookup
759 %attr(640,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldapaliasrc
760 %attr(700,daemon,daemon) %{_sbindir}/courierldapaliasd
761 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/esmtp
762 %attr(754,root,root) /etc/rc.d/init.d/courier
763 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
764 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
765 %attr(755,daemon,daemon) %dir %{_localstatedir}/track
766 %attr(755,root,root) %{_prefix}/lib/sendmail
767
768 %files pop3d
769 %defattr(644,root,root,755)
770 %doc htmldoc/*pop3d*
771 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/pop3
772 %{_mandir}/man8/courierpop3d.8*
773 %{_mandir}/man8/courierpop3login.8*
774 %{_mandir}/man8/mkpop3dcert.8*
775 %{_mandir}/man8/pop3d.8*
776 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-45pop3.pl
777 %{_datadir}/courierwebadmin/admin-45pop3.html
778 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d
779 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d.cnf
780 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d-ssl
781 %attr(755,root,root) %{_libdir}/courier/courierpop3d
782 %attr(755,root,root) %{_libdir}/courier/courierpop3login
783 %attr(755,root,root) %{_datadir}/mkpop3dcert
784 %attr(755,root,root) %{_sbindir}/mkpop3dcert
785 %attr(755,root,root) %{_datadir}/pop3d
786 %attr(755,root,root) %{_sbindir}/pop3d
787 %attr(755,root,root) %{_datadir}/pop3d-ssl
788 %attr(755,root,root) %{_sbindir}/pop3d-ssl
789
790 %files imapd
791 %defattr(644,root,root,755)
792 %doc htmldoc/*imapd*
793 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/imap
794 %{_mandir}/man8/imapd.8*
795 %{_mandir}/man8/mkimapdcert.8*
796 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-40imap.pl
797 %{_datadir}/courierwebadmin/admin-40imap.html
798 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd
799 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd-ssl
800 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd.cnf
801 %attr(755,root,root) %{_libdir}/courier/imaplogin
802 %attr(755,root,root) %{_sbindir}/imapd
803 %attr(755,root,root) %{_sbindir}/imapd-ssl
804 %attr(755,root,root) %{_datadir}/imapd
805 %attr(755,root,root) %{_datadir}/imapd-ssl
806 %attr(755,root,root) %{_bindir}/imapd
807 %attr(755,root,root) %{_datadir}/mkimapdcert
808 %attr(755,root,root) %{_sbindir}/mkimapdcert
809
810 %files webadmin
811 %defattr(644,root,root,755)
812 # suid root to cgi-bin??? and it's not secured by apache config!
813 %attr(4755,root,root) %{_cgibindir}/webadmin
814 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin
815 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin/added
816 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin/removed
817 %attr(400,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/webadmin/password
818 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/webadmin/unsecureok
819 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-main.pl
820 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-save.pl
821 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-cancel.pl
822 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-[0235]*.pl
823 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-10password.pl
824 %attr(755,root,root) %{_datadir}/courierwebadmin/dumpenv.pl
825 %attr(755,root,root) %{_datadir}/courierwebadmin/webadmin.pl
826 %{_datadir}/courierwebadmin/admin-[0235]*.html
827 %{_datadir}/courierwebadmin/admin-10password.html
828 %{_datadir}/courierwebadmin/admin-main.html
829 %{_datadir}/courierwebadmin/admin-save.html
830 %{_datadir}/courierwebadmin/login.html
831 %{_datadir}/courierwebadmin/notsupp.html
832 %{_datadir}/courierwebadmin/unsecure.html
833 %{_datadir}/courierwebadmin/webadmin.pm
834
835 %files webmail
836 %defattr(644,root,root,755)
837 %doc htmldoc/pcp* gpglib/README.html
838 %attr(755,root,root) %{_cgibindir}/webmail
839 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/webmail
840 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/calendar
841 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sqwebmaild
842 %attr(755,root,root) %{_sbindir}/webmaild
843 %dir %{_datadir}/sqwebmail
844 %dir %{_datadir}/sqwebmail/html
845 %dir %{_datadir}/sqwebmail/html/en-us
846 %{_datadir}/sqwebmail/html/en
847 %{_datadir}/sqwebmail/images
848 %config %{_datadir}/sqwebmail/html/en-us/[CILT]*
849 %{_datadir}/sqwebmail/html/en-us/*.html
850 %{_datadir}/sqwebmail/html/en-us/*.txt
851 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-47webmail.pl
852 %{_datadir}/courierwebadmin/admin-47webmail.html
853 %attr(755,root,root) %{_datadir}/sqwebmail/cleancache.pl
854 %attr(755,root,root) %{_datadir}/sqwebmail/ldapsearch
855 %attr(755,root,root) %{_datadir}/sqwebmail/sendit.sh
856 %attr(755,root,root) %{_datadir}/sqwebmail/webgpg
857 %attr(755,root,root) %{_sbindir}/webgpg
858 %attr(755,root,root) %{_libdir}/courier/pcpd
859 %attr(755,root,root) %{_libdir}/courier/sqwebmaild
860 %attr(755,root,root) %{_libdir}/courier/sqwebpasswd
861 %attr(700, bin, bin) %dir %{_localstatedir}/webmail-logincache
862 %attr(755,root,root) /etc/cron.hourly/courier-webmail-cleancache
863 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/calendarmode
864 %attr(755,bin,daemon) %dir %{_localstatedir}/calendar
865 %attr(700,bin,daemon) %dir %{_localstatedir}/calendar/localcache
866 %attr(750,bin,daemon) %dir %{_localstatedir}/calendar/private
867 %attr(755,bin,daemon) %dir %{_localstatedir}/calendar/public
868 %dir %attr(750,root,http) %{_webapps}/courier-webmail
869 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/courier-webmail/apache.conf
870 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/courier-webmail/httpd.conf
871
872 %files maildrop
873 %defattr(644,root,root,755)
874 %doc htmldoc/r* htmldoc/maildrop* htmldoc/lockmail*
875 %{_mandir}/man1/maildrop.1*
876 %{_mandir}/man1/refor*
877 %{_mandir}/man7/maildrop*
878 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/maildrop
879 %attr(4755,root,root) %{_bindir}/maildrop
880 %attr(755,root,root) %{_bindir}/reformail
881 %attr(755,root,root) %{_bindir}/reformime
882
883 %files maildir-tools
884 %defattr(644,root,root,755)
885 %doc maildir/README.*.html htmldoc/maildir*
886 %{_mandir}/man1/maildirmake.1*
887 %{_mandir}/man1/maildirkw.1*
888 %{_mandir}/man1/maildiracl.1*
889 %{_mandir}/man5/maildir.5*
890 %{_mandir}/man7/maildirquota.7*
891 %attr(755,root,root) %{_bindir}/maildirmake
892 %attr(755,root,root) %{_bindir}/maildirkw
893 %attr(755,root,root) %{_bindir}/maildiracl
894
895 %files mlm
896 %defattr(644,root,root,755)
897 %doc htmldoc/couriermlm.html
898 %{_mandir}/man1/couriermlm.1*
899 %attr(755,root,root) %{_bindir}/couriermlm
900 %{_datadir}/couriermlm
This page took 2.759637 seconds and 4 git commands to generate.