diff --git a/sendmail-8.13.1-localdomain.patch b/sendmail-8.13.1-localdomain.patch new file mode 100644 index 0000000..1fd344b --- /dev/null +++ b/sendmail-8.13.1-localdomain.patch @@ -0,0 +1,11 @@ +--- sendmail-8.13.1/cf/m4/proto.m4.localdomain 2007-01-22 16:35:19.000000000 +0100 ++++ sendmail-8.13.1/cf/m4/proto.m4 2007-01-22 16:36:47.000000000 +0100 +@@ -1840,6 +1840,8 @@ + $: < ? $&{client_name} > < $1 @ [127.0.0.1] > + R<@> < $* @ localhost.$m > + $: < ? $&{client_name} > < $1 @ localhost.$m > ++R<@> < $* @ localhost.localdomain > ++ $: < ? $&{client_name} > < $1 @ localhost.localdomain > + ifdef(`_NO_UUCP_', `dnl', + `R<@> < $* @ localhost.UUCP > + $: < ? $&{client_name} > < $1 @ localhost.UUCP >') diff --git a/sendmail.init b/sendmail.init index e386196..e28c119 100644 --- a/sendmail.init +++ b/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. - - 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 + # 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 - 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 + condrestart|try-restart) + [ ! -f /var/lock/subsys/sendmail ] && exit 7 + stop + start + RETVAL=$? ;; - status) - status sendmail + 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 diff --git a/sendmail.spec b/sendmail.spec index e036b24..63909ee 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -15,7 +15,7 @@ Summary: A widely used Mail Transport Agent (MTA) Name: sendmail Version: 8.14.1 -Release: 2 +Release: 4.1%{?dist} License: Sendmail Group: System Environment/Daemons URL: http://www.sendmail.org/ @@ -46,6 +46,7 @@ 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.14.1-noversion.patch +Patch16: sendmail-8.13.1-localdomain.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: tcp_wrappers-devel BuildRequires: db4-devel @@ -137,6 +138,7 @@ your sendmail.cf file. %patch13 -p1 -b .aliases_dir %patch14 -p1 -b .vacation %patch15 -p1 -b .noversion +%patch16 -p1 -b .localdomain %build # generate redhat config file @@ -232,7 +234,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 @@ -260,7 +262,7 @@ Make() { MSPQOWN=${nameuser} } -OBJDIR=obj.$(uname -s).$(uname -r).$(arch) +OBJDIR=obj.$(uname -s).$(uname -r).$(uname -m) Make install -C $OBJDIR/libmilter Make install -C $OBJDIR/libsmutil @@ -305,6 +307,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} @@ -343,8 +346,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 @@ -487,7 +488,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 @@ -503,8 +503,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) @@ -524,9 +532,27 @@ 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 +* Wed Aug 29 2007 Thomas Woerner 8.14.1-4.1 +- fixed condrestart in init script to use exit instead of return +- dropped glibc-2.6.90+ patch for F-7 + +* Mon Aug 27 2007 Thomas Woerner 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 8.14.1-3 +- do not accept localhost.localdomain as valid address from smtp + * Mon Apr 16 2007 Thomas Woerner 8.14.1-2 - readded chkconfig add for sendmail in post script - dropped mysql support (useless without further patching)