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