- new version 8.14.1
- spec file cleanup for merge review (rhbz#226407)
- dropped update support for sendmail versions prior to 8.12.0
- using pdf documentation
This commit is contained in:
Thomas Woerner 2007-04-12 14:35:58 +00:00
parent 33f964f233
commit 70974534dd
9 changed files with 331 additions and 288 deletions

View File

@ -7,3 +7,4 @@ sendmail.8.13.6.tar.gz
sendmail.8.13.7.tar.gz
sendmail.8.13.8.tar.gz
sendmail.8.14.0.tar.gz
sendmail.8.14.1.tar.gz

10
sendmail-etc-mail-access Normal file
View File

@ -0,0 +1,10 @@
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY

View File

@ -0,0 +1,4 @@
# The "domain table" can be used to provide domain name mapping.
# Use of this should really be limited to your own domains.
# It may be useful if you change names (e.g., your company
# changes names from oldname.com to newname.com)

View File

@ -0,0 +1 @@
# local-host-names - include all aliases for your machine here.

View File

@ -0,0 +1,30 @@
# The "mailer table" can be used to override routing for particular domains
# (which are not in class {w}, i.e. local host names).
#
# hash /etc/mail/mailertable
#
# Keys in this database are fully qualified domain names or partial domains
# preceded by a dot -- for example, "vangogh.CS.Berkeley.EDU" or
# ".CS.Berkeley.EDU". As a special case of the latter, "." matches any domain
# not covered by other keys. Values must be of the form:
#
# mailer:domain
#
# where "mailer" is the internal mailer name, and "domain" is where to send
# the message. These maps are not reflected into the message header. As a
# special case, the forms:
#
# local:user
#
# will forward to the indicated user using the local mailer,
#
# local:
#
# will forward to the original user in the e-mail address using the local
# mailer, and
#
# error:code message
# error:D.S.N:code message
#
# will give an error message with the indicated SMTP reply code and message,
# where D.S.N is an RFC 1893 compliant error code.

View File

@ -0,0 +1,2 @@
# trusted-users - users that can send mail as others without a warning
# apache, mailman, majordomo, uucp, are good candidates

View File

@ -0,0 +1,41 @@
# A domain-specific form of aliasing, allowing multiple virtual domains to be
# hosted on one machine.
#
# info@foo.com foo-info
# info@bar.com bar-info
# joe@bar.com error:nouser 550 No such user here
# jax@bar.com error:5.7.0:550 Address invalid
# @baz.org jane@example.net
#
# then mail addressed to info@foo.com will be sent to the address foo-info,
# mail addressed to info@bar.com will be delivered to bar-info, and mail
# addressed to anyone at baz.org will be sent to jane@example.net, mail to
# joe@bar.com will be rejected with the specified error message, and mail to
# jax@bar.com will also have a RFC 1893 compliant error code 5.7.0.
#
# The username from the original address is passed as %1 allowing:
#
# @foo.org %1@example.com
#
# Additionally, if the local part consists of "user+detail" then "detail" is
# passed as %2 and "+detail" is passed as %3 when a match against user+* is
# attempted, so entries like
#
# old+*@foo.org new+%2@example.com
# gen+*@foo.org %2@example.com
# +*@foo.org %1%3@example.com
# X++@foo.org Z%3@example.com
# @bar.org %1%3
#
# Note: to preserve "+detail" for a default case (@domain) %1%3 must be used
# as RHS. There are two wildcards after "+": "+" matches only a non-empty
# detail, "*" matches also empty details, e.g., user+@foo.org matches#
# +*@foo.org but not ++@foo.org. This can be used to ensure that the
# parameters %2 and %3 are not empty.
#
# All the host names on the left hand side (foo.com, bar.com, and baz.org)
# must be in class {w} or class {VirtHost}. The latter can be defined by the
# macros VIRTUSER_DOMAIN or VIRTUSER_DOMAIN_FILE (analogously to
# MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE). If VIRTUSER_DOMAIN or
# VIRTUSER_DOMAIN_FILE is used, then the entries of class {VirtHost} are
# added to class {R}, i.e., relaying is allowed to (and from) those domains.

View File

@ -1,32 +1,28 @@
## package options
%define with_fsl no
%define with_tls yes
%define with_sasl1 no
%define with_sasl2 yes
%define with_milter yes
%define with_ldap yes
%define with_mysql no
%define with_tls yes
%define with_sasl1 no
%define with_sasl2 yes
%define with_milter yes
%define with_ldap yes
%define with_mysql no
%define enable_pie yes
%define enable_pie yes
%define old_setup no
%define sendmailcf /usr/share/sendmail-cf
%define sendmailcf %{_datadir}/sendmail-cf
%define stdir /var/log/mail
%define smshell /sbin/nologin
%define initdir /etc/rc.d/init.d
%define spooldir /var/spool
%define maildir %{_sysconfdir}/mail
Summary: A widely used Mail Transport Agent (MTA).
Summary: A widely used Mail Transport Agent (MTA)
Name: sendmail
Version: 8.14.0
Version: 8.14.1
Release: 1
License: Sendmail
Group: System Environment/Daemons
Provides: smtpdaemon
URL: http://www.sendmail.org/
Provides: MTA smtpdaemon
Source0: ftp://ftp.sendmail.org/pub/sendmail/sendmail.%{version}.tar.gz
Source1: sendmail.init
%if "%{old_setup}" == "yes"
Source3: aliases
%endif
Source4: sendmail.sysconfig
Source5: sendmail.etc-mail-Makefile
Source6: sendmail-redhat.mc
@ -34,6 +30,12 @@ Source7: Sendmail-sasl1.conf
Source8: sendmail.pam
Source9: sendmail-8.12.5-newconfig.readme
Source11: Sendmail-sasl2.conf
Source12: sendmail-etc-mail-access
Source13: sendmail-etc-mail-domaintable
Source14: sendmail-etc-mail-local-host-names
Source15: sendmail-etc-mail-mailertable
Source16: sendmail-etc-mail-trusted-users
Source17: sendmail-etc-mail-virtusertable
Patch3: sendmail-8.14.0-makemapman.patch
Patch4: sendmail-8.13.2-smrsh-paths.patch
Patch5: sendmail-8.12.2-movefiles.patch
@ -44,45 +46,41 @@ Patch11: sendmail-8.14.0-dynamic.patch
Patch12: sendmail-8.13.0-cyrus.patch
Patch13: sendmail-8.13.7-aliases_dir.patch
Patch14: sendmail-8.13.7-vacation.patch
Patch15: sendmail-8.13.8-noversion.patch
Buildroot: %{_tmppath}/%{name}-root
Patch15: sendmail-8.14.1-noversion.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tcp_wrappers-devel
BuildRequires: db4-devel
BuildRequires: hesiod-devel
BuildRequires: groff
BuildRequires: ghostscript
BuildRequires: m4
PreReq: /usr/sbin/alternatives
PreReq: %{_sbindir}/alternatives
Provides: %{_sbindir}/sendmail %{_bindir}/mailq %{_bindir}/newaliases
Provides: %{_bindir}/rmail %{_mandir}/man1/mailq.1.gz
Provides: %{_mandir}/man1/newaliases.1.gz %{_mandir}/man5/aliases.5.gz
Provides: %{_bindir}/rmail /usr/lib/sendmail
Provides: %{_sysconfdir}/pam.d/smtp
Provides: %{_mandir}/man1/mailq.1.gz %{_mandir}/man1/newaliases.1.gz
Provides: %{_mandir}/man5/aliases.5.gz %{_mandir}/man8/sendmail.8.gz
PreReq: chkconfig >= 1.3
PreReq: /usr/sbin/useradd /bin/mktemp fileutils gawk sed sh-utils
PreReq: %{_sbindir}/useradd sed coreutils
Requires: procmail
Requires: bash >= 2.0
%if "%{old_setup}" != "yes"
Requires: setup >= 2.5.31-1
BuildRequires: setup >= 2.5.31-1
#Requires: /etc/aliases
%endif
%if "%{with_fsl}" == "yes"
BuildRequires: fsl >= 1.2.0
PreReq: fsl >= 1.2.0
%endif
%if "%{with_tls}" == "yes"
BuildRequires: openssl-devel
PreReq: openssl
BuildRequires: openssl-devel
Requires: openssl
%endif
%if "%{with_sasl1}" == "yes" || "%{with_sasl2}" == "yes"
BuildRequires: cyrus-sasl-devel, openssl-devel
PreReq: /usr/sbin/saslauthd, openssl
BuildRequires: cyrus-sasl-devel openssl-devel
Requires: %{_sbindir}/saslauthd openssl
%endif
%if "%{with_ldap}" == "yes"
BuildRequires: openldap-devel, openssl-devel
PreReq: openldap, openssl
BuildRequires: openldap-devel openssl-devel
Requires: openldap openssl
%endif
%if "%{with_mysql}" == "yes"
BuildRequires: mysql-devel
PreReq: mysql
BuildRequires: mysql-devel
Requires: mysql
%endif
@ -98,7 +96,7 @@ the sendmail-cf package installed. If you need documentation on
Sendmail, you can install the sendmail-doc package.
%package doc
Summary: Documentation about the Sendmail Mail Transport Agent program.
Summary: Documentation about the Sendmail Mail Transport Agent program
Group: Documentation
Requires: sendmail = %{version}-%{release}
@ -109,8 +107,8 @@ Sendmail FAQ, and a few papers written about Sendmail. The papers are
provided in PostScript(TM) and troff formats.
%package devel
Summary: Extra development include files and development files.
Group: System Environment/Daemons
Summary: Extra development include files and development files
Group: Development/Libraries
Requires: sendmail = %{version}-%{release}
%description devel
@ -118,7 +116,7 @@ Include files and devel libraries for e.g. the milter addons as part
of sendmail.
%package cf
Summary: The files needed to reconfigure Sendmail.
Summary: The files needed to reconfigure Sendmail
Group: System Environment/Daemons
Requires: sendmail = %{version}-%{release}
Requires: m4
@ -142,14 +140,14 @@ your sendmail.cf file.
%patch12 -p1 -b .cyrus
%patch13 -p1 -b .aliases_dir
%patch14 -p1 -b .vacation
%patch15 -p1
%patch15 -p1 -b .noversion
%build
# generate redhat config file
cat > redhat.config.m4 << EOF
define(\`confMAPDEF', \`-DNEWDB -DNIS -DHESIOD -DMAP_REGEX -DSOCKETMAP -DNAMED_BIND=1')
define(\`confOPTIMIZE', \`\`\`${RPM_OPT_FLAGS}''')
define(\`confENVDEF', \`-I/usr/include/db4 -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_WORKAROUND_BROKEN_NAMESERVERS -D_FFR_SMTP_SSL -D_FFR_TLS_1')
define(\`confENVDEF', \`-I%{_includedir}/db4 -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_TLS_1')
define(\`confLIBDIRS', \`-L/usr/kerberos/%{_lib}')
define(\`confLIBS', \`-lnsl -lwrap -lhesiod -lcrypt -ldb')
define(\`confMANOWN', \`root')
@ -163,11 +161,6 @@ define(\`STATUS_FILE', \`%{stdir}/statistics')
define(\`confLIBSEARCH', \`db resolv 44bsd')
EOF
# block mail from http proxies
#cat >> redhat.config.m4 << EOF
#APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_BLOCK_PROXIES')
#EOF
%ifarch ppc ppc64 s390x
cat >> redhat.config.m4 << EOF
APPENDDEF(\`confOPTIMIZE', \`-DSM_CONF_SHM=0')
@ -195,7 +188,7 @@ EOF
%if "%{with_sasl1}" == "yes"
cat >> redhat.config.m4 << EOF
APPENDDEF(\`confENVDEF', \`-DSASL=1 -D_FFR_UNSAFE_SASL')dnl
APPENDDEF(\`confENVDEF', \`-DSASL=1')dnl
APPENDDEF(\`confLIBS', \`-lsasl -lcrypto')dnl
EOF
%endif
@ -210,7 +203,6 @@ EOF
%if "%{with_milter}" == "yes"
cat >> redhat.config.m4 << EOF
APPENDDEF(\`conf_sendmail_ENVDEF', \`-DMILTER')dnl
APPENDDEF(\`conf_libmilter_ENVDEF', \`-D_FFR_MILTER_ROOT_UNSAFE')dnl
EOF
%endif
@ -241,24 +233,32 @@ for i in $DIRS; do
popd
done
make -C doc/op op.pdf
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
rm -rf %{buildroot}
cd $RPM_BUILD_ROOT
mkdir -p etc/sysconfig .%{initdir} etc/pam.d
mkdir -p usr/bin usr/include/libmilter usr/%{_lib} usr/lib
mkdir -p .%{_mandir}/man{1,5,8}
mkdir -p usr/sbin var/log var/spool .%{sendmailcf}
cd -
for d in %{_bindir} %{_sbindir} %{_includedir}/libmilter \
%{_libdir} %{_mandir}/man{1,5,8} %{maildir} %{stdir} %{spooldir} \
%{_docdir}/sendmail-%{version} %{sendmailcf} %{_sysconfdir}/smrsh\
%{spooldir}/clientmqueue %{_sysconfdir}/sysconfig %{_initrddir} \
%{_sysconfdir}/pam.d;
do
install -m 755 -d %{buildroot}$d
done
install -m 700 -d %{buildroot}%{spooldir}/mqueue
# create /usr/lib for 64 bit architectures
%if "%{_libdir}" != "/usr/lib"
install -m 755 -d %{buildroot}/usr/lib
%endif
OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
nameuser=`id -nu`
namegroup=`id -ng`
Make() {
make $@ \
DESTDIR=$RPM_BUILD_ROOT \
DESTDIR=%{buildroot} \
MANROOT=%{_mandir}/man \
SBINOWN=${nameuser} SBINGRP=${namegroup} \
UBINOWN=${nameuser} UBINGRP=${namegroup} \
@ -270,6 +270,8 @@ Make() {
MSPQOWN=${nameuser}
}
OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
Make install -C $OBJDIR/libmilter
Make install -C $OBJDIR/libsmutil
Make install -C $OBJDIR/sendmail
@ -279,185 +281,138 @@ Make install -C $OBJDIR/praliases
Make install -C $OBJDIR/smrsh
Make install -C $OBJDIR/makemap
touch $RPM_BUILD_ROOT/rootfile
root=..
while [ ! -r $RPM_BUILD_ROOT/%{_bindir}/${root}/rootfile ] ; do
root=${root}/..
# install libraries
install -m 644 $OBJDIR/libmilter/libmilter.a %{buildroot}%{_libdir}
install -m 644 $OBJDIR/libsmutil/libsmutil.a %{buildroot}%{_libdir}
install -m 644 $OBJDIR/libsm/libsm.a %{buildroot}%{_libdir}
%if "%{_lib}" == "lib64"
# libmilter.a is 64 bit, not usable in /usr/lib for 32 bit build
rm -fr %{buildroot}/usr/lib/libmilter.a
%endif
# replace absolute with relative symlinks
ln -sf ../sbin/makemap %{buildroot}%{_bindir}/makemap
for f in hoststat mailq newaliases purgestat ; do
ln -sf ../sbin/sendmail.sendmail %{buildroot}%{_bindir}/${f}
done
ln -sf ${root}%{_sbindir}/makemap $RPM_BUILD_ROOT/%{_bindir}/makemap
# Install docs by hand for the sendmail-doc package.
DOC=$RPM_BUILD_ROOT%{_docdir}/sendmail
mkdir -p $DOC
cp -ar FAQ LICENSE KNOWNBUGS README RELEASE_NOTES doc $DOC
cp sendmail/README $DOC/README.sendmail
cp sendmail/SECURITY $DOC/SECURITY
cp smrsh/README $DOC/README.smrsh
cp libmilter/README $DOC/README.libmilter
cp cf/README $DOC/README.cf
cp %{SOURCE9} $DOC/README.redhat
# use /usr/lib, even for 64 bit architectures
ln -sf ../sbin/sendmail.sendmail %{buildroot}/usr/lib/sendmail.sendmail
# Install the cf files for the sendmail-cf package.
cp -ar cf/* $RPM_BUILD_ROOT%{sendmailcf}
# install docs for sendmail
install -p -m 644 FAQ %{buildroot}%{_docdir}/sendmail-%{version}
install -p -m 644 KNOWNBUGS %{buildroot}%{_docdir}/sendmail-%{version}
install -p -m 644 LICENSE %{buildroot}%{_docdir}/sendmail-%{version}
install -p -m 644 README %{buildroot}%{_docdir}/sendmail-%{version}
install -p -m 644 RELEASE_NOTES %{buildroot}%{_docdir}/sendmail-%{version}
# install docs for sendmail-doc
install -m 644 doc/op/op.pdf %{buildroot}%{_docdir}/sendmail-%{version}
install -p -m 644 sendmail/README %{buildroot}%{_docdir}/sendmail-%{version}/README.sendmail
install -p -m 644 sendmail/SECURITY %{buildroot}%{_docdir}/sendmail-%{version}
install -p -m 644 smrsh/README %{buildroot}%{_docdir}/sendmail-%{version}/README.smrsh
install -p -m 644 libmilter/README %{buildroot}%{_docdir}/sendmail-%{version}/README.libmilter
install -p -m 644 cf/README %{buildroot}%{_docdir}/sendmail-%{version}/README.cf
install -m 644 %{SOURCE9} %{buildroot}%{_docdir}/sendmail-%{version}/README.redhat
# install the cf files for the sendmail-cf package.
cp -ar cf/* %{buildroot}%{sendmailcf}
# remove patch backup files
rm -rf $RPM_BUILD_ROOT%{sendmailcf}/cf/Build.*
rm -rf $RPM_BUILD_ROOT%{sendmailcf}/*/*.mc.*
rm -rf $RPM_BUILD_ROOT%{sendmailcf}/*/*.m4.*
rm -rf %{buildroot}%{sendmailcf}/cf/Build.*
rm -rf %{buildroot}%{sendmailcf}/*/*.mc.*
rm -rf %{buildroot}%{sendmailcf}/*/*.m4.*
install -d -m755 $RPM_BUILD_ROOT/etc/mail
# install sendmail.mc with proper paths
install -m 644 %{SOURCE6} %{buildroot}%{maildir}/sendmail.mc
sed -i -e 's|@@PATH@@|%{sendmailcf}|' %{buildroot}%{maildir}/sendmail.mc
sed -e 's|@@PATH@@|%{sendmailcf}|' < %{SOURCE6} > $RPM_BUILD_ROOT/etc/mail/sendmail.mc
sed -e 's|%{sendmailcf}|\.\.|' < $RPM_BUILD_ROOT/etc/mail/sendmail.mc > cf/cf/redhat.mc
%if "%{stdir}" != "/etc/mail"
perl -pi -e 's:/etc/mail/statistics:%{stdir}/statistics:' cf/cf/redhat.mc
# create sendmail.cf
cp %{buildroot}%{maildir}/sendmail.mc cf/cf/redhat.mc
sed -i -e 's|%{sendmailcf}|\.\.|' cf/cf/redhat.mc
%if "%{stdir}" != "%{maildir}"
sed -i -e 's:%{maildir}/statistics:%{stdir}/statistics:' cf/cf/redhat.mc
%endif
(cd cf/cf && m4 redhat.mc > redhat.cf)
install -m 644 cf/cf/redhat.cf $RPM_BUILD_ROOT/etc/mail/sendmail.cf
install -m 644 cf/cf/submit.mc $RPM_BUILD_ROOT/etc/mail/submit.mc
install -m 644 cf/cf/redhat.cf %{buildroot}%{maildir}/sendmail.cf
install -m 644 cf/cf/submit.mc %{buildroot}%{maildir}/submit.mc
echo "# local-host-names - include all aliases for your machine here." \
> $RPM_BUILD_ROOT/etc/mail/local-host-names
( echo "# trusted-users - users that can send mail as others without a warning"
echo "# apache, mailman, majordomo, uucp, are good candidates" ) \
> $RPM_BUILD_ROOT/etc/mail/trusted-users
install -m 644 %{SOURCE12} %{buildroot}%{maildir}/access
install -m 644 %{SOURCE13} %{buildroot}%{maildir}/domaintable
install -m 644 %{SOURCE14} %{buildroot}%{maildir}/local-host-names
install -m 644 %{SOURCE15} %{buildroot}%{maildir}/mailertable
install -m 644 %{SOURCE16} %{buildroot}%{maildir}/trusted-users
install -m 644 %{SOURCE17} %{buildroot}%{maildir}/virtusertable
ln -sf ../sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail.sendmail
install -d -m775 $RPM_BUILD_ROOT/var/spool/mqueue
install -d -m755 $RPM_BUILD_ROOT/var/spool/clientmqueue
# dangling symlinks
root=..
while [ ! -r $RPM_BUILD_ROOT/%{_bindir}/${root}/rootfile ] ; do
root=${root}/..
done
for f in hoststat mailq newaliases purgestat ; do
ln -sf ${root}%{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
done
install -d -m755 $RPM_BUILD_ROOT/etc/smrsh
cat <<EOF > $RPM_BUILD_ROOT/etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
EOF
# create db files
for map in virtusertable access domaintable mailertable ; do
touch $RPM_BUILD_ROOT/etc/mail/${map}
chmod 0644 $RPM_BUILD_ROOT/etc/mail/${map}
$RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT/etc/mail/sendmail.cf hash $RPM_BUILD_ROOT/etc/mail/${map}.db < $RPM_BUILD_ROOT/etc/mail/${map}
chmod 0644 $RPM_BUILD_ROOT/etc/mail/${map}.db
touch %{buildroot}%{maildir}/${map}
chmod 0644 %{buildroot}%{maildir}/${map}
%{buildroot}%{_bindir}/makemap -C %{buildroot}%{maildir}/sendmail.cf \
hash %{buildroot}%{maildir}/${map}.db \
< %{buildroot}%{maildir}/${map}
chmod 0644 %{buildroot}%{maildir}/${map}.db
done
%if "%{old_setup}" == "yes"
install -m644 %{SOURCE3} $RPM_BUILD_ROOT/etc/aliases
$RPM_BUILD_ROOT/usr/bin/makemap -C $RPM_BUILD_ROOT/etc/mail/sendmail.cf hash $RPM_BUILD_ROOT/etc/aliases.db < %{SOURCE3}
%else
$RPM_BUILD_ROOT/usr/bin/makemap -C $RPM_BUILD_ROOT/etc/mail/sendmail.cf hash $RPM_BUILD_ROOT/etc/aliases.db < /etc/aliases
%endif
%{buildroot}%{_bindir}/makemap -C %{buildroot}%{maildir}/sendmail.cf \
hash %{buildroot}%{_sysconfdir}/aliases.db < %{_sysconfdir}/aliases
install -m644 %SOURCE4 $RPM_BUILD_ROOT/etc/sysconfig/sendmail
install -m755 %SOURCE1 $RPM_BUILD_ROOT%{initdir}/sendmail
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/sendmail
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/sendmail
install -m 644 %{SOURCE5} %{buildroot}%{maildir}/Makefile
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/mail/Makefile
chmod u+w $RPM_BUILD_ROOT/usr/sbin/{mailstats,praliases}
chmod u+w $RPM_BUILD_ROOT/usr/bin/rmail
chmod u+w %{buildroot}%{_sbindir}/{mailstats,praliases}
chmod u+w %{buildroot}%{_bindir}/rmail
%if "%{with_sasl1}" == "yes"
install -m755 -d $RPM_BUILD_ROOT%{_libdir}/sasl
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_libdir}/sasl/Sendmail.conf
install -m 755 -d %{buildroot}%{_libdir}/sasl
install -m 644 %{SOURCE7} %{buildroot}%{_libdir}/sasl/Sendmail.conf
%endif
%if "%{with_sasl2}" == "yes"
install -m755 -d $RPM_BUILD_ROOT%{_libdir}/sasl2
install -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/sasl2/Sendmail.conf
install -m 755 -d %{buildroot}%{_libdir}/sasl2
install -m 644 %{SOURCE11} %{buildroot}%{_libdir}/sasl2/Sendmail.conf
%endif
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT/etc/pam.d/smtp.sendmail
install -m 755 -d $RPM_BUILD_ROOT%{_libdir}
install -m 644 $OBJDIR/libmilter/libmilter.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 $OBJDIR/libsmutil/libsmutil.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 $OBJDIR/libsm/libsm.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/smtp.sendmail
# allow stripping of the sendmail app
chmod 755 $RPM_BUILD_ROOT%{_sbindir}/sendmail
chmod 755 %{buildroot}%{_sbindir}/sendmail
mv $RPM_BUILD_ROOT%{_sbindir}/sendmail $RPM_BUILD_ROOT%{_sbindir}/sendmail.sendmail
# fix path for statistics file in man pages
%if "%{stdir}" != "%{maildir}"
sed -i -e 's:%{maildir}/statistics:%{stdir}/statistics:' %{buildroot}%{_mandir}/man*/*
%endif
# rename files for alternative usage
mv %{buildroot}%{_sbindir}/sendmail %{buildroot}%{_sbindir}/sendmail.sendmail
for i in mailq newaliases rmail; do
mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/$i.sendmail
mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i.sendmail
done
mv $RPM_BUILD_ROOT%{_mandir}/man1/mailq.1 $RPM_BUILD_ROOT%{_mandir}/man1/mailq.sendmail.1
mv $RPM_BUILD_ROOT%{_mandir}/man1/newaliases.1 $RPM_BUILD_ROOT%{_mandir}/man1/newaliases.sendmail.1
mv $RPM_BUILD_ROOT%{_mandir}/man5/aliases.5 $RPM_BUILD_ROOT%{_mandir}/man5/aliases.sendmail.5
mv $RPM_BUILD_ROOT%{_mandir}/man8/sendmail.8 $RPM_BUILD_ROOT%{_mandir}/man8/sendmail.sendmail.8
mv %{buildroot}%{_mandir}/man1/mailq.1 %{buildroot}%{_mandir}/man1/mailq.sendmail.1
mv %{buildroot}%{_mandir}/man1/newaliases.1 %{buildroot}%{_mandir}/man1/newaliases.sendmail.1
mv %{buildroot}%{_mandir}/man5/aliases.5 %{buildroot}%{_mandir}/man5/aliases.sendmail.5
mv %{buildroot}%{_mandir}/man8/sendmail.8 %{buildroot}%{_mandir}/man8/sendmail.sendmail.8
%if "%{stdir}" != "/etc/mail"
perl -pi -e 's:/etc/mail/statistics:%{stdir}/statistics:' $RPM_BUILD_ROOT%{_mandir}/man*/*
%endif
%if "%{_libdir}" == "/usr/lib64"
rm -fr $RPM_BUILD_ROOT/usr/lib/libmilter.a
%endif
rm -rf $RPM_BUILD_ROOT/rootfile
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%pre
/usr/sbin/useradd -u 47 -d /var/spool/mqueue -r -s %{smshell} mailnull >/dev/null 2>&1
/usr/sbin/useradd -u 51 -d /var/spool/mqueue -r -s %{smshell} smmsp >/dev/null 2>&1
%{_sbindir}/useradd -u 47 -d %{spooldir}/mqueue -r -s %{smshell} mailnull >/dev/null 2>&1
%{_sbindir}/useradd -u 51 -d %{spooldir}/mqueue -r -s %{smshell} smmsp >/dev/null 2>&1
exit 0
%postun
if [ "$1" -ge "1" ]; then
%{initdir}/sendmail condrestart >/dev/null 2>&1
mta=`readlink /etc/alternatives/mta`
%{_initrddir}/sendmail condrestart >/dev/null 2>&1
mta=`readlink %{_sysconfdir}/alternatives/mta`
if [ "$mta" == "%{_sbindir}/sendmail.sendmail" ]; then
/usr/sbin/alternatives --set mta %{_sbindir}/sendmail.sendmail
%{_sbindir}/alternatives --set mta %{_sbindir}/sendmail.sendmail
fi
fi
exit 0
%post
#
# 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
#
# Remove deprecated config flags which are probably harmless to remove
#
cf=`/bin/mktemp /etc/mail/sendmail.cf.XXXXXX`
if [ "$cf" != "" ] ; then
sed 's/^O AutoRebuildAliases$/#&/g' /etc/mail/sendmail.cf > ${cf} && \
cat ${cf} > /etc/mail/sendmail.cf
rm ${cf}
fi
/sbin/chkconfig --add sendmail
#
# Set up the alternatives files for MTAs.
#
/usr/sbin/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.sendmail 90 \
%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.sendmail 90 \
--slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.sendmail \
--slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.sendmail \
--slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.sendmail \
@ -469,115 +424,101 @@ fi
--slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.sendmail.5.gz \
--initscript sendmail
#
# 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)
#
{
chown root /etc/aliases.db /etc/mail/access.db /etc/mail/mailertable.db \
/etc/mail/domaintable.db /etc/mail/virtusertable.db
/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}
fi
done
chown root %{_sysconfdir}/aliases.db %{maildir}/access.db \
%{maildir}/mailertable.db %{maildir}/domaintable.db \
%{maildir}/virtusertable.db
%{_bindir}/newaliases
for map in virtusertable access domaintable mailertable ; do
if [ -f %{maildir}/${map} ]; then
%{_bindir}/makemap hash %{maildir}/${map} \
< %{maildir}/${map}
fi
done
} > /dev/null 2>&1
exit 0
%preun
if [ $1 = 0 ]; then
%{initdir}/sendmail stop >/dev/null 2>&1
%{_initrddir}/sendmail stop >/dev/null 2>&1
/sbin/chkconfig --del sendmail
/usr/sbin/alternatives --remove mta %{_sbindir}/sendmail.sendmail
%{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.sendmail
fi
exit 0
%triggerpostun -- sendmail < 8.10.0
/sbin/chkconfig --add sendmail
%triggerpostun -- sendmail < 8.11.6-11
/usr/sbin/alternatives --auto mta
%files
%defattr(-,root,root)
/usr/bin/hoststat
/usr/bin/makemap
/usr/bin/purgestat
/usr/sbin/mailstats
/usr/sbin/makemap
/usr/sbin/praliases
%attr(2755,root,smmsp)/usr/sbin/sendmail.sendmail
/usr/bin/rmail.sendmail
/usr/bin/newaliases.sendmail
/usr/bin/mailq.sendmail
/usr/sbin/smrsh
%doc %{_docdir}/sendmail-%{version}/FAQ
%doc %{_docdir}/sendmail-%{version}/KNOWNBUGS
%doc %{_docdir}/sendmail-%{version}/LICENSE
%doc %{_docdir}/sendmail-%{version}/README
%doc %{_docdir}/sendmail-%{version}/RELEASE_NOTES
%{_bindir}/hoststat
%{_bindir}/makemap
%{_bindir}/purgestat
%{_sbindir}/mailstats
%{_sbindir}/makemap
%{_sbindir}/praliases
%attr(2755,root,smmsp) %{_sbindir}/sendmail.sendmail
%{_bindir}/rmail.sendmail
%{_bindir}/newaliases.sendmail
%{_bindir}/mailq.sendmail
%{_sbindir}/smrsh
/usr/lib/sendmail.sendmail
%{_mandir}/man8/rmail.8*
%{_mandir}/man8/praliases.8*
%{_mandir}/man8/mailstats.8*
%{_mandir}/man8/makemap.8*
%{_mandir}/man8/sendmail.sendmail.8*
%{_mandir}/man8/smrsh.8*
%{_mandir}/man5/aliases.sendmail.5*
%{_mandir}/man1/newaliases.sendmail.1*
%{_mandir}/man1/mailq.sendmail.1*
%{_mandir}/man8/rmail.8.gz
%{_mandir}/man8/praliases.8.gz
%{_mandir}/man8/mailstats.8.gz
%{_mandir}/man8/makemap.8.gz
%{_mandir}/man8/sendmail.sendmail.8.gz
%{_mandir}/man8/smrsh.8.gz
%{_mandir}/man5/aliases.sendmail.5.gz
%{_mandir}/man1/newaliases.sendmail.1.gz
%{_mandir}/man1/mailq.sendmail.1.gz
%dir %{stdir}
%config(noreplace) %{stdir}/statistics
%config(noreplace) /etc/mail/sendmail.cf
%config(noreplace) /etc/mail/submit.cf
%attr(0644,root,root) %config(noreplace) /etc/mail/sendmail.mc
%attr(0644,root,root) %config(noreplace) /etc/mail/submit.mc
%config(noreplace) /etc/mail/local-host-names
%if "%{old_setup}" == "yes"
%config(noreplace) /etc/aliases
%endif
%attr(0644,root,root) %ghost /etc/aliases.db
%attr(0770,smmsp,smmsp) %dir /var/spool/clientmqueue
%attr(0700,root,mail) %dir /var/spool/mqueue
%dir /etc/smrsh
%dir /etc/mail
%dir %{_sysconfdir}/smrsh
%dir %{maildir}
%attr(0770,smmsp,smmsp) %dir %{spooldir}/clientmqueue
%attr(0700,root,mail) %dir %{spooldir}/mqueue
%config(noreplace) /etc/mail/Makefile
%attr(0644,root,root) %ghost /etc/mail/virtusertable.db
%attr(0644,root,root) %config(noreplace) /etc/mail/virtusertable
%config(noreplace) %{stdir}/statistics
%config(noreplace) %{maildir}/Makefile
%config(noreplace) %{maildir}/sendmail.cf
%config(noreplace) %{maildir}/submit.cf
%config(noreplace) %{maildir}/helpfile
%config(noreplace) %{maildir}/sendmail.mc
%config(noreplace) %{maildir}/submit.mc
%config(noreplace) %{maildir}/access
%config(noreplace) %{maildir}/domaintable
%config(noreplace) %{maildir}/local-host-names
%config(noreplace) %{maildir}/mailertable
%config(noreplace) %{maildir}/trusted-users
%config(noreplace) %{maildir}/virtusertable
%attr(0644,root,root) %ghost /etc/mail/access.db
%attr(0644,root,root) %config(noreplace) /etc/mail/access
%ghost %{_sysconfdir}/aliases.db
%ghost %{maildir}/virtusertable.db
%ghost %{maildir}/access.db
%ghost %{maildir}/domaintable.db
%ghost %{maildir}/mailertable.db
%attr(0644,root,root) %ghost /etc/mail/domaintable.db
%attr(0644,root,root) %config(noreplace) /etc/mail/domaintable
%attr(0644,root,root) %ghost /etc/mail/mailertable.db
%attr(0644,root,root) %config(noreplace) /etc/mail/mailertable
%attr(0644,root,root) %config(noreplace) /etc/mail/helpfile
%attr(0644,root,root) %config(noreplace) /etc/mail/trusted-users
%config(noreplace) /etc/sysconfig/sendmail
%config %{initdir}/sendmail
%attr(0755,root,root) %config(noreplace) %{_initrddir}/sendmail
%config(noreplace) %{_sysconfdir}/sysconfig/sendmail
%config(noreplace) %{_sysconfdir}/pam.d/smtp.sendmail
%config %{_libdir}/sasl*/Sendmail*.conf
%config(noreplace) /etc/pam.d/smtp.sendmail
%files cf
%defattr(-,root,root)
%{sendmailcf}
%doc %{sendmailcf}/README
%dir %{sendmailcf}
%{sendmailcf}/*/
%{sendmailcf}/sendmail.schema
%files devel
%defattr(-,root,root)
%doc libmilter/docs/*
%dir %{_includedir}/libmilter
%{_includedir}/libmilter/*.h
%{_libdir}/libmilter.a
@ -586,9 +527,22 @@ exit 0
%files doc
%defattr(-,root,root)
%{_docdir}/sendmail
%{_docdir}/sendmail-%{version}/README.cf
%{_docdir}/sendmail-%{version}/README.libmilter
%{_docdir}/sendmail-%{version}/README.redhat
%{_docdir}/sendmail-%{version}/README.sendmail
%{_docdir}/sendmail-%{version}/README.smrsh
%{_docdir}/sendmail-%{version}/SECURITY
%{_docdir}/sendmail-%{version}/op.pdf
%changelog
* Thu Apr 12 2007 Thomas Woerner <twoerner@redhat.com> 8.14.1-1
- new version 8.14.1
- spec file cleanup for merge review (rhbz#226407)
- dropped update support for sendmail versions prior to 8.12.0
- using pdf documentation
* Tue Feb 6 2007 Thomas Woerner <twoerner@redhat.com> 8.14.0-1
- new version 8.14.0
- adapted patches: makemapman, dynamic
@ -1041,7 +995,7 @@ exit 0
- run chkconfig --add before alternatives
* Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 8.12.2-3
- run alternatives --remove in %preun
- run alternatives --remove in %%preun
- add some prereqs
* Mon Feb 25 2002 Nalin Dahyabhai <nalin@redhat.com> 8.12.2-2
@ -1062,7 +1016,7 @@ exit 0
to build this for older releases
* Fri Feb 1 2002 Bill Nottingham <notting@redhat.com> 8.11.6-12
- %triggerpostun on older versions to make sure alternatives work on
- %%triggerpostun on older versions to make sure alternatives work on
upgrades
* Thu Jan 31 2002 Bill Nottingham <notting@redhat.com> 8.11.6-11
@ -1340,7 +1294,7 @@ exit 0
* Mon Mar 22 1999 Jeff Johnson <jbj@redhat.com>
- correxct dangling symlinks.
- check for map file existence in %post.
- check for map file existence in %%post.
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 3)

View File

@ -1 +1 @@
bc0dee396b8090b3f696e748a9caf83d sendmail.8.14.0.tar.gz
462bc9e00fdbef3a71b046b967c9a157 sendmail.8.14.1.tar.gz