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 BuildRequires: pam-devel
41 %{!?_without_ldap:BuildRequires: openldap-devel}
42 %{!?_without_tls:BuildRequires: openssl-devel}
44 Prereq: /sbin/chkconfig
45 Prereq: /usr/sbin/groupadd
46 Prereq: /usr/sbin/useradd
47 Prereq: /usr/sbin/groupdel
48 Prereq: /usr/sbin/userdel
49 Prereq: /usr/bin/getgid
57 Obsoletes: sendmail-cf
58 Obsoletes: sendmail-doc
63 %define _sysconfdir /etc/mail
66 The Sendmail program is a very widely used Mail Transport Agent (MTA).
67 MTAs send mail from one machine to another. Sendmail is not a client
68 program, which you use to read your e-mail. Sendmail is a
69 behind-the-scenes program which actually moves your e-mail over
70 networks or the Internet to where you want it to go.
73 Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine
74 allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und
75 Weiterleiten von Nachrichten, automatischem Routing an
76 Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über
77 das Internet senden und empfangen möchten, brauchen Sie sendmail.
80 Sendmail est un agent de transport de courrier, qui est le programme
81 transférent le courrier d'une machine à l'autre. Sendmail implémente
82 une facilité générale de routage de courrier entre les réseaux, permet
83 l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
84 passerelles du réseau, et une configuration flexible.
87 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
88 miêdzy komputerami w sieci internet. Zajmuje siê przekazywaniem poczty
89 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
90 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
91 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
92 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
93 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
96 Sendmail, bir mektubu bir makineden diðerine taþýr. Pek çok davranýþý
97 ayarlanabilir. Internet üzerinden mektup almak veya göndermek
98 istiyorsanýz bu pakete gereksiniminiz olacaktýr.
113 # seems to be obsoleted...
114 #tar xf %{SOURCE2} -C cf
116 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
118 install %{SOURCE7} config.m4
121 %if %{?debug:0}%{!?debug:1}
122 echo "define(\`confLDOPTS', \`-s')" >> config.m4
124 %if %{?_without_ldap:0}%{!?_without_ldap:1}
125 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
126 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
128 %if %{?_without_tls:0}%{!?_without_tls:1}
129 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
130 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
133 RPM_OPT_FLAGS="%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6"
136 cd sendmail && sh Build -f ../config.m4
137 cd ../mailstats && sh Build -f ../config.m4
138 cd ../rmail && sh Build -f ../config.m4
139 cd ../makemap && sh Build -f ../config.m4
140 cd ../praliases && sh Build -f ../config.m4
141 cd ../smrsh && sh Build -f ../config.m4
143 m4 redhat.mc > redhat.cf
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
148 $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
149 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
150 $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
151 $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
153 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
157 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
158 UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \
159 CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \
160 BINOWN=$IDNU BINGRP=$IDNG"
161 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
162 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
163 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
164 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
165 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
166 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
167 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
169 # install the cf files
171 rm -f cf/{Build,Makefile} feature/*~
172 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
176 install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
177 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
178 > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
180 # submit.mc (submit.cf is installed automatically)
181 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
183 echo "# local-host-names - include all aliases for your machine here." \
184 > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
186 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
189 for f in hoststat mailq newaliases purgestat ; do
190 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
193 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
194 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
195 # of the format of this file. (search for access_db in that file)
196 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
199 # by default we allow relaying from localhost...
200 localhost.localdomain RELAY
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}
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}
215 install %{SOURCE4} $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
220 mv -f smrsh/README README.smrsh
221 mv -f cf/README README.cf
224 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
227 rm -rf $RPM_BUILD_ROOT
230 if [ -n "`/usr/bin/getgid smmsp`" ]; then
231 if [ "`/usr/bin/getgid smmsp`" != "72" ]; then
232 echo "Warning: group smmsp haven't gid=72. Correct this before installing sendmail." 1>&2
236 /usr/sbin/groupadd -g 72 -r -f smmsp
238 if [ -n "`/bin/id -u smmsp 2>/dev/null`" ]; then
239 if [ "`/bin/id -u smmsp`" != "72" ]; then
240 echo "Warning: user smmsp haven't uid=72. Correct this before installing sendmail." 1>&2
244 /usr/sbin/useradd -u 72 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2
249 # Convert old format to new
251 if [ -f /etc/mail/deny ] ; then
252 cat /etc/mail/deny | \
253 awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
254 {print $1" REJECT"}' >> /etc/mail/access
255 cp -f /etc/mail/deny /etc/mail/deny.rpmorig
257 for oldfile in relay_allow ip_allow name_allow ; do
258 if [ -f /etc/mail/$oldfile ] ; then
259 cat /etc/mail/$oldfile | \
260 awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
261 { print $1\" RELAY\" }" >> /etc/mail/access
262 cp -f /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
267 # Oops, these files moved
269 if [ -f /etc/sendmail.cw ] ; then
270 cat /etc/sendmail.cw | \
271 awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
272 { print $1 }' >> /etc/mail/local-host-names
273 cp -f /etc/sendmail.cw /etc/sendmail.cw.rpmorig
276 # Rebuild maps (next reboot will rebuild also)
278 { /usr/bin/newaliases
279 for map in virtusertable access domaintable mailertable; do
280 if [ -f /etc/mail/${map} ] ; then
281 /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
287 /sbin/chkconfig --add sendmail
288 if [ -f /var/lock/subsys/sendmail ]; then
289 /etc/rc.d/init.d/sendmail restart >&2
291 echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
295 if [ "$1" = "0" ]; then
296 if [ -f /var/lock/subsys/sendmail ]; then
297 /etc/rc.d/init.d/sendmail stop >&2
299 /sbin/chkconfig --del sendmail
303 if [ "$1" = "0" ]; then
304 /usr/sbin/userdel smmsp 2>/dev/null
305 /usr/sbin/groupdel smmsp 2>/dev/null
308 # removal of compatibility links
309 %triggerpostun -- sendmail < 8.10.1
310 /sbin/chkconfig --add sendmail
313 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_sbindir}/mailstats
316 %attr(755,root,root) %{_sbindir}/praliases
317 %attr(755,root,root) %{_bindir}/hoststat
318 %attr(755,root,root) %{_bindir}/purgestat
319 %attr(755,root,root) %{_bindir}/rmail
320 %attr(755,root,root) %{_bindir}/makemap
321 %attr(755,root,root) %{_sbindir}/makemap
322 %attr(2755,root,smmsp) %{_sbindir}/sendmail
323 %attr(755,root,root) %{_bindir}/newaliases
324 %attr(755,root,root) %{_bindir}/mailq
325 %attr(755,root,root) %{_sbindir}/smrsh
328 %{_mandir}/man8/rmail.8*
329 %{_mandir}/man8/praliases.8*
330 %{_mandir}/man8/mailstats.8*
331 %{_mandir}/man8/makemap.8*
332 %{_mandir}/man8/sendmail.8*
333 %{_mandir}/man5/aliases.5*
334 %{_mandir}/man1/newaliases.1*
335 %{_mandir}/man1/mailq.1*
338 # XXX can't do noreplace here or new sendmail will not deliver.
339 %config(noreplace) %{_sysconfdir}/sendmail.cf
340 %config(noreplace) %{_sysconfdir}/sendmail.mc
341 %config(noreplace) %{_sysconfdir}/submit.cf
342 %config(noreplace) %{_sysconfdir}/submit.mc
343 %config(noreplace) %{_sysconfdir}/local-host-names
344 %config(noreplace) %{_sysconfdir}/aliases
345 %attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
346 %attr(0770,root,mail) %dir /var/spool/mqueue
347 %attr(0770,root,smmsp) %dir /var/spool/clientmqueue
351 %config %{_sysconfdir}/Makefile
352 %ghost %{_sysconfdir}/virtusertable.db
353 %config(noreplace) %{_sysconfdir}/virtusertable
354 %ghost %{_sysconfdir}/access.db
355 %config(noreplace) %{_sysconfdir}/access
356 %ghost %{_sysconfdir}/domaintable.db
357 %config(noreplace) %{_sysconfdir}/domaintable
358 %ghost %{_sysconfdir}/mailertable.db
359 %config(noreplace) %{_sysconfdir}/mailertable
360 %config(noreplace) %{_sysconfdir}/helpfile
362 %attr(754,root,root) /etc/rc.d/init.d/sendmail
363 %config(noreplace) /etc/sysconfig/sendmail
364 %config(noreplace) /etc/sasl/Sendmail.conf
366 %dir %{_libdir}/sendmail-cf
367 %dir %{_libdir}/sendmail-cf/cf
368 %{_libdir}/sendmail-cf/cf/pld.mc
369 %{_libdir}/sendmail-cf/feature
370 %{_libdir}/sendmail-cf/m4
371 %{_libdir}/sendmail-cf/mailer
372 %dir %{_libdir}/sendmail-cf/ostype
373 %{_libdir}/sendmail-cf/ostype/linux.m4
374 %dir %{_libdir}/sendmail-cf/sh
375 %{_libdir}/sendmail-cf/sh/makeinfo.sh
376 %{_libdir}/sendmail-cf/siteconfig