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