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