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