- do not remove /etc/aliases.db on package removal (rhbz#223637)
- fixed remaining paths to certs directory in sendmail.mc file - added contrib scripts to the doc package (rhbz#183723) - added LSB header to init script (rhbz#247053) - added plain login information for cyrus-sasl to access file - fixed compile proplem with glibc-2.6.90+ - fixed reoccuring m4 include problem (now using sinclude)
This commit is contained in:
parent
2174409589
commit
0bd1aa3120
@ -4,8 +4,8 @@
|
||||
#
|
||||
|
||||
divert(0)dnl
|
||||
-VERSIONID(`$Id: sendmail-8.13.7-pid.patch,v 1.1 2006/06/19 16:10:07 twoerner Exp $')
|
||||
+include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
|
||||
-VERSIONID(`$Id: sendmail-8.13.7-pid.patch,v 1.2 2007/08/27 10:25:00 twoerner Exp $')
|
||||
+sinclude(`/usr/share/sendmail-cf/m4/cf.m4')dnl
|
||||
+VERSIONID(`linux setup')dnl
|
||||
define(`confCF_VERSION', `Submit')dnl
|
||||
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
|
||||
|
36
sendmail-8.14.1-gcc2690.patch
Normal file
36
sendmail-8.14.1-gcc2690.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up sendmail-8.14.1/libsmdb/smdb2.c.gcc2690 sendmail-8.14.1/libsmdb/smdb2.c
|
||||
--- sendmail-8.14.1/libsmdb/smdb2.c.gcc2690 2003-06-13 23:33:11.000000000 +0200
|
||||
+++ sendmail-8.14.1/libsmdb/smdb2.c 2007-08-27 12:03:09.000000000 +0200
|
||||
@@ -523,7 +523,7 @@ smdb_db_open_internal(db_name, db_type,
|
||||
}
|
||||
}
|
||||
|
||||
- result = (*db)->open(*db,
|
||||
+ result = ((*db)->open)(*db,
|
||||
DBTXN /* transaction for DB 4.1 */
|
||||
db_name, NULL, db_type, db_flags, DBMMODE);
|
||||
if (result != 0)
|
||||
diff -up sendmail-8.14.1/sendmail/udb.c.gcc2690 sendmail-8.14.1/sendmail/udb.c
|
||||
--- sendmail-8.14.1/sendmail/udb.c.gcc2690 2006-12-19 20:49:51.000000000 +0100
|
||||
+++ sendmail-8.14.1/sendmail/udb.c 2007-08-27 12:03:53.000000000 +0200
|
||||
@@ -1007,7 +1007,7 @@ _udbx_init(e)
|
||||
}
|
||||
else
|
||||
{
|
||||
- ret = up->udb_dbp->open(up->udb_dbp,
|
||||
+ ret = (up->udb_dbp->open)(up->udb_dbp,
|
||||
DBTXN
|
||||
up->udb_dbname,
|
||||
NULL,
|
||||
diff -up sendmail-8.14.1/sendmail/map.c.gcc2690 sendmail-8.14.1/sendmail/map.c
|
||||
--- sendmail-8.14.1/sendmail/map.c.gcc2690 2007-04-03 23:33:14.000000000 +0200
|
||||
+++ sendmail-8.14.1/sendmail/map.c 2007-08-27 12:03:41.000000000 +0200
|
||||
@@ -2165,7 +2165,7 @@ db_map_open(map, mode, mapclassname, dbt
|
||||
# endif /* DB_HASH_NELEM */
|
||||
if (ret == 0 && db != NULL)
|
||||
{
|
||||
- ret = db->open(db,
|
||||
+ ret = (db->open)(db,
|
||||
DBTXN /* transaction for DB 4.1 */
|
||||
buf, NULL, dbtype, flags, DBMMODE);
|
||||
if (ret != 0)
|
@ -3,8 +3,10 @@
|
||||
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
|
||||
# package.
|
||||
#
|
||||
# by default we allow relaying from localhost...
|
||||
# If you want to use AuthInfo with "M:PLAIN LOGIN", make sure to have the
|
||||
# cyrus-sasl-plain package installed.
|
||||
#
|
||||
# By default we allow relaying from localhost...
|
||||
Connect:localhost.localdomain RELAY
|
||||
Connect:localhost RELAY
|
||||
Connect:127.0.0.1 RELAY
|
||||
|
||||
|
@ -53,9 +53,9 @@ dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
|
||||
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
|
||||
dnl #
|
||||
dnl # Rudimentary information on creating certificates for sendmail TLS:
|
||||
dnl # cd /usr/share/ssl/certs; make sendmail.pem
|
||||
dnl # cd /etc/pki/tls/certs; make sendmail.pem
|
||||
dnl # Complete usage:
|
||||
dnl # make -C /usr/share/ssl/certs usage
|
||||
dnl # make -C /etc/pki/tls/certs usage
|
||||
dnl #
|
||||
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
|
||||
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
|
||||
|
182
sendmail.init
182
sendmail.init
@ -10,6 +10,16 @@
|
||||
# config: /etc/mail/sendmail.cf
|
||||
# pidfile: /var/run/sendmail.pid
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: sendmail MTA smtpdaemon
|
||||
# Required-Start: $local_fs $network
|
||||
# Required-Stop: $local_fs $network
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: start and stop sendmail
|
||||
# Description: sendmail is a Mail Transport Agent (MTA)
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
@ -17,44 +27,43 @@
|
||||
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
||||
|
||||
# Source sendmail configureation.
|
||||
if [ -f /etc/sysconfig/sendmail ] ; then
|
||||
. /etc/sysconfig/sendmail
|
||||
if [ -f /etc/sysconfig/sendmail ]; then
|
||||
. /etc/sysconfig/sendmail
|
||||
else
|
||||
DAEMON=no
|
||||
QUEUE=1h
|
||||
DAEMON=no
|
||||
QUEUE=1h
|
||||
fi
|
||||
[ -z "$SMQUEUE" ] && SMQUEUE="$QUEUE"
|
||||
[ -z "$SMQUEUE" ] && SMQUEUE=1h
|
||||
|
||||
# Check that networking is up.
|
||||
[ "${NETWORKING}" = "no" ] && exit 0
|
||||
[ "${NETWORKING}" = "no" ] && exit 1
|
||||
|
||||
[ -f /usr/sbin/sendmail ] || exit 0
|
||||
[ -f /usr/sbin/sendmail ] || exit 5
|
||||
|
||||
RETVAL=0
|
||||
prog="sendmail"
|
||||
|
||||
start() {
|
||||
# Start daemons.
|
||||
# Start daemons.
|
||||
ret=0
|
||||
echo -n $"Starting $prog: "
|
||||
if [ -x /usr/bin/make -a -f /etc/mail/Makefile ]; then
|
||||
make all -C /etc/mail -s > /dev/null
|
||||
else
|
||||
for i in virtusertable access domaintable mailertable ; do
|
||||
[ -f /etc/mail/$i ] && makemap hash /etc/mail/$i < /etc/mail/$i
|
||||
let ret+=$?
|
||||
done
|
||||
fi
|
||||
/usr/bin/newaliases > /dev/null 2>&1
|
||||
daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd) \
|
||||
$([ -n "$QUEUE" ] && echo -q$QUEUE) $SENDMAIL_OPTARG
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
|
||||
let ret+=$RETVAL
|
||||
|
||||
echo -n $"Starting $prog: "
|
||||
if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
|
||||
make all -C /etc/mail -s > /dev/null
|
||||
else
|
||||
for i in virtusertable access domaintable mailertable ; do
|
||||
if [ -f /etc/mail/$i ] ; then
|
||||
makemap hash /etc/mail/$i < /etc/mail/$i
|
||||
fi
|
||||
done
|
||||
fi
|
||||
/usr/bin/newaliases > /dev/null 2>&1
|
||||
daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd) \
|
||||
$([ -n "$QUEUE" ] && echo -q$QUEUE) $SENDMAIL_OPTARG
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
|
||||
|
||||
if ! test -f /var/run/sm-client.pid ; then
|
||||
if [ ! -f /var/run/sm-client.pid ]; then
|
||||
echo -n $"Starting sm-client: "
|
||||
touch /var/run/sm-client.pid
|
||||
chown smmsp:smmsp /var/run/sm-client.pid
|
||||
@ -62,92 +71,101 @@ start() {
|
||||
/sbin/restorecon /var/run/sm-client.pid
|
||||
fi
|
||||
daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac \
|
||||
-q$SMQUEUE $SENDMAIL_OPTARG
|
||||
-q$SMQUEUE $SENDMAIL_OPTARG
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client
|
||||
fi
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client
|
||||
let ret+=$RETVAL
|
||||
fi
|
||||
|
||||
return $RETVAL
|
||||
[ $ret -eq 0 ] && return 0 || return 1
|
||||
}
|
||||
|
||||
reload() {
|
||||
# Stop daemons.
|
||||
echo -n $"reloading $prog: "
|
||||
/usr/bin/newaliases > /dev/null 2>&1
|
||||
if [ -x /usr/bin/make -a -f /etc/mail/Makefile ]; then
|
||||
make all -C /etc/mail -s > /dev/null
|
||||
else
|
||||
for i in virtusertable access domaintable mailertable ; do
|
||||
if [ -f /etc/mail/$i ] ; then
|
||||
makemap hash /etc/mail/$i < /etc/mail/$i
|
||||
fi
|
||||
done
|
||||
fi
|
||||
daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd) \
|
||||
$([ -n "$QUEUE" ] && echo -q$QUEUE)
|
||||
RETVAL=$?
|
||||
killproc sendmail -HUP
|
||||
# Stop daemons.
|
||||
ret=0
|
||||
echo -n $"Reloading $prog: "
|
||||
/usr/bin/newaliases > /dev/null 2>&1
|
||||
if [ -x /usr/bin/make -a -f /etc/mail/Makefile ]; then
|
||||
make all -C /etc/mail -s > /dev/null
|
||||
else
|
||||
for i in virtusertable access domaintable mailertable ; do
|
||||
[ -f /etc/mail/$i ] && makemap hash /etc/mail/$i < /etc/mail/$i
|
||||
done
|
||||
fi
|
||||
daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd) \
|
||||
$([ -n "$QUEUE" ] && echo -q$QUEUE)
|
||||
RETVAL=$?
|
||||
killproc sendmail -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
if [ $RETVAL -eq 0 -a -f /var/run/sm-client.pid ]; then
|
||||
echo -n $"reloading sm-client: "
|
||||
killproc sm-client -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
if [ $RETVAL -eq 0 -a -f /var/run/sm-client.pid ]; then
|
||||
echo -n $"reloading sm-client: "
|
||||
killproc sm-client -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
fi
|
||||
return $RETVAL
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
# Stop daemons.
|
||||
if test -f /var/run/sm-client.pid ; then
|
||||
echo -n $"Shutting down sm-client: "
|
||||
killproc sm-client
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client
|
||||
fi
|
||||
echo -n $"Shutting down $prog: "
|
||||
killproc sendmail
|
||||
# Stop daemons.
|
||||
if [ -f /var/run/sm-client.pid ]; then
|
||||
echo -n $"Shutting down sm-client: "
|
||||
killproc sm-client
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
|
||||
return $RETVAL
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client
|
||||
fi
|
||||
echo -n $"Shutting down $prog: "
|
||||
killproc sendmail
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
status -p /var/run/sendmail.pid >/dev/null && status -p /var/run/sm-client.pid >/dev/null
|
||||
running=$?
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start)
|
||||
[ $running -eq 0 ] && exit 0
|
||||
start
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
stop)
|
||||
[ $running -ne 0 ] || exit 0
|
||||
stop
|
||||
RETVAL=$?
|
||||
;;
|
||||
reload)
|
||||
reload)
|
||||
[ $running -ne 0 ] && exit 7
|
||||
reload
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart)
|
||||
restart|force-reload)
|
||||
stop
|
||||
start
|
||||
RETVAL=$?
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f /var/lock/subsys/sendmail ]; then
|
||||
stop
|
||||
start
|
||||
RETVAL=$?
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status sendmail
|
||||
condrestart|try-restart)
|
||||
[ ! -f /var/lock/subsys/sendmail ] && return 7
|
||||
stop
|
||||
start
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
status)
|
||||
echo -n sendmail; status -p /var/run/sendmail.pid
|
||||
RETVAL=$?
|
||||
echo -n sm-client; status -p /var/run/sm-client.pid
|
||||
[ $RETVAL -eq 0 ] && RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||
exit 1
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
@ -15,7 +15,7 @@
|
||||
Summary: A widely used Mail Transport Agent (MTA)
|
||||
Name: sendmail
|
||||
Version: 8.14.1
|
||||
Release: 3
|
||||
Release: 4
|
||||
License: Sendmail
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.sendmail.org/
|
||||
@ -47,6 +47,7 @@ Patch13: sendmail-8.13.7-aliases_dir.patch
|
||||
Patch14: sendmail-8.13.7-vacation.patch
|
||||
Patch15: sendmail-8.14.1-noversion.patch
|
||||
Patch16: sendmail-8.13.1-localdomain.patch
|
||||
Patch17: sendmail-8.14.1-gcc2690.patch
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: tcp_wrappers-devel
|
||||
BuildRequires: db4-devel
|
||||
@ -139,6 +140,7 @@ your sendmail.cf file.
|
||||
%patch14 -p1 -b .vacation
|
||||
%patch15 -p1 -b .noversion
|
||||
%patch16 -p1 -b .localdomain
|
||||
%patch17 -p1 -b .gcc2690
|
||||
|
||||
%build
|
||||
# generate redhat config file
|
||||
@ -234,7 +236,7 @@ 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;
|
||||
%{_sysconfdir}/pam.d %{_docdir}/sendmail-%{version}/contrib;
|
||||
do
|
||||
install -m 755 -d %{buildroot}$d
|
||||
done
|
||||
@ -307,6 +309,7 @@ install -p -m 644 smrsh/README %{buildroot}%{_docdir}/sendmail-%{version}/README
|
||||
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 -p -m 644 contrib/* %{buildroot}%{_docdir}/sendmail-%{version}/contrib
|
||||
|
||||
# install the cf files for the sendmail-cf package.
|
||||
cp -ar cf/* %{buildroot}%{sendmailcf}
|
||||
@ -345,8 +348,6 @@ for map in virtusertable access domaintable mailertable ; do
|
||||
< %{buildroot}%{maildir}/${map}
|
||||
chmod 0644 %{buildroot}%{maildir}/${map}.db
|
||||
done
|
||||
%{buildroot}%{_bindir}/makemap -C %{buildroot}%{maildir}/sendmail.cf \
|
||||
hash %{buildroot}%{_sysconfdir}/aliases.db < %{_sysconfdir}/aliases
|
||||
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/sendmail
|
||||
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/sendmail
|
||||
@ -489,7 +490,6 @@ exit 0
|
||||
%config(noreplace) %{maildir}/trusted-users
|
||||
%config(noreplace) %{maildir}/virtusertable
|
||||
|
||||
%ghost %{_sysconfdir}/aliases.db
|
||||
%ghost %{maildir}/virtusertable.db
|
||||
%ghost %{maildir}/access.db
|
||||
%ghost %{maildir}/domaintable.db
|
||||
@ -505,8 +505,16 @@ exit 0
|
||||
%defattr(-,root,root)
|
||||
%doc %{sendmailcf}/README
|
||||
%dir %{sendmailcf}
|
||||
%{sendmailcf}/*/
|
||||
%{sendmailcf}/cf
|
||||
%{sendmailcf}/domain
|
||||
%{sendmailcf}/feature
|
||||
%{sendmailcf}/hack
|
||||
%{sendmailcf}/m4
|
||||
%{sendmailcf}/mailer
|
||||
%{sendmailcf}/ostype
|
||||
%{sendmailcf}/sendmail.schema
|
||||
%{sendmailcf}/sh
|
||||
%{sendmailcf}/siteconfig
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
@ -526,9 +534,20 @@ exit 0
|
||||
%{_docdir}/sendmail-%{version}/README.smrsh
|
||||
%{_docdir}/sendmail-%{version}/SECURITY
|
||||
%{_docdir}/sendmail-%{version}/op.pdf
|
||||
%dir %{_docdir}/sendmail-%{version}/contrib
|
||||
%attr(0644,root,root) %{_docdir}/sendmail-%{version}/contrib/*
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Aug 27 2007 Thomas Woerner <twoerner@redhat.com> 8.14.1-4
|
||||
- do not remove /etc/aliases.db on package removal (rhbz#223637)
|
||||
- fixed remaining paths to certs directory in sendmail.mc file
|
||||
- added contrib scripts to the doc package (rhbz#183723)
|
||||
- added LSB header to init script (rhbz#247053)
|
||||
- added plain login information for cyrus-sasl to access file
|
||||
- fixed compile proplem with glibc-2.6.90+
|
||||
- fixed reoccuring m4 include problem (now using sinclude)
|
||||
|
||||
* Fri Jul 20 2007 Thomas Woerner <twoerner@redhat.com> 8.14.1-3
|
||||
- do not accept localhost.localdomain as valid address from smtp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user