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(de): Netzwerkwesen/Server
17 Group(pl): Sieciowe/Serwery
18 Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
20 Source2: http://www.informatik.uni-kiel.de/~ca/email/rules/check.tar
22 Source4: %{name}.sysconfig
23 Source5: %{name}-etc-mail-Makefile
25 Source7: %{name}-config.m4
27 Patch0: %{name}-makefile.patch
28 Patch1: %{name}-makemapman.patch
29 Patch2: %{name}-smrsh-paths.patch
30 Patch3: %{name}-rmail.patch
31 Patch4: %{name}-os-paths.patch
32 Patch5: %{name}-m4path.patch
33 Patch6: %{name}-dtelnet.patch
34 Patch7: %{name}-pld.mc.patch
35 Patch8: %{name}-redirect.patch
36 Patch9: %{name}-hprescan-dos.patch
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 BuildRequires: cyrus-sasl-devel
39 BuildRequires: db3-devel
40 %{!?_without_ldap:BuildRequires: openldap-devel}
41 %{!?_without_tls:BuildRequires: openssl-devel}
43 PreReq: /sbin/chkconfig
44 PreReq: /usr/sbin/groupadd
45 PreReq: /usr/sbin/useradd
46 PreReq: /usr/sbin/groupdel
47 PreReq: /usr/sbin/userdel
48 Requires(pre): /usr/bin/getgid
49 Requires(pre): /bin/id
51 Requires(post): textutils
59 Obsoletes: sendmail-cf
60 Obsoletes: sendmail-doc
64 %define _sysconfdir /etc/mail
67 The Sendmail program is a very widely used Mail Transport Agent (MTA).
68 MTAs send mail from one machine to another. Sendmail is not a client
69 program, which you use to read your e-mail. Sendmail is a
70 behind-the-scenes program which actually moves your e-mail over
71 networks or the Internet to where you want it to go.
74 Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine
75 allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und
76 Weiterleiten von Nachrichten, automatischem Routing an
77 Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über
78 das Internet senden und empfangen möchten, brauchen Sie sendmail.
81 Sendmail est un agent de transport de courrier, qui est le programme
82 transférent le courrier d'une machine à l'autre. Sendmail implémente
83 une facilité générale de routage de courrier entre les réseaux, permet
84 l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
85 passerelles du réseau, et une configuration flexible.
88 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
89 miêdzy komputerami w sieci (MTA). Zajmuje siê przekazywaniem poczty
90 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
91 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
92 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
93 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
94 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
97 Sendmail, bir mektubu bir makineden diðerine taþýr. Pek çok davranýþý
98 ayarlanabilir. Internet üzerinden mektup almak veya göndermek
99 istiyorsanýz bu pakete gereksiniminiz olacaktýr.
114 # seems to be obsoleted...
115 #tar xf %{SOURCE2} -C cf
117 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
119 install %{SOURCE7} config.m4
122 %if %{?debug:0}%{!?debug:1}
123 echo "define(\`confLDOPTS', \`-s')" >> config.m4
125 %if %{?_without_ldap:0}%{!?_without_ldap:1}
126 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
127 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
129 %if %{?_without_tls:0}%{!?_without_tls:1}
130 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
131 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
134 RPM_OPT_FLAGS="%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6"
137 cd sendmail && sh Build -f ../config.m4
138 cd ../mailstats && sh Build -f ../config.m4
139 cd ../rmail && sh Build -f ../config.m4
140 cd ../makemap && sh Build -f ../config.m4
141 cd ../praliases && sh Build -f ../config.m4
142 cd ../smrsh && sh Build -f ../config.m4
144 m4 redhat.mc > redhat.cf
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
149 $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
150 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
151 $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
152 $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
154 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
158 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
159 UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \
160 CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \
161 BINOWN=$IDNU BINGRP=$IDNG"
162 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
163 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
164 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
165 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
166 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
167 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
168 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
170 # install the cf files
172 rm -f cf/{Build,Makefile} feature/*~
173 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
177 install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
178 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
179 > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
181 # submit.mc (submit.cf is installed automatically)
182 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
184 echo "# local-host-names - include all aliases for your machine here." \
185 > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
187 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
190 for f in hoststat mailq newaliases purgestat ; do
191 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
194 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
195 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
196 # of the format of this file. (search for access_db in that file)
197 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
200 # by default we allow relaying from localhost...
201 localhost.localdomain RELAY
206 for map in virtusertable access domaintable mailertable ; do
207 touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
208 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
209 $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
212 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
213 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
214 $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
216 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
217 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
218 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
219 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
221 mv -f smrsh/README README.smrsh
222 mv -f cf/README README.cf
225 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
228 rm -rf $RPM_BUILD_ROOT
231 if [ -n "`/usr/bin/getgid smmsp`" ]; then
232 if [ "`/usr/bin/getgid smmsp`" != "25" ]; then
233 echo "Warning: group smmsp haven't gid=25. Correct this before installing sendmail." 1>&2
237 /usr/sbin/groupadd -g 25 -r -f smmsp
239 if [ -n "`/bin/id -u smmsp 2>/dev/null`" ]; then
240 if [ "`/bin/id -u smmsp`" != "25" ]; then
241 echo "Warning: user smmsp haven't uid=25. Correct this before installing sendmail." 1>&2
245 /usr/sbin/useradd -u 25 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2
250 # Convert old format to new
252 if [ -f /etc/mail/deny ] ; then
253 cat /etc/mail/deny | \
254 awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
255 {print $1" REJECT"}' >> /etc/mail/access
256 cp -f /etc/mail/deny /etc/mail/deny.rpmorig
258 for oldfile in relay_allow ip_allow name_allow ; do
259 if [ -f /etc/mail/$oldfile ] ; then
260 cat /etc/mail/$oldfile | \
261 awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
262 { print $1\" RELAY\" }" >> /etc/mail/access
263 cp -f /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
268 # Oops, these files moved
270 if [ -f /etc/sendmail.cw ] ; then
271 cat /etc/sendmail.cw | \
272 awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
273 { print $1 }' >> /etc/mail/local-host-names
274 cp -f /etc/sendmail.cw /etc/sendmail.cw.rpmorig
277 # Rebuild maps (next reboot will rebuild also)
279 { /usr/bin/newaliases
280 for map in virtusertable access domaintable mailertable; do
281 if [ -f /etc/mail/${map} ] ; then
282 /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
288 /sbin/chkconfig --add sendmail
289 if [ -f /var/lock/subsys/sendmail ]; then
290 /etc/rc.d/init.d/sendmail restart >&2
292 echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
296 if [ "$1" = "0" ]; then
297 if [ -f /var/lock/subsys/sendmail ]; then
298 /etc/rc.d/init.d/sendmail stop >&2
300 /sbin/chkconfig --del sendmail
304 if [ "$1" = "0" ]; then
305 /usr/sbin/userdel smmsp 2>/dev/null
306 /usr/sbin/groupdel smmsp 2>/dev/null
309 # removal of compatibility links
310 %triggerpostun -- sendmail < 8.10.1
311 /sbin/chkconfig --add sendmail
314 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_sbindir}/mailstats
317 %attr(755,root,root) %{_sbindir}/praliases
318 %attr(755,root,root) %{_bindir}/hoststat
319 %attr(755,root,root) %{_bindir}/purgestat
320 %attr(755,root,root) %{_bindir}/rmail
321 %attr(755,root,root) %{_bindir}/makemap
322 %attr(755,root,root) %{_sbindir}/makemap
323 %attr(2755,root,smmsp) %{_sbindir}/sendmail
324 %attr(755,root,root) %{_bindir}/newaliases
325 %attr(755,root,root) %{_bindir}/mailq
326 %attr(755,root,root) %{_sbindir}/smrsh
329 %{_mandir}/man8/rmail.8*
330 %{_mandir}/man8/praliases.8*
331 %{_mandir}/man8/mailstats.8*
332 %{_mandir}/man8/makemap.8*
333 %{_mandir}/man8/sendmail.8*
334 %{_mandir}/man5/aliases.5*
335 %{_mandir}/man1/newaliases.1*
336 %{_mandir}/man1/mailq.1*
341 # XXX can't do noreplace here or new sendmail will not deliver.
342 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.cf
343 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.mc
344 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.cf
345 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.mc
346 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/local-host-names
347 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/aliases
348 %attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
349 %attr(0770,root,smmsp) %dir /var/spool/clientmqueue
350 %attr(0770,root,mail) %dir /var/spool/mqueue
352 %config %{_sysconfdir}/Makefile
353 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/access
354 %ghost %{_sysconfdir}/access.db
355 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/domaintable
356 %ghost %{_sysconfdir}/domaintable.db
357 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mailertable
358 %ghost %{_sysconfdir}/mailertable.db
359 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/virtusertable
360 %ghost %{_sysconfdir}/virtusertable.db
361 %config(noreplace) %{_sysconfdir}/helpfile
363 %attr(754,root,root) /etc/rc.d/init.d/sendmail
364 %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sendmail
365 %config(noreplace) %verify(not md5 size mtime) /etc/sasl/Sendmail.conf
367 %dir %{_libdir}/sendmail-cf
368 %dir %{_libdir}/sendmail-cf/cf
369 %{_libdir}/sendmail-cf/cf/pld.mc
370 %{_libdir}/sendmail-cf/feature
371 %{_libdir}/sendmail-cf/m4
372 %{_libdir}/sendmail-cf/mailer
373 %dir %{_libdir}/sendmail-cf/ostype
374 %{_libdir}/sendmail-cf/ostype/linux.m4
375 %dir %{_libdir}/sendmail-cf/sh
376 %{_libdir}/sendmail-cf/sh/makeinfo.sh
377 %{_libdir}/sendmail-cf/siteconfig