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(ru): ðÏÞÔÏ×ÙÊ ÔÒÁÎÓÐÏÒÔÎÙÊ ÁÇÅÎÔ sendmail
11 Summary(tr): Elektronik posta hizmetleri sunucusu
12 Summary(uk): ðÏÛÔÏ×ÉÊ ÔÒÁÎÓÐÏÒÔÎÉÊ ÁÇÅÎÔ sendmail
17 Group: Networking/Daemons
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}-makemapman.patch
28 Patch1: %{name}-smrsh-paths.patch
29 Patch2: %{name}-rmail.patch
30 Patch3: %{name}-os-paths.patch
31 Patch4: %{name}-m4path.patch
32 Patch5: %{name}-redirect.patch
33 Patch6: %{name}-hprescan-dos.patch
34 BuildRequires: cyrus-sasl-devel
35 BuildRequires: db3-devel
36 %{!?_without_ldap:BuildRequires: openldap-devel}
37 %{!?_without_tls:BuildRequires: openssl-devel}
40 PreReq: /sbin/chkconfig
41 Requires(pre): /bin/id
42 Requires(pre): /usr/bin/getgid
43 Requires(pre): /usr/sbin/groupadd
44 Requires(pre): /usr/sbin/useradd
46 Requires(post): textutils
47 Requires(postun): /usr/sbin/groupdel
48 Requires(postun): /usr/sbin/userdel
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 Obsoletes: sendmail-cf
58 Obsoletes: sendmail-doc
62 %define _sysconfdir /etc/mail
65 The Sendmail program is a very widely used Mail Transport Agent (MTA).
66 MTAs send mail from one machine to another. Sendmail is not a client
67 program, which you use to read your e-mail. Sendmail is a
68 behind-the-scenes program which actually moves your e-mail over
69 networks or the Internet to where you want it to go.
72 Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine
73 allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und
74 Weiterleiten von Nachrichten, automatischem Routing an
75 Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über
76 das Internet senden und empfangen möchten, brauchen Sie sendmail.
79 Sendmail est un agent de transport de courrier, qui est le programme
80 transférent le courrier d'une machine à l'autre. Sendmail implémente
81 une facilité générale de routage de courrier entre les réseaux, permet
82 l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
83 passerelles du réseau, et une configuration flexible.
86 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
87 miêdzy komputerami w sieci (MTA). Zajmuje siê przekazywaniem poczty
88 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
89 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
90 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
91 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
92 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
95 Sendmail - ÜÔÏ Mail Transport Agent, ÐÒÏÇÒÁÍÍÁ ÐÅÒÅÓÙÌÁÀÝÁÑ ÐÏÞÔÕ Ó
96 ÍÁÛÉÎÙ ÎÁ ÍÁÛÉÎÕ. Sendmail ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ÓÔÁÎÄÁÒÔÎÙÅ ÓÒÅÄÓÔ×Á
97 ÍÅÖÓÅÔÅ×ÏÊ ÍÁÒÛÒÕÔÉÚÁÃÉÉ ÐÏÞÔÙ, aliasing, forwarding, Á×ÔÏÍÁÔÉÞÅÓËÕÀ
98 ÍÁÒÛÒÕÔÉÚÁÃÉÀ ÄÌÑ ÓÅÔÅ×ÙÈ ÛÌÀÚÏ× É ÇÉÂËÉÊ ÍÅÈÁÎÉÚÍ ËÏÎÆÉÇÕÒÁÃÉÉ.
101 Sendmail, bir mektubu bir makineden diðerine taþýr. Pek çok davranýþý
102 ayarlanabilir. Internet üzerinden mektup almak veya göndermek
103 istiyorsanýz bu pakete gereksiniminiz olacaktýr.
106 Sendmail - ÃÅ Mail Transport Agent, ÐÒÏÇÒÁÍÁ ÝÏ ÐÅÒÅÓÉÌÁ¤ ÐÏÛÔÕ Ú
107 ÍÁÛÉÎÉ ÎÁ ÍÁÛÉÎÕ. Sendmail ÎÁÄÁ¤ ÓÔÁÎÄÁÒÔΦ ÚÁÓÏÂÉ Í¦ÖÍÅÒÅÖÅ×ϧ
108 ÍÁÒÛÒÕÔÉÚÁæ§ ÐÏÛÔÉ, aliasing, forwarding, Á×ÔÏÍÁÔÉÞÎÕ ÍÁÒÛÒÕÔÉÚÁæÀ
109 ÄÌÑ ÍÅÒÅÖÅ×ÉÈ ÛÌÀÚ¦× ÔÁ ÇÎÕÞËÉÊ ÍÅÈÁΦÚÍ ÍÁÒÛÒÕÔÉÚÁæ§.
121 # seems to be obsoleted...
122 #tar xf %{SOURCE2} -C cf
124 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc
126 install %{SOURCE7} config.m4
129 echo "define(\`confCC', \`%{__cc}')" >> config.m4
130 echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6')" >> config.m4
131 %if %{?debug:0}%{!?debug:1}
132 echo "define(\`confLDOPTS', \`-s')" >> config.m4
134 %if %{?_without_ldap:0}%{!?_without_ldap:1}
135 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
136 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
138 %if %{?_without_tls:0}%{!?_without_tls:1}
139 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
140 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
143 cd sendmail && sh Build -f ../config.m4
144 cd ../mailstats && sh Build -f ../config.m4
145 cd ../rmail && sh Build -f ../config.m4
146 cd ../makemap && sh Build -f ../config.m4
147 cd ../praliases && sh Build -f ../config.m4
148 cd ../smrsh && sh Build -f ../config.m4
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
155 $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
156 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
157 $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
158 $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
160 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
164 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
165 UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG \
166 CFOWN=$IDNU CFGRP=$IDNG MSPQOWN=$IDNU GBINGRP=$IDNG GBINOWN=$IDNU \
167 BINOWN=$IDNU BINGRP=$IDNG"
168 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
169 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
170 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
171 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
172 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
173 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
174 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
176 # install the cf files
178 rm -f cf/{Build,Makefile} feature/*~
179 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
183 install cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
184 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
185 > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
187 # submit.mc (submit.cf is installed automatically)
188 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
190 echo "# local-host-names - include all aliases for your machine here." \
191 > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
193 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
196 for f in hoststat mailq newaliases purgestat ; do
197 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
200 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
201 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
202 # of the format of this file. (search for access_db in that file)
203 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
206 # by default we allow relaying from localhost...
207 localhost.localdomain RELAY
212 for map in virtusertable access domaintable mailertable ; do
213 touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
214 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
215 $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
218 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
219 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
220 $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
222 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
223 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
224 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
225 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
227 mv -f smrsh/README README.smrsh
228 mv -f cf/README README.cf
231 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
234 rm -rf $RPM_BUILD_ROOT
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
243 /usr/sbin/groupadd -g 25 -r -f smmsp
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
251 /usr/sbin/useradd -u 25 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2
256 # Convert old format to new
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
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
274 # Oops, these files moved
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
283 # Rebuild maps (next reboot will rebuild also)
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}
294 /sbin/chkconfig --add sendmail
295 if [ -f /var/lock/subsys/sendmail ]; then
296 /etc/rc.d/init.d/sendmail restart >&2
298 echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
302 if [ "$1" = "0" ]; then
303 if [ -f /var/lock/subsys/sendmail ]; then
304 /etc/rc.d/init.d/sendmail stop >&2
306 /sbin/chkconfig --del sendmail
310 if [ "$1" = "0" ]; then
311 /usr/sbin/userdel smmsp 2>/dev/null
312 /usr/sbin/groupdel smmsp 2>/dev/null
315 # removal of compatibility links
316 %triggerpostun -- sendmail < 8.10.1
317 /sbin/chkconfig --add sendmail
320 %defattr(644,root,root,755)
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
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*
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(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
354 %attr(0770,root,smmsp) %dir /var/spool/clientmqueue
355 %attr(0750,root,mail) %dir /var/spool/mqueue
357 %config %{_sysconfdir}/Makefile
358 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/access
359 %ghost %{_sysconfdir}/access.db
360 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/domaintable
361 %ghost %{_sysconfdir}/domaintable.db
362 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mailertable
363 %ghost %{_sysconfdir}/mailertable.db
364 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/virtusertable
365 %ghost %{_sysconfdir}/virtusertable.db
366 %config(noreplace) %{_sysconfdir}/helpfile
368 %attr(754,root,root) /etc/rc.d/init.d/sendmail
369 %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sendmail
370 %config(noreplace) %verify(not md5 size mtime) /etc/sasl/Sendmail.conf
372 %dir %{_libdir}/sendmail-cf
373 %dir %{_libdir}/sendmail-cf/cf
374 %{_libdir}/sendmail-cf/cf/pld.mc
375 %{_libdir}/sendmail-cf/feature
376 %{_libdir}/sendmail-cf/m4
377 %{_libdir}/sendmail-cf/mailer
378 %dir %{_libdir}/sendmail-cf/ostype
379 %{_libdir}/sendmail-cf/ostype/linux.m4
380 %dir %{_libdir}/sendmail-cf/sh
381 %{_libdir}/sendmail-cf/sh/makeinfo.sh
382 %{_libdir}/sendmail-cf/siteconfig