]> git.pld-linux.org Git - packages/sendmail.git/blob - sendmail.spec
- release 4.
[packages/sendmail.git] / sendmail.spec
1 #
2 # Conditional build:
3 # _without_ldap         without LDAP support
4 # _without_tls          without TLS (SSL) support
5
6 Summary:        A widely used Mail Transport Agent (MTA)
7 Summary(de):    sendmail-Mail-Übertragungsagent
8 Summary(fr):    Agent de transport de courrier sendmail
9 Summary(pl):    Sendmail - serwer poczty elektronicznej
10 Summary(ru):    ðÏÞÔÏ×ÙÊ ÔÒÁÎÓÐÏÒÔÎÙÊ ÁÇÅÎÔ sendmail
11 Summary(tr):    Elektronik posta hizmetleri sunucusu
12 Summary(uk):    ðÏÛÔÏ×ÉÊ ÔÒÁÎÓÐÏÒÔÎÉÊ ÁÇÅÎÔ sendmail
13 Name:           sendmail
14 Version:        8.12.3
15 Release:        4
16 License:        BSD
17 Group:          Networking/Daemons
18 Source0:        ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
19 Source1:        %{name}.init
20 Source2:        %{name}.sysconfig
21 Source3:        %{name}.aliases
22 # From http://doc.phpauction.org/sendmail/examples/
23 Source4:        %{name}-examples.tar.bz2
24 Source5:        %{name}-etc-mail-Makefile
25 Source6:        %{name}.mc
26 Source7:        %{name}-config.m4
27 Source8:        %{name}.sasl
28 Source9:        %{name}.access
29 Source10:       %{name}.mailertable
30 Source11:       %{name}.virtusertable
31 Source12:       %{name}.domaintable
32 Source13:       %{name}-smtp.pamd
33 Patch0:         %{name}-makemapman.patch
34 Patch1:         %{name}-smrsh-paths.patch
35 Patch2:         %{name}-rmail.patch
36 Patch3:         %{name}-os-paths.patch
37 Patch4:         %{name}-m4path.patch
38 Patch5:         %{name}-redirect.patch
39 Patch6:         %{name}-hprescan-dos.patch
40 BuildRequires:  cyrus-sasl-devel
41 BuildRequires:  db3-devel
42 %{!?_without_ldap:BuildRequires:        openldap-devel}
43 %{!?_without_tls:BuildRequires: openssl-devel}
44 Requires:       m4
45 Requires:       procmail
46 PreReq:         /sbin/chkconfig
47 Requires(pre):  /bin/id
48 Requires(pre):  /usr/bin/getgid
49 Requires(pre):  /usr/sbin/groupadd
50 Requires(pre):  /usr/sbin/useradd
51 Requires(post): awk
52 Requires(post): textutils
53 Requires(postun):       /usr/sbin/groupdel
54 Requires(postun):       /usr/sbin/userdel
55 Provides:       smtpdaemon
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 Obsoletes:      smtpdaemon
58 Obsoletes:      exim
59 Obsoletes:      masqmail
60 Obsoletes:      omta
61 Obsoletes:      postfix
62 Obsoletes:      qmail
63 Obsoletes:      sendmail-cf
64 Obsoletes:      sendmail-doc
65 Obsoletes:      smail
66 Obsoletes:      zmailer
67
68 %define         _sysconfdir     /etc/mail
69
70 %description
71 The Sendmail program is a very widely used Mail Transport Agent (MTA).
72 MTAs send mail from one machine to another. Sendmail is not a client
73 program, which you use to read your e-mail. Sendmail is a
74 behind-the-scenes program which actually moves your e-mail over
75 networks or the Internet to where you want it to go.
76
77 %description -l de
78 Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine
79 allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und
80 Weiterleiten von Nachrichten, automatischem Routing an
81 Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über
82 das Internet senden und empfangen möchten, brauchen Sie sendmail.
83
84 %description -l fr
85 Sendmail est un agent de transport de courrier, qui est le programme
86 transférent le courrier d'une machine à l'autre. Sendmail implémente
87 une facilité générale de routage de courrier entre les réseaux, permet
88 l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
89 passerelles du réseau, et une configuration flexible.
90
91 %description -l pl
92 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
93 miêdzy komputerami w sieci (MTA). Zajmuje siê przekazywaniem poczty
94 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
95 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
96 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
97 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
98 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
99
100 %description -l ru
101 Sendmail - ÜÔÏ Mail Transport Agent, ÐÒÏÇÒÁÍÍÁ ÐÅÒÅÓÙÌÁÀÝÁÑ ÐÏÞÔÕ Ó
102 ÍÁÛÉÎÙ ÎÁ ÍÁÛÉÎÕ. Sendmail ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ÓÔÁÎÄÁÒÔÎÙÅ ÓÒÅÄÓÔ×Á
103 ÍÅÖÓÅÔÅ×ÏÊ ÍÁÒÛÒÕÔÉÚÁÃÉÉ ÐÏÞÔÙ, aliasing, forwarding, Á×ÔÏÍÁÔÉÞÅÓËÕÀ
104 ÍÁÒÛÒÕÔÉÚÁÃÉÀ ÄÌÑ ÓÅÔÅ×ÙÈ ÛÌÀÚÏ× É ÇÉÂËÉÊ ÍÅÈÁÎÉÚÍ ËÏÎÆÉÇÕÒÁÃÉÉ.
105
106 %description -l tr
107 Sendmail, bir mektubu bir makineden diðerine taþýr. Pek çok davranýþý
108 ayarlanabilir. Internet üzerinden mektup almak veya göndermek
109 istiyorsanýz bu pakete gereksiniminiz olacaktýr.
110
111 %description -l uk
112 Sendmail - ÃÅ Mail Transport Agent, ÐÒÏÇÒÁÍÁ ÝÏ ÐÅÒÅÓÉÌÁ¤ ÐÏÛÔÕ Ú
113 ÍÁÛÉÎÉ ÎÁ ÍÁÛÉÎÕ. Sendmail ÎÁÄÁ¤ ÓÔÁÎÄÁÒÔΦ ÚÁÓÏÂɠͦÖÍÅÒÅÖÅ×ϧ
114 ÍÁÒÛÒÕÔÉÚÁ槠ÐÏÛÔÉ, aliasing, forwarding, Á×ÔÏÍÁÔÉÞÎÕ ÍÁÒÛÒÕÔÉÚÁæÀ
115 ÄÌÑ ÍÅÒÅÖÅ×ÉÈ ÛÌÀڦנÔÁ ÇÎÕÞËÉÊ ÍÅÈÁΦÚÍ ÍÁÒÛÒÕÔÉÚÁæ§.
116
117 %prep
118 %setup -q
119 %patch0 -p1
120 %patch1 -p1
121 %patch2 -p1
122 %patch3 -p1
123 %patch4 -p1
124 %patch5 -p1
125 %patch6 -p1
126
127 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc
128
129 install %{SOURCE7} config.m4
130
131 %build
132 echo "define(\`confCC', \`%{__cc}')" >> config.m4
133 echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6')" >> config.m4
134 %if %{?debug:0}%{!?debug:1}
135 echo "define(\`confLDOPTS', \`-s')" >> config.m4
136 %endif
137 %if %{?_without_ldap:0}%{!?_without_ldap:1}
138 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
139 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
140 %endif
141 %if %{?_without_tls:0}%{!?_without_tls:1}
142 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
143 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
144 %endif
145
146 cd sendmail     && sh Build -f ../config.m4
147 cd ../mailstats && sh Build -f ../config.m4
148 cd ../rmail     && sh Build -f ../config.m4
149 cd ../makemap   && sh Build -f ../config.m4
150 cd ../praliases && sh Build -f ../config.m4
151 cd ../smrsh     && sh Build -f ../config.m4
152 cd ../cf/cf
153 m4 pld.mc > pld.cf
154
155 %install
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
158         $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
159         $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
160         $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
161         $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
162         $RPM_BUILD_ROOT/etc/pam.d \
163
164 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
165
166 IDNU=`id -nu`
167 IDNG=`id -ng`
168 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
169         UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \
170         CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \
171         BINOWN=$IDNU BINGRP=$IDNG"
172 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
173 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
174 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
175 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
176 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
177 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
178 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
179
180 # install the cf files
181 cd cf
182 rm -f cf/{Build,Makefile} feature/*~
183 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
184 cd -
185
186 # sendmail.{cf,mc}
187 install cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
188 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
189         > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
190
191 # submit.mc (submit.cf is installed automatically)
192 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
193
194 echo "# local-host-names - include all aliases for your machine here." \
195         > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
196
197 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
198
199 # dangling symlinks
200 for f in hoststat mailq newaliases purgestat ; do
201         ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
202 done
203
204
205 for map in virtusertable access domaintable mailertable ; do
206         touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
207         $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
208                 $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
209 done
210
211 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
212 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
213         $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
214
215 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
216 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
217 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
218 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
219 install %{SOURCE13} $RPM_BUILD_ROOT/etc/pam.d/smtp
220 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/access
221 install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mailertable
222 install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/virtusertable
223 install %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/domaintable
224
225 mv -f smrsh/README README.smrsh
226 mv -f cf/README README.cf
227 mv -f doc/op/op.me .
228
229 bzip2 -dc %{SOURCE4} | tar xf -
230
231 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
232
233 %clean
234 rm -rf $RPM_BUILD_ROOT
235
236 %pre
237 if [ -n "`/usr/bin/getgid smmsp`" ]; then
238         if [ "`/usr/bin/getgid smmsp`" != "25" ]; then
239                 echo "Warning: group smmsp haven't gid=25. Correct this before installing sendmail." 1>&2
240                 exit 1
241         fi
242 else
243         /usr/sbin/groupadd -g 25 -r -f smmsp
244 fi
245 if [ -n "`/bin/id -u smmsp 2>/dev/null`" ]; then
246         if [ "`/bin/id -u smmsp`" != "25" ]; then
247                 echo "Warning: user smmsp haven't uid=25. Correct this before installing sendmail." 1>&2
248                 exit 1
249         fi
250 else
251         /usr/sbin/useradd -u 25 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2
252 fi
253
254 %post
255 #
256 # Convert old format to new
257 #
258 if [ -f /etc/mail/deny ] ; then
259         cat /etc/mail/deny | \
260                 awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
261                 {print $1" REJECT"}' >> /etc/mail/access
262         mv -f /etc/mail/deny /etc/mail/deny.rpmorig
263 fi
264 for oldfile in relay_allow ip_allow name_allow ; do
265         if [ -f /etc/mail/$oldfile ] ; then
266                 cat /etc/mail/$oldfile | \
267                         awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
268                         { print $1\" RELAY\" }" >> /etc/mail/access
269                 mv -f /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
270         fi
271 done
272
273 #
274 # Oops, these files moved
275 #
276 if [ -f /etc/sendmail.cw ] ; then
277         cat /etc/sendmail.cw | \
278                 awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
279                 { print $1 }' >> /etc/mail/local-host-names
280         mv -f /etc/sendmail.cw /etc/sendmail.cw.rpmorig
281 fi
282 #
283 # Rebuild maps (next reboot will rebuild also)
284 #
285 { /usr/bin/newaliases
286  for map in virtusertable access domaintable mailertable; do
287         if [ -f /etc/mail/${map} ] ; then
288                 /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
289                 sleep 1
290         fi
291  done
292 } > /dev/null 2>&1
293
294 /sbin/chkconfig --add sendmail
295 if [ -f /var/lock/subsys/sendmail ]; then
296         /etc/rc.d/init.d/sendmail restart >&2
297 else
298         echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
299 fi
300
301 %preun
302 if [ "$1" = "0" ]; then
303         if [ -f /var/lock/subsys/sendmail ]; then
304                 /etc/rc.d/init.d/sendmail stop >&2
305         fi
306         /sbin/chkconfig --del sendmail
307 fi
308
309 %postun
310 if [ "$1" = "0" ]; then
311         /usr/sbin/userdel smmsp 2>/dev/null
312         /usr/sbin/groupdel smmsp 2>/dev/null
313 fi
314
315 # removal of compatibility links
316 %triggerpostun -- sendmail < 8.10.1
317 /sbin/chkconfig --add sendmail
318
319 %files
320 %defattr(644,root,root,755)
321 %doc *.gz examples/
322 %attr(755,root,root) %{_sbindir}/mailstats
323 %attr(755,root,root) %{_sbindir}/praliases
324 %attr(755,root,root) %{_bindir}/hoststat
325 %attr(755,root,root) %{_bindir}/purgestat
326 %attr(755,root,root) %{_bindir}/rmail
327 %attr(755,root,root) %{_bindir}/makemap
328 %attr(755,root,root) %{_sbindir}/makemap
329 %attr(2755,root,smmsp) %{_sbindir}/sendmail
330 %attr(755,root,root) %{_bindir}/newaliases
331 %attr(755,root,root) %{_bindir}/mailq
332 %attr(755,root,root) %{_sbindir}/smrsh
333 %{_libdir}/sendmail
334
335 %{_mandir}/man8/rmail.8*
336 %{_mandir}/man8/praliases.8*
337 %{_mandir}/man8/mailstats.8*
338 %{_mandir}/man8/makemap.8*
339 %{_mandir}/man8/sendmail.8*
340 %{_mandir}/man5/aliases.5*
341 %{_mandir}/man1/newaliases.1*
342 %{_mandir}/man1/mailq.1*
343
344 %dir /etc/smrsh
345 %dir %{_sysconfdir}
346 /var/log/statistics
347 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.cf
348 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.mc
349 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.cf
350 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.mc
351 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/local-host-names
352 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/aliases
353 %attr(644,root,mail) %ghost %{_sysconfdir}/aliases.db
354 %attr(770,root,smmsp) %dir /var/spool/clientmqueue
355 %attr(750,root,mail) %dir /var/spool/mqueue
356 %attr(755,root,root) %dir /etc/pam.d
357
358 %config %{_sysconfdir}/Makefile
359 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/access
360 %ghost %{_sysconfdir}/access.db
361 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/domaintable
362 %ghost %{_sysconfdir}/domaintable.db
363 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mailertable
364 %ghost %{_sysconfdir}/mailertable.db
365 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/virtusertable
366 %ghost %{_sysconfdir}/virtusertable.db
367 %config(noreplace) %{_sysconfdir}/helpfile
368
369 %attr(754,root,root) /etc/rc.d/init.d/sendmail
370 %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sendmail
371 %config(noreplace) %verify(not md5 size mtime) /etc/sasl/Sendmail.conf
372 %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/smtp
373
374 %dir %{_libdir}/sendmail-cf
375 %dir %{_libdir}/sendmail-cf/cf
376 %{_libdir}/sendmail-cf/cf/pld.mc
377 %{_libdir}/sendmail-cf/feature
378 %{_libdir}/sendmail-cf/m4
379 %{_libdir}/sendmail-cf/mailer
380 %dir %{_libdir}/sendmail-cf/ostype
381 %{_libdir}/sendmail-cf/ostype/linux.m4
382 %dir %{_libdir}/sendmail-cf/sh
383 %{_libdir}/sendmail-cf/sh/makeinfo.sh
384 %{_libdir}/sendmail-cf/siteconfig
This page took 0.167237 seconds and 4 git commands to generate.