3 # _without_ldap without LDAP support
4 # _without_tls without TLS (SSL) support
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(tr): Elektronik posta hizmetleri sunucusu
15 Group: Networking/Daemons
16 Group(cs): Sí»ové/Démoni
17 Group(da): Netværks/Dæmoner
18 Group(de): Netzwerkwesen/Server
19 Group(es): Red/Servidores
20 Group(fr): Réseau/Serveurs
22 Group(it): Rete/Demoni
23 Group(no): Nettverks/Daemoner
24 Group(pl): Sieciowe/Serwery
25 Group(pt): Rede/Servidores
26 Group(ru): óÅÔØ/äÅÍÏÎÙ
27 Group(sl): Omre¾ni/Stre¾niki
28 Group(sv): Nätverk/Demoner
29 Group(uk): íÅÒÅÖÁ/äÅÍÏÎÉ
30 Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
32 Source2: http://www.informatik.uni-kiel.de/~ca/email/rules/check.tar
34 Source4: %{name}.sysconfig
35 Source5: %{name}-etc-mail-Makefile
37 Source7: %{name}-config.m4
39 Patch0: %{name}-makefile.patch
40 Patch1: %{name}-makemapman.patch
41 Patch2: %{name}-smrsh-paths.patch
42 Patch3: %{name}-rmail.patch
43 Patch4: %{name}-os-paths.patch
44 Patch5: %{name}-m4path.patch
45 Patch6: %{name}-dtelnet.patch
46 Patch7: %{name}-pld.mc.patch
47 Patch8: %{name}-redirect.patch
48 Patch9: %{name}-hprescan-dos.patch
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 BuildRequires: cyrus-sasl-devel
51 BuildRequires: db3-devel
52 %{!?_without_ldap:BuildRequires: openldap-devel}
53 %{!?_without_tls:BuildRequires: openssl-devel}
56 PreReq: /sbin/chkconfig
57 PreReq: /usr/sbin/groupadd
58 PreReq: /usr/sbin/useradd
59 PreReq: /usr/sbin/groupdel
60 PreReq: /usr/sbin/userdel
61 Requires(pre): /usr/bin/getgid
62 Requires(pre): /bin/id
64 Requires(post): textutils
72 Obsoletes: sendmail-cf
73 Obsoletes: sendmail-doc
77 %define _sysconfdir /etc/mail
80 The Sendmail program is a very widely used Mail Transport Agent (MTA).
81 MTAs send mail from one machine to another. Sendmail is not a client
82 program, which you use to read your e-mail. Sendmail is a
83 behind-the-scenes program which actually moves your e-mail over
84 networks or the Internet to where you want it to go.
87 Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine
88 allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und
89 Weiterleiten von Nachrichten, automatischem Routing an
90 Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über
91 das Internet senden und empfangen möchten, brauchen Sie sendmail.
94 Sendmail est un agent de transport de courrier, qui est le programme
95 transférent le courrier d'une machine à l'autre. Sendmail implémente
96 une facilité générale de routage de courrier entre les réseaux, permet
97 l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
98 passerelles du réseau, et une configuration flexible.
101 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
102 miêdzy komputerami w sieci (MTA). Zajmuje siê przekazywaniem poczty
103 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
104 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
105 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
106 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
107 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
110 Sendmail, bir mektubu bir makineden diðerine taþýr. Pek çok davranýþý
111 ayarlanabilir. Internet üzerinden mektup almak veya göndermek
112 istiyorsanýz bu pakete gereksiniminiz olacaktýr.
127 # seems to be obsoleted...
128 #tar xf %{SOURCE2} -C cf
130 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
132 install %{SOURCE7} config.m4
135 %if %{?debug:0}%{!?debug:1}
136 echo "define(\`confLDOPTS', \`-s')" >> config.m4
138 %if %{?_without_ldap:0}%{!?_without_ldap:1}
139 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
140 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
142 %if %{?_without_tls:0}%{!?_without_tls:1}
143 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
144 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
147 RPM_OPT_FLAGS="%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6"
150 cd sendmail && sh Build -f ../config.m4
151 cd ../mailstats && sh Build -f ../config.m4
152 cd ../rmail && sh Build -f ../config.m4
153 cd ../makemap && sh Build -f ../config.m4
154 cd ../praliases && sh Build -f ../config.m4
155 cd ../smrsh && sh Build -f ../config.m4
157 m4 redhat.mc > redhat.cf
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
162 $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
163 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
164 $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
165 $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
167 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
171 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
172 UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \
173 CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \
174 BINOWN=$IDNU BINGRP=$IDNG"
175 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
176 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
177 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
178 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
179 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
180 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
181 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
183 # install the cf files
185 rm -f cf/{Build,Makefile} feature/*~
186 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
190 install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
191 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
192 > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
194 # submit.mc (submit.cf is installed automatically)
195 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
197 echo "# local-host-names - include all aliases for your machine here." \
198 > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
200 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
203 for f in hoststat mailq newaliases purgestat ; do
204 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
207 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
208 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
209 # of the format of this file. (search for access_db in that file)
210 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
213 # by default we allow relaying from localhost...
214 localhost.localdomain RELAY
219 for map in virtusertable access domaintable mailertable ; do
220 touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
221 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
222 $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
225 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
226 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
227 $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
229 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
230 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
231 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
232 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
234 mv -f smrsh/README README.smrsh
235 mv -f cf/README README.cf
238 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
241 rm -rf $RPM_BUILD_ROOT
244 if [ -n "`/usr/bin/getgid smmsp`" ]; then
245 if [ "`/usr/bin/getgid smmsp`" != "25" ]; then
246 echo "Warning: group smmsp haven't gid=25. Correct this before installing sendmail." 1>&2
250 /usr/sbin/groupadd -g 25 -r -f smmsp
252 if [ -n "`/bin/id -u smmsp 2>/dev/null`" ]; then
253 if [ "`/bin/id -u smmsp`" != "25" ]; then
254 echo "Warning: user smmsp haven't uid=25. Correct this before installing sendmail." 1>&2
258 /usr/sbin/useradd -u 25 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2
263 # Convert old format to new
265 if [ -f /etc/mail/deny ] ; then
266 cat /etc/mail/deny | \
267 awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
268 {print $1" REJECT"}' >> /etc/mail/access
269 cp -f /etc/mail/deny /etc/mail/deny.rpmorig
271 for oldfile in relay_allow ip_allow name_allow ; do
272 if [ -f /etc/mail/$oldfile ] ; then
273 cat /etc/mail/$oldfile | \
274 awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
275 { print $1\" RELAY\" }" >> /etc/mail/access
276 cp -f /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
281 # Oops, these files moved
283 if [ -f /etc/sendmail.cw ] ; then
284 cat /etc/sendmail.cw | \
285 awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
286 { print $1 }' >> /etc/mail/local-host-names
287 cp -f /etc/sendmail.cw /etc/sendmail.cw.rpmorig
290 # Rebuild maps (next reboot will rebuild also)
292 { /usr/bin/newaliases
293 for map in virtusertable access domaintable mailertable; do
294 if [ -f /etc/mail/${map} ] ; then
295 /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
301 /sbin/chkconfig --add sendmail
302 if [ -f /var/lock/subsys/sendmail ]; then
303 /etc/rc.d/init.d/sendmail restart >&2
305 echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
309 if [ "$1" = "0" ]; then
310 if [ -f /var/lock/subsys/sendmail ]; then
311 /etc/rc.d/init.d/sendmail stop >&2
313 /sbin/chkconfig --del sendmail
317 if [ "$1" = "0" ]; then
318 /usr/sbin/userdel smmsp 2>/dev/null
319 /usr/sbin/groupdel smmsp 2>/dev/null
322 # removal of compatibility links
323 %triggerpostun -- sendmail < 8.10.1
324 /sbin/chkconfig --add sendmail
327 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_sbindir}/mailstats
330 %attr(755,root,root) %{_sbindir}/praliases
331 %attr(755,root,root) %{_bindir}/hoststat
332 %attr(755,root,root) %{_bindir}/purgestat
333 %attr(755,root,root) %{_bindir}/rmail
334 %attr(755,root,root) %{_bindir}/makemap
335 %attr(755,root,root) %{_sbindir}/makemap
336 %attr(2755,root,smmsp) %{_sbindir}/sendmail
337 %attr(755,root,root) %{_bindir}/newaliases
338 %attr(755,root,root) %{_bindir}/mailq
339 %attr(755,root,root) %{_sbindir}/smrsh
342 %{_mandir}/man8/rmail.8*
343 %{_mandir}/man8/praliases.8*
344 %{_mandir}/man8/mailstats.8*
345 %{_mandir}/man8/makemap.8*
346 %{_mandir}/man8/sendmail.8*
347 %{_mandir}/man5/aliases.5*
348 %{_mandir}/man1/newaliases.1*
349 %{_mandir}/man1/mailq.1*
354 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.cf
355 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.mc
356 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.cf
357 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.mc
358 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/local-host-names
359 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/aliases
360 %ghost %{_sysconfdir}/aliases.db
361 %attr(0770,root,smmsp) %dir /var/spool/clientmqueue
362 %attr(0750,root,mail) %dir /var/spool/mqueue
364 %config %{_sysconfdir}/Makefile
365 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/access
366 %ghost %{_sysconfdir}/access.db
367 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/domaintable
368 %ghost %{_sysconfdir}/domaintable.db
369 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mailertable
370 %ghost %{_sysconfdir}/mailertable.db
371 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/virtusertable
372 %ghost %{_sysconfdir}/virtusertable.db
373 %config(noreplace) %{_sysconfdir}/helpfile
375 %attr(754,root,root) /etc/rc.d/init.d/sendmail
376 %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sendmail
377 %config(noreplace) %verify(not md5 size mtime) /etc/sasl/Sendmail.conf
379 %dir %{_libdir}/sendmail-cf
380 %dir %{_libdir}/sendmail-cf/cf
381 %{_libdir}/sendmail-cf/cf/pld.mc
382 %{_libdir}/sendmail-cf/feature
383 %{_libdir}/sendmail-cf/m4
384 %{_libdir}/sendmail-cf/mailer
385 %dir %{_libdir}/sendmail-cf/ostype
386 %{_libdir}/sendmail-cf/ostype/linux.m4
387 %dir %{_libdir}/sendmail-cf/sh
388 %{_libdir}/sendmail-cf/sh/makeinfo.sh
389 %{_libdir}/sendmail-cf/siteconfig