]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - make sid-milter support: | |
3 | # http://sourceforge.net/projects/sid-milter/ | |
4 | # http://www.sendmail.net/ | |
5 | # - http://blue-labs.org/clue/bluelabs.patch-8.12.3 has been updated upstream | |
6 | # - fix re-entrancy of install | |
7 | # - add tests bcond and/or disable tests tha fail on (AC-)builders | |
8 | # | |
9 | # Conditional build: | |
10 | %bcond_without ldap # without LDAP support | |
11 | %bcond_without tls # without TLS (SSL) support | |
12 | %bcond_with pgsql # with PostgreSQL support (bluelabs) | |
13 | ||
14 | Summary: A widely used Mail Transport Agent (MTA) | |
15 | Summary(de.UTF-8): sendmail-Mail-Übertragungsagent | |
16 | Summary(es.UTF-8): Sendmail - agente de transporte de mail | |
17 | Summary(fr.UTF-8): Agent de transport de courrier sendmail | |
18 | Summary(ko.UTF-8): SMTP_AUTH와 TLS를 지원하는 Mail 전송 프로그램(MTA) | |
19 | Summary(pl.UTF-8): Sendmail - serwer poczty elektronicznej | |
20 | Summary(pt_BR.UTF-8): Sendmail - agente de transporte de mail | |
21 | Summary(ru.UTF-8): Почтовый транспортный агент sendmail | |
22 | Summary(tr.UTF-8): Elektronik posta hizmetleri sunucusu | |
23 | Summary(uk.UTF-8): Поштовий транспортний агент sendmail | |
24 | Name: sendmail | |
25 | Version: 8.15.2 | |
26 | Release: 2 | |
27 | License: BSD | |
28 | Group: Networking/Daemons/SMTP | |
29 | Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz | |
30 | # Source0-md5: a824fa7dea4d3341efb6462ccd816f00 | |
31 | Source1: %{name}.init | |
32 | Source2: %{name}.sysconfig | |
33 | Source3: %{name}.aliases | |
34 | # From http://doc.phpauction.org/sendmail/examples/ | |
35 | Source4: %{name}-examples.tar.bz2 | |
36 | # Source4-md5: d00d817cd456a947a7fc6c04072a7d68 | |
37 | Source5: %{name}-etc-mail-Makefile | |
38 | Source6: %{name}.mc | |
39 | Source7: %{name}-config.m4 | |
40 | Source8: %{name}.sasl | |
41 | Source9: %{name}.access | |
42 | Source10: %{name}.mailertable | |
43 | Source11: %{name}.virtusertable | |
44 | Source12: %{name}.domaintable | |
45 | Source13: %{name}-smtp.pamd | |
46 | Patch0: %{name}-makemapman.patch | |
47 | Patch1: %{name}-smrsh-paths.patch | |
48 | Patch2: %{name}-rmail.patch | |
49 | Patch3: %{name}-os-paths.patch | |
50 | Patch4: %{name}-m4path.patch | |
51 | Patch5: %{name}-redirect.patch | |
52 | Patch6: %{name}-hprescan-dos.patch | |
53 | Patch7: %{name}-format_string.patch | |
54 | # originally from http://blue-labs.org/clue/bluelabs.patch-8.12.3 | |
55 | Patch8: bluelabs.patch-8.12.3 | |
56 | URL: http://www.sendmail.org/ | |
57 | BuildRequires: cyrus-sasl-devel | |
58 | BuildRequires: db-devel >= 4.1.25 | |
59 | # man or man-db | |
60 | BuildRequires: man-db | |
61 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} | |
62 | %{?with_tls:BuildRequires: openssl-devel >= 0.9.7d} | |
63 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
64 | BuildRequires: rpmbuild(macros) >= 1.310 | |
65 | BuildRequires: sed >= 4.0 | |
66 | %ifarch sparc | |
67 | BuildRequires: sparc32 | |
68 | %endif | |
69 | Requires(post): awk | |
70 | Requires(post): textutils | |
71 | Requires(post,preun): /sbin/chkconfig | |
72 | Requires(post,preun): rc-scripts >= 0.4.0.20 | |
73 | Requires(postun): /usr/sbin/groupdel | |
74 | Requires(postun): /usr/sbin/userdel | |
75 | Requires(pre): /bin/id | |
76 | Requires(pre): /usr/bin/getgid | |
77 | Requires(pre): /usr/sbin/groupadd | |
78 | Requires(pre): /usr/sbin/useradd | |
79 | Requires: db >= 4.1.25 | |
80 | Requires: m4 | |
81 | Requires: pam >= 0.79.0 | |
82 | Requires: procmail | |
83 | Provides: group(smmsp) | |
84 | Provides: smtpdaemon | |
85 | Provides: user(smmsp) | |
86 | Obsoletes: sendmail-cf | |
87 | Obsoletes: sendmail-doc | |
88 | Obsoletes: smtpdaemon | |
89 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
90 | ||
91 | %define _sysconfdir /etc/mail | |
92 | %define specflags -fPIC | |
93 | ||
94 | %description | |
95 | The Sendmail program is a very widely used Mail Transport Agent (MTA). | |
96 | MTAs send mail from one machine to another. Sendmail is not a client | |
97 | program, which you use to read your e-mail. Sendmail is a | |
98 | behind-the-scenes program which actually moves your e-mail over | |
99 | networks or the Internet to where you want it to go. | |
100 | ||
101 | %description -l de.UTF-8 | |
102 | Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine | |
103 | allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und | |
104 | Weiterleiten von Nachrichten, automatischem Routing an | |
105 | Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über | |
106 | das Internet senden und empfangen möchten, brauchen Sie sendmail. | |
107 | ||
108 | %description -l es.UTF-8 | |
109 | sendmail es un agente de transporte de correo electrónico, que mueve | |
110 | mensajes entre máquinas. Implementa facilidades de internetwork y | |
111 | rutado, caracterizando cambio de nombres (aliases) y envío a nuevas | |
112 | direcciones ( forwarding ), rutado automático para gateways de la red | |
113 | y configuración flexible. Necesitarás del sendmail si deseas enviar y | |
114 | recibir mensajes a través de la Internet. | |
115 | ||
116 | %description -l fr.UTF-8 | |
117 | Sendmail est un agent de transport de courrier, qui est le programme | |
118 | transférent le courrier d'une machine à l'autre. Sendmail implémente | |
119 | une facilité générale de routage de courrier entre les réseaux, permet | |
120 | l'"aliasing" et le "forwarding", un routage automatique sur les | |
121 | passerelles du réseau, et une configuration flexible. | |
122 | ||
123 | %description -l ko.UTF-8 | |
124 | Sendamil은 매우 널리 사용되는 Mail 전송 프로그램이다(MTA). Mail 전송 | |
125 | 프로그램들(MTA)은 어떠한 machine에서 다른 machine으로 메일을 보내며 | |
126 | Sendmail은 e-mail을 읽기위해 사용하는 client program은 아니다. | |
127 | Sendamil은 원하는 곳으로 Internet이나 Network를 통해 e-mail을 보내는 | |
128 | 역할을 하는 backgrond에서 작업을 하는 프로그램이다. | |
129 | ||
130 | %description -l pl.UTF-8 | |
131 | Sendmail jest programem umożliwiającym wymianę poczty elektronicznej | |
132 | między komputerami w sieci (MTA). Zajmuje się przekazywaniem poczty | |
133 | elektronicznej między bramkami pocztowymi i dostarczaniem przesyłek na | |
134 | konta docelowe. Bardzo dobrze obsługuje aliasy pocztowe a jego | |
135 | dodatkowym atutem jest prosta konfiguracja. Dzięki rozbudowanym | |
136 | możliwościom konfiguracyjnym jest w stanie dostarczać przesyłki za | |
137 | pośrednictwem protokołów: SMTP, ESMTP, UUCP, X.400 i innych. | |
138 | ||
139 | %description -l pt_BR.UTF-8 | |
140 | O sendmail é um agente de transporte de correio eletrônico, que move | |
141 | mensagens entre máquinas. Ele implementa facilidades de internetwork e | |
142 | roteamento, caracterizando troca de nomes (aliases) e remessa a novos | |
143 | endereços ( forwarding ), roteamento automático para gateways da rede | |
144 | e configuração flexível. | |
145 | ||
146 | %description -l ru.UTF-8 | |
147 | Sendmail - это Mail Transport Agent, программа пересылающая почту с | |
148 | машины на машину. Sendmail предоставляет стандартные средства | |
149 | межсетевой маршрутизации почты, aliasing, forwarding, автоматическую | |
150 | маршрутизацию для сетевых шлюзов и гибкий механизм конфигурации. | |
151 | ||
152 | %description -l tr.UTF-8 | |
153 | Sendmail, bir mektubu bir makineden diğerine taşır. Pek çok davranışı | |
154 | ayarlanabilir. Internet üzerinden mektup almak veya göndermek | |
155 | istiyorsanız bu pakete gereksiniminiz olacaktır. | |
156 | ||
157 | %description -l uk.UTF-8 | |
158 | Sendmail - це Mail Transport Agent, програма що пересилає пошту з | |
159 | машини на машину. Sendmail надає стандартні засоби міжмережевої | |
160 | маршрутизації пошти, aliasing, forwarding, автоматичну маршрутизацію | |
161 | для мережевих шлюзів та гнучкий механізм маршрутизації. | |
162 | ||
163 | %package -n libmilter-devel | |
164 | Summary: Header files and static libmilter library | |
165 | Summary(pl.UTF-8): Pliki nagłówkowe i statyczna biblioteka libmilter | |
166 | Group: Development/Libraries | |
167 | Provides: sendmail-devel | |
168 | Obsoletes: sendmail-devel | |
169 | ||
170 | %description -n libmilter-devel | |
171 | Header files and static libmilter library. | |
172 | ||
173 | %description -n libmilter-devel -l pl.UTF-8 | |
174 | Pliki nagłówkowe i statyczna biblioteka libmilter. | |
175 | ||
176 | %prep | |
177 | %setup -q | |
178 | %patch0 -p1 | |
179 | %patch1 -p1 | |
180 | %patch2 -p1 | |
181 | %patch3 -p1 | |
182 | %patch4 -p1 | |
183 | %patch5 -p1 | |
184 | %patch6 -p1 | |
185 | %patch7 -p1 | |
186 | %{?with_pgsql:%patch8 -p1} | |
187 | ||
188 | sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc | |
189 | ||
190 | cp -p %{SOURCE7} config.m4 | |
191 | ||
192 | # Ac-specific hack: | |
193 | # It's problem with _simultanous_ building when builders are on the same | |
194 | # machine. These are anonymous SHM tests (AFAIR) which must fail when called | |
195 | # simultanously... | |
196 | # | |
197 | # send on builders requests only for some arch - it won't fail. | |
198 | #- blues | |
199 | %ifarch i386 i586 athlon | |
200 | %{__sed} -i -e 's/^\(smtest.*t-shm\)/dnl \1/' libsm/Makefile.m4 | |
201 | %{__sed} -i -e 's/^\(smtest.*t-sem\)/dnl \1/' libsm/Makefile.m4 | |
202 | %endif | |
203 | ||
204 | %build | |
205 | echo "define(\`confLIBSEARCHPATH', \`/%{_lib} %{_prefix}/%{_lib}')" >> config.m4 | |
206 | echo "define(\`confCC', \`%{__cc}')" >> config.m4 | |
207 | %ifarch sparc sparc64 | |
208 | echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DSM_CONF_SEM=0 -DNETINET6')" >> config.m4 | |
209 | %else | |
210 | echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6')" >> config.m4 | |
211 | %endif | |
212 | echo "define(\`confLDOPTS', \`%{rpmldflags}')" >> config.m4 | |
213 | %if %{with ldap} | |
214 | echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4 | |
215 | echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4 | |
216 | %endif | |
217 | %if %{with pgsql} | |
218 | echo "APPENDDEF(\`confMAPDEF', \`-DPGSQLMAP')" >> config.m4 | |
219 | echo "APPENDDEF(\`confLIBS', \`-lpq -lresolv -lcrypto')" >> config.m4 | |
220 | %endif | |
221 | %if %{with tls} | |
222 | echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4 | |
223 | echo "APPENDDEF(\`confENVDEF', \`-D_FFR_TLS_1')" >> config.m4 | |
224 | echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4 | |
225 | %endif | |
226 | ||
227 | %ifarch sparc | |
228 | %define Build sparc32 sh Build | |
229 | %else | |
230 | %define Build sh Build | |
231 | %endif | |
232 | ||
233 | cd sendmail && %{Build} -f ../config.m4 | |
234 | cd ../mailstats && %{Build} -f ../config.m4 | |
235 | cd ../rmail && %{Build} -f ../config.m4 | |
236 | cd ../makemap && %{Build} -f ../config.m4 | |
237 | cd ../praliases && %{Build} -f ../config.m4 | |
238 | cd ../smrsh && %{Build} -f ../config.m4 | |
239 | cd ../libmilter && %{Build} -f ../config.m4 | |
240 | cd ../cf/cf | |
241 | m4 pld.mc > pld.cf | |
242 | ||
243 | %install | |
244 | rm -rf $RPM_BUILD_ROOT | |
245 | install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \ | |
246 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,monit,sysconfig,sasl,smrsh,security} \ | |
247 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},/usr/lib} \ | |
248 | $RPM_BUILD_ROOT{%{_datadir}/sendmail-cf,%{_libdir}} \ | |
249 | $RPM_BUILD_ROOT/var/{log,spool/mqueue} \ | |
250 | $RPM_BUILD_ROOT{%{_sysconfdir},%{_includedir}} | |
251 | ||
252 | OBJDIR=obj.$(uname -s).$(uname -r).$(\ | |
253 | %ifarch sparc | |
254 | sparc32 \ | |
255 | %endif | |
256 | uname -m) | |
257 | ||
258 | IDNU=`id -nu` | |
259 | IDNG=`id -ng` | |
260 | SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \ | |
261 | UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \ | |
262 | CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \ | |
263 | BINOWN=$IDNU BINGRP=$IDNG LIBOWN=$IDNU LIBGRP=$IDNG INCOWN=$IDNU INCGRP=$IDNG" | |
264 | ||
265 | %{__make} -C $OBJDIR/sendmail install \ | |
266 | $SMINSTOPT | |
267 | %{__make} -C $OBJDIR/mailstats install \ | |
268 | $SMINSTOPT | |
269 | %{__make} -C $OBJDIR/praliases install \ | |
270 | $SMINSTOPT | |
271 | %{__make} -C $OBJDIR/rmail force-install \ | |
272 | $SMINSTOPT | |
273 | %{__make} -C $OBJDIR/makemap install \ | |
274 | $SMINSTOPT | |
275 | %{__make} -C $OBJDIR/smrsh install \ | |
276 | $SMINSTOPT | |
277 | %{__make} -C $OBJDIR/libmilter install \ | |
278 | $SMINSTOPT \ | |
279 | LIBDIR=%{_libdir} | |
280 | ||
281 | ln -sf %{_sbindir}/makemap $RPM_BUILD_ROOT%{_bindir}/makemap | |
282 | ||
283 | # install the cf files | |
284 | cd cf | |
285 | %{__rm} cf/{Build,Makefile} | |
286 | find . -name '*~' -o -name '*.orig' | xargs -r %{__rm} | |
287 | cp -a * $RPM_BUILD_ROOT%{_datadir}/sendmail-cf | |
288 | cd - | |
289 | ||
290 | # sendmail.{cf,mc} | |
291 | cp -p cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf | |
292 | sed -e 's|@@PATH@@|%{_datadir}/sendmail-cf|' < %{SOURCE6} \ | |
293 | > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc | |
294 | ||
295 | %if %{with pgsql} | |
296 | cp -p bluelabs.mc $RPM_BUILD_ROOT%{_sysconfdir}/bluelabs.mc | |
297 | %endif | |
298 | ||
299 | # submit.mc (submit.cf is installed automatically) | |
300 | cp -p cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir} | |
301 | ||
302 | echo "# local-host-names - include all aliases for your machine here." \ | |
303 | > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names | |
304 | ||
305 | ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail | |
306 | ||
307 | # dangling symlinks | |
308 | for f in hoststat mailq newaliases purgestat; do | |
309 | ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/${f} | |
310 | done | |
311 | ||
312 | for map in virtusertable access domaintable mailertable; do | |
313 | touch $RPM_BUILD_ROOT%{_sysconfdir}/${map} | |
314 | $RPM_BUILD_ROOT%{_sbindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \ | |
315 | $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map} | |
316 | done | |
317 | ||
318 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases | |
319 | $RPM_BUILD_ROOT%{_sbindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \ | |
320 | $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3} | |
321 | ||
322 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sendmail | |
323 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail | |
324 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile | |
325 | cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf | |
326 | cp -p %{SOURCE13} $RPM_BUILD_ROOT/etc/pam.d/smtp | |
327 | cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/access | |
328 | cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mailertable | |
329 | cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/virtusertable | |
330 | cp -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/domaintable | |
331 | ||
332 | touch $RPM_BUILD_ROOT/etc/security/blacklist.smtp | |
333 | ||
334 | mv -f smrsh/README README.smrsh | |
335 | mv -f cf/README README.cf | |
336 | mv -f doc/op/op.me . | |
337 | ||
338 | bzip2 -dc %{SOURCE4} | tar xf - | |
339 | ||
340 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf{,/cf}/README | |
341 | # foreign systems | |
342 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/cs-{hpux*,osf1,solaris*,sunos*,ultrix*}.mc | |
343 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/generic-{bsd*,hpux*,mpeix,nextstep*,osf1,solaris,sunos*,ultrix*}.{cf,mc} | |
344 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/s2k-{osf1,ultrix*}.mc | |
345 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/ostype/{a-ux,aix*,altos,amdahl-uts,bsd*,darwin,dgux,domainos,dragonfly,dynix*,freebsd*,gnu,hpux*,irix*,isc*,maxion,mklinux,mpeix,nextstep,openbsd,osf1,powerux,ptx2,qnx,riscos*,sco*,sinix,solaris*,sunos*,svr4,ultrix*,unicos*,unixware*,unknown,uxpds}.m4 | |
346 | # foreign machines | |
347 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/{chez.cs,huginn.cs,knecht,mail.cs,mail.eecs,mailspool.cs,python.cs,ucbarpa,ucbvax,vangogh.cs}.mc | |
348 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/domain/{Berkeley.EDU,CS.Berkeley.EDU,EECS.Berkeley.EDU,S2K.Berkeley.EDU,berkeley-only}.m4 | |
349 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/hack/cssubdomain.m4 | |
350 | # precompiled files | |
351 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/cf/*.cf | |
352 | # MIB (package as mibs-*?) | |
353 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/sendmail.schema | |
354 | ||
355 | # for perl-Sendmail-Milter | |
356 | install $OBJDIR/libsm/libsm.a $OBJDIR/libsmutil/libsmutil.a \ | |
357 | $RPM_BUILD_ROOT%{_libdir} | |
358 | ||
359 | %clean | |
360 | rm -rf $RPM_BUILD_ROOT | |
361 | ||
362 | %pre | |
363 | %groupadd -g 25 smmsp | |
364 | %useradd -u 25 -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp | |
365 | ||
366 | %post | |
367 | umask 022 | |
368 | # | |
369 | # Convert old format to new | |
370 | # | |
371 | if [ -f /etc/mail/deny ] ; then | |
372 | cat /etc/mail/deny | \ | |
373 | awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \ | |
374 | {print $1" REJECT"}' >> /etc/mail/access | |
375 | mv -f /etc/mail/deny /etc/mail/deny.rpmorig | |
376 | fi | |
377 | for oldfile in relay_allow ip_allow name_allow ; do | |
378 | if [ -f /etc/mail/$oldfile ] ; then | |
379 | cat /etc/mail/$oldfile | \ | |
380 | awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \ | |
381 | { print $1\" RELAY\" }" >> /etc/mail/access | |
382 | mv -f /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig | |
383 | fi | |
384 | done | |
385 | ||
386 | # | |
387 | # Oops, these files moved | |
388 | # | |
389 | if [ -f /etc/sendmail.cw ] ; then | |
390 | cat /etc/sendmail.cw | \ | |
391 | awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \ | |
392 | { print $1 }' >> /etc/mail/local-host-names | |
393 | mv -f /etc/sendmail.cw /etc/sendmail.cw.rpmorig | |
394 | fi | |
395 | # | |
396 | # Rebuild maps (next reboot will rebuild also) | |
397 | # | |
398 | { /usr/bin/newaliases | |
399 | for map in virtusertable access domaintable mailertable; do | |
400 | if [ -f /etc/mail/${map} ] ; then | |
401 | /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map} | |
402 | sleep 1 | |
403 | fi | |
404 | done | |
405 | } > /dev/null 2>&1 | |
406 | ||
407 | /sbin/chkconfig --add sendmail | |
408 | %service sendmail restart "sendmail daemon" | |
409 | ||
410 | %preun | |
411 | if [ "$1" = "0" ]; then | |
412 | %service sendmail stop | |
413 | /sbin/chkconfig --del sendmail | |
414 | fi | |
415 | ||
416 | %postun | |
417 | if [ "$1" = "0" ]; then | |
418 | %userremove smmsp | |
419 | %groupremove smmsp | |
420 | fi | |
421 | ||
422 | # removal of compatibility links | |
423 | %triggerpostun -- sendmail < 8.10.1 | |
424 | /sbin/chkconfig --add sendmail | |
425 | ||
426 | %files | |
427 | %defattr(644,root,root,755) | |
428 | %doc FAQ KNOWNBUGS README* op.me RELEASE_NOTES examples/ | |
429 | %attr(755,root,root) %{_sbindir}/mailstats | |
430 | %attr(755,root,root) %{_sbindir}/praliases | |
431 | %attr(755,root,root) %{_bindir}/hoststat | |
432 | %attr(755,root,root) %{_bindir}/purgestat | |
433 | %attr(755,root,root) %{_bindir}/rmail | |
434 | %attr(755,root,root) %{_bindir}/makemap | |
435 | %attr(755,root,root) %{_sbindir}/makemap | |
436 | %attr(2755,root,smmsp) %{_sbindir}/sendmail | |
437 | %attr(755,root,root) %{_bindir}/newaliases | |
438 | %attr(755,root,root) %{_bindir}/mailq | |
439 | %attr(755,root,root) %{_sbindir}/smrsh | |
440 | /usr/lib/sendmail | |
441 | ||
442 | %{_mandir}/man1/mailq.1* | |
443 | %{_mandir}/man1/newaliases.1* | |
444 | %{_mandir}/man5/aliases.5* | |
445 | %{_mandir}/man8/mailstats.8* | |
446 | %{_mandir}/man8/makemap.8* | |
447 | %{_mandir}/man8/praliases.8* | |
448 | %{_mandir}/man8/rmail.8* | |
449 | %{_mandir}/man8/sendmail.8* | |
450 | %{_mandir}/man8/smrsh.8* | |
451 | ||
452 | %dir /etc/smrsh | |
453 | %dir %{_sysconfdir} | |
454 | /var/log/statistics | |
455 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sendmail.cf | |
456 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sendmail.mc | |
457 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/submit.cf | |
458 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/submit.mc | |
459 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local-host-names | |
460 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/aliases | |
461 | %{?with_pgsql:%{_sysconfdir}/bluelabs.mc} | |
462 | %attr(644,root,mail) %ghost %{_sysconfdir}/aliases.db | |
463 | %attr(770,root,smmsp) %dir /var/spool/clientmqueue | |
464 | %attr(750,root,mail) %dir /var/spool/mqueue | |
465 | ||
466 | %config %{_sysconfdir}/Makefile | |
467 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/access | |
468 | %ghost %{_sysconfdir}/access.db | |
469 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domaintable | |
470 | %ghost %{_sysconfdir}/domaintable.db | |
471 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mailertable | |
472 | %ghost %{_sysconfdir}/mailertable.db | |
473 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/virtusertable | |
474 | %ghost %{_sysconfdir}/virtusertable.db | |
475 | %config(noreplace) %{_sysconfdir}/helpfile | |
476 | ||
477 | %attr(754,root,root) /etc/rc.d/init.d/sendmail | |
478 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sendmail | |
479 | %config(noreplace) %verify(not md5 mtime size) /etc/sasl/Sendmail.conf | |
480 | %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp | |
481 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.smtp | |
482 | ||
483 | %dir %{_datadir}/sendmail-cf | |
484 | %dir %{_datadir}/sendmail-cf/cf | |
485 | %{_datadir}/sendmail-cf/cf/clientproto.mc | |
486 | %{_datadir}/sendmail-cf/cf/cyrusproto.mc | |
487 | %{_datadir}/sendmail-cf/cf/generic-linux.mc | |
488 | %{_datadir}/sendmail-cf/cf/pld.mc | |
489 | %{_datadir}/sendmail-cf/cf/submit.mc | |
490 | %{_datadir}/sendmail-cf/cf/tcpproto.mc | |
491 | %{_datadir}/sendmail-cf/cf/uucpproto.mc | |
492 | %dir %{_datadir}/sendmail-cf/domain | |
493 | %{_datadir}/sendmail-cf/domain/generic.m4 | |
494 | %{_datadir}/sendmail-cf/feature | |
495 | %{_datadir}/sendmail-cf/m4 | |
496 | %{_datadir}/sendmail-cf/mailer | |
497 | %dir %{_datadir}/sendmail-cf/ostype | |
498 | %{_datadir}/sendmail-cf/ostype/linux.m4 | |
499 | %dir %{_datadir}/sendmail-cf/sh | |
500 | %{_datadir}/sendmail-cf/sh/makeinfo.sh | |
501 | %{_datadir}/sendmail-cf/siteconfig | |
502 | ||
503 | %files -n libmilter-devel | |
504 | %defattr(644,root,root,755) | |
505 | %{_libdir}/libmilter.a | |
506 | %{_libdir}/libsm.a | |
507 | %{_libdir}/libsmutil.a | |
508 | %{_includedir}/libmilter |