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