]> git.pld-linux.org Git - packages/courier.git/blob - courier.spec
- added db patch to use shared db
[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 Patch6:         %{name}-db.patch
24 URL:            http://www.courier-mta.org/
25 BuildRequires:  autoconf
26 BuildRequires:  automake
27 BuildRequires:  courier-authlib-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 %patch6 -p1
262
263 %build
264 # we don't want fax module
265 rm -rf courier/module.fax
266 cp -f /usr/share/automake/config.sub webmail
267
268 cd rootcerts
269 %{__libtoolize}
270 %{__aclocal}
271 %{__autoconf}
272 %{__automake}
273 cd ..
274
275 %{__libtoolize}
276 %{__aclocal}
277 %{__autoconf}
278 %{__automake}
279
280 cd courier
281 %{__aclocal}
282 %{__autoconf}
283 automake -a -c --foreign
284
285 cd module.esmtp
286 %{__aclocal}
287 %{__autoconf}
288 automake -a -c --foreign
289 cd ../..
290
291 cd imap
292 %{__aclocal}
293 %{__autoconf}
294 automake -a -c --foreign
295 cd ..
296
297 cd webadmin
298 %{__aclocal}
299 %{__autoconf}
300 %{__automake}
301 cd ..
302
303 cd maildir
304 %{__aclocal}
305 %{__autoconf}
306 automake -a -c --foreign
307 cd ..
308
309 cd maildrop
310 %{__aclocal}
311 %{__autoconf}
312 automake -a -c --foreign
313 cd ..
314
315 %configure \
316         --localstatedir=%{_localstatedir} \
317         --sysconfdir=%{_sysconfdir} \
318         --mandir=%{_mandir} \
319         --enable-imagedir=%{_imagedir} \
320         --enable-imageurl=%{_imageurl} \
321         --with-certsdir=%{_certsdir} \
322         --with-db=db \
323         --with-mailer=%{_sbindir}/sendmail \
324         --with-mailuser=daemon \
325         --with-mailgroup=daemon \
326         --with-mailuid=2 \
327         --with-mailgid=2
328
329 %{__make}
330 %{__make} check
331
332 %install
333 rm -rf $RPM_BUILD_ROOT
334 umask 022
335 install -d -p $RPM_BUILD_ROOT{/etc/{cron.hourly,pam.d},%{_initrddir}} \
336         $RPM_BUILD_ROOT{%{_cgibindir},/usr/lib,%{_sysconfdir}/hosteddomains} \
337         $RPM_BUILD_ROOT{/etc/cron.hourly,%{_certsdir}}
338
339 %{__make} install \
340         DESTDIR=$RPM_BUILD_ROOT
341
342 # fix pam problem
343 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.authpam
344 for X in imap esmtp pop3 webmail calendar
345 do
346         cat > $RPM_BUILD_ROOT/etc/pam.d/$X <<EOF
347 #%PAM-1.0
348 auth    required        pam_unix.so shadow nullok
349 account required        pam_unix.so
350 session required        pam_unix.so
351 EOF
352 done
353
354 # delete dead links
355 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dotforward.1 \
356 $RPM_BUILD_ROOT%{_mandir}/man1/rmail.1 \
357 $RPM_BUILD_ROOT%{_mandir}/man8/esmtpd-msa.8 \
358 $RPM_BUILD_ROOT%{_mandir}/man8/makesmtpaccess-msa.8 \
359 $RPM_BUILD_ROOT%{_mandir}/man8/filterctl.8 \
360 $RPM_BUILD_ROOT%{_mandir}/man8/makeuucpneighbors.8 \
361 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3login.8
362
363 # make man links
364 echo '.so dot-forward.1' > $RPM_BUILD_ROOT%{_mandir}/man1/dotforward.1
365 echo '.so sendmail.1' > $RPM_BUILD_ROOT%{_mandir}/man1/rmail.1
366 echo '.so esmtpd.8' > $RPM_BUILD_ROOT%{_mandir}/man8/esmtpd-msa.8
367 echo '.so courierfilter.8' > $RPM_BUILD_ROOT%{_mandir}/man8/filterctl.8
368 echo '.so makesmtpaccess.8' > $RPM_BUILD_ROOT%{_mandir}/man8/makesmtpaccess-msa.8
369 echo '.so courieruucp.8' > $RPM_BUILD_ROOT%{_mandir}/man8/makeuucpneighbors.8
370 echo '.so courierpop3d.8' > $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3login.8
371
372 %{__make} install-perms
373
374 # Move webmail and webadmin to cgibindir
375 mv -f $RPM_BUILD_ROOT%{_libexecdir}/courier/webmail/webmail \
376         $RPM_BUILD_ROOT%{_cgibindir}/webmail
377 mv -f $RPM_BUILD_ROOT%{_libexecdir}/courier/webmail/webadmin \
378         $RPM_BUILD_ROOT%{_cgibindir}/webadmin
379
380 # install a cron job to clean out webmail's cache
381 install webmail/cron.cmd $RPM_BUILD_ROOT/etc/cron.hourly/courier-webmail-cleancache
382
383 # Move .html documentation back to build dir, so that RPM will move it to
384 # the appropriate docdir
385
386 rm -rf htmldoc
387 mkdir htmldoc
388 mv -f $RPM_BUILD_ROOT%{_datadir}/htmldoc/* htmldoc
389 chmod a-w htmldoc/*
390
391 # Manually set POP3DSTART and IMAPDSTART to yes, they'll go into a separate
392 # package, so after it's installed they should be runnable.
393
394 sed -i 's/^POP3DSTART.*/POP3DSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
395 sed -i 's/^POP3DSSLSTART.*/POP3DSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
396 sed -i 's/^IMAPDSTART.*/IMAPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
397 sed -i 's/^IMAPDSSLSTART.*/IMAPDSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
398
399 # Want to have esmtpd running by default
400 sed -i 's/^ESMTPDSTART.*/ESMTPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/esmtpd.dist
401
402 # run script from install-configure (make config files)
403 for confdist in `awk ' $5 == "config" && $1 ~ /\.dist$/ { print $1 }' <permissions.dat`
404 do /usr/bin/perl ././sysconftool $RPM_BUILD_ROOT$confdist
405 done
406
407 # make locals, esmtpacceptmailfor.dir/default
408 touch $RPM_BUILD_ROOT%{_sysconfdir}/esmtpacceptmailfor.dir/default
409 touch $RPM_BUILD_ROOT%{_sysconfdir}/locals
410
411 # file with important options
412 cat > $RPM_BUILD_ROOT%{_sysconfdir}/bofh <<EOF
413 # enable this option if you want to pass bad converted mails
414 # opt BOFHBADMIME=accept
415 EOF
416
417 # Make password and unsecureok (files for webadmin)
418 touch $RPM_BUILD_ROOT%{_sysconfdir}/webadmin/password
419 touch $RPM_BUILD_ROOT%{_sysconfdir}/webadmin/unsecureok
420
421 # create file me to put localdomain
422 touch $RPM_BUILD_ROOT%{_sysconfdir}/me
423
424 # create calendarmode
425 touch $RPM_BUILD_ROOT%{_sysconfdir}/calendarmode
426
427 install courier.sysvinit $RPM_BUILD_ROOT%{_initrddir}/courier
428 #
429 # Red Hat /etc/profile.d scripts
430 #
431
432 install -d $RPM_BUILD_ROOT/etc/profile.d
433 cat >$RPM_BUILD_ROOT/etc/profile.d/courier.sh <<EOF
434 if echo "\$PATH" | tr ':' '\012' | fgrep -qx %{_bindir}
435 then
436         :
437 else
438         if test -w /etc
439         then
440                 PATH="%{_sbindir}:\$PATH"
441         fi
442         PATH="%{_bindir}:\$PATH"
443         export PATH
444 fi
445 EOF
446
447 cat >$RPM_BUILD_ROOT/etc/profile.d/courier.csh <<EOF
448
449 echo "\$PATH" | tr ':' '\012' | fgrep -qx %{_bindir}
450
451 if ( \$? ) then
452         true
453 else
454         test -w /etc
455         if ( \$? ) then
456                 setenv PATH "%{_sbindir}:\$PATH"
457         endif
458         setenv PATH "%{_bindir}:\$PATH"
459 endif
460 EOF
461
462 # sendmail soft links
463 ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
464
465 # fix rmail link
466 rm -f $RPM_BUILD_ROOT%{_bindir}/rmail
467 ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/rmail
468
469 # This link by default is missing
470 ln -sf %{_datadir}/esmtpd-ssl $RPM_BUILD_ROOT%{_sbindir}/esmtpd-ssl
471
472 # for apache
473 echo "Alias /webmail %{_imagedir}" >apache-%{name}.conf
474 install apache-%{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
475
476 # remove unpackaged files
477 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.dist
478 rm -rf $RPM_BUILD_ROOT%{_datadir}/faxmail
479 rm -f $RPM_BUILD_ROOT%{_datadir}/courierwebadmin/*fax*
480
481 %clean
482 rm -rf $RPM_BUILD_ROOT
483
484 %triggerin -- courier < 0.45.5
485 echo
486 echo Directory with certificates has changed to %{_certsdir}
487 echo
488
489 %post
490 /sbin/chkconfig --add courier
491
492 if [ "$1" = "1" ]; then
493         /bin/hostname -f >/etc/courier/me
494         cat <<EOF
495
496 Now courier will refuse to accept SMTP messages except to localhost
497 add hosts to /etc/courier/esmtpacceptmailfor.dir/default
498 run makeacceptmailfor
499
500 Add hosts to /etc/courier/locals you want to accept mail for
501 run makealiases
502
503 Enter user, who should receive mail for root, mailer-daemon and postmaster
504 into /etc/courier/aliases/system
505
506 Default maildir is in ~/Mail/Maildir
507
508 EOF
509 fi
510
511 if [ -e /var/lock/subsys/courier ]; then
512         %{_initrddir}/courier restart
513 else
514         echo
515         echo 'Type "%{_initrddir}/courier start" to start courier'
516         echo
517 fi
518
519 %preun
520 if [ "$1" = "0" ]; then
521         if [ -e /var/lock/subsys/courier ]; then
522                 %{_initrddir}/courier stop
523         fi
524         /sbin/chkconfig --del courier
525 fi
526
527 %post imapd
528 if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
529         %{_sbindir}/imapd stop
530         %{_sbindir}/imapd start
531 else
532         echo
533         echo 'Type "%{_sbindir}/imapd start" to start imapd server'
534         echo
535 fi
536 if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
537         %{_sbindir}/imapd-ssl stop
538         %{_sbindir}/imapd-ssl start
539 else
540         echo
541         echo Type "%{_sbindir}/imapd-ssl start" to start imapd-ssl server
542         echo
543 fi
544
545 %preun imapd
546 if [ "$1" = "0" ]; then
547         if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
548                 %{_sbindir}/imapd stop
549         fi
550         if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
551                 %{_sbindir}/imapd-ssl stop
552         fi
553 fi
554
555 %post pop3d
556 if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
557         %{_sbindir}/pop3d stop
558         %{_sbindir}/pop3d start
559 else
560         echo
561         echo 'Type "%{_sbindir}/pop3d start" to start pop3d server'
562         echo
563 fi
564 if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
565         %{_sbindir}/pop3d-ssl stop
566         %{_sbindir}/pop3d-ssl start
567 else
568         echo
569         echo 'Type "%{_sbindir}/pop3d-ssl start" to start pop3d-ssl server'
570         echo
571 fi
572
573 %preun pop3d
574 if [ "$1" = "0" ]; then
575         if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
576                 %{_sbindir}/pop3d stop
577         fi
578         if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
579                 %{_sbindir}/pop3d-ssl stop
580         fi
581 fi
582
583 %post webadmin
584 if [ "$1" = "1" ]; then
585         echo
586         echo Remember to put your webadmin password to %{_sysconfdir}/webadmin/password
587         echo
588 fi
589
590 %post webmail
591 if [ "$1" = "1" ]; then
592         echo
593         echo If you want to have calendar starting by default then
594         echo put word net to %{_sysconfdir}/calendarmode
595         echo
596 fi
597 if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
598         %{_sbindir}/webmaild stop
599         %{_sbindir}/webmaild start
600 else
601         echo
602         echo 'Type "%{_sbindir}/webmaild start" to start webmail server'
603         echo
604 fi
605
606 # apache1
607 if [ -d %{_apache1dir}/conf.d ]; then
608         ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache1dir}/conf.d/99_%{name}.conf
609         if [ -f /var/lock/subsys/apache ]; then
610                 /etc/rc.d/init.d/apache restart 1>&2
611         fi
612 fi
613 # apache2
614 if [ -d %{_apache2dir}/httpd.conf ]; then
615         ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
616         if [ -f /var/lock/subsys/httpd ]; then
617                 /etc/rc.d/init.d/httpd restart 1>&2
618         fi
619 fi
620
621 %preun webmail
622 if [ "$1" = "0" ]; then
623         if [ -e %{_localstatedir}/tmp/sqwebmaild.pid ]; then
624                 %{_sbindir}/webmaild stop
625         fi
626         # apache1
627         if [ -d %{_apache1dir}/conf.d ]; then
628                 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
629                 if [ -f /var/lock/subsys/apache ]; then
630                         /etc/rc.d/init.d/apache restart 1>&2
631                 fi
632         fi
633         # apache2
634         if [ -d %{_apache2dir}/httpd.conf ]; then
635                 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
636                 if [ -f /var/lock/subsys/httpd ]; then
637                         /etc/rc.d/init.d/httpd restart 1>&2
638                 fi
639         fi
640 fi
641
642 %files
643 %defattr(644,root,root,755)
644 %doc AUTHORS BENCHMARKS ChangeLog INSTALL NEWS README TODO htmldoc/[adehqstu]*
645 %doc htmldoc/courierperl* htmldoc/courier.html htmldoc/courier[fltu]*
646 %doc htmldoc/local* htmldoc/mailbot* htmldoc/mailq* htmldoc/make*
647 %doc htmldoc/mime* htmldoc/mkesmtpd* htmldoc/modules* htmldoc/preline*
648 %{_mandir}/man1/sendmail.1*
649 %{_mandir}/man1/preline.1*
650 %{_mandir}/man1/cancelmsg.1*
651 %{_mandir}/man1/lockmail.1*
652 %{_mandir}/man1/mailbot.1*
653 %{_mandir}/man1/makemime.1*
654 %{_mandir}/man1/mimegpg.1*
655 %{_mandir}/man1/makedat.1*
656 %{_mandir}/man1/testmxlookup.1*
657 %{_mandir}/man1/dot-forward.1*
658 %{_mandir}/man1/couriertls.1*
659 %{_mandir}/man1/mailq*
660 %{_mandir}/man1/couriertcpd*
661 %{_mandir}/man1/dotforward.1*
662 %{_mandir}/man1/rmail.1*
663 %{_mandir}/man5/dot-courier.5*
664 %{_mandir}/man7/localmailfilter.7*
665 %{_mandir}/man8/courierfilter.8*
666 %{_mandir}/man8/courierperlfilter.8*
667 %{_mandir}/man8/dupfilter.8*
668 %{_mandir}/man8/courier.8*
669 %{_mandir}/man8/courierldapaliasd.8*
670 %{_mandir}/man8/deliverquota.8*
671 %{_mandir}/man8/esmtpd.8*
672 %{_mandir}/man8/makeacceptmailfor.8*
673 %{_mandir}/man8/makehosteddomains.8*
674 %{_mandir}/man8/mkesmtpdcert.8*
675 %{_mandir}/man8/makealiases.8*
676 %{_mandir}/man8/makepercentrelay.8*
677 %{_mandir}/man8/makesmtpaccess.8*
678 %{_mandir}/man8/submit.8*
679 %{_mandir}/man8/courieruucp.8*
680 %{_mandir}/man8/esmtpd-msa.8*
681 %{_mandir}/man8/filterctl.8*
682 %{_mandir}/man8/makesmtpaccess-msa.8*
683 %{_mandir}/man8/makeuucpneighbors.8*
684 %attr(755,daemon,daemon) %dir %{_sysconfdir}
685 %attr(750,daemon,daemon) %dir %{_certsdir}
686 %attr(755,daemon,daemon) %dir %{_sysconfdir}/hosteddomains
687 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/me
688 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ldapaddressbook
689 %attr(755,daemon,daemon) %dir %{_sysconfdir}/aliasdir
690 %attr(750,daemon,daemon) %dir %{_sysconfdir}/aliases
691 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/enablefiltering
692 %attr(755,daemon,daemon) %dir %{_sysconfdir}/smtpaccess
693 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/smtpaccess/default
694 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpacceptmailfor.dir/default
695 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bofh
696 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
697 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/courierd
698 %attr(640,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/aliases/system
699 %attr(644,root,root) %{_sysconfdir}/quotawarnmsg.example
700 %dir %{_libdir}
701 %dir %{_libdir}/courier
702 %dir %{_datadir}
703 %{_datadir}/rootcerts
704 %attr(755,root,root) %dir %{_datadir}/courierwebadmin
705 %{_datadir}/courierwebadmin/admin-15*
706 %dir %{_libdir}/filters
707 %attr(755,daemon,daemon) %{_libdir}/filters/*
708 %attr(755,daemon,daemon) %{_datadir}/perlfilter-*.pl
709 %attr(755,bin,bin) %dir %{_localstatedir}
710 %attr(770,daemon,daemon) %dir %{_localstatedir}/tmp
711 %attr(750,daemon,daemon) %dir %{_localstatedir}/msgs
712 %attr(750,daemon,daemon) %dir %{_localstatedir}/msgq
713 %attr(750,daemon,daemon) %dir %{_localstatedir}/filters
714 %attr(750,daemon,daemon) %dir %{_localstatedir}/allfilters
715 %attr(750,daemon,daemon) %dir %{_sysconfdir}/filters
716 %attr(750,daemon,daemon) %dir %{_sysconfdir}/filters/active
717 %attr(754,root,daemon) %{_datadir}/filterctl
718 %attr(754,root,daemon) %{_sbindir}/filterctl
719 %attr(754,root,daemon) %{_sbindir}/courierfilter
720 %dir %{_libdir}/courier/modules
721 %dir %{_libdir}/courier/modules/uucp
722 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/module.uucp
723 %attr(755,root,root) %{_libdir}/courier/modules/uucp/courieruucp
724 %attr(755,root,root) %{_sbindir}/makeuucpneighbors
725 %attr(755,root,root) %{_datadir}/makeuucpneighbors
726 %dir %{_libdir}/courier/modules/local
727 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/module.local
728 %attr(755,root,root) %{_libdir}/courier/modules/local/courierlocal
729 %attr(755,root,root) %{_libdir}/courier/modules/local/courierdeliver
730 %attr(755,root,root) %{_bindir}/preline
731 %dir %{_libdir}/courier/modules/esmtp
732 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/module.esmtp
733 %attr(750,root,daemon) %{_libdir}/courier/modules/esmtp/courieresmtp
734 %attr(750,root,daemon) %{_libdir}/courier/modules/esmtp/courieresmtpd
735 %attr(755,root,root) %{_libdir}/courier/modules/esmtp/addcr
736 %attr(755,root,root) %{_sbindir}/courieresmtpd
737 %attr(755,root,root) %{_bindir}/addcr
738 %attr(755,root,root) %{_sbindir}/esmtpd
739 %attr(755,root,root) %{_datadir}/esmtpd
740 %attr(755,root,root) %{_sbindir}/esmtpd-ssl
741 %attr(755,root,root) %{_datadir}/esmtpd-ssl
742 %attr(755,root,root) %{_sbindir}/makesmtpaccess
743 %attr(755,root,root) %{_datadir}/makesmtpaccess
744 %attr(755,root,root) %{_sbindir}/makeacceptmailfor
745 %attr(755,root,root) %{_datadir}/makeacceptmailfor
746 %attr(755,root,root) %{_sbindir}/makepercentrelay
747 %attr(755,root,root) %{_datadir}/makepercentrelay
748 %attr(755,root,root) %{_sbindir}/mkesmtpdcert
749 %attr(755,root,root) %{_datadir}/mkesmtpdcert
750 %attr(755,root,root) %{_sbindir}/esmtpd-msa
751 %attr(755,root,root) %{_sbindir}/makesmtpaccess-msa
752 %attr(755,root,root) %{_sbindir}/sharedindexinstall
753 %attr(755,root,root) %{_sbindir}/sharedindexsplit
754 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpd
755 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpd-msa
756 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpd-ssl
757 %attr(755,daemon,daemon) %dir %{_sysconfdir}/esmtpacceptmailfor.dir
758 %attr(755,daemon,daemon) %dir %{_sysconfdir}/esmtppercentrelay.dir
759 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpd.cnf
760 %attr(600,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpauthclient
761 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsndelayed.txt
762 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsndelivered.txt
763 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsnfailed.txt
764 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsnrelayed.txt
765 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsnfooter.txt
766 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsnsubjectnotice.txt
767 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsnsubjectwarn.txt
768 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dsnheader.txt
769 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/module.dsn
770 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/rfcerr*.txt
771 %dir %{_libdir}/courier/modules/dsn
772 %attr(755,root,root) %{_libdir}/courier/modules/dsn/courierdsn
773 %attr(4550,daemon,daemon) %{_libdir}/courier/submitmkdir
774 %attr(750,daemon,daemon) %{_libdir}/courier/courierd
775 %attr(750,daemon,daemon) %{_libdir}/courier/aliasexp
776 %attr(750,daemon,daemon) %{_libdir}/courier/aliascombine
777 %attr(750,daemon,daemon) %{_libdir}/courier/aliascreate
778 %attr(750,daemon,daemon) %{_libdir}/courier/submit
779 %attr(755,daemon,daemon) %{_libdir}/courier/makedatprog
780 %attr(6555,daemon,daemon) %{_bindir}/cancelmsg
781 %attr(755,root,root) %{_sbindir}/courier
782 %attr(755,root,root) %{_datadir}/courierctl.start
783 %attr(755,root,root) %{_bindir}/couriertls
784 %attr(755,root,root) %{_sbindir}/couriertcpd
785 %attr(755,root,root) %{_bindir}/courier-config
786 %attr(755,root,root) %{_bindir}/deliverquota
787 %attr(755,root,root) %{_bindir}/dotforward
788 %attr(755,root,root) %{_bindir}/lockmail
789 %attr(755,root,root) %{_bindir}/mailbot
790 %attr(2755,daemon,daemon) %{_bindir}/mailq
791 %attr(750,root,daemon) %{_datadir}/makealiases
792 %attr(750,root,daemon) %{_sbindir}/makealiases
793 %attr(755,root,root) %{_datadir}/makedat
794 %attr(755,root,root) %{_bindir}/makedat
795 %attr(755,root,root) %{_datadir}/makehosteddomains
796 %attr(755,root,root) %{_sbindir}/makehosteddomains
797 %attr(755,root,root) %{_bindir}/makemime
798 %attr(755,root,root) %{_bindir}/mimegpg
799 %attr(4755,root,root) %{_bindir}/rmail
800 %attr(755,root,root) %{_sbindir}/showconfig
801 %attr(750,root,daemon) %{_sbindir}/showmodules
802 %attr(4755,root,root) %{_sbindir}/sendmail
803 %attr(755,root,root) %{_bindir}/testmxlookup
804 %attr(640,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ldapaliasrc
805 %attr(700,daemon,daemon) %{_sbindir}/courierldapaliasd
806 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/esmtp
807 %attr(755,root,root) /etc/profile.d/courier.sh
808 %attr(755,root,root) /etc/profile.d/courier.csh
809 %attr(754,root,root) /etc/rc.d/init.d/courier
810 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
811 %attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
812 %attr(755,daemon,daemon) %dir %{_localstatedir}/track
813 %attr(755,root,root) /usr/lib/sendmail
814
815 %files pop3d
816 %defattr(644,root,root,755)
817 %doc htmldoc/*pop3d*
818 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3
819 %{_mandir}/man8/courierpop3d.8*
820 %{_mandir}/man8/courierpop3login.8*
821 %{_mandir}/man8/mkpop3dcert.8*
822 %{_mandir}/man8/pop3d.8*
823 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-45pop3.pl
824 %{_datadir}/courierwebadmin/admin-45pop3.html
825 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d
826 %attr(600,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d.cnf
827 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d-ssl
828 %attr(755,root,root) %{_libdir}/courier/courierpop3d
829 %attr(755,root,root) %{_libdir}/courier/courierpop3login
830 %attr(755,root,root) %{_datadir}/mkpop3dcert
831 %attr(755,root,root) %{_sbindir}/mkpop3dcert
832 %attr(755,root,root) %{_datadir}/pop3d
833 %attr(755,root,root) %{_sbindir}/pop3d
834 %attr(755,root,root) %{_datadir}/pop3d-ssl
835 %attr(755,root,root) %{_sbindir}/pop3d-ssl
836
837 %files imapd
838 %defattr(644,root,root,755)
839 %doc htmldoc/*imapd*
840 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap
841 %{_mandir}/man8/imapd.8*
842 %{_mandir}/man8/mkimapdcert.8*
843 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-40imap.pl
844 %attr(644,root,root) %{_datadir}/courierwebadmin/admin-40imap.html
845 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/imapd
846 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/imapd-ssl
847 %attr(600,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/imapd.cnf
848 %attr(755,root,root) %{_libdir}/courier/imaplogin
849 %attr(755,root,root) %{_sbindir}/imapd
850 %attr(755,root,root) %{_sbindir}/imapd-ssl
851 %attr(755,root,root) %{_datadir}/imapd
852 %attr(755,root,root) %{_datadir}/imapd-ssl
853 %attr(755,root,root) %{_bindir}/imapd
854 %attr(755,root,root) %{_datadir}/mkimapdcert
855 %attr(755,root,root) %{_sbindir}/mkimapdcert
856
857 %files webadmin
858 %defattr(644,root,root,755)
859 %attr(4755,root,root) %{_cgibindir}/webadmin
860 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin
861 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin/added
862 %attr(700,daemon,daemon) %dir %{_sysconfdir}/webadmin/removed
863 %attr(400,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/webadmin/password
864 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/webadmin/unsecureok
865 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-main.pl
866 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-save.pl
867 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-cancel.pl
868 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-[0235]*.pl
869 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-10password.pl
870 %attr(755,root,root) %{_datadir}/courierwebadmin/dumpenv.pl
871 %attr(755,root,root) %{_datadir}/courierwebadmin/webadmin.pl
872 %{_datadir}/courierwebadmin/admin-[0235]*.html
873 %{_datadir}/courierwebadmin/admin-10password.html
874 %{_datadir}/courierwebadmin/admin-main.html
875 %{_datadir}/courierwebadmin/admin-save.html
876 %{_datadir}/courierwebadmin/login.html
877 %{_datadir}/courierwebadmin/notsupp.html
878 %{_datadir}/courierwebadmin/unsecure.html
879 %{_datadir}/courierwebadmin/webadmin.pm
880
881 %files webmail
882 %defattr(644,root,root,755)
883 %doc htmldoc/pcp* gpglib/README.html
884 %attr(755,root,root) %{_cgibindir}/webmail
885 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/webmail
886 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/calendar
887 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sqwebmaild
888 %attr(755,root,root) %{_sbindir}/webmaild
889 %dir %{_datadir}/sqwebmail
890 %dir %{_datadir}/sqwebmail/html
891 %dir %{_datadir}/sqwebmail/html/en-us
892 %{_datadir}/sqwebmail/html/en
893 %{_datadir}/sqwebmail/images
894 %config %{_datadir}/sqwebmail/html/en-us/[CILT]*
895 %{_datadir}/sqwebmail/html/en-us/*.html
896 %{_datadir}/sqwebmail/html/en-us/*.txt
897 %attr(755,root,root) %{_datadir}/courierwebadmin/admin-47webmail.pl
898 %{_datadir}/courierwebadmin/admin-47webmail.html
899 %attr(755,root,root) %{_datadir}/sqwebmail/cleancache.pl
900 %attr(755,root,root) %{_datadir}/sqwebmail/ldapsearch
901 %attr(755,root,root) %{_datadir}/sqwebmail/sendit.sh
902 %attr(755,root,root) %{_datadir}/sqwebmail/webgpg
903 %attr(755,root,root) %{_sbindir}/webgpg
904 %attr(755,root,root) %{_libdir}/courier/pcpd
905 %attr(755,root,root) %{_libdir}/courier/sqwebmaild
906 %attr(755,root,root) %{_libdir}/courier/sqwebpasswd
907 %attr(700, bin, bin) %dir %{_localstatedir}/webmail-logincache
908 %attr(755,root,root) /etc/cron.hourly/courier-webmail-cleancache
909 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/calendarmode
910 %attr(755,bin,daemon) %dir %{_localstatedir}/calendar
911 %attr(700,bin,daemon) %dir %{_localstatedir}/calendar/localcache
912 %attr(750,bin,daemon) %dir %{_localstatedir}/calendar/private
913 %attr(755,bin,daemon) %dir %{_localstatedir}/calendar/public
914 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/apache-%{name}.conf
915
916 %files maildrop
917 %defattr(644,root,root,755)
918 %doc htmldoc/r* htmldoc/maildrop* htmldoc/lockmail*
919 %{_mandir}/man1/maildrop.1*
920 %{_mandir}/man1/refor*
921 %{_mandir}/man7/maildrop*
922 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/maildrop
923 %attr(4755,root,root) %{_bindir}/maildrop
924 %attr(755,root,root) %{_bindir}/reformail
925 %attr(755,root,root) %{_bindir}/reformime
926
927 %files maildir-tools
928 %defattr(644,root,root,755)
929 %doc maildir/README.*.html htmldoc/maildir*
930 %{_mandir}/man1/maildirmake.1*
931 %{_mandir}/man1/maildirkw.1*
932 %{_mandir}/man1/maildiracl.1*
933 %{_mandir}/man5/maildir.5*
934 %{_mandir}/man7/maildirquota.7*
935 %attr(755,root,root) %{_bindir}/maildirmake
936 %attr(755,root,root) %{_bindir}/maildirkw
937 %attr(755,root,root) %{_bindir}/maildiracl
938
939 %files mlm
940 %defattr(644,root,root,755)
941 %doc htmldoc/couriermlm.html
942 %{_mandir}/man1/couriermlm.1*
943 %attr(755,root,root) %{_bindir}/couriermlm
944 %{_datadir}/couriermlm
This page took 0.137393 seconds and 4 git commands to generate.