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