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