-Summary: Sendmail -- mail transport agent
+Summary: A widely used Mail Transport Agent (MTA)
Summary(pl): Sendmail -- aplikacja do obs³ugi poczty elektronicznej
Name: sendmail
-Version: 8.9.3
-Release: 4
-Copyright: distributable (similar to, but not quite BSD)
+Version: 8.10.1
+Release: 5
+License: BSD
Group: Networking/Daemons
Group(pl): Sieciowe/Serwery
-Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
-Source1: site.Linux.m4
-Source2: aliases
-Source3: %{name}.init
-Source4: site.Linux.ppc.m4
-Source5: %{name}.sysconfig
-Patch0: %{name}-ipv6.patch
-Patch1: %{name}-dtelnet.patch
-Patch2: %{name}-path.patch
-Patch3: %{name}-rmail.patch
-Patch4: %{name}-pld.mc.patch
-Patch5: %{name}-redirect.patch
-Patch6: %{name}-smrsh.patch
-Patch7: %{name}-release.patch
-BuildRoot: /tmp/%{name}-%{version}-root
-URL: http://www.sendmail.org
+Provides: smtpdaemon
+Source0: ftp://ftp.cs.berkeley.edu/ucb/sendmail/%{name}.%{version}.tar.gz
+Source1: sendmail.init
+Source2: http://www.informatik.uni-kiel.de/%7Eca/email/rules/check.tar
+Source3: aliases
+Source4: sendmail.sysconfig
+Source5: sendmail-8.9.3-etc-mail-Makefile
+Source6: sendmail.mc
+Source7: sendmail-config.m4
+Patch0: sendmail-8.10.0-redhat.patch
+Patch1: sendmail-8.10.0-makemapman.patch
+Patch2: sendmail-8.10.0-smrsh-paths.patch
+Patch3: sendmail-8.8.7-rmail.patch
+Buildrequires: cyrus-sasl-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Prereq: /sbin/chkconfig
-Requires: rc-scripts
+Provides: smtpdaemon
+Obsoletes: smtpdaemon
Obsoletes: zmail
Obsoletes: qmail
Obsoletes: smail
+Obsoletes: exim
+Obsoletes: sendmail-cf
-%description
-Sendmail is a Mail Transport Agent, which is the program
-that moves mail from one machine to another. Sendmail implements a
-general internetwork mail routing facility, featuring aliasing and
-forwarding, automatic routing to network gateways, and flexible
-configuration.
+%description
+The Sendmail program is a very widely used Mail Transport Agent (MTA).
+MTAs send mail from one machine to another. Sendmail is not a client
+program, which you use to read your e-mail. Sendmail is a
+behind-the-scenes program which actually moves your e-mail over
+networks or the Internet to where you want it to go.
-If you need the ability to send and receive mail via the internet
-you'll need sendmail or another MTA.
+If you need documentation on Sendmail, you can install the sendmail-doc
+package.
%description -l pl
Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
miêdzy komputerami w sieci internet. Zajmuje siê przekazywaniem poczty
-elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
-konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego dodatkowym
-atutem jest prosta konfiguracja. Dziêki rozbudowanym mo¿liwo¶ciom
-konfiguracyjnym jest w stanie dostarczaæ przesy³ki za po¶rednictwem
-protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
-
-Je¿eli masz zamiar korzystaæ z poczty elektronicznej w sieci internet
-oraz 6bone to zainstaluj ten pakiet.
-
-%package cf
-Summary: Sendmail configuration files and m4 macros
-Summary(pl): Pliki konfiguracyjne oraz makra m4 dla sendmaila
-Group: Daemons
-Group(pl): Serwery
+elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
+konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
+dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
+mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
+po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
+
+dokumentacja do programu sendmail znajduje siê w pakiecie sendmail-doc.
+
+%package doc
+Summary: Documentation about the Sendmail Mail Transport Agent program
+Summary(pl): Dokumentacja do Sendmaila
+Group: Documentation
+Group(pl): Dokumentacja
Requires: %{name} = %{version}
-%description cf
-This package contains all the configuration files used to generate
-the sendmail.cf file distributed with the base sendmail package.
-You'll want this package if you need to reconfigure and rebuild
-your sendmail.cf file. For example, the default sendmail.cf is
-not configured for UUCP. If you need to send and receive mail
-over UUCP, you may need this package to help you reconfigure sendmail.
-
-%description -l pl cf
-Pakiet ten zawiera wszystkie pliki konfiguracyjne u¿ywane do gene-
-rowania pliku sendmail.cf, znajduj±cego siê w pakiecie bazowym.
-Bêdziesz potrzebowa³ tego pakietu je¿eli chcesz zmieniæ i przebudowaæ
-konfiguracjê swojego sendmaila. Na przyk³ad, standardowy plik konfigu-
-racyjny nie zawiera wspomagania dla poczty po UUCP. Je¿eli chcesz wy-
-sy³aæ i odbieraæ pocztê po UUCP bêdziesz potrzebowa³ tego pakietu.
+%description doc
+The sendmail-doc package contains documentation about the Sendmail
+Mail Transport Agent (MTA) program, including release notes, the
+Sendmail FAQ and a few papers written about Sendmail. The papers are
+provided in PostScript(TM) and troff formats.
+
+Install the sendmail-doc package if you need documentation about
+Sendmail.
+
+%description -l pl
+Ten pakiet zawiera dokumentacjê do programu Sendmail Mail Transport
+Agent (MTA). Dokumentacja zwawiera informacje o zmianach w bie¿±cej
+wersji i FAQ - najczêsciej zadawane pytania. Dokumentacja dostêpna jest
+w formacie PostScript(TM) oraz troff. Je¿eli potrzebujesz dokumentacji
+- zainstaluj ten pakiet.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-
-%build
-ID="`id -u`"
-GID="`id -g`"
-OPT=$RPM_OPT_FLAGS
-
-cat %{SOURCE1} |sed s/gid/"$GID"/g | sort | sed s/id/"$ID"/g | sort | \
-sed s/opt/"$OPT"/g > BuildTools/Site/site.Linux.m4
-
-cd src
-./makesendmail
-cd ../
-make makemap mailstats praliases rmail
-make smrsh LDOPTS="-s -static"
-(
-cd cf/cf
-/usr/bin/m4 pld.mc >> ./sendmail.cf
-)
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{mail,rc.d/init.d,sysconfig}
-install -d $RPM_BUILD_ROOT/usr/{bin,lib,sbin,share/sendmail-cf,libexec}
-install -d $RPM_BUILD_ROOT/usr/share/{man/man{1,5,8},misc}
-install -d $RPM_BUILD_ROOT/var/{run,spool/{mqueue,mail}}
+# XXX REVERTING
+#tar xf $RPM_SOURCE_DIR/check.tar -C cf
+#chown root.root cf/hack/* cf/README.check
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/mail/aliases
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
+sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
-touch $RPM_BUILD_ROOT/etc/mail/{sendmail.{ct,cw},relay-domains}
+install %{SOURCE7} config.m4
-for i in aliases access domaintable genericstable mailertable majordomo \
-virtusertable
-do touch $RPM_BUILD_ROOT/etc/mail/$i{,.db}
-done
+%build
+export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_VENDOR_CF_PATH=1"
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
+cd sendmail
+sh Build -f ../config.m4
+cd ..
-make DESTDIR=$RPM_BUILD_ROOT install
-make DESTDIR=$RPM_BUILD_ROOT OPTIONS=force-install rmail
+cd mailstats
+sh Build -f ../config.m4
+cd ..
-for i in hoststat mailq newaliases purgestat
- do ln -sf ../sbin/sendmail $RPM_BUILD_ROOT/usr/bin/$i
-done
-ln -sf ../sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
+cd rmail
+sh Build -f ../config.m4
+cd ..
-install cf/cf/sendmail.cf $RPM_BUILD_ROOT/etc/mail
+cd makemap
+sh Build -f ../config.m4
+cd ..
-cp cf/* $RPM_BUILD_ROOT/usr/share/sendmail-cf/ -a
+cd praliases
+sh Build -f ../config.m4
+cd ..
-mv $RPM_BUILD_ROOT/etc/mail/*.hf $RPM_BUILD_ROOT/usr/share/misc
+cd smrsh
+sh Build -f ../config.m4
+cd ..
-cat $RPM_BUILD_ROOT/etc/mail/sendmail.cf |sed s/DZ8.9.3/DZLinux/g > \
- $RPM_BUILD_ROOT/etc/mail/sendmail.cf.new
-
-mv $RPM_BUILD_ROOT/etc/mail/sendmail.cf.new $RPM_BUILD_ROOT/etc/mail/sendmail.cf
+cd cf/cf
+m4 redhat.mc > redhat.cf
-cp smrsh/README smrsh/SMRSH.txt
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT
+
+cd $RPM_BUILD_ROOT
+install -d etc/rc.d/init.d etc/rc.d/rc{0,1,2,3,4,5,6}.d etc/sysconfig
+install -d usr/bin usr/lib usr/man/man{1,5,8} usr/sbin var/log var/spool usr/lib/sendmail-cf
+cd -
+
+OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
+
+%{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
+ install -C $OBJDIR/sendmail
+%{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
+ install -C $OBJDIR/mailstats
+%{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
+ install -C $OBJDIR/praliases
+%{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
+ force-install -C $OBJDIR/rmail
+%{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
+ install -C $OBJDIR/makemap
+ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
+%{__make} DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
+ install -C $OBJDIR/smrsh
+
+# install docs by hand
+install -d $RPM_BUILD_ROOT%{_prefix}/doc/sendmail
+cp -ar FAQ LICENSE KNOWNBUGS README RELEASE_NOTES doc $RPM_BUILD_ROOT%{_prefix}/doc/sendmail
+cp smrsh/README $RPM_BUILD_ROOT%{_prefix}/doc/sendmail/README.smrsh
+cp cf/README $RPM_BUILD_ROOT%{_prefix}/doc/sendmail/README.cf
+
+# install the cf files
+cd cf
+cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
+cd -
+
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
+
+
+install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
+sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} > $RPM_BUILD_ROOT%{_sysconfdir}/mail/sendmail.mc
+echo "# local-host-names - include all aliases for your machine here." > $RPM_BUILD_ROOT%{_sysconfdir}/mail/local-host-names
+
+ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
+install -d -m755 $RPM_BUILD_ROOT/var/spool/mqueue
+
+# dangling symlinks
+for f in hoststat mailq newaliases purgestat
+ do
+ ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
+ done
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/smrsh
+
+cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/mail/access
+# Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
+# of the format of this file. (search for access_db in that file)
+# The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
+# package.
+#
+# by default we allow relaying from localhost...
+localhost.localdomain RELAY
+localhost RELAY
+127.0.0.1 RELAY
+
+EOF
+for map in virtusertable access domaintable mailertable
+ do
+touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}
+makemap hash $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}
+ done
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
+makemap hash $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
+
+install %SOURCE4 $RPM_BUILD_ROOT/etc/sysconfig/sendmail
+install %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
+
+install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mail/Makefile
+
+chmod u+w $RPM_BUILD_ROOT%{_sbindir}/{mailstats,praliases}
+chmod u+w $RPM_BUILD_ROOT%{_bindir}/rmail
+
+strip $RPM_BUILD_ROOT%{_sbindir}/{mailstats,praliases,sendmail}
+strip $RPM_BUILD_ROOT%{_bindir}/rmail
-gzip -9fn $RPM_BUILD_ROOT/usr/share/man/man[158]/*
-gzip -9fn README KNOWNBUGS RELEASE_NOTES smrsh/SMRSH.txt
+%clean
+rm -rf $RPM_BUILD_ROOT
%post
-/sbin/chkconfig --add sendmail
-if [ -f /var/lock/subsys/sendmail ]; then
- /etc/rc.d/init.d/sendmail restart >&2
+#
+# Convert old format to new
+#
+if [ -f /etc/mail/deny ] ; then
+ cat /etc/mail/deny | \
+ awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
+ {print $1" REJECT"}' >> /etc/mail/access
+ cp /etc/mail/deny /etc/mail/deny.rpmorig
fi
+for oldfile in relay_allow ip_allow name_allow ; do
+ if [ -f /etc/mail/$oldfile ] ; then
+ cat /etc/mail/$oldfile | \
+ awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
+ { print $1\" RELAY\" }" >> /etc/mail/access
+ cp /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
+ fi
+done
-%preun
-if [ -e /var/lock/sybsys/sendmail ]; then
- /etc/rc.d/init.d/sendmail stop &>/dev/null
+#
+# Oops, these files moved
+#
+if [ -f /etc/sendmail.cw ] ; then
+ cat /etc/sendmail.cw | \
+ awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
+ { print $1 }' >> /etc/mail/local-host-names
+ cp /etc/sendmail.cw /etc/sendmail.cw.rpmorig
fi
+#
+# Rebuild maps (next reboot will rebuild also)
+#
+{ /usr/bin/newaliases
+ for map in virtusertable access domaintable mailertable
+ do
+ if [ -f /etc/mail/${map} ] ; then
+ /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
+ sleep 1
+ fi
+ done
+} > /dev/null 2>&1
+
+/sbin/chkconfig --add sendmail
+%preun
if [ $1 = 0 ]; then
- /sbin/chkconfig --del sendmail
+ /sbin/chkconfig --del sendmail
fi
-%clean
-rm -rf $RPM_BUILD_ROOT
+# removal of compatibility links
+%triggerpostun -- sendmail < 8.10.1
+/sbin/chkconfig --add sendmail
%files
%defattr(644,root,root,755)
-%doc {README,KNOWNBUGS,RELEASE_NOTES}.gz
-%doc smrsh/SMRSH.txt.gz
-
-%attr(750,root,root) %dir /etc/mail
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/mail/*
-%attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/*
-%attr(755,root,root) /etc/rc.d/init.d/*
-
-%attr(755,root,root) /usr/bin/*
-
-%attr(755,root,root) /usr/sbin/mailstats
-%attr(755,root,root) /usr/sbin/makemap
-%attr(755,root,root) /usr/sbin/praliases
-
-%attr(4711,root,root) /usr/sbin/sendmail
-
-%attr(755,root,root) /usr/lib/sendmail
-%attr(755,root,root) /usr/sbin/smrsh
-
-/usr/share/man/man[158]/*
-/usr/share/misc/*.hf
-
-%ghost /var/run/sendmail.st
-
-%files cf
+%attr(755,root,root) %{_sbindir}/mailstats
+%attr(755,root,root) %{_sbindir}/praliases
+%attr(755,root,root) %{_bindir}/hoststat
+%attr(755,root,root) %{_bindir}/purgestat
+%attr(755,root,root) %{_bindir}/rmail
+%attr(755,root,root) %{_bindir}/makemap
+%attr(755,root,root) %{_sbindir}/makemap
+%attr(755,root,root) %{_sbindir}/sendmail
+%attr(755,root,root) %{_bindir}/newaliases
+%attr(755,root,root) %{_bindir}/mailq
+%attr(755,root,root) %{_sbindir}/smrsh
+%{_libdir}/sendmail
+%{_libdir}/sendmail-cf
+
+%{_mandir}/man8/rmail.8*
+%{_mandir}/man8/praliases.8*
+%{_mandir}/man8/mailstats.8*
+%{_mandir}/man8/makemap.8*
+%{_mandir}/man8/sendmail.8*
+%{_mandir}/man5/aliases.5*
+%{_mandir}/man1/newaliases.1*
+%{_mandir}/man1/mailq.1*
+
+/var/log/statistics
+# XXX can't do noreplace here or new sendmail will not deliver.
+%config %{_sysconfdir}/sendmail.cf
+%attr(0644,root,root) %config %{_sysconfdir}/mail/sendmail.mc
+%config(noreplace) %{_sysconfdir}/mail/local-host-names
+%config(noreplace) %{_sysconfdir}/aliases
+%attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
+%attr(0755,root,mail) %dir /var/spool/mqueue
+%dir %{_sysconfdir}/smrsh
+%dir %{_sysconfdir}/mail
+
+%config %{_sysconfdir}/mail/Makefile
+%ghost %{_sysconfdir}/mail/virtusertable.db
+%config(noreplace) %{_sysconfdir}/mail/virtusertable
+
+%ghost %{_sysconfdir}/mail/access.db
+%config(noreplace) %{_sysconfdir}/mail/access
+
+%ghost %{_sysconfdir}/mail/domaintable.db
+%config(noreplace) %{_sysconfdir}/mail/domaintable
+
+%ghost %{_sysconfdir}/mail/mailertable.db
+%config(noreplace) %{_sysconfdir}/mail/mailertable
+%config(noreplace) %{_sysconfdir}/mail/helpfile
+
+%attr(754,root,root) /etc/rc.d/init.d/sendmail
+%config(noreplace) /etc/sysconfig/sendmail
+
+%files doc
%defattr(644,root,root,755)
-
-%dir /usr/share/sendmail-cf
-%attr(-,root,root) /usr/share/sendmail-cf/*
+%{_prefix}/doc/sendmail