diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-01-16 01:38:39 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-01-16 01:38:39 +0000 |
commit | a43abb56470658a128e833c3b04747f0a4d3e99e (patch) | |
tree | 69afbaee64d72ad997b57bbf157a9639a203e98a /gnu | |
parent | 8edf266b50aee3a4c02867f8fb58b93dc2656fba (diff) |
pull 8.12.x change (or equivalent to),
which can mark certain DaemonPortOptions as "optional".
now we can ship single sendmail.cf for both IPv4-only and IPv4/v6 kernels.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.sbin/sendmail/cf/cf/Makefile | 9 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/cf/cf/openbsd-proto-IPv4only.mc | 35 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/cf/cf/openbsd-proto.mc | 4 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/sendmail/daemon.c | 10 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/sendmail/sendmail.h | 2 |
5 files changed, 17 insertions, 43 deletions
diff --git a/gnu/usr.sbin/sendmail/cf/cf/Makefile b/gnu/usr.sbin/sendmail/cf/cf/Makefile index 49f352dbb26..7b8341f0315 100644 --- a/gnu/usr.sbin/sendmail/cf/cf/Makefile +++ b/gnu/usr.sbin/sendmail/cf/cf/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2001/01/15 21:08:51 millert Exp $ +# $OpenBSD: Makefile,v 1.8 2001/01/16 01:38:37 itojun Exp $ # # Makefile for configuration files. # @@ -27,8 +27,7 @@ RM= rm -f ALL= clientproto.cf openbsd-proto.cf courtesan.cf courtesan-nonet.cf \ courtesan-lists.cf openbsd-lists.cf gandalf.cf saruman.cf alatar.cf \ - nettan.cf waldorf.cf lucifier.cf elbereth.cf corpse.cf knecht.cf \ - openbsd-proto-IPv4only.cf + nettan.cf waldorf.cf lucifier.cf elbereth.cf corpse.cf knecht.cf all: $(ALL) @@ -37,11 +36,9 @@ clean cleandir: depend install: -distribution: openbsd-proto.cf openbsd-proto-IPv4only.cf +distribution: openbsd-proto.cf ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 openbsd-proto.cf \ ${DESTDIR}/etc/mail/sendmail.cf - ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \ - openbsd-proto-IPv4only.cf ${DESTDIR}/etc/mail/sendmail-IPv4only.cf # this is overkill, but.... M4FILES=\ diff --git a/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto-IPv4only.mc b/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto-IPv4only.mc deleted file mode 100644 index 54403defbcd..00000000000 --- a/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto-IPv4only.mc +++ /dev/null @@ -1,35 +0,0 @@ -divert(-1) -# -# Copyright (c) 1998 Sendmail, Inc. All rights reserved. -# Copyright (c) 1983 Eric P. Allman. All rights reserved. -# Copyright (c) 1988, 1993 -# The Regents of the University of California. All rights reserved. -# -# By using this file, you agree to the terms and conditions set -# forth in the LICENSE file which can be found at the top level of -# the sendmail distribution. -# -# - -# -# This is the prototype file for a configuration that supports nothing -# but basic SMTP connections via TCP. -# - -divert(0)dnl -VERSIONID(`@(#)openbsd-proto.mc $Revision: 1.1 $') -OSTYPE(openbsd) -FEATURE(nouucp, `reject') -MAILER(local) -MAILER(smtp) -dnl DAEMON_OPTIONS(`Family=inet, address=0.0.0.0, Name=MTA')dnl -dnl DAEMON_OPTIONS(`Family=inet6, address=::, Name=MTA6')dnl -dnl -dnl Enforce valid Message-Id to help stop spammers -dnl -LOCAL_RULESETS -HMessage-Id: $>CheckMessageId - -SCheckMessageId -R< $+ @ $+ > $@ OK -R$* $#error $: 553 Header Error diff --git a/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto.mc b/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto.mc index 18cd0fd969b..6b0293a46b9 100644 --- a/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto.mc +++ b/gnu/usr.sbin/sendmail/cf/cf/openbsd-proto.mc @@ -17,13 +17,13 @@ divert(-1) # divert(0)dnl -VERSIONID(`@(#)openbsd-proto.mc $Revision: 1.2 $') +VERSIONID(`@(#)openbsd-proto.mc $Revision: 1.3 $') OSTYPE(openbsd) FEATURE(nouucp, `reject') MAILER(local) MAILER(smtp) DAEMON_OPTIONS(`Family=inet, address=0.0.0.0, Name=MTA')dnl -DAEMON_OPTIONS(`Family=inet6, address=::, Name=MTA6')dnl +DAEMON_OPTIONS(`Family=inet6, address=::, Name=MTA6, M=O')dnl dnl dnl Enforce valid Message-Id to help stop spammers dnl diff --git a/gnu/usr.sbin/sendmail/sendmail/daemon.c b/gnu/usr.sbin/sendmail/sendmail/daemon.c index 98293cc595e..1e35e7cbb76 100644 --- a/gnu/usr.sbin/sendmail/sendmail/daemon.c +++ b/gnu/usr.sbin/sendmail/sendmail/daemon.c @@ -270,6 +270,8 @@ getrequests(e) { if (timenow < Daemons[idx].d_refuse_connections_until) continue; + if (bitnset(D_DISABLE, Daemons[idx].d_flags)) + continue; if (refuseconnections(Daemons[idx].d_name, e, idx)) { if (Daemons[idx].d_socket >= 0) @@ -880,6 +882,14 @@ opendaemonsocket(d, firsttime) { save_errno = errno; syserr("opendaemonsocket: daemon %s: can't create server SMTP socket", d->d_name); + if (bitnset(D_OPTIONAL, d->d_flags) && + (save_errno == EAFNOSUPPORT || + save_errno == EPROTONOSUPPORT)) + { + syserr("opendaemonsocket: daemon %s: optional socket disabled", d->d_name); + setbitn(D_DISABLE, d->d_flags); + return -1; + } severe: if (LogLevel > 0) sm_syslog(LOG_ALERT, NOQID, diff --git a/gnu/usr.sbin/sendmail/sendmail/sendmail.h b/gnu/usr.sbin/sendmail/sendmail/sendmail.h index b1739a4776b..d25ed879f52 100644 --- a/gnu/usr.sbin/sendmail/sendmail/sendmail.h +++ b/gnu/usr.sbin/sendmail/sendmail/sendmail.h @@ -1444,6 +1444,8 @@ struct termescape #define D_NOCANON 'C' /* no canonification (cf) */ #define D_NOETRN 'E' /* no ETRN (MSA) */ #define D_ETRNONLY ((char)0x01) /* allow only ETRN (disk low) */ +#define D_OPTIONAL 'O' /* optional socket */ +#define D_DISABLE ((char)0x02) /* optional socket disabled */ /* Flags for submitmode */ #define SUBMIT_UNKNOWN 0x0000 /* unknown agent type */ |