3 # _without_ldap without LDAP support
4 # _without_tls without TLS (SSL) support
5 # _with_auth with AUTH support
7 Summary: A widely used Mail Transport Agent (MTA)
8 Summary(de): sendmail-Mail-Übertragungsagent
9 Summary(fr): Agent de transport de courrier sendmail
10 Summary(pl): Sendmail - serwer poczty elektronicznej
11 Summary(tr): Elektronik posta hizmetleri sunucusu
16 Group: Networking/Daemons
17 Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
19 Source2: http://www.informatik.uni-kiel.de/~ca/email/rules/check.tar
21 Source4: %{name}.sysconfig
22 Source5: %{name}-etc-mail-Makefile
24 Source7: %{name}-config.m4
26 Patch0: %{name}-makemapman.patch
27 Patch1: %{name}-smrsh-paths.patch
28 Patch2: %{name}-rmail.patch
29 Patch3: %{name}-os-paths.patch
30 Patch4: %{name}-m4path.patch
31 Patch5: %{name}-dtelnet.patch
32 Patch6: %{name}-redirect.patch
33 Patch7: %{name}-hprescan-dos.patch
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 BuildRequires: cyrus-sasl-devel
36 BuildRequires: db3-devel
37 %{!?_without_ldap:BuildRequires: openldap-devel}
38 %{!?_without_tls:BuildRequires: openssl-devel}
41 %{?_with_auth:Requires: cyrus-sasl-{plain,login}}
42 PreReq: /sbin/chkconfig
43 Requires(pre): /bin/id
44 Requires(pre): /usr/bin/getgid
45 Requires(pre): /usr/sbin/groupadd
46 Requires(pre): /usr/sbin/useradd
48 Requires(post): textutils
49 Requires(postun): /usr/sbin/groupdel
50 Requires(postun): /usr/sbin/userdel
58 Obsoletes: sendmail-cf
59 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 (MTA). 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.
111 # seems to be obsoleted...
112 #tar xf %{SOURCE2} -C cf
114 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc
116 install %{SOURCE7} config.m4
119 %if %{?debug:0}%{!?debug:1}
120 echo "define(\`confLDOPTS', \`-s')" >> config.m4
122 %if %{?_without_ldap:0}%{!?_without_ldap:1}
123 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
124 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
126 %if %{?_without_tls:0}%{!?_without_tls:1}
127 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
128 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
131 RPM_OPT_FLAGS="%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6"
134 cd sendmail && sh Build -f ../config.m4
135 cd ../mailstats && sh Build -f ../config.m4
136 cd ../rmail && sh Build -f ../config.m4
137 cd ../makemap && sh Build -f ../config.m4
138 cd ../praliases && sh Build -f ../config.m4
139 cd ../smrsh && sh Build -f ../config.m4
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
146 $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
147 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
148 $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
149 $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
151 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
155 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
156 UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \
157 CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \
158 BINOWN=$IDNU BINGRP=$IDNG"
159 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
160 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
161 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
162 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
163 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
164 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
165 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
167 # install the cf files
169 rm -f cf/{Build,Makefile} feature/*~
170 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
174 install cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
175 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
176 > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
178 # submit.mc (submit.cf is installed automatically)
179 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
181 echo "# local-host-names - include all aliases for your machine here." \
182 > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
184 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
187 for f in hoststat mailq newaliases purgestat ; do
188 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
191 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
192 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
193 # of the format of this file. (search for access_db in that file)
194 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
197 # by default we allow relaying from localhost...
198 localhost.localdomain RELAY
203 for map in virtusertable access domaintable mailertable ; do
204 touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
205 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
206 $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
209 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
210 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
211 $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
213 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
214 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
215 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
216 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
218 mv -f smrsh/README README.smrsh
219 mv -f cf/README README.cf
222 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
225 rm -rf $RPM_BUILD_ROOT
228 if [ -n "`/usr/bin/getgid smmsp`" ]; then
229 if [ "`/usr/bin/getgid smmsp`" != "25" ]; then
230 echo "Warning: group smmsp haven't gid=25. Correct this before installing sendmail." 1>&2
234 /usr/sbin/groupadd -g 25 -r -f smmsp
236 if [ -n "`/bin/id -u smmsp 2>/dev/null`" ]; then
237 if [ "`/bin/id -u smmsp`" != "25" ]; then
238 echo "Warning: user smmsp haven't uid=25. Correct this before installing sendmail." 1>&2
242 /usr/sbin/useradd -u 25 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2
247 # Convert old format to new
249 if [ -f /etc/mail/deny ] ; then
250 cat /etc/mail/deny | \
251 awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
252 {print $1" REJECT"}' >> /etc/mail/access
253 mv -f /etc/mail/deny /etc/mail/deny.rpmorig
255 for oldfile in relay_allow ip_allow name_allow ; do
256 if [ -f /etc/mail/$oldfile ] ; then
257 cat /etc/mail/$oldfile | \
258 awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
259 { print $1\" RELAY\" }" >> /etc/mail/access
260 mv -f /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
265 # Oops, these files moved
267 if [ -f /etc/sendmail.cw ] ; then
268 cat /etc/sendmail.cw | \
269 awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
270 { print $1 }' >> /etc/mail/local-host-names
271 mv -f /etc/sendmail.cw /etc/sendmail.cw.rpmorig
274 # Rebuild maps (next reboot will rebuild also)
276 { /usr/bin/newaliases
277 for map in virtusertable access domaintable mailertable; do
278 if [ -f /etc/mail/${map} ] ; then
279 /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
285 /sbin/chkconfig --add sendmail
286 if [ -f /var/lock/subsys/sendmail ]; then
287 /etc/rc.d/init.d/sendmail restart >&2
289 echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
293 if [ "$1" = "0" ]; then
294 if [ -f /var/lock/subsys/sendmail ]; then
295 /etc/rc.d/init.d/sendmail stop >&2
297 /sbin/chkconfig --del sendmail
301 if [ "$1" = "0" ]; then
302 /usr/sbin/userdel smmsp 2>/dev/null
303 /usr/sbin/groupdel smmsp 2>/dev/null
306 # removal of compatibility links
307 %triggerpostun -- sendmail < 8.10.1
308 /sbin/chkconfig --add sendmail
311 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_sbindir}/mailstats
314 %attr(755,root,root) %{_sbindir}/praliases
315 %attr(755,root,root) %{_bindir}/hoststat
316 %attr(755,root,root) %{_bindir}/purgestat
317 %attr(755,root,root) %{_bindir}/rmail
318 %attr(755,root,root) %{_bindir}/makemap
319 %attr(755,root,root) %{_sbindir}/makemap
320 %attr(2755,root,smmsp) %{_sbindir}/sendmail
321 %attr(755,root,root) %{_bindir}/newaliases
322 %attr(755,root,root) %{_bindir}/mailq
323 %attr(755,root,root) %{_sbindir}/smrsh
326 %{_mandir}/man8/rmail.8*
327 %{_mandir}/man8/praliases.8*
328 %{_mandir}/man8/mailstats.8*
329 %{_mandir}/man8/makemap.8*
330 %{_mandir}/man8/sendmail.8*
331 %{_mandir}/man5/aliases.5*
332 %{_mandir}/man1/newaliases.1*
333 %{_mandir}/man1/mailq.1*
338 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.cf
339 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sendmail.mc
340 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.cf
341 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.mc
342 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/local-host-names
343 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/aliases
344 %attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
345 %attr(0770,root,smmsp) %dir /var/spool/clientmqueue
346 %attr(0750,root,mail) %dir /var/spool/mqueue
348 %config %{_sysconfdir}/Makefile
349 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/access
350 %ghost %{_sysconfdir}/access.db
351 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/domaintable
352 %ghost %{_sysconfdir}/domaintable.db
353 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mailertable
354 %ghost %{_sysconfdir}/mailertable.db
355 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/virtusertable
356 %ghost %{_sysconfdir}/virtusertable.db
357 %config(noreplace) %{_sysconfdir}/helpfile
359 %attr(754,root,root) /etc/rc.d/init.d/sendmail
360 %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sendmail
361 %config(noreplace) %verify(not md5 size mtime) /etc/sasl/Sendmail.conf
363 %dir %{_libdir}/sendmail-cf
364 %dir %{_libdir}/sendmail-cf/cf
365 %{_libdir}/sendmail-cf/cf/pld.mc
366 %{_libdir}/sendmail-cf/feature
367 %{_libdir}/sendmail-cf/m4
368 %{_libdir}/sendmail-cf/mailer
369 %dir %{_libdir}/sendmail-cf/ostype
370 %{_libdir}/sendmail-cf/ostype/linux.m4
371 %dir %{_libdir}/sendmail-cf/sh
372 %{_libdir}/sendmail-cf/sh/makeinfo.sh
373 %{_libdir}/sendmail-cf/siteconfig