]> git.pld-linux.org Git - packages/courier.git/blob - courier.spec
4a4dcb16223c5c150aaa2e49ddf834dee38b6820
[packages/courier.git] / courier.spec
1 # TODO
2 # - doesn't -webadmin need webserver integration?
3 # - use rc-scripts in %%post scriptlets
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:        4
14 License:        GPL
15 Group:          Networking/Daemons
16 Source0:        http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
17 # Source0-md5:  73cda41adc5425ade94e1f9005b2218b
18 Patch0:         %{name}-openssl-path.patch
19 Patch1:         %{name}-withoutfam.patch
20 Patch2:         %{name}-maildir.patch
21 Patch3:         %{name}-sendmail_dir.patch
22 Patch4:         %{name}-start_scripts.patch
23 Patch5:         %{name}-certs.patch
24 Patch6:         %{name}-db.patch
25 URL:            http://www.courier-mta.org/
26 BuildRequires:  autoconf
27 BuildRequires:  automake
28 BuildRequires:  courier-authlib-devel >= 0.57
29 BuildRequires:  expect
30 %{?with_fam:BuildRequires:      fam-devel}
31 BuildRequires:  gettext-devel
32 BuildRequires:  libstdc++-devel
33 BuildRequires:  libtool
34 BuildRequires:  mailcap
35 BuildRequires:  openldap-devel >= 2.3.0
36 BuildRequires:  openssl-devel >= 0.9.7d
37 BuildRequires:  openssl-tools >= 0.9.7d
38 BuildRequires:  openssl-tools-perl >= 0.9.7d
39 BuildRequires:  pam-devel
40 BuildRequires:  pcre-devel
41 BuildRequires:  perl-devel
42 BuildRequires:  rpmbuild(macros) >= 1.268
43 BuildRequires:  sed >= 4.0
44 BuildRequires:  sysconftool
45 Requires(post,preun):   /sbin/chkconfig
46 Requires:       rc-scripts
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:       filesystem >= 3.0-11
166 Requires:       webapps
167 Requires:       webserver = apache
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:       filesystem >= 3.0-11
184 Requires:       webapps
185 Requires:       webserver = apache
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 %{__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 if [ "$1" = "1" ]; then
450         [ -s %{_sysconfdir}/me ] || /bin/hostname -f > %{_sysconfdir}/me
451         %banner -e %{name} <<'EOF'
452
453 Now courier will refuse to accept SMTP messages except to localhost
454 add hosts to %{_sysconfdir}/esmtpacceptmailfor.dir/default
455 run makeacceptmailfor
456
457 Add hosts to %{_sysconfdir}/locals you want to accept mail for
458 run makealiases
459
460 Enter user, who should receive mail for root, mailer-daemon and postmaster
461 into %{_sysconfdir}/aliases/system
462
463 Default maildir is in ~/Mail/Maildir
464
465 EOF
466 fi
467
468 /sbin/chkconfig --add courier
469 %service courier restart
470
471 %preun
472 if [ "$1" = "0" ]; then
473         %service courier stop
474         /sbin/chkconfig --del courier
475 fi
476
477 %post imapd
478 # TODO: use rc-scripts here
479 if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
480         %{_sbindir}/imapd stop
481         %{_sbindir}/imapd start
482 else
483         echo
484         echo 'Type "%{_sbindir}/imapd start" to start imapd server'
485         echo
486 fi
487 if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
488         %{_sbindir}/imapd-ssl stop
489         %{_sbindir}/imapd-ssl start
490 else
491         echo
492         echo Type "%{_sbindir}/imapd-ssl start" to start imapd-ssl server
493         echo
494 fi
495
496 %preun imapd
497 if [ "$1" = "0" ]; then
498         if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
499                 %{_sbindir}/imapd stop
500         fi
501         if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
502                 %{_sbindir}/imapd-ssl stop
503         fi
504 fi
505
506 %post pop3d
507 if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
508         %{_sbindir}/pop3d stop
509         %{_sbindir}/pop3d start
510 else
511         echo
512         echo 'Type "%{_sbindir}/pop3d start" to start pop3d server'
513         echo
514 fi
515 if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
516         %{_sbindir}/pop3d-ssl stop
517         %{_sbindir}/pop3d-ssl start
518 else
519         echo
520         echo 'Type "%{_sbindir}/pop3d-ssl start" to start pop3d-ssl server'
521         echo
522 fi
523
524 %preun pop3d
525 if [ "$1" = "0" ]; then
526         if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
527                 %{_sbindir}/pop3d stop
528         fi
529         if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
530                 %{_sbindir}/pop3d-ssl stop
531         fi
532 fi
533
534 %post webadmin
535 if [ "$1" = "1" ]; then
536         echo
537         echo Remember to put your webadmin password to %{_sysconfdir}/webadmin/password
538         echo
539 fi
540
541 %post webmail
542 if [ "$1" = "1" ]; then
543         echo
544         echo If you want to have calendar starting by default then
545         echo put word net to %{_sysconfdir}/calendarmode
546         echo
547 fi
548 if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
549         %{_sbindir}/webmaild stop
550         %{_sbindir}/webmaild start
551 else
552         echo
553         echo 'Type "%{_sbindir}/webmaild start" to start webmail server'
554         echo
555 fi
556
557 %preun webmail
558 if [ "$1" = "0" ]; then
559         if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
560                 %{_sbindir}/webmaild stop
561         fi
562 fi
563
564 %triggerin webmail -- apache1 < 1.3.37-3, apache1-base
565 %webapp_register apache courier-webmail
566
567 %triggerun webmail -- apache1 < 1.3.37-3, apache1-base
568 %webapp_unregister apache courier-webmail
569
570 %triggerin webmail -- apache < 2.2.0, apache-base
571 %webapp_register httpd courier-webmail
572
573 %triggerun webmail -- apache < 2.2.0, apache-base
574 %webapp_unregister httpd courier-webmail
575
576 %triggerpostun webmail -- courier-webmail < 0.52.2-0.2
577 # migrate from apache-config macros
578 if [ -f /etc/courier/apache-courier.conf.rpmsave ]; then
579         if [ -d /etc/apache/webapps.d ]; then
580                 cp -f %{_webapps}/courier-webmail/apache.conf{,.rpmnew}
581                 cp -f /etc/courier/apache-courier.conf.rpmsave %{_webapps}/courier-webmail/apache.conf
582         fi
583
584         if [ -d /etc/httpd/webapps.d ]; then
585                 cp -f %{_webapps}/courier-webmail/httpd.conf{,.rpmnew}
586                 cp -f /etc/courier/apache-courier.conf.rpmsave %{_webapps}/courier-webmail/httpd.conf
587         fi
588         rm -f /etc/courier/apache-courier.conf.rpmsave
589 fi
590
591 # migrating apache-config symlinks
592 if [ -L /etc/apache/conf.d/99_courier.conf ]; then
593         rm -f /etc/apache/conf.d/99_courier.conf
594         /usr/sbin/webapp register apache courier-webmail
595         %service -q apache reload
596 fi
597 if [ -L /etc/httpd/httpd.conf/99_courier.conf ]; then
598         rm -f /etc/httpd/httpd.conf/99_courier.conf
599         /usr/sbin/webapp register httpd courier-webmail
600         %service -q httpd reload
601 fi
602
603 %files
604 %defattr(644,root,root,755)
605 %doc AUTHORS BENCHMARKS ChangeLog INSTALL NEWS README TODO htmldoc/[adehqstu]*
606 %doc htmldoc/courierperl* htmldoc/courier.html htmldoc/courier[fltu]*
607 %doc htmldoc/local* htmldoc/mailbot* htmldoc/mailq* htmldoc/make*
608 %doc htmldoc/mime* htmldoc/mkesmtpd* htmldoc/modules* htmldoc/preline*
609 %{_mandir}/man1/sendmail.1*
610 %{_mandir}/man1/preline.1*
611 %{_mandir}/man1/cancelmsg.1*
612 %{_mandir}/man1/lockmail.1*
613 %{_mandir}/man1/mailbot.1*
614 %{_mandir}/man1/makemime.1*
615 %{_mandir}/man1/mimegpg.1*
616 %{_mandir}/man1/makedat.1*
617 %{_mandir}/man1/testmxlookup.1*
618 %{_mandir}/man1/dot-forward.1*
619 %{_mandir}/man1/couriertls.1*
620 %{_mandir}/man1/mailq*
621 %{_mandir}/man1/couriertcpd*
622 %{_mandir}/man1/dotforward.1*
623 %{_mandir}/man1/rmail.1*
624 %{_mandir}/man5/dot-courier.5*
625 %{_mandir}/man7/localmailfilter.7*
626 %{_mandir}/man8/courierfilter.8*
627 %{_mandir}/man8/courierperlfilter.8*
628 %{_mandir}/man8/dupfilter.8*
629 %{_mandir}/man8/courier.8*
630 %{_mandir}/man8/courierldapaliasd.8*
631 %{_mandir}/man8/deliverquota.8*
632 %{_mandir}/man8/esmtpd.8*
633 %{_mandir}/man8/makeacceptmailfor.8*
634 %{_mandir}/man8/makehosteddomains.8*
635 %{_mandir}/man8/mkesmtpdcert.8*
636 %{_mandir}/man8/makealiases.8*
637 %{_mandir}/man8/makepercentrelay.8*
638 %{_mandir}/man8/makesmtpaccess.8*
639 %{_mandir}/man8/submit.8*
640 %{_mandir}/man8/courieruucp.8*
641 %{_mandir}/man8/esmtpd-msa.8*
642 %{_mandir}/man8/filterctl.8*
643 %{_mandir}/man8/makesmtpaccess-msa.8*
644 %{_mandir}/man8/makeuucpneighbors.8*
645 %attr(755,daemon,daemon) %dir %{_sysconfdir}
646 %attr(750,daemon,daemon) %dir %{_certsdir}
647 %attr(755,daemon,daemon) %dir %{_sysconfdir}/hosteddomains
648 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/me
649 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldapaddressbook
650 %attr(755,daemon,daemon) %dir %{_sysconfdir}/aliasdir
651 %attr(750,daemon,daemon) %dir %{_sysconfdir}/aliases
652 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/enablefiltering
653 %attr(755,daemon,daemon) %dir %{_sysconfdir}/smtpaccess
654 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smtpaccess/default
655 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpacceptmailfor.dir/default
656 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bofh
657 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locals
658 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/courierd
659 %attr(640,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/aliases/system
660 %{_sysconfdir}/quotawarnmsg.example
661 %dir %{_libdir}
662 %dir %{_libdir}/courier
663 %dir %{_datadir}
664 %{_datadir}/rootcerts
665 %attr(755,root,root) %dir %{_datadir}/courierwebadmin
666 %{_datadir}/courierwebadmin/admin-15*
667 %dir %{_libdir}/filters
668 %attr(755,daemon,daemon) %{_libdir}/filters/*
669 %attr(755,daemon,daemon) %{_datadir}/perlfilter-*.pl
670 %attr(755,bin,bin) %dir %{_localstatedir}
671 %attr(770,daemon,daemon) %dir %{_localstatedir}/tmp
672 %attr(750,daemon,daemon) %dir %{_localstatedir}/msgs
673 %attr(750,daemon,daemon) %dir %{_localstatedir}/msgq
674 %attr(750,daemon,daemon) %dir %{_localstatedir}/filters
675 %attr(750,daemon,daemon) %dir %{_localstatedir}/allfilters
676 %attr(750,daemon,daemon) %dir %{_sysconfdir}/filters
677 %attr(750,daemon,daemon) %dir %{_sysconfdir}/filters/active
678 %attr(754,root,daemon) %{_datadir}/filterctl
679 %attr(754,root,daemon) %{_sbindir}/filterctl
680 %attr(754,root,daemon) %{_sbindir}/courierfilter
681 %dir %{_libdir}/courier/modules
682 %dir %{_libdir}/courier/modules/uucp
683 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.uucp
684 %attr(755,root,root) %{_libdir}/courier/modules/uucp/courieruucp
685 %attr(755,root,root) %{_sbindir}/makeuucpneighbors
686 %attr(755,root,root) %{_datadir}/makeuucpneighbors
687 %dir %{_libdir}/courier/modules/local
688 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.local
689 %attr(755,root,root) %{_libdir}/courier/modules/local/courierlocal
690 %attr(755,root,root) %{_libdir}/courier/modules/local/courierdeliver
691 %attr(755,root,root) %{_bindir}/preline
692 %dir %{_libdir}/courier/modules/esmtp
693 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.esmtp
694 %attr(750,root,daemon) %{_libdir}/courier/modules/esmtp/courieresmtp
695 %attr(750,root,daemon) %{_libdir}/courier/modules/esmtp/courieresmtpd
696 %attr(755,root,root) %{_libdir}/courier/modules/esmtp/addcr
697 %attr(755,root,root) %{_sbindir}/courieresmtpd
698 %attr(755,root,root) %{_bindir}/addcr
699 %attr(755,root,root) %{_sbindir}/esmtpd
700 %attr(755,root,root) %{_datadir}/esmtpd
701 %attr(755,root,root) %{_sbindir}/esmtpd-ssl
702 %attr(755,root,root) %{_datadir}/esmtpd-ssl
703 %attr(755,root,root) %{_sbindir}/makesmtpaccess
704 %attr(755,root,root) %{_datadir}/makesmtpaccess
705 %attr(755,root,root) %{_sbindir}/makeacceptmailfor
706 %attr(755,root,root) %{_datadir}/makeacceptmailfor
707 %attr(755,root,root) %{_sbindir}/makepercentrelay
708 %attr(755,root,root) %{_datadir}/makepercentrelay
709 %attr(755,root,root) %{_sbindir}/mkesmtpdcert
710 %attr(755,root,root) %{_datadir}/mkesmtpdcert
711 %attr(755,root,root) %{_sbindir}/esmtpd-msa
712 %attr(755,root,root) %{_sbindir}/makesmtpaccess-msa
713 %attr(755,root,root) %{_sbindir}/sharedindexinstall
714 %attr(755,root,root) %{_sbindir}/sharedindexsplit
715 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd
716 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd-msa
717 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd-ssl
718 %attr(755,daemon,daemon) %dir %{_sysconfdir}/esmtpacceptmailfor.dir
719 %attr(755,daemon,daemon) %dir %{_sysconfdir}/esmtppercentrelay.dir
720 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpd.cnf
721 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/esmtpauthclient
722 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsndelayed.txt
723 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsndelivered.txt
724 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnfailed.txt
725 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnrelayed.txt
726 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnfooter.txt
727 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnsubjectnotice.txt
728 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnsubjectwarn.txt
729 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dsnheader.txt
730 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/module.dsn
731 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rfcerr*.txt
732 %dir %{_libdir}/courier/modules/dsn
733 %attr(755,root,root) %{_libdir}/courier/modules/dsn/courierdsn
734 %attr(4550,daemon,daemon) %{_libdir}/courier/submitmkdir
735 %attr(750,daemon,daemon) %{_libdir}/courier/courierd
736 %attr(750,daemon,daemon) %{_libdir}/courier/aliasexp
737 %attr(750,daemon,daemon) %{_libdir}/courier/aliascombine
738 %attr(750,daemon,daemon) %{_libdir}/courier/aliascreate
739 %attr(750,daemon,daemon) %{_libdir}/courier/submit
740 %attr(755,daemon,daemon) %{_libdir}/courier/makedatprog
741 %attr(6555,daemon,daemon) %{_bindir}/cancelmsg
742 %attr(755,root,root) %{_sbindir}/courier
743 %attr(755,root,root) %{_datadir}/courierctl.start
744 %attr(755,root,root) %{_bindir}/couriertls
745 %attr(755,root,root) %{_sbindir}/couriertcpd
746 %attr(755,root,root) %{_bindir}/courier-config
747 %attr(755,root,root) %{_bindir}/deliverquota
748 %attr(755,root,root) %{_bindir}/dotforward
749 %attr(755,root,root) %{_bindir}/lockmail
750 %attr(755,root,root) %{_bindir}/mailbot
751 %attr(2755,daemon,daemon) %{_bindir}/mailq
752 %attr(750,root,daemon) %{_datadir}/makealiases
753 %attr(750,root,daemon) %{_sbindir}/makealiases
754 %attr(755,root,root) %{_datadir}/makedat
755 %attr(755,root,root) %{_bindir}/makedat
756 %attr(755,root,root) %{_datadir}/makehosteddomains
757 %attr(755,root,root) %{_sbindir}/makehosteddomains
758 %attr(755,root,root) %{_bindir}/makemime
759 %attr(755,root,root) %{_bindir}/mimegpg
760 %attr(4755,root,root) %{_bindir}/rmail
761 %attr(755,root,root) %{_sbindir}/showconfig
762 %attr(750,root,daemon) %{_sbindir}/showmodules
763 %attr(4755,root,root) %{_sbindir}/sendmail
764 %attr(755,root,root) %{_bindir}/testmxlookup
765 %attr(640,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldapaliasrc
766 %attr(700,daemon,daemon) %{_sbindir}/courierldapaliasd
767 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/esmtp
768 %attr(754,root,root) /etc/rc.d/init.d/courier
769 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
770 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
771 %attr(755,daemon,daemon) %dir %{_localstatedir}/track
772 %attr(755,root,root) %{_prefix}/lib/sendmail
773
774 %files pop3d
775 %defattr(644,root,root,755)
776 %doc htmldoc/*pop3d*
777 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/pop3
778 %{_mandir}/man8/courierpop3d.8*
779 %{_mandir}/man8/courierpop3login.8*
780 %{_mandir}/man8/mkpop3dcert.8*
781 %{_mandir}/man8/pop3d.8*
782 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-45pop3.pl
783 %{_datadir}/courierwebadmin/admin-45pop3.html
784 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d
785 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d.cnf
786 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pop3d-ssl
787 %attr(755,root,root) %{_libdir}/courier/courierpop3d
788 %attr(755,root,root) %{_libdir}/courier/courierpop3login
789 %attr(755,root,root) %{_datadir}/mkpop3dcert
790 %attr(755,root,root) %{_sbindir}/mkpop3dcert
791 %attr(755,root,root) %{_datadir}/pop3d
792 %attr(755,root,root) %{_sbindir}/pop3d
793 %attr(755,root,root) %{_datadir}/pop3d-ssl
794 %attr(755,root,root) %{_sbindir}/pop3d-ssl
795
796 %files imapd
797 %defattr(644,root,root,755)
798 %doc htmldoc/*imapd*
799 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/imap
800 %{_mandir}/man8/imapd.8*
801 %{_mandir}/man8/mkimapdcert.8*
802 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-40imap.pl
803 %{_datadir}/courierwebadmin/admin-40imap.html
804 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd
805 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd-ssl
806 %attr(600,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd.cnf
807 %attr(755,root,root) %{_libdir}/courier/imaplogin
808 %attr(755,root,root) %{_sbindir}/imapd
809 %attr(755,root,root) %{_sbindir}/imapd-ssl
810 %attr(755,root,root) %{_datadir}/imapd
811 %attr(755,root,root) %{_datadir}/imapd-ssl
812 %attr(755,root,root) %{_bindir}/imapd
813 %attr(755,root,root) %{_datadir}/mkimapdcert
814 %attr(755,root,root) %{_sbindir}/mkimapdcert
815
816 %files webadmin
817 %defattr(644,root,root,755)
818 # suid root to cgi-bin??? and it's not secured by apache config!
819 %attr(4755,root,root) %{_cgibindir}/webadmin
820 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin
821 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin/added
822 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin/removed
823 %attr(400,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/webadmin/password
824 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/webadmin/unsecureok
825 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-main.pl
826 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-save.pl
827 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-cancel.pl
828 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-[0235]*.pl
829 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-10password.pl
830 %attr(755,root,root) %{_datadir}/courierwebadmin/dumpenv.pl
831 %attr(755,root,root) %{_datadir}/courierwebadmin/webadmin.pl
832 %{_datadir}/courierwebadmin/admin-[0235]*.html
833 %{_datadir}/courierwebadmin/admin-10password.html
834 %{_datadir}/courierwebadmin/admin-main.html
835 %{_datadir}/courierwebadmin/admin-save.html
836 %{_datadir}/courierwebadmin/login.html
837 %{_datadir}/courierwebadmin/notsupp.html
838 %{_datadir}/courierwebadmin/unsecure.html
839 %{_datadir}/courierwebadmin/webadmin.pm
840
841 %files webmail
842 %defattr(644,root,root,755)
843 %doc htmldoc/pcp* gpglib/README.html
844 %attr(755,root,root) %{_cgibindir}/webmail
845 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/webmail
846 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/calendar
847 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sqwebmaild
848 %attr(755,root,root) %{_sbindir}/webmaild
849 %dir %{_datadir}/sqwebmail
850 %dir %{_datadir}/sqwebmail/html
851 %dir %{_datadir}/sqwebmail/html/en-us
852 %{_datadir}/sqwebmail/html/en
853 %{_datadir}/sqwebmail/images
854 %config %{_datadir}/sqwebmail/html/en-us/[CILT]*
855 %{_datadir}/sqwebmail/html/en-us/*.html
856 %{_datadir}/sqwebmail/html/en-us/*.txt
857 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-47webmail.pl
858 %{_datadir}/courierwebadmin/admin-47webmail.html
859 %attr(755,root,root) %{_datadir}/sqwebmail/cleancache.pl
860 %attr(755,root,root) %{_datadir}/sqwebmail/ldapsearch
861 %attr(755,root,root) %{_datadir}/sqwebmail/sendit.sh
862 %attr(755,root,root) %{_datadir}/sqwebmail/webgpg
863 %attr(755,root,root) %{_sbindir}/webgpg
864 %attr(755,root,root) %{_libdir}/courier/pcpd
865 %attr(755,root,root) %{_libdir}/courier/sqwebmaild
866 %attr(755,root,root) %{_libdir}/courier/sqwebpasswd
867 %attr(700, bin, bin) %dir %{_localstatedir}/webmail-logincache
868 %attr(755,root,root) /etc/cron.hourly/courier-webmail-cleancache
869 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/calendarmode
870 %attr(755,bin,daemon) %dir %{_localstatedir}/calendar
871 %attr(700,bin,daemon) %dir %{_localstatedir}/calendar/localcache
872 %attr(750,bin,daemon) %dir %{_localstatedir}/calendar/private
873 %attr(755,bin,daemon) %dir %{_localstatedir}/calendar/public
874 %dir %attr(750,root,http) %{_webapps}/courier-webmail
875 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/courier-webmail/apache.conf
876 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/courier-webmail/httpd.conf
877
878 %files maildrop
879 %defattr(644,root,root,755)
880 %doc htmldoc/r* htmldoc/maildrop* htmldoc/lockmail*
881 %{_mandir}/man1/maildrop.1*
882 %{_mandir}/man1/refor*
883 %{_mandir}/man7/maildrop*
884 %attr(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/maildrop
885 %attr(4755,root,root) %{_bindir}/maildrop
886 %attr(755,root,root) %{_bindir}/reformail
887 %attr(755,root,root) %{_bindir}/reformime
888
889 %files maildir-tools
890 %defattr(644,root,root,755)
891 %doc maildir/README.*.html htmldoc/maildir*
892 %{_mandir}/man1/maildirmake.1*
893 %{_mandir}/man1/maildirkw.1*
894 %{_mandir}/man1/maildiracl.1*
895 %{_mandir}/man5/maildir.5*
896 %{_mandir}/man7/maildirquota.7*
897 %attr(755,root,root) %{_bindir}/maildirmake
898 %attr(755,root,root) %{_bindir}/maildirkw
899 %attr(755,root,root) %{_bindir}/maildiracl
900
901 %files mlm
902 %defattr(644,root,root,755)
903 %doc htmldoc/couriermlm.html
904 %{_mandir}/man1/couriermlm.1*
905 %attr(755,root,root) %{_bindir}/couriermlm
906 %{_datadir}/couriermlm
This page took 0.204223 seconds and 2 git commands to generate.