diff options
93 files changed, 13584 insertions, 0 deletions
diff --git a/debian/Debian-specific b/debian/Debian-specific new file mode 100644 index 0000000..b9fad25 --- /dev/null +++ b/debian/Debian-specific @@ -0,0 +1,140 @@ +Changes: Items that cause a functional difference in the way + sendmail works. + + These items *may* bite you if you aren't careful ! + +Enhancements: Items above and beyond the base sendmail distribution + These will be Debian add ons, or items the sendmail folk + consider *not ready for prime time* (the _FFR_'s). + + These items should *not* bite you, but be aware that + other distributions may not have anything comparable. + +Patches: Items correcting flaws in the original sendmail distribution + these items are culled from c.m.s, notes from developers, + and user input. + ++++++++++++++++++++++++++++++Sendmail 8.11.0:++++++++++++++++++++++++++++++++ + + Changes:------------------------------------------------------------- + 1) rmail/rmail.c: Deliver mail foreground, not queued + Roland Rosenfeld (closes: bug #31138) + + 2) cf/feature/local_procmail.m4: Remove -Y from procmail + (closes: bug #25639) + + 3) sendmail/control.c: Make control socket mode 0660 + + Enhancements:-------------------------------------------------------- + 1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file + cf/ostype/debian.m4: Debian customizations for OSTYPE(debian) + + 2) cf/feature/dont_masquerade_local.m4 + cf/mailer/local.m4: Don't masquerade local to local delivery + Wichert Akkerman + + 3) cf/hack/nodns.m4: /etc/mail/service.switch-nodns + (closes: bug#24608) + 4) cf/feature/dssl.m4 + cf/feature/imrss.m4 + cf/feature/orbs.m4 Note, these are deprecated and will + cf/feature/orca.m4 be removed soon, please update to use + cf/feature/rbl.m4 the FEATURE(dnsbl,[addr],[message]) + cf/m4/cfhead.m4 + cf/m4/proto.m4: Anti spam/relay/etc + Claus Assmann + + Patches:------------------------------------------------------------- + 1) cf/mailer/cyrus/m4: Support Debian cyrus delivery agent pkg + Manoj Srivastava (closes: bug #63441) + + ++++++++++++++++++++++++++++++Sendmail 8.10.1:++++++++++++++++++++++++++++++++ + + Changes:------------------------------------------------------------- + 1) rmail/rmail.c: Deliver mail foreground, not queued + Roland Rosenfeld (closes: bug #31138) + + 2) cf/feature/local_procmail.m4: Remove -Y from procmail + (closes: bug #25639) + + 3) sendmail/control.c: Make control socket mode 0660 + + Enhancements:-------------------------------------------------------- + 1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file + cf/ostype/debian.m4: Debian customizations for OSTYPE(debian) + + 2) cf/feature/dont_masquerade_local.m4 + cf/mailer/local.m4: Don't masquerade local to local delivery + Wichert Akkerman + + 3) cf/hack/nodns.m4: /etc/mail/service.switch-nodns + (closes: bug#24608) + + 4) cf/feature/dssl.m4 + cf/feature/imrss.m4 + cf/feature/orbs.m4 Note, these are deprecated and will + cf/feature/orca.m4 be removed soon, please update to use + cf/feature/rbl.m4 the FEATURE(dnsbl,[addr],[message]) + cf/m4/cfhead.m4 + cf/m4/proto.m4: Anti spam/relay/etc + Claus Assmann + + Patches:------------------------------------------------------------- + 1) cf/mailer/cyrus/m4: Support Debian cyrus delivery agent pkg + Manoj Srivastava (closes: bug #63441) + + 2) mail.local/mail.local.c: Fix unsafe fgets in mail.local + Wichert Akkerman (closes: bug #63715) + + ++++++++++++++++++++++++++++++Sendmail 8.9.3:+++++++++++++++++++++++++++++++++ + + Changes:------------------------------------------------------------- + 1) rmail/rmail.c: Deliver mail foreground, not queued + Roland Rosenfeld (closes: bug #31138) + + 2) cf/feature/local_procmail.m4: Remove -Y from procmail + (closes: bug #25639) + + Enhancements:-------------------------------------------------------- + 1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file + cf/ostype/debian.m4: Debian customizations for OSTYPE(debian) + + 2) cf/feature/dont_masquerade_local.m4 + cf/mailer/local.m4: Don't masquerade local to local delivery + Wichert Akkerman + + 3) cf/hack/nodns.m4: /etc/mail/service.switch-nodns + (closes: bug#24608) + + 4) cf/feature/dssl.m4 + cf/feature/imrss.m4 + cf/feature/orbs.m4 + cf/feature/orca.m4 + cf/feature/rbl.m4 + cf/m4/cfhead.m4 + cf/m4/proto.m4: Anti spam/relay/etc + Claus Assmann + + 5) cf/m4/proto.m4 (patch) + cf/feature/ldap.m4: Better support of LDAP maps + + 6) cf/feature/local_procmail.m4: FEATURE(local_procmail) before MAILER(local) + + Patches:------------------------------------------------------------- + 1) cf/mailer/cyrus/m4: Support Debian cyrus delivery agent pkg + Manoj Srivastava (closes: bug #63441) + + 2) mail.local/mail.local.c: Fix unsafe fgets in mail.local + Wichert Akkerman (closes: bug #63715) + + 3) src/mime.c + src/headers.c: Duplicate "Content-Transfer-Encoding" + Per Hedeland/c.m.s (closes: bug #28279) + + 4) src/ldap_map.h + src/map.c: Correct LDAP mapping + + 5) src/main.c: sendmail -bi(newalias) DOS + c.m.s (closes: bug #51126) diff --git a/debian/cf/cf/debproto.mc b/debian/cf/cf/debproto.mc new file mode 100644 index 0000000..ea20179 --- /dev/null +++ b/debian/cf/cf/debproto.mc @@ -0,0 +1,42 @@ +divert(-1) +# +# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# +# This file is used to configure sendmail for use with Debian systems. +# + +divert(0) +VERSIONID(`@(#)sendmail.mc 8.9.3-21 (Debian) 20000309') +OSTYPE(debian)dnl diff --git a/debian/cf/feature/dont_masquerade_local.m4 b/debian/cf/feature/dont_masquerade_local.m4 new file mode 100644 index 0000000..5748721 --- /dev/null +++ b/debian/cf/feature/dont_masquerade_local.m4 @@ -0,0 +1,9 @@ +divert(-1) +# +# Prevent masquerading of local senders when sending to local recipients +# used by: mailer/local.m4 +# +divert(0) +VERSIONID(`@(#)dont_masquerade_local.m4 1.0 (Debian) 1999-04-22') +divert(-1) +define(`_DONT_MASQUERADE_LOCAL_', 1)dnl diff --git a/debian/cf/feature/dssl.m4 b/debian/cf/feature/dssl.m4 new file mode 100644 index 0000000..2ed99ee --- /dev/null +++ b/debian/cf/feature/dssl.m4 @@ -0,0 +1,5 @@ +divert(0) +VERSIONID(`@(#)dssl.m4 1.0 (Debian) 1999-08-03') +divert(-1) +FEATURE(rbl,`dssl.imrss.org',` Mail from $&{client_addr} + rejected - dynamic ip; see http://www.imrss.org/dssl/unblock.html') diff --git a/debian/cf/feature/imrss.m4 b/debian/cf/feature/imrss.m4 new file mode 100644 index 0000000..c01a992 --- /dev/null +++ b/debian/cf/feature/imrss.m4 @@ -0,0 +1,5 @@ +divert(0) +VERSIONID(`@(#)imrss.m4 1.0 (Debian) 1999-08-03') +divert(-1) +FEATURE(rbl,`mr-out.imrss.org',` Mail from $&{client_addr} + rejected - open relay; see http://www.imrss.org/error.html') diff --git a/debian/cf/feature/ldap.m4 b/debian/cf/feature/ldap.m4 new file mode 100644 index 0000000..57ea0e0 --- /dev/null +++ b/debian/cf/feature/ldap.m4 @@ -0,0 +1,13 @@ +divert(-1) +# commentary/copyright +divert(0) +VERSIONID(`@(#)ldap.m4 1.0 (Debian) 1999-04-23') +divert(-1) +dnl # +dnl # Mark LDAP in use for subsequent S5 rule +dnl # +define(`_LDAP_MAP_', 1)dnl +LOCAL_CONFIG +# Define ldap map, arguments come directly from the `FEATURE(ldap, xxx)' +# This version of ldap.m4 only checks the map in the S5 rule +Kldap ldapx _ARG_ diff --git a/debian/cf/feature/orbs.m4 b/debian/cf/feature/orbs.m4 new file mode 100644 index 0000000..aec60a4 --- /dev/null +++ b/debian/cf/feature/orbs.m4 @@ -0,0 +1,7 @@ +divert(0) +VERSIONID(`@(#)orbs.m4 2.0 (Debian) 1999-04-22') +divert(-1) +dnl define(`_ORBS_', ifelse(_ARG_, `', `orbs.dorkslayers.com', `_ARG_'))dnl +dnl define(`_ORBS_', ifelse(_ARG_, `', `relays.orbs.org', `_ARG_'))dnl +FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr} + rejected - open relay; see http://www.orbs.org') diff --git a/debian/cf/feature/orca.m4 b/debian/cf/feature/orca.m4 new file mode 100644 index 0000000..4f8e874 --- /dev/null +++ b/debian/cf/feature/orca.m4 @@ -0,0 +1,6 @@ +divert(0) +VERSIONID(`@(#)orca.m4 2.0 (Debian) 1999-04-22') +divert(-1) +dnl define(`_ORCA_', ifelse(_ARG_, `', `dul.orca.bc.ca', `_ARG_'))dnl +FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr} + rejected - dul; see http://maps.vix.com') diff --git a/debian/cf/feature/vnet.m4 b/debian/cf/feature/vnet.m4 new file mode 100644 index 0000000..56377f4 --- /dev/null +++ b/debian/cf/feature/vnet.m4 @@ -0,0 +1,47 @@ +PUSHDIVERT(0) +LOCAL_CONFIG +# +# Support routing of .rscs nodes via XAGENT +# +# Define vnet/rscs node hlq +CAvnet rscs +# Note: you'll to define your XAGENT node: +#DAlexvmk.lexington.ibm.com +dnl # +dnl # +dnl # +LOCAL_RULE_3 +# +# Support Lotus Notes and VM TCP/IP MTAs +# +# Remove stupid route addressing (%hack) added by VM TCP/IP +R$* % ibmus.rscs < @ $+> $* $: $1 < @ us.ibm.com > $3 +R$* % ibmuk.rscs < @ $+> $* $: $1 < @ uk.ibm.com > $3 +R$* % $-.rscs < @ $+> $* $: $1 < @ $2.rscs > $4 +# Now, try the domaintable yet again... +R$* < @ $-.rscs > $* $: $1 < @ $(domaintable $2.rscs $) > $3 +dnl # +dnl # +dnl # +LOCAL_NET_CONFIG +#------------------------------------------------------------------------ +# Handle RSCS/VM messages and messages addressed to sites internal to IBM +#------------------------------------------------------------------------ +# + +# Skip any local addresses +# (or we'll get a "mail loops back to itself" error +R$* < @ $=w . > $* $@ $1 < @ $2 . > $3 regular local name +R$* < @ $=w > $* $@ $1 < @ $2 . > $3 regular local name + +# Recipients inside IBM--transfer the mail directly. + +R$* < @ $+.ibm.com > $* $#smtp $@ $2.ibm.com $: $1 < @$2.ibm.com > $3 +R$* < @ $+.ibm.com. > $* $#smtp $@ $2.ibm.com $: $1 < @$2.ibm.com > $3 + +# Recipients of the form user@node.vnet get rewritten to +# user@node.RSCS, the message itself is forwarded to the RSCS/VM node +# specified in $A. + +R$* < @ $-.$=A > $* $#smtp $@ $A $: $1 < @$2.RSCS > $4 +POPDIVERT diff --git a/debian/cf/hack/nodns.m4 b/debian/cf/hack/nodns.m4 new file mode 100644 index 0000000..41216f1 --- /dev/null +++ b/debian/cf/hack/nodns.m4 @@ -0,0 +1,44 @@ +divert(-1) +# +# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +divert(0) +VERSIONID(`@(#)nodns.m4 8.1 (Debian) 19991013') +divert(-1) +LOCAL_CONFIG +undefine(`confBIND_OPTS')dnl +define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch-nodns')dnl +FEATURE(nocanonify)dnl +define(`confDONT_PROBE_INTERFACES', `True')dnl + + diff --git a/debian/cf/mailer/xagent.m4 b/debian/cf/mailer/xagent.m4 new file mode 100644 index 0000000..2a432d1 --- /dev/null +++ b/debian/cf/mailer/xagent.m4 @@ -0,0 +1,26 @@ +PUSHDIVERT(-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. +# +# + +ifdef(`XAGENT_MAILER_PATH',, `define(`XAGENT_MAILER_PATH', /usr/lib/xagent)') +ifdef(`XAGENT_MAILER_FLAGS',, `define(`XAGENT_MAILER_FLAGS', `DFMueXLn')') +ifdef(`XAGENT_MAILER_ARGS',, `define(`XAGENT_MAILER_ARGS', `xagent $h $u')') +POPDIVERT +#################################### +### XAGENT Mailer specification ### +#################################### + +VERSIONID(`@(#)xagent.m4 0.1 (ISSC) 4/19/1996') + +Mxagent, P=XAGENT_MAILER_PATH, F=XAGENT_MAILER_FLAGS, S=11/31, R=21/31, + _OPTINS(`XAGENT_MAILER_MAX', `M=', `, ')T=DNS/RFC822/X-Unix, + A=XAGENT_MAILER_ARGS, E=\n diff --git a/debian/cf/ostype/debian.m4 b/debian/cf/ostype/debian.m4 new file mode 100644 index 0000000..ddc04bc --- /dev/null +++ b/debian/cf/ostype/debian.m4 @@ -0,0 +1,105 @@ +divert(-1) +# +# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +divert(0)dnl +VERSIONID(`@(#)debian.m4 8.9.3-21 (Debian) 20000309') +define(`confCF_VERSION', `Debian 8.9.3-21')dnl +dnl # +dnl # changes made herein *must* be reflected in parsemc,updatedb,debian.m4 +dnl # +dnl # paths +define(`_USE_ETC_MAIL_', `True')dnl # a little late for some items ;-{ +define(`DATABASE_MAP_TYPE', `hash')dnl # Default +define(`STATUS_FILE', `/var/lib/sendmail/sendmail.st')dnl +define(`confHOST_STATUS_DIRECTORY', `/var/lib/sendmail/host_status')dnl +define(`HELP_FILE', `/usr/share/sendmail/sendmail.hf')dnl +define(`confCR_FILE', `-o /etc/mail/relay-domains %[^\#]')dnl +define(`confCT_FILE', `-o /etc/mail/trusted-users %[^\#]')dnl +define(`confCW_FILE', `-o /etc/mail/local-host-names %[^\#]')dnl +define(`confUSERDB_SPEC', `/etc/mail/users')dnl +define(`ALIAS_FILE', `/etc/mail/aliases')dnl +define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch')dnl +define(`confEBINDIR', `/usr/lib/sm.bin')dnl +dnl # +dnl # flags +define(`confCON_EXPENSIVE', `True')dnl +define(`confDIAL_DELAY', `45')dnl +define(`confMAX_DAEMON_CHILDREN', `30')dnl +define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl +define(`confQUEUE_SORT_ORDER', `Host')dnl +define(`confSAFE_FILE_ENV')dnl +define(`confSAFE_QUEUE', `True')dnl +define(`confTEMP_FILE_MODE', `600')dnl +define(`confTO_ICONNECT', `30s')dnl +dnl # +dnl # features +dnl # +dnl # mailers +define(`LOCAL_MAILER_PATH', `/usr/lib/sm.bin/sensible-mda')dnl +dnl define(`LOCAL_MAILER_FLAGS', `mnru9')dnl +define(`LOCAL_MAILER_FLAGS', `hnPu90')dnl +define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl +define(`LOCAL_SHELL_FLAGS', `u90')dnl +define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl +define(`USENET_MAILER_PATH', `/usr/bin/inews')dnl +# +# These undocumented features are available in Debian sendmail. +# O PidFile=/var/run/sendmail.pid +# O DontProbeInterfaces=False +# O MaxRecipientsPerMessage= +# O DeadLetterDrop=False +# O RrtImpliesDsn=False +# +# Sendmail 8.9.1a patch for mime headers to protect the various MUAs: +# This option causes MIME headers to be truncated to a total of 256 +# characters; no individual field is permitted to exceed 128 +# characters. These values should be safe for the common mail clients +# that are vulnerable. +# +# Note: there is a speed trade here, as the entire message must be scanned +#O MaxMimeHeaderLength=256/128 +#`define'(`confMAX_MIME_HEADER_LENGTH', `256/128') +define(`confMAX_MIME_HEADER_LENGTH', `256/128')dnl +# +# Sendmail 8.9.3 fix for header based DOS +# Number of bytes allowed for mail headers, default=32k. +#O MaxHeadersLength=32768 +#`define'(`confMAX_HEADERS_LENGTH', `32768') +define(`confMAX_HEADERS_LENGTH', `32768')dnl +dnl # +dnl # Debian users have group writable directories/files by default... +define(`confDONT_BLAME_SENDMAIL', `ClassFileInUnsafeDirPath,ForwardFileInGroupWritableDirPath,GroupWritableAliasFile,GroupWritableForwardFileSafe,GroupWritableIncludeFileSafe,IncludeFileInGroupWritableDirPath,MapInUnsafeDirPath')dnl +# +DOMAIN(generic)dnl +LOCAL_CONFIG diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..485e1be --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1043 @@ +sendmail (8.9.3-26.1) oldstable-security; urgency=high + + * Non-maintainer upload by the Security Team + * Create temporary files securely + Report and patches from Paul Szabo <psz@maths.usyd.edu.au> + [debian/checksendmail/checksendmail.perl, + contrib/doublebounce.pl, + contrib/expn.pl] + (Closes: #173243) + + -- Matt Zimmerman <mdz@debian.org> Thu, 24 Apr 2003 12:57:36 -0400 + +sendmail (8.9.3-26) oldstable-security; urgency=high + + * Buffer overflow in parsing routines closes: #186768 + Claus Assmann <ca+announce@sendmail.org> writes: + > We apologize for releasing this information today (2003-03-29) but + > we were forced to do so by an e-mail on a public mailing list (that + > has been sent by an irresponsible individual) which contains + > information about the security flaw. + [...] + > SECURITY: Fix a buffer overflow in address parsing due to + > a char to int conversion problem which is potentially + > remotely exploitable. Problem found by Michal Zalewski. + > Note: an MTA that is not patched might be vulnerable to + > data that it receives from untrusted sources, which + > includes DNS. + + -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 30 Mar 2003 13:10:00 -0500 + +sendmail (8.9.3-25) oldstable-security; urgency=high + + * -O0 (to get past ARM) + * Remote exploit (CERT Advisory CA-2003-07) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 03 Mar 2003 19:50:00 -0500 + +sendmail (8.9.3-24) oldstable-security; urgency=high + + * Remote exploit (CERT Advisory CA-2003-07) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 03 Mar 2003 18:00:00 -0500 + +sendmail (8.9.3-23) frozen; urgency=low + + * Release manager - All these bugs are capable of stopping an upgrade + of slink->potato *DEAD* This really needs to be installed ! + * depend upon a recent dpkg to get a fixed start-stop-daemon + * support nis maps in Makefile, updatedb (closes: #65322) + . debian/local/parsemc, debian/local/updatedb + * hamm -> potato upgrade error (closes: #64815) + . debian/sendmail.postinst + * Quiet /etc/init.d/sendmail stop (closes: #64631,#63610,#64686) + and also drop redundant --stop (closes: #64345) + . debian/sendmail.init.d + * Debian-specific file to summarize Debian vs Sendmail differences + . debian/Debian-specific + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 25 May 2000 17:00:00 -0500 + +sendmail (8.9.3-22) frozen; urgency=high + + * Fix unsafe fgets in mail.local, based on the upstream patch for 8.10.1 + Non-maintainer upload by security team (thanks Wichert). + * sendmail.cf/mailer/cyrus.m4 incompatible with Debian package + Thanks Manoj Srivastava (closes: bug #63441) + * revert fix for 55485 because it doesn't really solve the problem: + the problem specifically noted in the 8.10 cf/README: + + NOTICE: It is possible to relay mail through a system which the anti-relay + rules do not prevent: the case of a system that does use FEATURE(`nouucp', + `nospecial') (system A) and relays local messages to a mail hub (e.g., via + LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use + FEATURE(`nouucp') at all, addresses of the form + <example.net!user@local.host> would be relayed to <user@example.net>. + System A doesn't recognize `!' as an address separator and therefore + forwards it to the mail hub which in turns relays it because it came from + a trusted local host. So if a mailserver allows UUCP (bang-format) + addresses, all systems from which it allows relaying should do the same + or reject those addresses. + + The bottom line here is basically that a certain *combination* of nouucp + and non-nouucp on different hosts can open up for multi-level relaying, + which of course makes it difficult for a pre-packaged version to do "the + right thing", given that it can't make assumptions about what type of + systems it gets installed on. Best is probably to not have it use + FEATURE(nouucp) in 8.9.3, as this is (of course) the default. + --Per Hedeland + + I've taken the approach of properly warning the user in sendmailconfig + . debian/local/sendmailconfig (closes: bug#55485) + + * Remove --exec parameter from start-stop-daemon --stop as it can prevent + orderly shutdown of sendmail during postinst (use just --PIDFILE) + . debian/sendmail.init.d (closes: #60282) + * Several older bugs got marked as NMU fixed... + . closes: #24608,#24612,#31138,#32409,#34285,#34405,#34715 + . closes: #34722,#34789,#35548,#36067,#38783,#39021,#41325 + . closes: #42041,#42265,#43241,#44035,#44797 + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 08 May 2000 12:00:00 -0500 + +sendmail (8.9.3-21) frozen; urgency=low + + * (RC) _NO_UUCP_ test was backwards in proto.m4, causing relay hole + for sites that used FEATURE(nouucp) + . debian/patches/patch.nouucp (closes: #55485) + * (RC) Sigh, Correct FEATURE(rbl), dns site renamed (closes: #55301) + . debian/patches/mrbl.p3 + * complete rename of /etc/mail/sendmail.ct to /etc/mail/trusted-users + . debian/cf/ostype/debian.m4 (closes: #54552) + . debian/cf/cf/debproto.mc + * Don't assume make is installed and don't use it in postrm (closes: #57051) + . also noted as (closes: #59258) + * Return-Path 53173 duplicate (closes: #58003) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 09 Mar 2000 14:00:00 -0500 + +sendmail (8.9.3-20) unstable; urgency=low + + * Properly handle sendmail.cf being a soft symbolic link (closes: #51782) + . debian/sendmail.cron.daily + * Remove start-as so /etc/init.d/sendmail actually stops ;-0 + . debian/sendmail.init.d + * add Return-Path: on delivery (closes: #53173) + . debian/cf/ostype/debian.m4 + + -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 07 Jan 2000 15:05:00 -0500 + +sendmail (8.9.3-19) unstable; urgency=low + + * don't wait for subordinate processess to finish... they may not + end for quite a while -- caused 2min delays during ip-up + . debian/sendmail.init.d + * don't stop sendmail in prerm unless this is a removal + . debian/sendmail.prerm + * patched against local user running sendmail -bi, DoS (closes: #51126) + * provide default /etc/mail/aliases if none found (closes: #51609) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 1 Dec 1999 15:05:00 -0500 + +sendmail (8.9.3-18) unstable; urgency=low + + * no longer stop sendmail in preinst, wait until postinst (closes: #48136) + . debian/sendmail.{pre,post}inst + * uucp *does* put rmail in /usr/sbin... (closes: #48496) + * improve updatedb error message on missing file (closes: #49924) + . debian/local/updatedb + * remove /usr/sbin/hoststat - newscache has it also (closes: #49875) + . debian/rules + * improve vnet/lotus notes support + . debian/cf/feature/vnet.m4 + * cleanup dependancies - build and runtime + . debian/control + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 16 Nov 1999 14:05:00 -0500 + +sendmail (8.9.3-17) unstable; urgency=low + + * updatedb no longer prompts when an error is seen + . debian/local/updatedb + * add vacation to the default list of commands for smrsh + . debian/rules + * Conforms to Standards version 3.1.0: + . debian/control: Added build dependancies. + . debian/local/site.config.m4.in: Using `-O2 -g -Wall' for CFLAGS. + * close a window wherein sendmail.cf didn't exist (use cp instead of mv) + . debian/sendmail.postinst + * parsemc didn't handle `userdb.db` (closes: #49351) + . debian/local/parsemc + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 08 Nov 1999 15:05:00 -0500 + +sendmail (8.9.3-16) unstable; urgency=low + + * updatedb failed to create link for /etc/aliases (closes: #48535) + a mv command just ahead of it died first ;-{ + . debian/local/updatedb + * permissions on files should be 06x4, not 06x0 (closes: #48509) + I these execs from my (tightly clamped) system + . debian/sendmail.postinst + . debian/local/parsemc + . debian/local/updatedb + * postinst failure if run whilst the network is down (closes: #48521) + Can't tell if messages from m4 are error, informational ;-{ + . debian/sendmail.postinst + * move mailq back to /usr/bin + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 28 Oct 1999 12:00:00 -0500 + +sendmail (8.9.3-15) unstable; urgency=low + + * source builds still fubar... chmod a+x debian/configure (closes: #48469) + . debian/rules + * /etc/ppp/ip-{up,down}.d/sendmail now both use /etc/init.d/sendmail reload + instead of restart/stop. (closes: #48374) + . debian/local/ip-{up,down}.d + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 27 Oct 1999 11:00:00 -0500 + +sendmail (8.9.3-14) unstable; urgency=low + + * use autoconfig for NISPLUS so sendmail builds ok on m68k (closes: #48289) + . debian/local/site.config.m4.in + . debian/local/configure.in + . debian/rules + * problem with smarthost and sendmailconfig (email report) + . debian/local/sendmailconfig + * don't keep persistant host status while the network is down + . debian/local/ip-down.d + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 25 Oct 1999 15:00:00 -0500 + +sendmail (8.9.3-13) unstable; urgency=low + + * remove basename from parsemc for `force` option (closes: #48106) + . debian/local/parsemc + * /etc/mail/Makefile now handles optional databases (closes: #48107) + . debian/local/parsemc + * close a previous fixed problem (closes: #47715) + . fixed -9, was hoping to get more info on possible parse error ... + + -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 24 Oct 1999 16:00:00 -0500 + +sendmail (8.9.3-12) unstable; urgency=low + + * remove FEATURE(access_db) from debian.m4 (closes: #47905) + . debian/cf/ostype/debian.m4 + * redo sensible-mda.8 (closes: #21768) + . debian/local/sensible-mda.8 + * warn users, who skip sendmailconfig, that they may have problems + if any files have moved (ie smrsh) (closes: #47936) + . debian/sendmail.postinst + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 21 Oct 1999 10:30:00 -0500 + +sendmail (8.9.3-11) unstable; urgency=low + + * updatedb dies, preventing configuration (closes: #47827, #47838) + . debian/local/updatedb + * a few more updatedb problems (closes: #47887) + . bad redirection (sigh) + . make /etc/alias link relative + - debian/local/updatedb + * more 8.10 preparedness + . /etc/mail/sendmail.ct -> /etc/mail/trusted-users + - debian/local/updatedb + - debian/local/parsemc + - debian/local/sendmailconfig + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 20 Oct 1999 10:30:00 -0500 +sendmail (8.9.3-10) unstable; urgency=low + + * switch sense of optional database tests added in -9 + . debian/local/updatedb + * to mimize load (via #children), change rmail to use -odi + . debian/patches/patch.rmail + * Don't replace Makefile if the current one isn't auto generated + . debian/local/parsemc (closes: #47733) + * prerm script fails if sendmail isn't running (closes: #47547, #47758) + . debian/sendmail.{pre,post}{inst,rm}: verify -e + . debian/sendmail.init.d: add --oknodo to stop + * remove /usr/bin/rmail link (leaving in /usr/sbin in conformance w/policy) + . debian/rules + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 19 Oct 1999 10:00:00 -0500 + +sendmail (8.9.3-9) unstable; urgency=low + + * updated wouldn't generate aliases.db if the file was empty, or only + contained comments (reported via email) + . debian/local/updatedb + * remove peers from provider.m4 in Makefile + .debian/local/parsemc + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 18 Oct 1999 15:35:00 -0500 + +sendmail (8.9.3-8) unstable; urgency=low + + * sendmailconfig used old location for smrsh + . debian/local/sendmailconfig (closes: #47713) + * Makefile missed .m4 extension for provider + . debian/local/parsemc + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 18 Oct 1999 10:40:00 -0500 + +sendmail (8.9.3-7) unstable; urgency=low + + * control and changelog now agree on who I am + . debian/control + * extraneous trailing blank kills awk (but not mawk) ;-{ + . debian/local/parsemc (closes: #47539) + * improper variable reference in sendmailconfig + . debian/local/sendmailconfig (closes: #47526) + * switch order of arguments to procmail + . debian/local/sensible-mda (closes: #47534) + * add minimal help information to sensible-mda + . debian/local/sensible-mda (closes: #47532) + * parsemc doesn't work under ash, magic is now #!/bin/bash + . debian/local/parsemc (closes: #47575) + * bug list cleanup + . smrsh manpage fixed in 8.9.3-3 (closes: #40024) + . sendmail/nscd now coexists much better, fixed in 8.9.3-3 (closes: #40363) + . 8.9.3-3 should've fixed children segfaulting (closes: #45093) + . No answer to information requests (closes: #40922) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Sat, 16 Oct 1999 12:00:00 -0500 + +sendmail (8.9.3-6) unstable; urgency=low + + * ************* IMPORTANT ******************** + Please see /usr/share/doc/sendmail/changelog.Debian.gz for + the 8.9.3-4 changes ! That version had significant changes + and fixed the following 20 problems (but was only tested by a few): + closes: #43241,#39021,#31138,#42265,#44035,#38783,#36067,#34715 + closes: #24608,#42041,#41325,#34789,#44797,#34722,#34285,#32409 + closes: #24612,#29420,#35548,#34405 + * Ok, back to our regulary scheduled programming + + * add dependancies on sendmail.cf for dialup.m4 and provider.m4 + * create /etc/mail/peers/provider (new conffile) + * prevent shell expansion in someplace in /etc/init.d/sendmail + This will allow the new queue checking code to work properly + * Note that the following are very interdependant: + . debian/local/parsemc + . debian/local/updatedb + . debian/cf/ostype/debian.m4 + * cleanup and extend configuration + . debian/local/updatedb + . debian/local/parsemc + * Don't let /etc/ppp/ip-up.d/sendmail overwrite /etc/mail/provider.m4 + when it is a link - for single provider cases. + . debian/local/ip-up.d + * User database is optional ! + . debian/local/parsemc + * save /etc/mail/sendmail.{mc,cf} to /var/backups + . debian/sendmail.cron.daily + . debian/sendmail.postinst + * Postinst now asks before overwriting /etc/mail/sendmail.cf + . debian/sendmail.postinst + * /var/sendmail -> /var/lib/sendmail + + -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 15 Oct 1999 14:00:00 -0500 + +sendmail (8.9.3-5) stable; urgency=low + * "slink" (stable) version of "potato" (unstable) sendmail-8.9.3-6 + Please see its changelog for further information + + -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 15 Oct 1999 14:00:00 -0500 + +sendmail (8.9.3-4) unstable; urgency=low + + * The `back from the dead` release + Ok... Between glibc 2.1 breaking socksification and IBM having + severe problems with email... not to mention health & vacation + problems... I've procrastinated enough ;-{ + Sending the currently complete items out to allow further testing. + The sendmailconfig rewrite has been held up pending some head bashing + (my own). + * Vastly superior postinst/sendmailconfig setup, still more to do + will move sendmailconfig to debconf ASAP. But the current version: + . Automagically updates sendmail.cf and any related databases upon + each new release + . Creates /etc/mail/Makefile that can be used to updated sendmail.cf + and related databases anytime + . Creates/updated databases when sendmailconfig is run, and sendmail.mc + has changed. (closes: bug#43241) + . Moves/Renames databases according to FHS and Sendmail suggestions + . text mailertable -> hash mailertable (closes: bug#39021) + * Ship plain text faq (email request) + * Have rmail call sendmail with background delivery instead of queueing. + Local email will be delivered immediately, and sendmail automatically + queues everything else anyway (at least with the supersafe option which + debian provides by default). (closes: bug#31138) - though he wanted + -odi, and I used -odb + * Update ip-{up,down}.d/sendmail sample to properly handle dialup hosts! + the domain name, and Cw are updated based upon the allocated IP. + The idea comes from, and (closes: bug#42265) + * /etc/init.d/sendmail now checks for -d /usr/share/sendmail + instead of /usr/doc/sendmail. This'll prevent NFS and partial + migration problems (closes: bug#44035) + * Start on example files (mailertable, etc): please checkout + /usr/share/doc/sendmail/examples/db-examples and let me know + what you think -- please contribute other examples ! + * Finally, lintian clean ;-} + * Standards 3.0.1, Debhelper v2 (with only a few kluges in debian/rules) ;-} + . debian/rules + * Don't start sendmail daemon if nullclient, or if smptd is installed + . debian/sendmail.init.d (partial fix for 35220) and request of smptd + maintainer + * add NoRecipienAction = add-to-undisclosed (suggested setting) + . debian/debian.m4 + * Add mime header patches from c.m.s + * SPAM: + -- Add imrss, dssl FEATUREs (see www.imrss.org) + Done using new rbl support + -- Drop orca/orbs in favour of mrbl patch from C.A. + They still work this release, by internally using the new rbl support + * Make sure FEATURE(local_procmail) comes before MAILER(local) + This will keep accidents from happening where plussed mail + gets broken... Helps with 34722 (closes: bug#38783) + * Add FEATURE(dont_masquerade_local), + suggested by our fearless leader ;-} (closes: bug#36067) + . This will prevent local address from being rewritten during local + delivery. This most likely also fixes 34715 (closes: bug#34715) + * Enable mail.local -- for its LMTP support, it may become the default + and then wouldn't require procmail | deliver ! ;-} + Will not work via sensible-mda, however ;-{ + . use FEATURE(local_lmtp) to enable + * Enabled NISPLUS for glibc 2.1 + * Finally support /etc/mail/service.switch (ie, /etc/nsswitch.conf) + This file was never really consulted, as the default name didn't + match what Debian uses. We can't use the real one because sendmail + doesn't (for the nonce) support this format. + Also, corrected HACK(nodns) to use /etc/mail/service.switch-nodns + and to remove FEATURE(nodns). (closes: bug#24608) + * Start of LDAP support.. + . support compiled into sendmail for OpenLDAP + . added FEATURE(ldap,``parms'')dnl + . minimal testing, will do more - feel free ;-} + . Will need to wait for next release ;-{ + * Fix smrsh manpage: /usr/adm/sm.bin->/usr/lib/sm.bin (closes: bug#40024) + * Update to use glibc 2.1, and use its libdb (closes: bug#41325) + . Previous bugs reported due to libdb2 problems - (closes: bug#34789) + . also removes problem of specific libdb2 dependancy (closes: bug#44797) + * sensible-mda updates + . sensible-mda breaks plussed mail (user+arg@domain) (closes: bug#34722) + . debian/sensible-mda.c + . debian/cf/ostype/debian.m4 + * debian cleanup + . perl5 | perl suggestion + . remove bashisms from {pre,post}{inst,rm} + . debian/rules + . basically a complete rewrite + . handle Debian patches during build and install + . remove bashisms + . debian/sendmail.conffiles + . remove /etc/aliases as a conffile (reported via IRC) + . debian/sendmail.postinst + . yet another rewrite + . correct "you you" (closes: bug#34285) + . correct upgrade message with /etc/ -> /etc/mail (closes: bug#32409) + * Don't automagically create sendmail.st, and henceforth preserve it + across upgrades if it exists. + . debian/rules -- rm debian/tmp/var/sendmail/sendmail.st + . debian/sendmail.postinst -- mv /var/log/sendmail.st /var/sendmail/... + * Sendmail compliance: + . Move /etc/mail/sendmail.cw to /etc/mail/local-host-names + . Move /etc/aliases to /etc/mail/aliases and symlinks the two + so that current users of /etc/aliases continue to work and + the databases get built inside /etc/mail instead of /etc/ + * FHS: + . Move /usr/doc to /usr/share/doc + . debian/rules + . Move /usr/man to /usr/share/man + . debian/local/site.config.m4 + . Move /var/log/sendmail.st to /var/sendmail/sendmail.st + . debian/sendmail.postinst, debian/debian.m4 + . Move /var/state/sendmail to /var/sendmail/host_status + . debian/sendmail.postinst, debian/debian.m4 + . Move /usr/tmp/dead.letter to /var/sendmail/dead.letter + . This means mail is *no longer lost, but put herein* + . debian/site.config.m4 (closes: bug#24612) + * Properly fix FHS locations (bug#29420 from 8.9.1-16) + Sigh... If one puts the define in the wrong place, it doesn't work + . FHS: Move FEATURE(xxx) databases from /etc/ to /etc/mail/: (#29420) + bitdomain.m4, domaintable.m4, genericstable.m4, mailertable.m4, + uucpdomain.m4, virtusertable.m4 + . Partial fix for 35548, except for /etc/aliases (closes: bug#35548) + * Note that 8.9.3-3 also fixes part of 34405: allowing group writable + home and .forward... I'm not going to change sendmail's treatment + of DontBlameSendmail from permanent to temporary - though I think + there might be a valid case for this! (closes: bug#34405) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 04 Oct 1999 17:33:21 -0500 + +sendmail (8.9.3-3) stable unstable; urgency=low, closes=35357 + + * group writable home, .forward (closes: bug#35357) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 18 Apr 1999 21:00:00 -0500 + +sendmail (8.9.3-2) unstable; urgency=low, closes=33656 33602 33405 + + * sendmail.postrm not doing suidunregister (closes: bug#33656) + Well, actually it tried... it was just in the wrong spot + * /etc/init.d/sendmail runs even after sendmail removed (closes: bug#33602) + Since policy calls for all MTAs to supply /usr/sbin/sendmail, and + /etc/mail/sendmail.cf was only deleted upon purge, I'm following + the suggestion of checking for /usr/doc/sendmail + * add purgestat to /usr/doc/sendmail/examples/ip-up.d (closes: bug#33405) + This will allow all mail to be delivered - this is only an example + file, however, so you'll have to edit you're /etc/ppp/ip-up.d/sendmail + file yourself + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 22 Feb 1999 13:14:21 -0500 + +sendmail (8.9.3-1) frozen unstable; urgency=high, closes=33152 32872 + + * Refit Debian changes + . debian/site.config.m4 -- new defines for DOS fix + . debian/debian.m4 -- new defines for DOS fix, bump version + . debian/sendmail.postinst -- bump version to coerce sendmailconfig run + * New upstream version - bugfix only (closes: bug#33152) + . New version of DOS patch + . preserve order of MIME headers, correcting PGP signature problems + * FHS & Debian policy 5.5: move /bin/rmail to /sbin/rmail (closes: bug#32872) + sigh... This time, create a symlink so both exist + . debian/rules + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 10 Feb 1999 13:14:21 -0500 + +sendmail (8.9.2-4) unstable; urgency=low + + * debian/site.config.m4 + . link with -ldb2 (sigh) why did glibc let me get away with + this obvious error? glibc-2.1 doesn't... + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 25 Jan 1999 15:00:00 -0500 + +sendmail (8.9.2-3) frozen unstable; urgency=high + + * Yet another DOS attack from BugTraq -- patch from sendmail.org + . debian/site.config.m4 -- + . debian/debian.m4 -- + . src/conf.h -- + . src/collect.c -- + . src/sendmail.h -- + . src/readcf.c -- + . src/conf.c -- + . cf/m4/proto.m4 -- + * Correct orca (ORBS) address to relays.orbs.org + . debian/orbs.m4 -- relays.orbs.org + . cf/m4/proto.m4 -- http://www.orbs.org + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 21 Jan 1999 15:00:00 -0500 + +sendmail (8.9.2-2) frozen unstable; urgency=high + + * Re upload to make both frozen and unstable. + The DOS update and nullclient (open relay) problems are severe + enough that I, and others, think this should make frozen. + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 20 Jan 1999 14:00:00 -0500 + +sendmail (8.9.2-1) unstable; urgency=high, closes=30292 + + * New upstream source, bug fixes and a DOS fix + . syslog filling/DOS (#30292) + . libdb2 (Berkeley DB 2.6.4 API change) + . upstream inclusion of proto.m4 patches already in Debian + . upstream fixes for FHS issue wrt /etc/mail + * Update debproto.m4 for 8.9.2 + * Drop Debian support of nullclient - it turns one into an unchecked relay! + current nullclients are converted to smarthosts with no loss of function- + ality. + . sendmailconfig + * See changelog for the unreleased 8.9.1-16 changes contained herein + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 05 Jan 1999 12:00:00 -0500 +sendmail (8.9.1-16) unstable; urgency=low, closes=27355 28410 28931 29420 30447 + + * Correct HACK(nodns) (#30447) + * Compile with new libc6 to remove versioned depends (#28931) + * add feature(orca): Dial User List + at the request of Paul Haggart <ph@bsfh.org> + * Correct README.Debian reference (#29613) + /usr/lib/sendmail.cf -> /usr/share/sendmail.cf + * Correct include library path for libdb2 + * Update debproto.m4 for 8.9.1a, add proper diversion tags to + sendmailconfig + * Add MapInUnsafeDirPath to DontBlameSendmail (#27355) + so access.db may be in group writable directory + * FHS: Move FEATURE(xxx) databases from /etc/ to /etc/mail/: (#29420) + bitdomain.m4, domaintable.m4, genericstable.m4, mailertable.m4, + uucpdomain.m4, virtusertable.m4 + -- IMPORTANT -- + sendmailconfig can't automagically move all this for you, you'll + have to move the datasets and any update script by hand + * make the postinst actually wait for enter (#28410) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 30 Nov 1998 12:00:00 -0500 + +sendmail (8.9.1-15) unstable; urgency=high, closes=28410 + + * The change to libdb2 requires that *all* sendmail databases be + rebuilt before sendmail restarts. A warning is now issued to + inform the user of this change. (#28410) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 23 Oct 1998 12:00:00 -0500 + +sendmail (8.9.1-14) unstable; urgency=low, closes=28279 + + * sendmail: adds multiple Content-Transfer-Encoding headers (#28279) + patch sent by Miquel van Smoorenburg <miquels@cistron.nl> + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 20 Oct 1998 18:00:00 -0500 + +sendmail (8.9.1-13) unstable; urgency=low + + * add feature(orbs): Open Relay Blocking System + at the request of Paul Haggart <ph@bsfh.org> + * patch for sendmail stalls on 2.0.x kernels + from Ben Gertzfield <che@debian.org> + * Build with libdb2 instead of libdb. This chanage is mentioned as being + important in the sendmail documentation, and has been requested by both + i386 and sparc folks. + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 20 Oct 1998 12:00:00 -0500 + +sendmail (8.9.1-12) unstable; urgency=high, closes=28226 + + * erf... remove sendmail.real from sendmail.postinst (#28226) + I have to remember to test on the machine w/o socks as well ;-{ + ('twould be nice to have the source in a neutral CVS repository + so I could access from home and work) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 20 Oct 1998 10:00:00 -0500 + +sendmail (8.9.1-11) unstable; urgency=high + + * Correct /etc/init.d/sendmail + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 19 Oct 1998 11:00:00 -0500 + +sendmail (8.9.1-10) unstable; urgency=high, closes=28034 27106 26855 27218 + + * Remove socks wrapper - need a wrapper program, not script as sendmail -F + doesn't work going from the socks wrapper, the runsocks wrapper, and then + finally to sendmail (#28034 and also #27106) + * sendmail wrapper requires bash for exec -a (#26855) + * sendmail wrapper was suid-root (#27218) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 18 Oct 1998 12:00:00 -0500 + +sendmail (8.9.1-9) unstable; urgency=high, closes=26803 + + * correct the socks wrapper for non-socks case - I pulled + the wrong copy (#26803) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 17 Sep 1998 12:00:00 -0500 + +sendmail (8.9.1-8) unstable; urgency=high, closes=26801 + + * sigh... restore rmail to /usr/bin, even though its presence + therein is a very longstanding bug (#26801) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 17 Sep 1998 11:00:00 -0500 + +sendmail (8.9.1-7) unstable; urgency=high, closes=26610 26399 26106 + + * Remove dontinitgroups (#26610) + This change updates debian.m4 so you'll have to run sendmailconfig + to actually get the update enabled. + * update /etc/hosts.allow automagically (#26399) + sendmailconfig checks for sendmail in /etc/hosts.allow and + adds a leading sendmail: all line if needed + * sendmailconfig is now tolerant of warnings (#26106) + * socks5 support - /usr/sbin/sendmail is a wrapper that calls + /usr/sbin/sendmail.real if needed when runsocks is executable + * change checksendmail to a+x + * more cleanup of debian/rules + * FHS changes: + move /usr/lib/sendmail.cf/ to /usr/share/sendmail.cf/ + move /usr/lib/sendmail.hf to /usr/share/sendmail/sendmail.hf + update sendmailconf, debian.m4 + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 14 Sep 1998 10:00:00 -0500 + +sendmail (8.9.1-6) unstable; urgency=high + + * Sigh... I will not leave extraneous blanks in a .m4 file + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 14 Aug 1998 10:00:00 -0500 + +sendmail (8.9.1-5) unstable; urgency=high, closes=25639 + + * Apply sendmail 8.9.1a security patch to protect the various MUAs + This patch updates debian.m4 so you'll have to run sendmailconfig + to actually get the protection enabled. + * Apply two proto.m4 patches from Claus: + - bug wrt overriding the RBL + - bug wrt prevention of unauthorized relay attempts + * Remove -Y from sensible-mda's invocation of procmail (#25639) + * sensible-mda now checks for /etc/procmailrc/<user> and if so, + calls procmail with the -m option... This allows one to deliver mail + to pseudo users without having to create entries in /etc/aliases + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 13 Aug 1998 10:00:00 -0500 + +sendmail (8.9.1-4) unstable; urgency=med, closes=24456 + + * Correct sendmail.cf path in /usr/sbin/etrn (#24456) + also in /usr/sbin/checkmail + + -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 06 Aug 1998 17:00:00 -0500 + +sendmail (8.9.1-3) unstable; urgency=high + + * Cleanup debian/rules a bit... + * Correct /bin /sbin problem created with the reinstall of rmail + + -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 08 Jun 1998 12:00:00 -0500 + +sendmail (8.9.1-2) unstable; urgency=high + + * change /usr/doc/changelog to be RELEASE_NOTES + * add rmail back... + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 06 Jun 1998 12:00:00 -0500 + +sendmail (8.9.1-1) unstable; urgency=low, closes=11132 + + * new upstream source + * /etc/init.d/sendmail and runq now support SOCKS5 if updated... + I personally run socks via /etc/ld.so.preload so that everything + is automagically socksified. + * Only add MASQUERADE_AS in sendmailconfig if needed (#11132) + * Correct define(`confMAX_DAEMON_CHILDREN', `30s')dnl (remove the s) + + -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 06 Jun 1998 10:00:00 -0500 + +sendmail (8.9.0-5) unstable; urgency=high, closes=23870 + + * gack... when I stopped linking /etc/mail/sendmail.cf, I + missed the test in /etc/init.d/sendmail. (#23870) + + -- Richard Nelson <cowboy@debian.org> Thu, 25 Jun 1998 10:00:00 -0500 + +sendmail (8.9.0-4) unstable; urgency=high, closes=23551 + + * Patch collect.c to prevent segfaults in mime8->mime7 (#23774) + * sensible-mda now ignores non-suid MDAs (#23000) + * postinst checks for curent release (#23551) + also - it no longer ln -sf /etc/mail/sendmail.cf /etc/sendmail.cf + * majordomo wants include files in group writeable dirs + + -- Richard Nelson <cowboy@debian.org> Tue, 16 Jun 1998 15:00:00 -0500 + +sendmail (8.9.0-3) unstable; urgency=low + + * Fix copyright file + + -- Richard Nelson <cowboy@debian.org> Sat, 13 Jun 1998 23:00:00 -0500 + +sendmail (8.9.0-2) unstable; urgency=high, closes=23170 23137 23392 23138 + + * Point smrsh back to /usr/lib/sm.bin (#23170) + * Document TCP wrapper support in README.Debian (is this enough?) (#23137) + Also document that one should *really* read RELEASE_NOTES + * don't preformat man pages (#23392) + * forgot the /usr/lib/sendmail link (pine,uucp) (#23165) + * include pre 8.9.0 changelog (#23138) + + -- Richard Nelson <cowboy@debian.org> Sat, 13 Jun 1998 12:00:00 -0500 + +sendmail (8.9.0-1) unstable; urgency=low + + * first release of 8.9.0. This drop is very beta in that I've not + done anything with the control files other than allowing group + writable directories for .forward. I've also not done anything + with the rulesets to improve spam control. + + Basically, this release is ONLY for those who want to play with + the new version and are experienced enough to modify it themselves. + + I'm thinking of integrating the following into the next release, + please let me know what you think: + http://www.unix-ag.uni-hannover.de/soft/check_local/ + + -- Richard Nelson <cowboy@debian.org> Sat, 23 May 1998 12:00:00 -0500 + +sendmail (8.8.8-17) frozen; urgency=high, closes=22747 + + * add MAILER-DAEMON alias (#22747) This is a SEVERE problem + in that absence of this alias may cause mailing loops upon + delivery errors. + + -- Richard Nelson <cowboy@debian.org> Sat, 23 May 1998 12:00:00 -0500 + +sendmail (8.8.8-16) unstable frozen; urgency=low, closes=21787 21744 + + * remove the `m' flag from LOCAL_MAILER_FLAGS (#21787) + * remove /etc/ppp/ip-{up,down}.d from debian/dirs (#21744) + + -- Richard Nelson <cowboy@debian.org> Sun, 03 May 1998 12:00:00 -0500 + +sendmail (8.8.8-15) unstable frozen; urgency=low, closes=21071 + + * This time, hoststat and purgestat really are symlinks to sendmail ;-} (#21071) + * debhelperization start + + -- Richard Nelson <cowboy@debian.org> Sun, 19 Apr 1998 12:00:00 -0500 + +sendmail (8.8.8-14) unstable frozen; urgency=low, closes=20657 20758 + + * <lart,mode=auto> rewrite desc for 20637 </lart> (#20758) + * Don't install /etc/ppp/ip-{up,down}.d/sendmail (#20657) + + -- Richard Nelson <cowboy@debian.org> Mon, 06 Apr 1998 09:00:00 -0500 + +sendmail (8.8.8-13) unstable frozen; urgency=low, closes=20637 20335 20189 + + * Add --pidfile to start of daemon (#20637) + Allow starting when there are queue processes from prior incarnation + * Dangling man symlinks (#20335) + * Local mailer and mixed case users (#20189) + * Include updated ismx patch (updated rules) + + -- Richard Nelson <cowboy@debian.org> Sat, 04 Apr 1998 12:00:00 -0500 + +sendmail (8.8.8-12) unstable frozen; urgency=low, closes=19972 19971 19081 + + * lintian bugs + * /usr/doc/sendmail/checksum.txt has mode 600 (#19972) + * sensible.mda needs man page (#19971) + * Change LOCAL_SHELL_FLAGS to stop queueing of local mail (#19081) + + -- Richard Nelson <cowboy@debian.org> Sat, 21 Mar 1998 12:00:00 -0500 + +sendmail (8.8.8-11) unstable; urgency=low + + * Correct package build so both source/binary show up + + - Richard Nelson <cowboy@debian.org> Sun, 8 Mar 1998 16:36:00 -0500 + +sendmail (8.8.8-10) unstable; urgency=low, closes=16883 19129 + + * New maintainer + * Updated to Standards-Version 2.4.0.0. + * Made -q default to 10 minutes instead of 30. + * Debian.mc: ct,cw optional, temp_mode, etc. + * Add /etc/ppp/ip-{up,down}.d/sendmail (#19129) + + -- Richard Nelson <cowboy@debian.org> Sun, 8 Mar 1998 12:00:00 -0500 + +sendmail (8.8.8-9) unstable; urgency=low + + * Added examples for other operating systems to cf/ostype, per + StormCrow's request. + + -- Johnie Ingram <johnie@debian.org> Mon, 9 Feb 1998 17:23:54 -0500 + +sendmail (8.8.8-8) unstable; urgency=low, closes=17454 17809 + + * Manpage for etrn.8 is no longer executable (#17454). + * Added checksendmail script from BSDI contrib. + * Debian releases of 8.8.6 and later include a .dsc file (#17809). + * Added HACK(rblspam) from Manoj Srivastava (srivasta@debian.org) to + redirect messages from RBLed wastelands to a user called "spam". + + -- Johnie Ingram <johnie@debian.org> Fri, 6 Feb 1998 23:08:55 -0500 + +sendmail (8.8.8-7) unstable; urgency=low + + * The sendmailconfig program no longer forces FEATURE(local_procmail). + + -- Johnie Ingram <johnie@debian.org> Wed, 21 Jan 1998 13:30:33 -0500 + +sendmail (8.8.8-6) unstable; urgency=low, closes=7903 9788 12413 12453 14253 14520 14575 14711 15508 15593 16065 16079 + + * Added Realtime Black Hole ruleset: HACK(rbl). + * Includes alternate nsswitch file which does not use DNS, allowing + run-time deactivation with HACK(nodns) (#12413, #12453, cf. 6495, + early stage of fix of 16883). + * Made name of spam control README more obvious by popular request of + IRC, and corrected "dbm" to "hash" in documentation (#16065). + * Now determines at runtime which mail delivery agent to invoke + (#15593), so dependency is restored to "procmail | deliver" (#14253). + * Corrected location of sendmail.st file (#14575, #15508, #16079). + * The option of setting the expensive flag in mailer definitions is + enabled by default, making modem-based setups easier (#9788). + * Corrected tcpwraper support patch so support is activatable again, and + disabled by default (#14520, #14711). + * ETRN and EXPN programs now included, from the contrib dir. + * A persistent host status directory is defined, so the daemon need not + reattempt a connect to known-bad hosts during simultaneous queue runs. + * Enabled tiered connect timeout in queue runs, lessening the effect of + slow peers delaying the queue runs of mailing lists. + * Queue runs are now sorted, by host to be connected to. + * A limit is set on the number of live children to prevent DoS attacks. + * Outbound connections are now quickly retried once after diald has time + to react, then queued normally. + * For speed, initgroups (supplemental group permissions) are disabled by + default -- this would require a sequential scan of the groups file. + * Added SHELL=/bin/bash to rules file and increased debhelperization. + * Closed #13384, corrected by sed fix to sendmailconfig (cf. 14547). + * Some undocumented features may now be enabled by config files: + O PidFile=/var/run/sendmail.pid + O WritableDirectoriesAreFatal=False + O DontProbeInterfaces=False + O MaxRecipientPerMessage= + O DeadLetterDrop=False + O TcpWrappers=False + * Undocumented features are documented in /usr/lib/sendmail.cf/ostype/debian. + * No longer runs dpkg-shlibdeps on shell scripts. + * Documentation files now preserve original timestamps whenever possible. + * Closed #7903, apparently not a problem with hamm mailx. + * All provided DOMAIN() examples are now included. + * Perl example for converting passwd file to aliases database included. + + -- Johnie Ingram <johnie@debian.org> Tue, 20 Jan 1998 23:06:30 -0500 + +sendmail (8.8.8-5) unstable; urgency=low, closes=16389 + + * Compiled with the -D_FFR_DONT_PROBE_INTERFACES_OPTION option (#16389). + + -- Johnie Ingram <johnie@debian.org> Tue, 30 Dec 1997 16:57:51 -0500 + +sendmail (8.8.8-4) unstable; urgency=low, closes=15707 15990 16000 + + * Corrected package md5sum error (#15990, #16000). + * Removed errant mail delivery agent mail.local (#15707). + + -- Johnie Ingram <johnie@debian.org> Wed, 17 Dec 1997 11:54:59 -0500 + +sendmail (8.8.8-3) unstable; urgency=low + + * Tweaked debian/rules to autocompile on debian-powerpc. + + -- Johnie Ingram <johnie@debian.org> Tue, 9 Dec 1997 17:56:42 -0500 + +sendmail (8.8.8-2) unstable; urgency=low, closes=14894 14565 15552 15131 14825 14292 14547 + + * Init script now defines PIDFILE (#15552, #15131, #14825). + * Binaries are now stripped (#14894, #14565). + * Applied patch so sendmail postinst is now reentrant (#14292). + * Added sed fix to sendmailconfig (#14547). + + -- Johnie Ingram <johnie@debian.org> Wed, 3 Dec 1997 18:49:51 -0500 + +sendmail (8.8.8-1) unstable; urgency=low, closes=12235 13817 13864 + + * New upstream version. + * Now includes sendmail FAQ from rtfm.mit.edu (#12235). + * Added code from David Rocher for compliance with the Standard for + Console Messages (#13817). + * No longer depends exclusively on procmail (#13864). + + -- Johnie Ingram <johnie@debian.org> Wed, 29 Oct 1997 17:11:50 -0500 + +sendmail (8.8.7-5) unstable; urgency=low + + * Added patch from Miquel van Smoorenburg <miquels@cistron.nl> to enable + tcpwrap support at runtime (support now disabled by default). + + -- Johnie Ingram <johnie@debian.org> Sat, 4 Oct 1997 15:05:03 -0400 + +sendmail (8.8.7-4) unstable; urgency=low + + * Fixed problem with sendmailconfig reported by Scott K. Ellis. + + -- Johnie Ingram <johnie@debian.org> Thu, 2 Oct 1997 11:22:12 -0400 + +sendmail (8.8.7-3) unstable; urgency=low + + * No longer depends on deliver (#11655). + * Updated to Standards-Version 2.3.0.0. + * Corrected typo in debian/rules which prevented tcpwrapper support from + working. + + -- Johnie Ingram <johnie@debian.org> Wed, 1 Oct 1997 14:02:01 -0400 + +sendmail (8.8.7-2) unstable; urgency=low + + * Fixed bug in yesno() function in sendmailconfig (#12035) which caused + it to ignore user input in some cases. + * Added patch for ifmail fidonet mailer support (#12241). + * Registered sendmail permissions with suidregister. + * Added patch from Herbert Xu so sendmailconfig will work with ash + (#12211). + * Fixed detection of compatible sendmail.cf files. + * Tweaked packaging to improve multi-architecture, multi-compiler + support. + + -- Johnie Ingram <johnie@debian.org> Sun, 31 Aug 1997 05:00:20 -0400 + +sendmail (8.8.7-1) unstable; urgency=low + + * New upstream bugfix version (pristine source) (#11932). + * Updated to Standards-Version: 2.2.0.0. + + -- Johnie Ingram <johnie@debian.org> Thu, 7 Aug 1997 18:12:23 -0400 + +sendmail (8.8.6-4) unstable; urgency=low + + * Added spam control hacks by Claus Assmann (#5795). + + -- Johnie Ingram <johnie@debian.org> Sat, 26 Jul 1997 13:54:58 -0400 + +sendmail (8.8.6-3) unstable; urgency=low + + * Added binary-arch target to debian/rules (#11400). + + -- Johnie Ingram <johnie@debian.org> Tue, 22 Jul 1997 04:52:54 -0400 + +sendmail (8.8.6-2) unstable; urgency=low + + * Added patch to sendmailconfig from Darrin Stalder so it accepts + procmail as an alternate local delivery agent (#7897, fixing #3752, + #3753, #3754, #4064, #9074, much of 10860). Go Darrin. + * No longer requires "deliver" for installation (bug list above). + * Created a "runq" script at request of Martin "Joey" Schulze (#9268). + * Enabled default support for limited 7->8 bit MIME autoconversion, + since this security hole was fixed (#6815, #10491). + * Edited sendmailconfig to make it more clear that a FQDN is needed + during setup of /etc/mailname (#10512). + * Added the mail.local local delivery program (cf. 4064). + * Corrected name of init script in sendmail(8) manpage from /etc/rc to + /etc/init.d/sendmail (#9176). + * Closed #6093, a duplicate of 6495 (sendmail insists on performing DNS + lookups, bringing the PPP link up unnecessarily). Unfortunately 6495 + is a known bug in the 8.8 series which is not yet fixed. + * Closed #7843 (incorrect upstream PROCMAIL_MAILER_PATH), since this is + always redefined by OSTYPE(debian). + * Closed #5321 -- performance demands that sendmail be run as a daemon. + * Closed #9550, since package is now in new source format and compliant + with Standards-Version 2.1.3.3 (cf. 7077, 9845). + * Closed #5676 (core dump) posted against 8.7.6, which does not apply to + the versions currently in use in the stable and unstable + distributions. + * No longer requires "deliver" for installation (worth repeating). + + -- Johnie Ingram <johnie@debian.org> Sun, 20 Jul 1997 01:48:51 -0400 + +sendmail (8.8.6-1) unstable; urgency=low + + * New maintainer. + * Converted to new source format (#7077, #9845). + * Added "debug" target to /etc/init.d/sendmail to dump status to syslog. + * Modified build makefile to work with bash 2.0, and with libc6 tools. + * Changed tone of long description and similar blurbs from "complex" to + "powerful". + * Added PGP-signed file checksums. + * Included upstream changelog, created Debian changelog (#7075). + * Added Debian and GNU to default configuration string. + + -- Johnie Ingram <johnie@debian.org> Sat, 19 Jul 1997 04:26:45 -0400 + +Local variables: +mode: debian-changelog +add-log-mailing-address: "cowboy@debian.org" +End: diff --git a/debian/checks b/debian/checks new file mode 100644 index 0000000..4ad84c8 --- /dev/null +++ b/debian/checks @@ -0,0 +1,20 @@ + +HFrom: $>CheckFrom +SCheckFrom +R$@ $#error $: 553 empty from + +HTo:$>CheckTo +SCheckTo +R$@ $# error .... some error message .... + +Upgrade to 8.9.3, and install the multiple rbl patch from: + http://www.Sendmail.ORG/~ca/email/patches/mrbl.p3 + http://www.sendmail.org +Then use + FEATURE(rbl,`rbl.maps.vix.com',` Mail from $&{client_addr} + rejected - rbl; see http://maps.vix.com') + FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr} + rejected - dul; see http://maps.vix.com') + FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr} + rejected - open relay; see http://www.orbs.org') + diff --git a/debian/checksendmail/BSDI_CONTRIB b/debian/checksendmail/BSDI_CONTRIB new file mode 100644 index 0000000..97871d5 --- /dev/null +++ b/debian/checksendmail/BSDI_CONTRIB @@ -0,0 +1,18 @@ +Software Package: + checksendmail + +Release/Version: + Dated 7/11/90. + +Retrieved from: + N/A. + +Bug reports: + This software package is maintained by the software contributor, + not BSDI. Please send any bug reports to both support@BSDI.COM + and polk@bsdi.com. + +Comments: + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +Modifications to this version made by BSDI: diff --git a/debian/checksendmail/CVS/Entries b/debian/checksendmail/CVS/Entries new file mode 100644 index 0000000..692e38d --- /dev/null +++ b/debian/checksendmail/CVS/Entries @@ -0,0 +1,5 @@ +/BSDI_CONTRIB/1.1/Mon Jan 22 10:57:27 1996 Tue Oct 24 17:29:51 1995// +/Makefile/1.3/Mon Jan 22 10:57:28 1996 Fri Jan 6 22:34:35 1995// +/address.resolve/1.1.1.1/Mon Jan 22 10:57:28 1996 Thu Jan 13 14:15:30 1994// +/checksendmail.8/1.1.1.1/Mon Jan 22 10:57:28 1996 Thu Jan 13 14:15:31 1994// +/checksendmail.perl/1.1.1.1/Mon Jan 22 10:57:29 1996 Thu Jan 13 14:15:31 1994// diff --git a/debian/checksendmail/CVS/Repository b/debian/checksendmail/CVS/Repository new file mode 100644 index 0000000..b300606 --- /dev/null +++ b/debian/checksendmail/CVS/Repository @@ -0,0 +1 @@ +/master/contrib/checksendmail diff --git a/debian/checksendmail/Makefile b/debian/checksendmail/Makefile new file mode 100644 index 0000000..101ba4e --- /dev/null +++ b/debian/checksendmail/Makefile @@ -0,0 +1,15 @@ +# BSDI $Id: Makefile,v 1.3 1995/01/07 05:34:35 donn Exp $ + +MAN8= checksendmail.0 + +all checksendmail: ${MAN8} + +clean depend tags: + +install: maninstall + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${.CURDIR}/checksendmail.perl ${DESTDIR}${BINDIR}/checksendmail + install -c -o ${BINOWN} -g ${BINGRP} -m 0444 \ + ${.CURDIR}/address.resolve ${DESTDIR}/usr/contrib/lib/ + +.include <bsd.prog.mk> diff --git a/debian/checksendmail/address.resolve b/debian/checksendmail/address.resolve new file mode 100644 index 0000000..01f3011 --- /dev/null +++ b/debian/checksendmail/address.resolve @@ -0,0 +1,27 @@ + +# BSDI $Id: address.resolve,v 1.1.1.1 1994/01/13 21:15:30 polk Exp $ + +# Sample address resolution file for checksendmail(8) + +# local addresses +user +user@hilltop +user@hilltop.BSDI.COM +hilltop!polk + +# within-domain addresses +user@bsdi.com +user@ibapah +user@ibapah.bsdi.com +ibapah!user + +# faraway addresses +user@xxxxxxx.com +user@xxxxxxx.dom +site!user + +# addresses with routing, etc. +site1!site2!user +user@xxxxxxx.dom@bar.dom +site!user@xxxxxxx.dom +site!user@uunet.uu.net diff --git a/debian/checksendmail/checksendmail.8 b/debian/checksendmail/checksendmail.8 new file mode 100644 index 0000000..b129c35 --- /dev/null +++ b/debian/checksendmail/checksendmail.8 @@ -0,0 +1,223 @@ +.\" BSDI $Id: checksendmail.8,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $ +.Dd January 12, 1994 +.Dt CHECKSENDMAIL 8 +.Os +.Sh NAME +.Nm checksendmail +.Nd verify sendmail address transformations. +.Sh SYNOPSIS +.Nm checksendmail +.Op Fl C Ar file.cf +.Op Fl r Ar resolve +.Op Fl T Ar test.address +.Op Fl b Ar sendmail_binary +.Sh DESCRIPTION +.Pp +The +.Nm checksendmail +program is a +.Xr perl +script that aids the testing of +.Xr sendmail 8 's +various configuration files. +.Nm checksendmail +passes typical addresses (supplied in input files) through +.Xr sendmail +and prints the results of the resolution and transformation routines. +.Pp +The input files contain a list of addresses, one per line. +For example: +.Bd -literal -offset indent +user +user@site +user@site.com +.Ed +.Pp +The input file can contain comments started with a +.Em # +and blank lines. +.Sh OPTIONS +.Pp +.Bl -tag -width Fl -compact -offset left +.It Fl C Ar file.cf +Use the +.Xr sendmail +configuration file +.Ar file.cf +instead of the default +.Pa /etc/sendmail.cf +file. +.It Fl r Ar resolve +Use +.Ar resolve +as the input file for the addresses to be used for mail resolving. Defaults +to +.Ar address.resolve . +.It Fl T Ar test.address +Use +.Ar test.address +as the single address to test. Cannot be used in conjunction with +file setting flags. +.It Fl B Ar sendmail_binary +Use the specified +.Ar sendmail_binary +as the path to invoke sendmail (instead of +.Pa /usr/sbin/sendmail ) . +.El +.Sh EXAMPLES +.Pp +The following command will pass the addresses in +.Ar address.resolve +through +.Xr sendmail +using the configuration information in +.Ar myconfig.cf . +.Bd -literal -offset left +example% cat address.resolve +user +user@site +user@site.com +example% checksendmail \-C myconfig.cf +config file: myconfig.cf resolve file: address.resolve +towhom file: address.resolve fromwhom file: address.resolve +Mail address resolution +user --(ether )--> user[rmtc] +user@site --(ether )--> user@site[rmtc] +user@site.com --(ether )--> user@site.com[rmtc] +`To' address transformations for mailer ether: +user ----> user +user@site ----> user@site +user@site.com ----> user@site.com +`From' address transformations for mailer ether: +user ----> user +user@site ----> user +user@site.com ----> user +.Ed +.Pp +The first section of the output shows how the addresses in the input +files are resolved by +.Xr sendmail 8 . +Consider the following output line: +.Pp +.Dl user@site.com --(ether )--> user@site.com[rmtc] +.Pp +The input address +.Em user@site.com +resolves to use the +.Em ether +mailer. That mailer is directed to send the mail to +to the user +.Em user@site.com +at site +.Em rmtc +(as indicated in the square brackets). +.Pp +The two later sections of output show how the addresses specified as +the +.Em To +and +.Em From +address are transformed in the text of the +headers. In the example above, the +.Em To +addresses are untouched. +The +.Em From +addresses, however, all lose their machine information on +the way through the mailer: +.Pp +.Dl user@site ----> user +.Pp +This may be desirable when using a configuration file on a +workstation which is to be hidden as a mailhost from the rest of the +network. +.Pp +The following is a set of addresses used at one site for the purposes of +testing address resolution. Comments after the addresses detail why +particular addresses are present: +.Bl -tag -width "user@machine.com" -compact -offset indent +.It user +Standard trivial address +.It user@rmtc +qualified at one level +.It user@rmtc.central +qualified at two levels +.It user@rmtc.central.sun.com +qualified all the way +.It rmtc!user +local but specified as uucp +.It user@summit +a workstation (normally delivered locally, though) +.It user@summit.central +same but more qualified +.It user@summit.central.sun.com +same but fully qualified +.It summit!user +same but specified as uucp +.It user@prisma +Backward compatibility tests +.It user@prisma.com +.It prisma!user +.It user@central +Superior domain testing +.It user@machine.central +more qualified, but unknown +.It user@summit.central +more qualified and known +.It user@eng +name in faraway domain +.It user@machine.eng +unknown machine in faraway domain +.It user@summit.eng +local machine, far away domain +.It user@hoback +far away machine +.It user@machine +apparently local but unknown machine +.It user@sun.com +Standard trivial address +.It user@machine.dom.sun.com +fully qualified but unknown machine +.It user@foo.com +standard, known, really far away domain +.It user@foo.dom +standard, unknown, really far away domain +.It site!user +Single level uucp +.It site1!site2!user +Double level uucp +.It user@foo.dom@bar.dom +Trickier address +.It site!user@foo.dom +Mixed uucp/domain +.It site!user@uunet.uu.net +Mixed double uucp/domain +.El +.Sh NOTES +Note that +.Nm checksendmail +is a +.Xr perl +script. If your site does not have +.Xr perl 1 , +it can be obtained via anonymous +.Xr ftp +from +.Em ftp.uu.net . +.Pp +.Xr sendmail +requires that the user have access to directory specified by the +.Em OQ +parameter in the configuration file (normally +.Pa /usr/spool/mqueue ) . +.Nm checksendmail +verifies that the user has access to this directory before allowing the +test to continue. +.Sh AUTHORS +.Bd -literal +Gene Kim +Rob Kolstad +Jeff Polk +.Ed +.Sh "SEE ALSO" +.Xr sendmail 8 diff --git a/debian/checksendmail/checksendmail.perl b/debian/checksendmail/checksendmail.perl new file mode 100644 index 0000000..14f4c14 --- /dev/null +++ b/debian/checksendmail/checksendmail.perl @@ -0,0 +1,383 @@ +#!/usr/bin/perl + +# BSDI $Id: checksendmail.perl,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $ + +# checksendmail +# +# The checksendmail program is a perl script that aids the testing +# of sendmail's various configuration filse. checksendmail +# passes typical addresses (supplied in input files) through +# sendmail and prints the result of the resolution and +# transformation routines. +# +# Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90 + +# -- -C config file +# -- -r resolve_addresses_file +# -- -T test one address +# -- -b sendmail binary + +# XXX deficiencies: ``/etc/sendmail'' should be a parameter + +# defaults: + $resolve = "address.resolve"; + $cffile = "/etc/sendmail.cf"; + $sendmail = "/usr/sbin/sendmail"; + +# Pre-create tmp files (so can use safely) +use Fcntl; +foreach ("/tmp/csm$$", "/tmp/csm.in$$") { + die "Can't pre-create $_" unless sysopen(T,$_,O_RDWR|O_CREAT|O_EXCL,0600) and close(T); +} + +sub usage { + die "Usage: checksendmail [-C cffile.cf] [-r resolve_addrs_file [-T one\@test.addr\n"; +} + +for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) { + if ($ARGV[1] eq "-C") + { + shift @ARGV; + if ($#ARGV >= 1) {$cffile = $ARGV[1]; } + else { &usage(); } + } + elsif ($ARGV[1] eq "-r") + { + if ($setfile & 1) { die "Can only set `resolve' once"; } + shift @ARGV; + if ($#ARGV < 1) { &usage(); } + $resolve = $ARGV[1]; + $setfile += 1; + } + elsif ($ARGV[1] eq "-T") + { + if ($setfile) { die "Can't set other files and use -T"; } + shift @ARGV; + if ($#ARGV < 1) { &usage(); } + open (OUT, ">/tmp/csm.in$$") || + die "Can't open >/tmp/csm.in$$"; + $resolve = "/tmp/csm.in$$"; + print OUT "$ARGV[1]\n"; + close (OUT); + $setfile = 7; + } + elsif ($ARGV[1] eq "-b") + { + shift @ARGV; + if ($#ARGV >= 1) {$sendmail = $ARGV[1]; } + else { &usage(); } + } + else { &usage(); } +} + +if (!-e $cffile) { die "Can't find configuration file $cffile\n"; } +if (!-e $resolve) { die "Can't find name file $resolve\n"; } + +# make sure the user can access the ../mqueue directory + +$maildir = `grep ^OQ $cffile`; +chop $maildir; +$maildir =~ s/^OQ//; +if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) { + warn "checksendmail: can't access $maildir! trying anyway...\n"; +} + +chop($hostname = `hostname`); +chop($pwd = `pwd`); +print "system: $hostname\t\tcurrent dir: $pwd\n"; +print "config file: $cffile\t\tresolve file: $resolve\n"; + +sub handler { # 1st argument is signal name + local($sig) = @_; + print STDERR "Caught a SIG$sig--shutting down\n"; + unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$"; + unlink("/tmp/csm.in$$"); + exit(0); +} + +$SIG{'INT'} = 'handler'; +$SIG{'QUIT'} = 'handler'; + + +# glean the mailers used from the rule 0 tests + +sub parseresolve +{ + while (<MAIL>) + { + if (/^ADDRESS TEST MODE/) { next; } + if (/^Enter <ruleset>/) { next; } + if (/^>/) # INPUT LINE! (and last output is done) + { + chop; + if ($prevline) { # OUTPUT LINE! + &printparseresolve; + } + s/> *[0-9,]* *//g; + s/.*input: *//; + s/ //g; + s/"//g; + $input = $_; + } + else { chop; } + $prevline = $_; + } + &printparseresolve; +} + +sub printparseresolve { + $prevline =~ s/.*returns: *//; + $prevline =~ s/"//g; + $prevline =~ s/ //g; + # Don't strip spaces off error messages + $prevline =~ s/ *([.!%<>]) */$1/g; + $prevline =~ s/ +([;?\$])/$1/g; + $prevline =~ s/([#\@:]) +/$1/g; + +# non-Sun test mode delimiters -> easily-readable style +# Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu + $prevline =~ s/\^V/\$#/; + $prevline =~ s/\^W/\$@/; + $prevline =~ s/\^X/\$:/; + + #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET + @t = split( '\$', $prevline); + $address = "XXX"; + $remote = "XXX"; + $mailer = "XXX"; + for ($i = 1; $i <= $#t; $i++) + { + if (substr($t[$i], 0, 1) eq ":") + { $address = substr($t[$i], 1,999); } + if (substr($t[$i], 0, 1) eq "@") + { $remote = substr($t[$i], 1,999); } + if (substr($t[$i], 0, 1) eq "#") + { $mailer = substr($t[$i], 1,999); + $mailer =~ tr/A-Z/a-z/; } + } + printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer, + $address, $remote); + if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";} +} + +# Parse output of sendmail name resolution + +sub parseaddress +{ +## ADDRESS TEST MODE +## Enter <ruleset> <address> +## > rewrite: ruleset 3 input: "user" + + open(MAIL, $_[0]) || die "Can't open $_[0]...\n"; + local ($k, $address, $prevline, $mailer, $remote, $input); + print $_[1]; # the title + + $done = 0; + while (<MAIL>) + { + if (/^> *$/) { $done = 1; } + if (/^ADDRESS TEST MODE/) { next; } + if (/^Enter <ruleset>/) { next; } + chop; + if (/^>/) # INPUT LINE! (and last output is done) + { + if ($prevline) { # OUTPUT LINE! + $prevline =~ s/.*returns: *//; + $prevline =~ s/"//g; + $prevline =~ s/ //g; +#> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net" +#rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net" +#> + printf("%-27.27s ----> %s\n", $input, $prevline); + } + s/> *[0-9,]* *//g; + s/.*input: *//; + s/ //g; + s/"//g; + $input = $_; + } + last if $done; + $prevline = $_; + } + close(MAIL); +} + + +# pass names from resolve files to sendmail + +open(IN, $resolve) || die "can't open $resolve\n"; +open(OUT, ">/tmp/csm$$") || die "can't open >/tmp/csm$$\n"; +while (<IN>) +{ + /^$/ && next; + /^#/ && next; + print OUT "3,0 $_"; + chop; + $allinput .= " $_"; +} +close(OUT); +close(IN); +$sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|"; +open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n"; +print "Mail address resolution (rule 0)\n\n"; +&parseresolve(); + +# calculate $f + $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$"; + open (OUT, $sendmailprog); + open (IN, $resolve); + $rules = "3,1,4"; + while (<IN>) { + chop; + /^$/ && next; + /^#/ && next; + $address = $_; + print OUT "$rules $address\n"; + } + print OUT "\n"; # stuff last line into sendmail + close(IN); + close(OUT); + &parseaddress ("/tmp/csm$$", "\n\n\$f address header transformations\n\n"); + +# Get the R= and S= special rulesets from the configuration + +open(FID, "grep ^M $cffile|"); +while (<FID>) +{ +# Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h + chop; + $thisline = $_; $thisline =~ s/M//; $thisline =~ s/,.*//; + $thisline =~ tr/A-Z/a-z/; + $sendrule = $_; $sendrule =~ s/.*S=//; $sendrule =~ s/,.*//; + if ($sendrule=~q!/!) { + ($esendrule, $hsendrule) = split (q!/!, $sendrule); + } + else { $esendrule = $hsendrule = $sendrule; } + $recvrule = $_; $recvrule =~ s/.*R=//; $recvrule =~ s/,.*//; + if ($recvrule=~q!/!) { + ($erecvrule, $hrecvrule) = split (q!/!, $recvrule); + } + else { $erecvrule = $hrecvrule = $recvrule; } + $esendrules{$thisline} = $esendrule; + $hsendrules{$thisline} = $hsendrule; + $erecvrules{$thisline} = $erecvrule; + $hrecvrules{$thisline} = $hrecvrule; +} +close(FID); + +# pass names from various mailers through sendmail + +foreach $i (keys %themailers) +{ + $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$"; + if ($erecvrules{$i} == 0) { + print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n"; + next; + } + open (OUT, $sendmailprog); + @namelist = split(/ /, $allinput); + $rules = "3,2,$erecvrules{$i},4"; + foreach (@namelist) { + print OUT "$rules $_\n"; + } + print OUT "\n"; # stuff last line into sendmail + close(OUT); + $note = ""; + if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; } + &parseaddress ("/tmp/csm$$", "\n\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n\n"); +} +foreach $i (keys %themailers) +{ + $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$"; + if ($hrecvrules{$i} == 0) { + print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n"; + next; + } + if ($hrecvrules{$i} ne $erecvrules{$i}) { + open (OUT, $sendmailprog); + @namelist = split(/ /, $allinput); + $rules = "3,2,$hrecvrules{$i},4"; + foreach (@namelist) { + print OUT "$rules $_\n"; + } + print OUT "\n"; # stuff last line into sendmail + close(OUT); + &parseaddress ("/tmp/csm$$", "\n\n`To' header address transformations for mailer $i [$rules]:\n\n"); + } +} + +# pass names from various mailers through sendmail +foreach $i (keys %themailers) +{ + $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$"; + if ($esendrules{$i} == 0) { + print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n"; + next; + } + open (OUT, $sendmailprog); + open (IN, $resolve); + $rules = "3,1,$esendrules{$i},4"; + while (<IN>) { + chop; + /^$/ && next; + /^#/ && next; + $address = $_; + print OUT "$rules $address\n"; + } + print OUT "\n"; # stuff last line into sendmail + close(IN); + close(OUT); + $note = ""; + if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";} + &parseaddress ("/tmp/csm$$", "\n\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n\n"); +} +foreach $i (keys %themailers) +{ + $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$"; + if ($hsendrules{$i} == 0) { + print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n"; + next; + } + open (OUT, $sendmailprog); + open (IN, $resolve); + $rules = "3,1,$hsendrules{$i},4"; + while (<IN>) { + chop; + /^$/ && next; + /^#/ && next; + $address = $_; + print OUT "$rules $address\n"; + } + print OUT "\n"; # stuff last line into sendmail + close(IN); + close(OUT); + &parseaddress ("/tmp/csm$$", "\n\n`From' address header transformations for mailer $i [$rules]:\n\n"); +} +foreach $i (keys %themailers) +{ + $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$"; + if ($esendrules{$i} == 0) { + print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n"; + next; + } + open (OUT, $sendmailprog); + open (IN, $resolve); + $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431??? + while (<IN>) { + chop; + /^$/ && next; + /^#/ && next; + $address = $_; + print OUT "$rules $address\n"; + } + print OUT "\n"; # stuff last line into sendmail + close(IN); + close(OUT); + $note = ""; + if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";} + &parseaddress ("/tmp/csm$$", "\n\n\$g address transformations for mailer $i [$rules]:\n\n"); +} + +unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$"; +unlink("/tmp/csm.in$$"); + diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..61fc5c5 --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: sendmail +Section: mail +Priority: extra +Maintainer: Richard A Nelson (Rick) <cowboy@debian.org> +Standards-Version: 3.1.1 + +Package: sendmail +Architecture: any +Depends: ${shlibs:Depends}, dpkg (>= 1.4.1.17), m4, awk, procmail | deliver +Recommends: mail-reader, ${perl:Depends} | perl +Conflicts: mail-transport-agent, smail, postfix +Provides: mail-transport-agent +Description: A powerful mail transport agent. + Sendmail is an alternative mail transport agent (MTA) for + Debian. It is suitable for handling sophisticated mail + configurations, although this means that its configuration + can also be complex. + . + To deliver mail to local users, sendmail requires either the + `procmail' or `deliver' package to be installed. diff --git a/debian/db-examples/access b/debian/db-examples/access new file mode 100644 index 0000000..9eea701 --- /dev/null +++ b/debian/db-examples/access @@ -0,0 +1,88 @@ +# /etc/mail/access +# Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1998/10/27 10:00:00 cowboy> +# GPL'd config file, please feed any gripes, suggestions, etc. to me +# +# Function: +# Access Control for this smtp server - determines: +# * Who we accept mail from +# * Who we accept relaying from +# * Who we will not send to +# +# Usage: +# FEATURE(access_db[, type [-o] /etc/mail/access])dnl +# makemap hash access < access +# +# Format: +# lhs: +# email addr <user@[host.domain]> +# domain name unless FEATURE(relay_hosts_only) is used, +# then this is a fqdn - and relay-domains ($=R) +# must also be fqdns. +# network number must end on an octet boundary, or +# you're stuck going the longwinded way ;-{ +# rhs: +# OK accept mail even if other rules in the +# running ruleset would reject it. +# RELAY Allow domain to relay through your SMTP +# server. RELAY also serves an implicit +# OK for the other checks. +# REJECT reject the sender/recipient with a general +# purpose message that can be customized. +# confREJECT_MSG [550 Access denied] will be issued +# DISCARD discard the message completely using +# the $#discard mailer. +# ### any text where ### is an RFC 821 compliant error code +# and "any text" is a message to return for +# the command +# Examples: +# spammer@aol.com REJECT +# FREE.STEALTH.MAILER@ 550 Spam not accepted +# +# Notes: +# With FEATURE(blacklist_recipients) this is also possible: +# badlocaluser 550 Mailbox disabled for this username +# host.mydomain.com 550 That host does not accept mail +# user@otherhost.mydomain.com 550 Mailbox disabled for this recipient +# +# Related: +# define(`confREJECT_MSG', `550 Access denied')dnl +# define(`confCR_FILE', `-o /etc/mail/relay-domains')dnl <<- $=R +# FEATURE(relay_hosts_only)dnl +# FEATURE(relay_entire_domain)dnl <<- relays any host in the $=m class +# FEATURE(relay_based_on_MX)dnl <<- relaying for boxes MX'd to you +# FEATURE(blacklist_recipients)dnl +# FEATURE(rbl[,alternate server])dnl +# FEATURE(orbs[,alternate server])dnl <<- Debian addition +# FEATURE(orca[,alternate server])dnl <<- Debian addition +# FEATURE(accept_unqualified_senders)dnl +# FEATURE(accept_unresolvable_domains)dnl +# +# Local addresses 10.x.x.x, 127.x.x.x, 172.16-31.x.x 192.168.x.x can relay +# Note Well! You *must* make sure these address can't be spoofed externally +10 RELAY +127 RELAY +172.16 RELAY +172.17 RELAY +172.18 RELAY +172.19 RELAY +172.20 RELAY +172.21 RELAY +172.22 RELAY +172.23 RELAY +172.24 RELAY +172.25 RELAY +172.26 RELAY +172.27 RELAY +172.28 RELAY +172.29 RELAY +172.30 RELAY +172.31 RELAY +192.168 RELAY +# +# Hosts that are allowed to talk to me +# +# +# Blacklisted users +# +reject@ REJECT diff --git a/debian/db-examples/aliases b/debian/db-examples/aliases new file mode 100644 index 0000000..8e99427 --- /dev/null +++ b/debian/db-examples/aliases @@ -0,0 +1,15 @@ +# +# Mail aliases for sendmail +# +# You must run newaliases(1) after making changes to this file. +# + +# Required aliases +postmaster: root +MAILER-DAEMON: postmaster + +# Common aliases +abuse: postmaster +spam: postmaster + +# Other aliases diff --git a/debian/db-examples/domaintable b/debian/db-examples/domaintable new file mode 100644 index 0000000..82b3ff7 --- /dev/null +++ b/debian/db-examples/domaintable @@ -0,0 +1,26 @@ +# /etc/mail/domaintable +# Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1998/10/27 10:00:00 cowboy> +# GPL'd config file, please feed any gripes, suggestions, etc. to me +# +# Function: +# Specify a mapping from old host name to new host name. +# Commonly used to support old (or merged) domain names. +# The host name in the lhs will be rewritten to that in the rhs +# +# Usage: +# FEATURE(domaintable[, type [-o] /etc/mail/domaintable])dnl +# makemap hash domaintable < domaintable +# +# Format: +# old fqdn new fqdn +# +# Examples: +# debian.com debian.org +# .debian.com %0.debian.org +# +# Notes: +# +# Related: +# +#.cv.lexington.ibm.com %0.lexington.ibm.com diff --git a/debian/db-examples/genericstable b/debian/db-examples/genericstable new file mode 100644 index 0000000..44bf03c --- /dev/null +++ b/debian/db-examples/genericstable @@ -0,0 +1,36 @@ +# /etc/mail/genericstable +# Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1998/10/27 10:00:00 cowboy> +# GPL'd config file, please feed any gripes, suggestions, etc. to me +# +# Function: +# Cause certain addresses originating locally (unqualified), or +# from a domain in $=G to be rewritten based upon the map below. +# This mapping may change both the user and domain name. +# +# Usage: +# FEATURE(genericstable[, type [-o] /etc/mail/genericstable])dnl +# makemap hash genericstable < genericstable +# +# Format: +# localuser realuser@realdomain <<- implied $j or masq domain +# user@host realuser@realhost <<- tried first +# user[@host] realuser[@realhost] +# +# Examples: +# +# Notes: +# * Masquerading is *required* for genericstable support! +# * Then genericstable should only be enabled if needed as it +# causes every sender to be looked up in the database +# * Members of $=w are *not* automatically placed in $=G +# * For local mail, FEATURE(always_add_domain) is necessary +# +# Related: +# EXPOSED_USER(root uucp)dnl <<- these are exempt from masquerading +# FEATURE(allmasquerade)dnl <<- rewrite recipient addrs too +# FEATURE(always_add_domain)dnl <<- add domain to unqualified names +# FEATURE(limited_masquerade)dnl <<- only masq domains in $=M +# FEATURE(masquerade_envelope)dnl <<- rewrite envelope return address too +# GENERICS_DOMAIN_FILE(`/etc/mail/sendmail.cG')dnl <<- masq From: +# diff --git a/debian/db-examples/mailertable b/debian/db-examples/mailertable new file mode 100644 index 0000000..79d950f --- /dev/null +++ b/debian/db-examples/mailertable @@ -0,0 +1,50 @@ +# /etc/mail/mailertable +# Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1998/10/27 10:00:00 cowboy> +# GPL'd config file, please feed any gripes, suggestions, etc. to me +# +# Function: +# Specify a mapping from old host name to new host name. +# Commonly used to support old (or merged) domain names. +# The host name in the lhs will be rewritten to that in the rhs +# +# Usage: +# FEATURE(mailertable[, type [-o] /etc/mail/mailertable])dnl +# makemap hash mailertable < mailertable +# +# Format: +# Local recipients: +# <address> local:user +# <address> local: <<- will use same user +# Error messages: +# badhost error:nohost mail to %0 is prohibited +# .baddomain error:nohost mail to %1%0 is prohibited +# +# Examples: +# Local recipients: +# <address> local:user +# <address> local: <<- will use same user +# Error messages: +# badhost error:nohost mail to %0 is prohibited +# .baddomain error:nohost mail to %1%0 is prohibited +# +# Notes: +# +# Related: +# +# Address rewrites for hosts *NOT IN* class $w +# Direct delivery, %0 is left side +# friend.dom smtp:[%0]:[some.smart.host] +# Direct deliver of domain, smarthost as second choice +# .friend.dom smtp:[%1%0]:[some.smart.host] +# Default route, via smarthost +# . smtp:[some.smart.host] +# +badhost error:nohost mail to %0 is prohibited +.baddomain error:nohost mail to %1%0 is prohibited +# +# Sites we deliver directly to, bypassing SMARTHOST: +# +# Sites that use DUL: Dialup User Lists (or equivalent) +#aol.com esmtp:[relay] +#primenet.com esmtp:[relay] diff --git a/debian/db-examples/relay-domains b/debian/db-examples/relay-domains new file mode 100644 index 0000000..393f65d --- /dev/null +++ b/debian/db-examples/relay-domains @@ -0,0 +1,34 @@ +# /etc/mail/relay-domains +# Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1998/10/27 10:00:00 cowboy> +# GPL'd config file, please feed any gripes, suggestions, etc. to me +# +# Function: +# Control what hosts are allowed to relay (or be a relay) +# +# Usage: +# define(`confCR_FILE', `[-o ]/etc/mail/relay-domains')dnl +# +# Format: +# lhs: +# +# Notes: +# Class $=R +# These are domains unless FEATURE(relay_hosts_only) is used, +# then these names must be fully qualified host names! +# +# Related: +# FEATURE(relay_hosts_only)dnl +# FEATURE(relay_entire_domain)dnl <<- relays any host in the $=m class +# FEATURE(relay_based_on_MX)dnl <<- relaying for boxes MX'd to you +# FEATURE(access_db)dnl +# EATURE(blacklist_recipients)dnl +# FEATURE(rbl[,alternate server])dnl +# FEATURE(orbs[,alternate server])dnl <<- Debian addition +# FEATURE(accept_unqualified_senders)dnl +# FEATURE(accept_unresolvable_domains)dnl +# +# Hosts that I will relay to: +# +# Hosts that can relay to me: +# diff --git a/debian/db-examples/sendmail.cM b/debian/db-examples/sendmail.cM new file mode 100644 index 0000000..8806f3b --- /dev/null +++ b/debian/db-examples/sendmail.cM @@ -0,0 +1,32 @@ +# /etc/mail/sendmail.cM +# Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1998/10/27 10:00:00 cowboy> +# GPL'd config file, please feed any gripes, suggestions, etc. to me +# +# Function: +# Specify mail domains, which when relayed, will be rewritten +# to appear as the MASQUERADE_AS address +# +# Usage: +# MASQUERADE_DOMAIN_FILE(`[-o ]/etc/mail/sendmail.cM')dnl +# +# Format: +# fqdn +# +# Examples: +# debian.org +# +# Notes: +# Class=$M +# +# Related: +# EXPOSED_USER(root uucp)dnl <<- these are exempt from masquerading +# FEATURE(allmasquerade)dnl <<- rewrite recipient addrs too +# FEATURE(always_add_domain)dnl <<- add domain to unqualified names +# FEATURE(limited_masquerade)dnl <<- only masq domains in $=M +# FEATURE(masquerade_entire_domain)dnl <<- masq all hosts under domain +# FEATURE(masquerade_envelope)dnl <<- rewrite envelope return address too +# GENERICS_DOMAIN_FILE(`/etc/mail/sendmail.cG')dnl <<- masq From: +# +# Local names +# diff --git a/debian/db-examples/virtusertable b/debian/db-examples/virtusertable new file mode 100644 index 0000000..3512635 --- /dev/null +++ b/debian/db-examples/virtusertable @@ -0,0 +1,8 @@ +# Address rewrites for incomming mail +# user@realdomain (must be in $w) localuser (may be an alias) +# info@foo.com foo-info +# info@bar.com bar-info +# @baz.org jane@elsewhere.net +# @foo.org %1@elsewhere.com +# @bar.org error:nouser User unknown +# diff --git a/debian/faq.txt b/debian/faq.txt new file mode 100644 index 0000000..89504a8 --- /dev/null +++ b/debian/faq.txt @@ -0,0 +1,3001 @@ + + sendmail.org + + Sendmail + Frequently Asked Questions (FAQ) + + Last updated September 9, 1999 + + Comments and questions on this FAQ should be directed to + sendmail+faq@sendmail.org. + General questions about sendmail should be directed to + sendmail-questions@sendmail.org. + Bug reports should be directed to sendmail-bugs@sendmail.org. + Questions and comments about this web site should be directed to + sendmail-www@sendmail.org. + + If you post a message to comp.mail.sendmail and send it to one of the + above addresses, please clearly indicate so at the top of your + message. + _________________________________________________________________ + +Top 5 - the most frequently asked questions about sendmail + + 1. Local config error: see 4.5 + 2. Y2K: see 4.11 + 3. Relaying denied: see 3.27 + 4. Directory permissions: see 3.33 + 5. Virtual hosting: see 3.7 & 3.28 + _________________________________________________________________ + +Table of Contents + + * 0. Plain-text version now available. + * 1. COPYRIGHT NOTICE / REDISTRIBUTION REQUIREMENTS + * 2. INTRODUCTION / MISCELLANEOUS + + 2.1 What is this newsgroup? + + 2.2 What is the scope of this FAQ? + + 2.3 Where can I find the latest version of this FAQ? + + 2.4 How do I access comp.mail.sendmail by email? + + 2.5 Where can I ask email-related DNS questions? + + 2.6 How can I subscribe to these newsgroups? + + 2.7 Which version of sendmail should I run? + + 2.8 What is the latest release of sendmail? + + 2.9 Where can I find it? + + 2.10 What are the differences between Version 8 and other + versions? + + 2.11 What's the best platform for running sendmail? + + 2.12 What is BIND and where can I get the latest version? + + 2.13 What is smrsh and where can I get it? + + 2.14 What is smap and where can I get it? + + 2.15 What is TCP-Wrappers and where can I get it? + + 2.16 Why won't db 1.85 build on my machine? + + 2.17 What is makemap and where can I get it? + * 3. VERSION 8 SPECIFIC ISSUES + + 3.1 How do I make all my addresses appear to be from a single + host? + + 3.2 How do I rewrite my "From:" lines to read + ``First_Last@My.Domain'' or ``Different_Name@My.Domain''? + + 3.3 Why are you so hostile to using full names for email + addresses? + + 3.4 So what was the user database feature intended for? + + 3.5 Where do I find this user database (UserDB) code? + + 3.6 How do I get the user database to work with Pine or with + FEATURE(always_add_domain)? + + 3.7 How do I manage several (virtual) domains? + + 3.8 There are four UUCP mailers listed in the configuration + files. Which one should I use? + + 3.9 How do I fix "undefined symbol inet_aton" and "undefined + symbol _strerror" messages? + + 3.10 How do I solve "collect: I/O error on connection" or + "reply: read error from host.name" errors? + + 3.11 Why can't my users forward their mail to a program? + + 3.12 Why do connections to the SMTP port take such a long + time? + + 3.13 Why do I get "unknown mailer error 5 -- mail: options + MUST PRECEDE recipients" errors? + + 3.14 Why does version 8 sendmail panic my SunOS box? + + 3.15 Why does the Unix From line get mysteriously munged when + I send to an alias? + + 3.16 Why doesn't MASQUERADE_AS (or the user database) work + for envelope addresses as well as header addresses? + + 3.17 How do I run version 8 sendmail and support the MAIL11V3 + protocol? + + 3.18 Why do messages disappear from my queue unsent? + + 3.19 When is sendmail going to support RFC 2047 MIME header + encoding? + + 3.20 Why can't I get mail to some places, but instead always + get the error "reply: read error from name.of.remote.host"? + + 3.21 Why doesn't "FEATURE(xxx)" work? + + 3.22 How do I configure sendmail to not use DNS? + + 3.23 How do I get all my queued mail delivered to my Unix box + from my ISP? + + 3.24 Why do I get the error message unable to write + /etc/mail/sendmail.pid? + + 3.25 Why can't I compile sendmail with Berkeley DB 2.X? + + 3.26 What operating systems has Berkeley sendmail been ported + to? + + 3.27 How do I prevent Relaying Denied errors for my clients? + + 3.28 Why isn't virtual hosting working, even after I added a + Kvirtuser line to sendmail.cf ? + + 3.29 How can I add a header specifying the actual recipient + when having multiple users in a virtual domain go to a single + mailbox? + + 3.30 What do I do when Build fails because groff was not + found? + + 3.31 What does "class hash not available" mean? + + 3.32 How do I configure majordomo with sendmail 8.9 without + relaxing the DontBlameSendmail option? + + 3.33 How do I configure my system in general with sendmail + 8.9? + * 4. GENERAL SENDMAIL ISSUES + + 4.1 Should I use a wildcard MX for my domain? + + 4.2 How can I set up an auto-responder? + + 4.3 How can I get sendmail to deliver local mail to + $HOME/.mail instead of into /usr/spool/mail (or /usr/mail)? + + 4.4 Why does it deliver the mail interactively when I'm + trying to get it to go into queue only mode? + + 4.5 How can I solve "MX list for hostname points back to + hostname" and "config error: mail loops back to myself" + messages? + + 4.6 Why does my sendmail process sometimes hang when + connecting over a SLIP/PPP link? + + 4.7 How can I summarize the statistics generated by sendmail + in the syslog? + + 4.8 How can I check my sendmail.cf to ensure that it's + re-writing addresses correctly? + + 4.9 What is procmail, and where can I get it? + + 4.10 How can I solve "cannot alias non-local names" errors? + + 4.11 Is sendmail Year 2000 (Y2K) compliant? + + 4.12 How can I batch remote mail to be sent using my ISP + while delivering local mail immediately? + + 4.13 What does "unknown mailer error 1" mean? + + 4.14 How do I queue mail for another domain? + + 4.15 How do I create attachments with sendmail? + + 4.16 How do I find sendmail's version number? + * 5. VENDOR/OS SPECIFIC SENDMAIL ISSUES + + 5.1 Sun Microsystems SunOS/Solaris 1.x/2.x + o 5.1.1 How can I solve "line 273: replacement $3 out of + bounds" errors? + o 5.1.2 How can I solve "line 445: bad ruleset 96 (50 + max)" errors? + o 5.1.3 Why does version 8 sendmail (< 8.7.5) sometimes + hang under Solaris 2.5? + o 5.1.4 Why can't I use SunOS/Solaris to get email to + certain large sites? + o 5.1.5 Why do I have trouble compiling on Solaris? + o 5.1.6 How does 8.X compare to 8.X+Sun? + + 5.2 IBM AIX + o 5.2.1 The system resource controller always reports + sendmail as "inoperative". What's wrong? + o 5.2.2 Why can't I use AIX to get email to some sites? + o 5.2.3 Why can't I get sendmail 8.7.1 to use MX records + with AIX 3.2.5? + * 6. ADDITIONAL INFORMATION SOURCES (RFC 1807 bibliography format) + + 6.1 Reference material devoted exclusively to sendmail + + 6.2 Reference material with chapters or sections on sendmail + + 6.3 Reference material on subjects related to sendmail + + 6.4 World-wide web index pages on sendmail + + 6.5 World-wide web index pages Internet email in general + + 6.6 Online tutorials for sendmail + + 6.7 Online archives of mailing lists and Usenet newsgroups, + relating to Internet email + * 7. THANKS! + + home + + sendmail.org 1. COPYRIGHT NOTICE / REDISTRIBUTION REQUIREMENTS + + The entire contents of this document are copyright 1997 - 1998 by the + Sendmail Consortium, all rights reserved. + + This document may be freely distributed for non-profit purposes + (including, but not limited to: posting to mailing lists, Usenet + newsgroups, and world-wide-web pages; inclusion on CD-ROM or other + distribution media; and insertion into text retrieval systems), so + long as it is the latest version available at the time, all parts are + distributed together, and it is kept completely intact without + editing, changes, deletions, or additions. Non-profit redistribution + in accordance with these guidelines does not require contact with or + approval from the copyright holder. + + Redistribution of this document for profit without express prior + permission is not allowed. At the very least, expect to provide the + copyright holder a free copy of the product (exactly as it would be + sold to customers, all distribution media intact), or a percentage of + the gross revenue from said product and sufficient proof that the + integrity and completeness requirements set for non-profit + distribution will be met. + + In the event that the copyright holder discovers a redistributed + version that is not in compliance with the above requirements, he will + make a good-faith effort to get it corrected or removed, and failing + that, at least note its deprecated status in a new version. Legal + action will likely be taken against redistribution for profit that is + not in compliance with the above requirements. + + + sendmail.org + + 2. INTRODUCTION / MISCELLANEOUS + + * 2.1 What is this newsgroup? + * 2.2 What is the scope of this FAQ? + * 2.3 Where can I find the latest version of this FAQ? + * 2.4 How do I access comp.mail.sendmail by email? + * 2.5 Where can I ask email-related DNS questions? + * 2.6 How can I subscribe to these newsgroups? + * 2.7 Which version of sendmail should I run? + * 2.8 What is the latest release of sendmail? + * 2.9 Where can I find it? + * 2.10 What are the differences between Version 8 and other + versions? + * 2.11 What's the best platform for running sendmail? + * 2.12 What is BIND and where can I get the latest version? + * 2.13 What is smrsh and where can I get it? + * 2.14 What is smap and where can I get it? + * 2.15 What is TCP-Wrappers and where can I get it? + * 2.16 Why won't db 1.85 build on my machine? + * 2.17 What is makemap and where can I get it? + _________________________________________________________________ + +Q2.1 -- What is this newsgroup? + + Date: May 28, 1996 + + The Usenet newsgroup comp.mail.sendmail is dedicated to the discussion + of the program named "sendmail" in all its various forms. It is most + commonly found on computers running a flavor of the Operating System + known as Unix, or derived from Unix. + + This program has been ported to other OSes, but those versions have + typically been ported by a particular vendor and are considered + proprietary. There are many versions of sendmail, but the original + author (Eric Allman) is continuing development on a particular version + typically referred to as "Version Eight" or sometimes just "V8". This + is considered by many to be the One True Version. This is also the + version that this FAQ is centered around. + + If you have a question that amounts to "How do I send mail to my + friend?", then you're in the wrong newsgroup. You should first check + with your System or E-Mail Administrator(s), BBS SysOp(s), etc... + before you post your question publicly, since the answer will likely + be very highly dependent on what software and hardware you have. You + also don't want to embarrass yourself publicly, nor do you want to + annoy the kinds of people who are likely to be the counterparts of + your System or E-Mail Administrator(s), BBS SysOp(s), etc.... If + asking them doesn't do you any good, make sure you read this FAQ and + the other mail-related FAQs at the archive sites listed below. + + If you have a question about another program similar to sendmail + (technically referred to as an "SMTP MTA"), an SMTP Gateway package, + or a LAN email package, then you should see if there is another group + in the comp.mail hierarchy that more closely matches the particular + program you want to ask a question about. For example, the SMTP MTA + known as Smail has comp.mail.smail dedicated to it. The Mail User + Agent (MUA) Eudora has two newsgroups dedicated to it + (comp.mail.eudora.mac and comp.mail.eudora.ms-windows), depending on + which hardware platform you use. If there isn't a more appropriate + newsgroup, try comp.mail.misc. Again, make sure your question isn't + already addressed in one of the mail-related FAQs or other available + documentation. See the IMC website (more info below) for a good list + of mail-related FAQs. + + If you have a question about an older or vendor-proprietary version of + sendmail, be prepared for a lot of answers that amount to "Get V8". + Version 8 isn't a panacea, but it does solve many problems known to + plague previous versions, as well as having many new features that + make it much easier to administer large or complex sites. In many + cases, it makes at least possible what was previously virtually + impossible, and relatively easy the previously difficult. + + There are, of course, many alternative programs that have sprung up in + an attempt to answer one or another weakness or perceived fault of + sendmail, but so far, none of them have had the kind of success it + would require to unseat it as the de facto standard program for + sending Internet mail. Obviously, this forum should not be used to + discuss the merits of any of the alternative programs versus sendmail. + These kinds of discussions should be taken to comp.mail.misc, or you + should agitate to get a new newsgroup or newsgroup hierarchy created + where that sort of thing is acceptable (or even the norm, such as a + comp.mail.advocacy or news:comp.mail.mta.advocacy newsgroup). + _________________________________________________________________ + +Subject: Q2.2 -- What is the scope of this FAQ? + + Date: April 9, 1997 + + This FAQ is strongly centered around version 8 sendmail, for many + reasons. First and foremost, this is the area of most interest on the + part of the maintainers of this FAQ. Secondly, version 8 is where most + of the additional development is being concentrated. Version 8 + sendmail is also the best documented of all SMTP MTAs, by virtue of + the book by Bryan Costales (see entry + sendmail-faq//book/ISBN/1-56592-222-0 in Q6.1). + + Other versions of sendmail get mentioned in passing, and some + interesting interactions between version 8 and various OSes is also + covered. + + This FAQ is aimed primarily at the experienced Unix System + Administrator/Postmaster/DNS Domain Administrator. If you're looking + for introductory texts, see the references in Q6.1. + _________________________________________________________________ + +Q2.3 -- Where can I find the latest version of this FAQ? + + Date: February 20, 1998 + + We post changes as they occur to the sendmail FAQ support page at + http://www.sendmail.org/faq/. + _________________________________________________________________ + +Q2.4 -- How do I access comp.mail.sendmail by email? + + Date: November 24, 1996 + + Send email to mxt@dl.ac.uk with the command "sub + comp-news.comp.mail.sendmail full-US-ordered-email-address" as the + body of the message (with your correct address in place of the + "full-US-ordered-email-address", and omitting the double quotes in all + cases of this example). + + E-mail you want posted on comp.mail.sendmail should be sent to + comp-mail-sendmail@dl.ac.uk + _________________________________________________________________ + +Q2.5 -- Where can I ask email-related DNS questions? + + Date: March 23, 1996 + + Depending on how deeply they get into the DNS, they can be asked here. + However, you'll probably be told that you should send them to the + Usenet newsgroup comp.protocols.tcp-ip.domains (DNS in general) or to + the Info-BIND mailing list (if the question is specific to that + program). + _________________________________________________________________ + +Q2.6 -- How can I subscribe to these? + + Date: June 19, 1997 + + For comp.protocols.tcp-ip.domains, you have to be on Usenet. They + don't have a news-to-mail gateway yet (I'm working on this), but they + do have a FAQ. + + Questions from all levels of experience can be found on this newsgroup + (as well as people to answer them), so don't be shy about asking a + question you think may be too simple. + + Some more information from the BIND 8.1 src/README file: + + CAPTION: Kits, Questions, Comments, and Bug Reports + + URL Purpose + ftp.isc.org/isc/bind/src/cur current non-test release + ftp.isc.org/isc/bind/src/testing latest public test kit + _________________________________________________________________ + + comp.protocols.dns.bind using BIND + comp.protocols.dns.ops DNS operations in general + comp.protocols.dns.std DNS standards in general + _________________________________________________________________ + + bind-users-request@vix.com gw'd to c.p.d.bind + namedroppers-request@internic.net gw'd to c.p.d.std + bind-workers-request@vix.com code warriors only please + _________________________________________________________________ + + www.isc.org/bind.html the BIND home page + bind-bugs@isc.org bug reports + _________________________________________________________________ + +Q2.7 -- Which version of sendmail should I run? + + Date: April 8, 1997 + Updated: October 8, 1998 + + If you're concerned at all about the security of your machines, you + should make sure you're at least running a recent release of version 8 + sendmail (either from your vendor or the public version detailed in + Q2.8). + + Check the CERT Alerts and Summaries to make sure that you're running a + version that is free of known security holes. Just because the + sendmail program provided by your vendor isn't listed doesn't mean + that you're not vulnerable, however. If your particular vendor or + version isn't listed, check with your vendor and on the appropriate + Internet mailing lists and Usenet newsgroups to verify. + + If nothing else, the most recent public version is usually a pretty + good bet, although you should check comp.mail.sendmail to see if + anyone has posted recent comments that haven't yet been folded into a + new release. + + That said, you need to look at what the primary function is for the + machine. If its primary function is to run some CAD/CAM package on the + desk of an engineer, then there's probably not much sense in replacing + the vendor-supplied version of sendmail (assuming it's secure, + according to the CERT Alerts and Summaries). Just set the machine up + to forward all outbound mail to a central mail relay, and then worry + about making that central mail relay the best it can be. Also arrange + to have all their inbound mail pass through a central Mail eXchanger + (probably the same machine as the central Mail Relay), for the same + reasons. + + If the primary function for a machine is to act as that central Mail + Relay/Mail eXchanger, then we *strongly* recommend the best version of + sendmail you can get, and in our opinion that is the latest release of + version 8. IDA sendmail is also pretty good, but virtually everything + it does, version 8 does better, and version 8 has the additional + advantage of having continued development as well. + + If fighting spam is a concern, then by all means upgrade to 8.9.X . + 8.8.X has some good anti-spam features, but 8.9.X has more features, + and the anti-spam ones are far easier to configure than those in 8.8.X + . + + However, keep in mind that version 8 still hasn't been ported (so far + as we know) to some of the older (and perhaps more esoteric) + platforms, and if you're stuck using one of them, you may not have + much choice. + + Some vendors have started shipping (or announced that they will soon + ship) version 8 sendmail pre-configured for their machines. + Unfortunately, in most cases this means you get a pre-compiled binary + and a sendmail.cf file (that may need a bit of tweaking), but not much + else of the "standard" version 8 sendmail installation kit. Silicon + Graphics (SGI) and Hewlett-Packard are known to already be shipping + version 8 sendmail in this fashion. + + Sun Microsystems did the same with SunOS 5.5, 5.5.1 and 5.6, shipping + a version based on 8.6 with their own proprietary config files. Recent + patches for 5.5.1 and 5.6, however, upgrade to a version based on + 8.8.8 with a sendmail.cf that is only slightly tweaked. More + importantly, a cf hierarchy is available under /usr/lib/mail/. More + details are available at the Sun migration page. + _________________________________________________________________ + +Q2.8 -- What is the latest release of sendmail? + + Date: October 24, 1997 + Updated: February 4, 1999 + + For version 8 sendmail, there are four release trees. + + For those people who, for whatever reason, are unable or unwilling to + upgrade to version 8.8.z, releases of version 8.6 and 8.7 sendmail are + still available. As of this writing, the most recent release of + version 8.6 sendmail is 8.6.13, and the most recent release of version + 8.7 sendmail is 8.7.6. + + For the most recent releases of 8.6 and 8.7 sendmail, there is a + version number difference between the sendmail program itself and the + associated configuration files. This is okay. The security-related bug + fixes that were made only required changes to the sendmail program + itself and not the configuration files, so only the version number of + the sendmail program itself was incremented. + + Version 8.9.3 was released on February 4, 1999. + Version 8.9.2 was released on December 31, 1998. + Version 8.9.1 was released on July 2, 1998. + Version 8.9.0 was released on May 20, 1998. + + On machines exposed directly to the Internet, you should either + already be running sendmail 8.9.3 or plan on upgrading to it in the + immediate future. 8.9.3 is considered "stable", has security fixes + included that will not be found in any previous release, and therefore + supercedes all previous releases. + + There is no further support for previous releases of sendmail. + _________________________________________________________________ + +Q2.9 -- Where can I find it? + + Date: January 21, 1997 + + By anonymous FTP from ftp.sendmail.org in /pub/sendmail, or (in URL + form) via ftp://ftp.sendmail.org/pub/sendmail/. If you care, there + should be files in this directory that end with the extension ".sig" + which you can check with PGP to make sure that corresponding archives + haven't been modified. You'll need to have the PGP key of Eric Allman + on your public keyring to be able to verify these archives with their + associated .sig files. + + There are no other known official version 8 sendmail mirrors. + + Check the sendmail home page at http://www.sendmail.org/ for + late-breaking updates and other useful information. + + If you want to be notified regarding future updates to sendmail and + other items of potential interest, you may want to subscribe to the + sendmail-announce mailing list. Address your subscription requests to + "majordomo@lists.sendmail.org" with "subscribe sendmail-announce" as + the body of the message. + _________________________________________________________________ + +Q2.10 -- What are the differences between Version 8 and other versions? + + Date: March 23, 1996 + + See doc/changes/changes.{me,ps} in the distribution. See also + RELEASE_NOTES at the top level. + _________________________________________________________________ + +Q2.11 -- What's the best platform for running sendmail? + + Date: April 8, 1997 + + Generally speaking, I adhere to the old axiom that you should choose + what software you want to run first, then choose the platform + (hardware and OS) that best runs this software. By this token, if + sendmail is the software, then a recent version of BSD Unix would + probably be best, since sendmail was developed at UC Berkeley on BSD + Unix. FreeBSD and BSD/OS are two known implementations of BSD Unix for + Intel-based PC's (among other hardware platforms), and this would make + them the most "native" OSes for sendmail. FreeBSD is freely available + by anonymous ftp or on CD-ROM, and BSD/OS is a commercial product. + + However, not everyone has this kind of "luxury". If you're on a + homogeneous network (i.e., completely composed of only one type of + hardware and OS), then you should probably be running the same OS as + the rest of the machines on the network, regardless of the axiom + stated above. You may have other problems, but you should at least be + able to get some local support on the OS for your machine. + + Either way, if the primary function of the machine is to handle + "large" quantities of mail (for whatever value you define "large" to + be), I strongly recommend getting the latest stable release of version + 8 sendmail. + + You may be surprised to find that it is easier for you to support only + one version of sendmail across all the various platforms than it is to + try to support multiple versions of sendmail, each unique for their + particular platform. In that case, the easy solution is to put version + 8 sendmail everywhere, and not have to worry about vendor-specific + problems with older versions. + + For more information on BSD Unix in general, see the Usenet newsgroups + under comp.unix.bsd, comp.bugs.4bsd, comp.os.386bsd. For more + information on BSD/OS, see the BSD newsgroups mentioned above, or the + BSD/OS Home Page at http://www.bsdi.com/. For more information on + FreeBSD, see the Usenet newsgroups under news:comp.unix.bsd.freebsd, + or the FreeBSD Home Page at http://www.freebsd.org/. + _________________________________________________________________ + +Q2.12 -- What is BIND and where can I get the latest version? + + Date: June 24, 1997 + + BIND stands for "Berkeley Internet Name Daemon", and is the Internet + de-facto standard program for turning host names into IP addresses. + + The BIND Home Page is at http://www.isc.org/bind.html, which provides + pointers to the most recent release of BIND. In May of 1997, the first + production version of BIND-8 was released. The ISC has deprecated + BIND-4 other than for security related patches. No new features or + portability changes will be added to BIND-4. You should be using + BIND-8. + + Note that there are bugs in older resolver libraries, which can cause + problems getting to large sites (that list more than five IP addresses + for a particular name), or represent a huge security hole as they do + not check the returned data to see if it will fit in the amount of + space pre-allocated for it. + + If at all possible, you should get the most recent "release" version + of BIND and make a serious attempt to integrate it into your + configuration, since virtually all vendor-provided resolver libraries + are woefully out of date. + + Note that since the release of BIND version 8.1, many people building + sendmail have experienced problems compiling and linking with the new + BIND include files and libraries under /usr/local/. A section in our + Compiling Sendmail page explains this. + _________________________________________________________________ + +Q2.13 -- What is smrsh and where can I get it? + + Date: July 9, 1996 + + From ftp://info.cert.org/pub/tools/smrsh/README: + + smrsh is a restricted shell utility that provides the ability to + specify, through a configuration, an explicit list of executable + programs. When used in conjunction with sendmail, smrsh effectively + limits sendmail's scope of program execution to only those programs + specified in smrsh's configuration. + + smrsh has been written with portability in mind, and uses traditional + Unix library utilities. As such, smrsh should compile on most Unix C + compilers. + + The purpose for restricting the list of programs that can be executed + in this manner is to keep mail messages (either through an alias or + the .forward file in a user's home directory) from being sent to + arbitrary programs which are not necessarily known to be sufficiently + paranoid in checking their input, and can therefore be easily + subverted (this is related to, but different from, the /etc/shells + feature discussed in Q3.11). + + More information regarding the CERT-CC can be found at their web site, + http://www.cert.org. For more information on CERT Alerts and CERT + Summaries, see their advisories and summaries, respectively. + + You can find smrsh in the most recent sendmail source archive, as well + as ftp://info.cert.org/pub/tools/smrsh/. Other very useful programs + can be found in ftp://info.cert.org/pub/tools/. + _________________________________________________________________ + +Q2.14 -- What is smap and where can I get it? + + Date: July 5, 1996 + + Smap (and smapd) are tools out of the Trusted Information Systems + (TIS) Firewall Toolkit (fwtk). They were originally written by + firewall expert Marcus Ranum under contract to TIS, and TIS is + continuing what maintenance there is. The toolkit may be found at + here. Support questions regarding the toolkit may be sent to + fwall-support@tis.com, while you may join their mailing list + fwall-users@tis.com by sending electronic mail to + fwall-users-request@tis.com. + + The concept of smap and smapd is that sendmail is a huge, monolithic + setuid root program that is virtually impossible to verify as being + "correct" and free from bugs (historically, sendmail has been rather + buggy and an easy mark for system crackers to exploit, although with + the advent of version 8 sendmail, this becomes much more difficult). + In contrast, smap and smapd are very small (only a few hundred lines + long), and relatively easy to verify as being correct and functioning + as designed (however, as you will see later, we can question their + design). According to the theory, it is therefore safer and "better" + to run smap and smapd as "wrappers" around sendmail, which would no + longer need to be run setuid root. + + Unfortunately, smap and smapd have a few problems of their own, and + don't appear to have been updated since late March 1996. There have + been conflicting reports of incompatibilities between smapd and + sendmail 8.7.y (both cannot be run on the same machine, although if + you're running sendmail 8.6.x and smap/smapd on the local machine, + people on the outside can still use sendmail 8.7.y to talk to you). + + For further information on smap and smapd, see the documentation that + comes with the TIS Firewall Toolkit. + + For more information on firewalls, see the Firewalls FAQ at + http://www.interhack.net/pubs/fwfaq/ + _________________________________________________________________ + +Q2.15 -- What is TCP-Wrappers and where can I get it? + + Date: April 8, 1997 + + TCP-Wrappers is another security enhancement package. The theory is + that you take programs being run under inetd (see /etc/inetd.conf) and + before you run the program to do the real work (ftpd, telnetd, + etc...), you first run the connection attempt through a package that + checks to see if the IP address of the source packet is coming from a + host known to be either good or bad (you may filter connection + attempts by source host name, domain name, raw IP address, port they + are attempting to connect to; and either allow known good connections + through thus refusing unknown connections, or accept all connections + except those known to be bad). + + The practice of TCP-Wrappers actually follows the theory quite well. + It is a very useful and important tool in the System Administrator's + Bag of Things To Help You Secure Your Machine From Crackers, Spammers, + Junkmailers, and Other Undesirables. However, it only works for + programs that communicate via TCP packets (not UDP, such as NFS) + started up out of inetd. It does not work for RPC-based services, and + programs that start up a daemon outside of inetd and just leave it + running obviously don't benefit beyond the initial connection that + gets the daemon started (however, see the FTP URL below for other + packages that can help secure RPC and portmapper-based services). + + However, most sendmail installations tend to start up a daemon and + leave it running at all times. If you did run sendmail out of inetd, + you'd lose the benefit of the load average checking code that is + executed only in daemon mode, and for systems that handle a lot of + mail, this is vitally important. + + You can get TCP-Wrappers from ftp://ftp.win.tue.nl/pub/security/, a + site that has a whole host of other useful security tools, such as + securelib, portmap, satan, cops, crack, etc... You can also find + pointers to many other useful security tools at + http://ciac.llnl.gov/ciac/SecurityTools.html, and the COAST Archive at + http://www.cs.purdue.edu/homes/spaf/hotlists/csec.html is a veritable + cornucopia of all things security related. The SANS 1996 Network + Security Roadmap at http://www.sans.org/roadmap/ has much useful + information and pointers to many other useful resources. + + For the adventurous, you can get a source patch for version 8 sendmail + (created for 8.7.6, but, with work, applicable to older releases) that + will take the core TCP-Wrappers code and integrate it into the daemon, + so that you get the best of both worlds. However, this isn't as + smoothly integrated as it should be, is not for the faint-of-heart, + and is certainly not officially supported by the original author of + sendmail (Eric Allman). This functionality is integrated in a + different fashion into version 8.8.5 sendmail. + + You should be able to find the unsupported patch at + ftp://ftp.win.tue.nl/pub/security/sendmail-tcpd.patch. + _________________________________________________________________ + +Q2.16 -- Why won't db 1.85 build on my machine? + + Date: April 8, 1997 + Updated: May 20, 1997 + URL Updated: July 27, 1999 + + As of release 8.9.X of sendmail, db 1.85 is no longer needed, as + support for db 2.X is included (starting with 2.3.16). More details + are given at Q3.25. The rest of this answer only applies if you have + not yet upgraded to 8.9.X . + + The db 1.85 package as available from + http://www.sleepycat.com/register.html provides Irix support up to + Irix 4.05F, but 5.{2,3} need a slightly patched version, as does HP-UX + 10.20. Some vendors also provide db standard with their OS (DEC Unix + 4.0, for example). + + A tarball incorporating these changes for Irix 5.x is available at + ftp://ftp.his.com/pub/brad/sendmail/irix5.tar.gz. This will extract + into ./db.1.85/PORT/irix.5.2, with a symbolic link created from + ./db.1.85/PORT/irix.5.3 to this same directory. Make sure you extract + this archive into the same directory where you extracted the db 1.85 + archive as available from ftp.cs.berkeley.edu. (see Q3.5 for more + information on getting the db 1.85 package). An ASCII context diff of + this same patch is at + ftp://ftp.his.com/pub/brad/sendmail/irix4-5.diff. + + A version of db 1.85 that has supposedly been patched to compile under + Irix 6.2 has been made available at + http://reality.sgi.com/ariel/freeware/#db, but I haven't had a chance + to download and check it out yet. + + The context diffs required to get db 1.85 working under HP-UX 10.20 + are available at ftp://ftp.his.com/pub/brad/sendmail/hpux.10.20.diff. + A tarball incorporating these changes is available at + ftp://ftp.his.com/pub/brad/sendmail/hp-ux.10.20.tar.gz. This will + extract into ./db.1.85/PORT/hpux.10.20, so make sure you extract this + archive into the same directory where you extracted the db 1.85 + archive as available from ftp.cs.berkeley.edu. + _________________________________________________________________ + +Q2.17 -- What is makemap and where can I get it? + + Date: August 30, 1996 + + The program "makemap" is used to build the databases used by version 8 + sendmail, for things like the UserDB, mailertables, etc.... + + It is distributed as part of the basic operating system from some + vendors, but source code for it is also included at the root level of + the sendmail archive (at least, it is for sendmail 8.6.12 and 8.7.5, + and presumably will continue to be as newer releases come out). + However, it is not considered a "supported" part of version 8 + sendmail. Just like the other source provided in the archive, the + Makefile will likely need some tweaking for your specific site. + + It turns out that Irix 5.3 doesn't appear to have the dbm or ndbm + libraries, but to compile makemap.c, you need to have -DNDBM on the + "DBMDEF=" line (some necessary things are defined only in + /usr/include/ndbm.h). Try just leaving off "-lndbm" from the "LIBS=" + line in the Makefile for makemap. + + If you plan on using makemap with db 1.85 on an SGI machine running a + version of Irix later than 4.x, see Q2.16 for some additional steps to + get db 1.85 compiled on your machine. + + + sendmail.org + + 3. VERSION 8 SPECIFIC ISSUES + + * 3.1 How do I make all my addresses appear to be from a single + host? + * 3.2 How do I rewrite my "From:" lines to read + ``First_Last@My.Domain'' or ``Different_Name@My.Domain''? + * 3.3 Why are you so hostile to using full names for email + addresses? + * 3.4 So what was the user database feature intended for? + * 3.5 Where do I find this user database (UserDB) code? + * 3.6 How do I get the user database to work with Pine or with + FEATURE(always_add_domain)? + * 3.7 How do I manage several (virtual) domains? + * 3.8 There are four UUCP mailers listed in the configuration files. + Which one should I use? + * 3.9 How do I fix "undefined symbol inet_aton" and "undefined + symbol _strerror" messages? + * 3.10 How do I solve "collect: I/O error on connection" or "reply: + read error from host.name" errors? + * 3.11 Why can't my users forward their mail to a program? + * 3.12 Why do connections to the SMTP port take such a long time? + * 3.13 Why do I get "unknown mailer error 5 -- mail: options MUST + PRECEDE recipients" errors? + * 3.14 Why does version 8 sendmail panic my SunOS box? + * 3.15 Why does the Unix From line get mysteriously munged when I + send to an alias? + * 3.16 Why doesn't MASQUERADE_AS (or the user database) work for + envelope addresses as well as header addresses? + * 3.17 How do I run version 8 sendmail and support the MAIL11V3 + protocol? + * 3.18 Why do messages disappear from my queue unsent? + * 3.19 When is sendmail going to support RFC 2047 MIME header + encoding? + * 3.20 Why can't I get mail to some places, but instead always get + the error "reply: read error from name.of.remote.host"? + * 3.21 Why doesn't "FEATURE(xxx)" work? + * 3.22 How do I configure sendmail not to use DNS? + * 3.23 How do I get all my queued mail delivered to my Unix box from + my ISP? + * 3.24 Why do I get the error message unable to write + /etc/mail/sendmail.pid on Solaris 2.x? + * 3.25 Why can't I compile sendmail with Berkeley DB 2.X? + * 3.26 What operating systems has Berkeley sendmail been ported to? + * 3.27 How do I prevent Relaying Denied errors for my clients? + * 3.28 Why isn't virtual hosting working, even after I added a + Kvirtuser line to sendmail.cf ? + * 3.29 How can I add a header specifying the actual recipient when + having multiple users in a virtual domain go to a single mailbox? + * 3.30 What do I do when Build fails because groff was not found? + * 3.31 What does "class hash not available" mean? + * 3.32 How do I configure majordomo with sendmail 8.9 without + relaxing the DontBlameSendmail option? + * 3.33 How do I configure my system in general with sendmail 8.9? + _________________________________________________________________ + +Q3.1 -- How do I make all my addresses appear to be from a single host? + + This question is answered in detail at the configuration Masquerading + and Relaying page. + _________________________________________________________________ + +Q3.2 -- How do I rewrite my From: lines to read ``First_Last@My.Domain''' or +``Different_Name@My.Domain''? + + Date: September 23, 1997 + + There are a couple of ways of doing this. This describes using the + "user database" code, discussed in detail at the Using UserDB to Map + Full Names page. This is still experimental and was intended for a + different purpose -- however, it does work with a bit of care. It does + require that you have the Berkeley "db" package installed (it won't + work with DBM). First, create your input file. This should have lines + like: + loginname:mailname DifferentName + DifferentName:maildrop loginname + + Install it in (for example) /etc/userdb. Create the database: + makemap btree /etc/userdb.db < /etc/userdb + + You can then create a config file that uses this. You will have to + include the following in your .mc file: + define(confUSERDB_SPEC, /etc/userdb.db) + FEATURE(notsticky) + _________________________________________________________________ + +Q3.3 -- Why are you so hostile to using full names for email addresses? + + Date: May 12, 1997 + + Because full names are not unique. For example, the computer community + has two Peter Deutsches. At one time, Bell Labs had two Stephen R. + Bournes with offices a few doors apart. You can create alternative + addresses (e.g., Stephen_R_Bourne_2), but that's even worse -- which + one of them has to have their name desecrated in this way? And you can + bet that one of them will get most of the other person's email. + + So called "full names" are just an attempt to create longer versions + of unique names. Rather that lulling people into a sense of security, + I'd rather that it be clear that these handles are arbitrary. People + should use good user agents that have alias mappings so that they can + attach arbitrary names for their personal use to those with whom they + correspond (such as the MH alias file). + + The problem is even worse outside of America, where non-ASCII + characters (e.g., characters with umlauts or the Norwegian Ø) are used + in names. Since non-ASCII characters cannot be used in the SMTP + envelope or e-mail headers, the full names are mangled anyway. + + Even worse is fuzzy matching in email -- this can make good addresses + turn bad. For example, Eric Allman is currently (to the best of our + knowledge) the only ``Allman'' at Berkeley, so mail sent to + <Allman@Berkeley.EDU> should get to him. But if another Allman ever + appears, this address could suddenly become ambiguous. He's been the + only Allman at Berkeley for over fifteen years -- to suddenly have + this "good address" bounce mail because it is ambiguous would be a + heinous wrong. + + Directory services should be as fuzzy as possible (within reason, of + course). Mail services should be unique. + _________________________________________________________________ + +Q3.4 -- So what was the user database feature intended for? + + Date: May 12, 1997 + + The intent was to have all information for a given user (where the + user is the unique login name, not an inherently non-unique full name) + in one place. This would include phone numbers, addresses, and so + forth. The "maildrop" feature is because Berkeley does not use a + centralized mail server (there are a number of reasons for this that + are mostly historic), and so we need to know where each user gets his + or her mail delivered -- i.e., the mail drop. + + UC Berkeley is (was) in the process of setting up their environment so + that mail sent to an unqualified "name" goes to that person's + preferred maildrop; mail sent to "name@host" goes to that host. The + purpose of "FEATURE(notsticky)" is to cause "name@host" to be looked + up in the user database for delivery to the maildrop. + _________________________________________________________________ + +Q3.5 -- Where do I find this user database (UserDB) code? + + Date: October 13, 1997 + URL updated: July 27, 1999 + + The user database code is part of the Sendmail V8 distribution. + However, it depends on your installing the db library from the package + at http://www.sleepycat.com/register.html. If you install this + library, edit the Makefile to include the right option (-DNEWDB), and + then make sendmail again, you get a binary which has the database + features described in the book and the documentation provided in the + sendmail source archive. + + If you're using SGI Irix above 4.x, see Q2.16 for the patches you will + need to get db 1.85 working on your machine. + _________________________________________________________________ + +Q3.6 -- How do I get the user database to work with Pine or with +FEATURE(always_add_domain)? + + Date: July 19, 1996 + + The basic incompatibility with Pine and the user database option is in + how Pine writes From addresses in the header. Most MUAs write the From + address as "From: user", while Pine, for reasons given in its + documentation, write the From address as "From: user@FQDN" (FQDN=fully + qualified domain name). Using the m4 feature macro always_add_domain + has the same effect. Because of this difference, the user database + does not rewrite these headers. + + One solution to this problem is to make the following change in the + sendmail.mc file compiled by m4 into your /etc/sendmail.cf (or + wherever your sendmail.cf file is located) after you have the user + database option installed and working with other MUAs: + + Early in the section(s) where you are setting configuration variables, + add the following: + # Define our userdb file for FQDN rewrites + Kuserdb btree -o /etc/userdb.db + + And a bit later, before the "MAILER()" entries, but after other + configuration options have been set: + LOCAL_RULE_1 + ######################################################## + ### Local Ruleset 1, rewrite sender header & envelope ## + ######################################################## + #Thanks to Bjart Kvarme <bjart.kvarme@usit.uio.no> + S1 + R$- $1 < @ $j . > user => user@lo +calhost + R$- < @ $=w . > $* $: $1 < @ $2 . > $3 ?? $1 user@localhost +? + R$+ ?? $+ $: $1 ?? $(userdb $2 : mailname $: @ $) + R$+ ?? @ $@ $1 Not found + R$+ ?? $+ $>3 $2 Found, rewrite + + #NOTE ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ + # Use Tab Characters Use Tab Characters in these regions + # to make three columns (the line with "mailname" only has 2 columns). + + Now the user database should re-write messages sent with Pine or + anything else that causes local users to have their address be fully + qualified (both header and envelope sender will be properly + re-written). If this still does not work for you, try adding the + following to either the system-wide pine.conf, pine.conf.fixed, or + your personal .pinerc: + + user-domain=localhost + + This has been known to help solve the problem for some people. + + However, a more elegant (read: m4-based) solution for version 8 + sendmail users has yet to be created. + _________________________________________________________________ + +Q3.7 -- How do I manage several (virtual) domains? + + This question is answered in detail at the Virtual Hosting page. + _________________________________________________________________ + +Q3.8 -- There are four UUCP mailers listed in the configuration files. Which +one should I use? + + This question is answered in detail at the configuration Using UUCP + Mailers page. + _________________________________________________________________ + +Q3.9 -- How do I fix "undefined symbol inet_aton" and "undefined symbol +_strerror" messages? + + This question is answered in detail within the Compiling Sendmail + page. + _________________________________________________________________ + +Q3.10 -- How do I solve "collect: I/O error on connection" or "reply: read +error from host.name" errors? + + Date: April 8, 1997 + Updated: June 4, 1998 + + There is nothing wrong. This is just a diagnosis of a condition that + had not been diagnosed before. If you are getting a lot of these from + a single host, there is probably some incompatibility between 8.x and + that host. If you get a lot of them in general, you may have network + problems that are causing connections to get reset. + + Note that this problem is sometimes caused by incompatible values of + the MTU (Maximum Transmission Unit) size on a SLIP or PPP connection. + Be sure that your MTU size is configured to be the same value as what + your ISP has configured for your connection. If you are still having + problems, then have your ISP configure your MTU size for 1500 (the + maximum value), and you configure your MTU size similarly. + + Although it seems like a problem of this sort would affect all of your + connections, that is not the case. You may encounter this problem with + only a small number of sites with which you exchange mail, and it may + even affect only certain size messages. + _________________________________________________________________ + +Q3.11 -- Why can't my users forward their mail to a program? + + Date: July 9, 1996 + + I just upgraded to version 8 sendmail and now when my users try to + forward their mail to a program they get an "illegal shell" or "cannot + mail to programs" message and their mail is not delivered. What's + wrong? + + In order for people to be able to run a program from their .forward + file, version 8 sendmail insists that their shell (that is, the shell + listed for that user in the passwd entry) be a "valid" shell, meaning + a shell listed in /etc/shells. If /etc/shells does not exist, a + default list is used, typically consisting of /bin/sh and /bin/csh. + + This is to support environments that may have NFS-shared directories + mounted on machines on which users do not have login permission. For + example, many people make their file server inaccessible for + performance or security reasons; although users have directories, + their shell on the server is /usr/local/etc/nologin or some such. If + you allowed them to run programs anyway you might as well let them log + in. + + If you are willing to let users run programs from their .forward file + even though they cannot telnet or rsh in (as might be reasonable if + you run smrsh to control the list of programs they can run) then add + the line: + + /SENDMAIL/ANY/SHELL/ + + to /etc/shells. This must be typed exactly as indicated, in caps, with + the trailing slash. + + NOTA BENE: DO NOT list /usr/local/etc/nologin in /etc/shells -- this + will open up other security problems. + + IBM AIX does not use /etc/shells -- a list of allowable login shells + is contained, along with many other login parameters, in + /etc/security/login.cfg. You can copy the information in the "shells=" + stanza into a /etc/shells on your system so sendmail will have + something to use. Do NOT add "/usr/lib/uucp/uucico" or any other + non-login shell into /etc/shells. + + Also note that there are some weird things that AFS throws into the + mix, and these can keep a program from running or running correctly + out of .forward files or the system-wide aliases. + + See also "smrsh" in Q2.13, and "directory permissions" in Q3.33. + _________________________________________________________________ + +Q3.12 -- Why do connections to the SMTP port take such a long time? + + Date: November 24, 1996 + + I just upgraded to version 8 sendmail and suddenly connections to the + SMTP port take a long time. What is going wrong? + + It's probably something weird in your TCP implementation that makes + the IDENT code act oddly. On most systems version 8 sendmail tries to + do a ``callback'' to the connecting host to get a validated user name + (see RFC 1413 for detail). If the connecting host does not support + such a service it will normally fail quickly with "Connection + refused", but certain kinds of packet filters and certain TCP + implementations just time out. + + To test this (pre-8.7.y sendmail), set the IDENT timeout to zero + using: + + define(`confREAD_TIMEOUT',`Ident=0')dnl + + in the .mc file used by m4 to generate your sendmail.cf file. + Alternatively, if you don't use m4, you can put ``OrIdent=0'' in the + configuration file (we recommend the m4 solution, since that makes + maintenance much easier for people who don't understand sendmail + re-write rules, or after you've been away from it for a while). Either + way, this will completely disable all use of the IDENT protocol. + + For version 8.7.y sendmail (and above), you should instead use: + + define(`confTO_IDENT',`0s')dnl + + Another possible problem is that you have your name server and/or + resolver configured improperly. Make sure that all "nameserver" + entries in /etc/resolv.conf point to functional servers. If you are + running your own server, make certain that all the servers listed in + your root cache are up to date (this file is usually called something + like "/var/namedb/root.cache"; see your /etc/named.boot file to get + your value). Either of these can cause long delays. + _________________________________________________________________ + +Q3.13 -- Why do I get "unknown mailer error 5 -- mail: options MUST PRECEDE +recipients" errors? + + Date: March 23, 1996 + + I just upgraded to version 8 sendmail and suddenly I get errors such + as ``unknown mailer error 5 -- mail: options MUST PRECEDE + recipients.'' What is going wrong? + + You need OSTYPE(systype) in your .mc file, where "systype" is set + correctly for your hardware & OS combination -- otherwise the + configurations use a default that probably disagrees with your local + mail system. See the configuration OSTYPE page for details. + + If this is on a Sun workstation, you might also want to take a look at + the local mailer flags in the Sun-supplied sendmail.cf and compare + them to the local mailer flags generated for your version 8 + sendmail.cf. If they differ, you might try changing the V8 flags to + match the Sun flags. + _________________________________________________________________ + +Q3.14 -- Why does version 8 sendmail panic my SunOS box? + + Date: March 24, 1996 + Updated: November 4, 1997 + + Sendmail 8.7.y panics SunOS 4.1.3_U1 (at least for 1 <= y <= 3) and + SunOS 4.1.3, and sendmail 8.6.x seems fine on both machines (at least + for 9 <= x <= 12). + + The problem is that a kernel patch is missing, specifically 100584-08 + (4.1.3), 102010-05 (4.1.3_U1), or 102517 (4.1.4). This should be + available from your hardware vendor through your support contract or + their online support facilities (including being available on the + SunSolve CD). + _________________________________________________________________ + +Q3.15 -- Why does the Unix From line get mysteriously munged when I send to an +alias? + + Date: December 3, 1997 + + ``It's not a bug, it's a feature.'' This happens when you have an + owner-list alias and you send to list. V8 propagates the owner + information into the SMTP envelope sender field (which appears as the + Unix From line [sometimes incorrectly referred to as the From-space + "header"] on Unix mail or as the Return-Path: header) so that + downstream errors are properly returned to the mailing list owner + instead of to the sender. In order to make this appear as sensible as + possible to end users, I recommend making the owner point to a + "request" address -- for example: + list: :include:/path/name/list.list + owner-list: list-request + list-request: eric + + This will make message sent to list come out as being "From + list-request" instead of "From eric". + _________________________________________________________________ + +Q3.16 -- Why doesn't MASQUERADE_AS (or the user database) work for envelope +addresses as well as header addresses? + + Date: November 24, 1996 + + Believe it or not, this is intentional. The interpretation of the + standards by the version 8 sendmail development group was that this + was an inappropriate rewriting, and that if the rewriting were + incorrect at least the envelope would contain a valid return address. + + If you're using version 8.7.y sendmail (or later), you can use + FEATURE(masquerade_envelope) + + in your sendmail.mc file to change this behavior. This is discussed in + greater detail at the configuration Masquerading and Relaying page. + _________________________________________________________________ + +Q3.17 -- How do I run version 8 sendmail and support the MAIL11V3 protocol? + + Date: March 23, 1996 + + Get the reimplementation of the mail11 protocol by Keith Moore from + ftp://gatekeeper.dec.com/pub/DEC/gwtools/ (with contributions from + Paul Vixie). + _________________________________________________________________ + +Q3.18 -- Why do messages disappear from my queue unsent? + + Date: March 23, 1996 + + When I look in the queue directory I see that qf* files have been + renamed to Qf*, and sendmail doesn't see these. What's wrong? + + If you look closely you should find that the Qf files are owned by + users other than root. Since sendmail runs as root it refuses to + believe information in non-root-owned qf files, and it renames them to + Qf to get them out of the way and make it easy for you to find. The + usual cause of this is twofold: first, you have the queue directory + world writable (which is probably a mistake -- this opens up other + security problems) and someone is calling sendmail with an "unsafe" + flag, usually a -o flag that sets an option that could compromise + security. When sendmail sees this it gives up setuid root permissions. + + The usual solution is to not use the problematic flags. If you must + use them, you have to write a special queue directory and have them + processed by the same uid that submitted the job in the first place. + _________________________________________________________________ + +Q3.19 -- When is sendmail going to support RFC 2047 MIME header encoding? + + Date: March 23, 1996 + Updated: September 5, 1999 + + This is considered to be a MUA issue rather than an MTA issue. + + Quoth Eric Allman: + + The primary reason is that the information necessary to do the + encoding (that is, 8->7 bit) is unknown to the MTA. In specific, + the character set used to encode names in headers is _NOT_ + necessarily the same as used to encode the body (which is already + encoded in MIME in the charset parameter of the Content-Type: + header). Furthermore, it is perfectly reasonable for, say, a Swede + to be living and working in Korea, or a Russian living and working + in Germany, and want their name to be encoded in their native + character set; it could even be that the sender was Japanese, the + recipient Russian, and the body encoded in ISO 8859-1. If all I + have are 8-bit characters, I can't choose the charset properly. + + Similarly, when doing 7->8 bit conversions, I don't want to throw + away this information, as it is necessary for proper presentation + to the end user. + _________________________________________________________________ + +Q3.20 -- Why can't I get mail to some places, but instead always get the error +"reply: read error from name.of.remote.host"? + + Date: January 17, 1997 + + This is usually caused by a bug in the remote host's mail server, or + Mail Transport Agent (MTA). The "EHLO" command of ESMTP causes the + remote server to drop the SMTP connection. There are several MTAs that + have this problem, but one of the most common server implementations + can be identified by the "220 All set, fire away" greeting it gives + when you telnet to its SMTP port. + + To work around this problem, you can configure sendmail to use a + mailertable with an entry telling sendmail to use plain SMTP when + talking to that host: + + name.of.remote.host smtp:name.of.remote.host + + Sites which must run a host with this broken SMTP implementation + should do so by having a site running sendmail or some other reliable + (and reasonably modern) SMTP MTA act as an MX server for the problem + host. + + There is also a problem wherein some TCP/IP implementations are + broken, and if any connection attempt to a remote end gets a + "connection refused", then *all* connections to that site will get + closed. Of course, if you try to use the IDENT protocol across a + firewall (at either end), this is highly likely to result in the same + apparent kind of "read error". + + The fix is simple -- on those machines with broken TCP/IP + implementations, do not attempt to use IDENT. When compiling newer + releases of version 8 sendmail, the compiler should automatically + detect whether you're on a machine that is known to have this kind of + TCP/IP networking problem, and make sure that sendmail does not + attempt to use IDENT. If you've since patched your machine so that it + no longer has this problem, you'll need to go back in and explicitly + configure sendmail for support of IDENT, if you want that feature. + _________________________________________________________________ + +Q3.21 -- Why doesn't "FEATURE(xxx)" work? + + Date: January 17, 1996 + + When creating m4 Master Config (".mc") files for version 8 sendmail, + many FEATURE() macros simply change the definition of internal + variables that are referenced in the MAILER() definitions. + + To make sure that everything works as desired, you need to make sure + that OSTYPE() macros are put at the very beginning of the file, + followed by FEATURE() and HACK() macros, local definitions, and at the + very bottom, the MAILER() definitions. See the configuration + Introduction and Example page for more details. + _________________________________________________________________ + +Q3.22 -- How do I configure sendmail not to use DNS? + + Date: March 24, 1997 + + In situations where you're behind a firewall, or across a dial-up + line, there are times when you need to make sure that programs (such + as sendmail) do not use the DNS at all. + + With version 8.8, you change the service switch file to omit "DNS" and + use only NIS, files, and other map types as appropriate. + + With previous releases of version 8 sendmail, you need to recompile + the binary and make sure that "NAMED_BIND" is turned off in + src/conf.h. + + Note that you'll need to forward all your outbound mail to another + machine as a "relay" (one that does use DNS, and understands how to + properly use MX records, etc...), otherwise you won't be able to get + mail to any site(s) other than the one(s) you configure in your + /etc/hosts file (or whatever). + _________________________________________________________________ + +Q3.23 -- How do I get all my queued mail delivered to my Unix box from my ISP? + + Date: June 6, 1997 + Updated: October 8, 1998 + + In the contrib directory of the sendmail distribution is a Perl script + called etrn.pl. Assuming you're running sendmail or some other SMTP + MTA on some sort of a Unix host, and your ISP uses version 8.8 + sendmail and they queue all mail for your domain (as opposed to + stuffing it all in one file that you need to download via POP3 or some + such), the command + etrn.pl mail.myisp.com mydomain.com + + will do the trick. You can learn about Perl at the Perl Language Home + Page. The O'Reilly book is also very helpful. + + If you don't have Perl, something like the following script should do + the trick: + #!/bin/sh + telnet mail.myisp.com. 25 << __EOF__ + EHLO me.mydomain.com + ETRN mydomain.com + QUIT + __EOF__ + + Note that this is indented for readability, and the real script would + have column position #1 of the file be the first printable character + in each line. + + Of course, you'll have to fill in the appropriate details for + "mail.myisp.com", "mydomain.com", etc.... + + If your ISP doesn't use version 8.8 sendmail, you may have to cobble + together alternative solutions. They may have a "ppplogin" script that + is executed every time your machines dials them up, and if so, you may + be able to have them modified this script so as to put a "sendmail + -qRmydomain.com" in it (which is effectively what the "ETRN" command + does, but in a safer fashion). + + Alternatively, they may have a hacked finger daemon, so that you'd put + "finger mydomain.com@theirhost.theirdomain.com" in your script. Or, + they may have some other solution for you. However, only they would be + able to answer what solutions they have available to them. + + Obviously, the easiest and most "standard" solution is to have them + upgrade their system to the most recent stable release of version 8 + sendmail. See Q2.8 to find out what exact version this is. + _________________________________________________________________ + +Q3.24 -- Why do I get the error message unable to write /etc/mail/sendmail.pid? + + Date: August 6, 1997 + + sendmail checks if it has write access to the directory in which it + wants to create a file without granting special privileges to 'root'. + To have sendmail run properly, the directories /etc, /etc/mail, and/or + /var/run should be owned by root and be writable by its owner. + _________________________________________________________________ + +Q3.25 -- Why can't I compile sendmail with Berkeley DB 2.X? + + Date: August 12, 1997 + Updated: May 20, 1998 + + sendmail 8.8 only supports Berkeley DB 1.85. It will not work with + newer Berkeley DB versions, even in compatibility mode + + Sendmail 8.9, however, does include support for Berkeley DB 2.X, + starting with 2.3.16 . + _________________________________________________________________ + +Q3.26 -- What operating systems has Berkeley sendmail been ported to? + + Date: December 18, 1997 + Updated: September 9, 1999 + + Berkeley sendmail 8.9.3 supports most known flavors of UNIX, + including: +386BSD A-UX AIX Altos +BSD-OS BSD43 CLIX CSOS +ConvexOS Dell DomainOS Dynix +EWS-UX_V FreeBSD HP-UX IRIX +ISC KSR LUNA Linux +Mach386 NCR.MP-RAS NEWS-OS NeXT +NetBSD NonStop-UX OSF1 OpenBSD +PTX Paragon PowerUX RISCos +SCO SINIX SMP_DC.OSx.NILE Solaris +SVR4 SunOS Titan ULTRIX +UMAX UNICOS UNIX_SV.4.x.i386 +UX4800 UXPDS Utah dgux +maxion uts.systemV + + Also, a Windows NT version is available from Sendmail, Inc.. + _________________________________________________________________ + +Q3.27 -- How do I prevent Relaying Denied errors for my clients? + + Date: April 12, 1998 + Last updated: August 9, 1998 + + You need to add the fully-qualified host name and/or IP address of + each client to class R, the set of relay-allowed domains. For version + 8.8.X, this is typically defined by the file /etc/sendmail.cR ; for + 8.9.X, it is typically /etc/mail/relay-domains . Note: if your DNS is + problematic, you may need to list the IP address in square brackets + (e.g., [1.2.3.4]) to get the ${client_name} macro to work properly; in + general, however, this should not be necessary. + + Once you've updated the appropriate file, SIGHUP your sendmail daemon + and you should be OK. + + Further details are available on our Allowing controlled SMTP relaying + in Sendmail 8.9 page. + _________________________________________________________________ + +Q3.28 -- Why isn't virtual hosting working, even after I added a Kvirtuser line +to sendmail.cf? + + Date: April 12, 1998 + + Just adding the proper Kvirtuser line to sendmail.cf is not enough to + enable the virtual user table feature, a key ingredient for virtual + hosting. You need to use the m4 technique FEATURE(virtusertable); + detailed instructions are provided at our Virtual Hosting with + Sendmail page. + _________________________________________________________________ + +Q3.29 -- How can I add a header specifying the actual recipient when having +multiple users in a virtual domain go to a single mailbox? + + Date: July 2, 1998 + + Stuffing multiple user's mail into a single mail box is not a good + method of distributing user mail but if you must do this, the + following solution should allow a tool like fetchmail to separate the + messages for individual users. + 1. Use FEATURE(local_procmail) in your .mc file so procmail (which + you must install separately) will deliver mail to the mailbox. + 2. Use FEATURE(virtusertable) to create a virtual user table entry + for the domain as follows: +@domain.com domuser+%1 + where domuser is the username of the mailbox you will be using. + 3. Put this in the respective domuser's $HOME/.procmailrc: +DOMAIN=domain.com +ENV_TO=$1 + +:0f +* ENV_TO ?? . +| formail -i "X-Envelope-To: "$ENV_TO@$DOMAIN + +:0fE +| formail -i "X-Envelope-To: UNKNOWN" + This will insert an X-Envelope-To header with the original + envelope recipient address when the message is delivered the + normal way via the virtusertable, and UNKNOWN if for some reason + it was sent directly to domuser. + _________________________________________________________________ + +Q3.30 -- What do I do when Build fails because groff was not found? + + Date: September 24, 1998 + + You can get groff from ftp://ftp.gnu.org/pub/gnu/. But it's not a big + deal, because: + 1. You've already successfully built the sendmail binary to get this + far. + 2. You can just use the preformatted man pages anyway: +% cp *.0 obj* + _________________________________________________________________ + +Q3.31 -- What does "class hash not available" mean? + + Date: September 24, 1998 + + You've built sendmail and/or makemap without NEWDB specified in your + DBMDEF configuration, but you specified the class hash in sendmail.cf + or on a makemap command. The class hash requires NEWDB support, for + which you need the Berkeley database. Please refer to the Database + Definitions section of our Compiling Sendmail web page. + _________________________________________________________________ + +Q3.32 -- How do I configure majordomo with sendmail 8.9 without relaxing the +DontBlameSendmail option? + + Date: January 26, 1999 + + We have had some queries about this, as majordomo apparently suggests + some configuration values which sendmail 8.9 does not like. Here is + what one expert suggests: + + The sendmail.cf contains: +O AliasFile=/etc/aliases, /etc/majordomo.aliases +O DontBlameSendmail=Safe + + /etc/aliases contains the general majordomo aliases: +# Majordomo +majordomo: "|/usr/local/lib/majordomo/wrapper majordomo" +owner-majordomo: postmaster +majordomo-owner: postmaster + + /etc/majordomo.aliases contains the majordomo lists of the form: +wookie: "|/usr/local/lib/majordomo/wrapper resend -l wookie wookie-list" +wookie-list: :include:/usr/local/lib/majordomo/lists/wookie +owner-wookie: head-wookie +wookie-approval: owner-wookie +wookie-request: "|/usr/local/lib/majordomo/wrapper majordomo -l wookie" + + The various directory owners/groups/permissions: +drwxr-xr-x 20 root root 1024 Dec 1 15:20 / +drwxr-xr-x 25 root root 3072 Jan 26 01:26 /etc +drwxr-xr-x 20 root root 1024 Feb 4 1998 /usr +drwxr-xr-x 18 root root 1024 Jan 16 18:40 /usr/local +drwxr-xr-x 5 root root 1024 Feb 6 1996 /usr/local/lib +lrwxrwxrwx 1 root root 16 Dec 1 10:01 /usr/local/lib/majordomo + -> majordomo-1.94.4 +drwxr-x--x 5 majordom majordom 1024 Jan 25 23:12 /usr/local/lib/majordomo +-1.94.4 +drwxr-xr-x 2 majordom majordom 32768 Jan 26 00:49 /usr/local/lib/majordomo +-1.94.4/lists +-rw-rw-r-- 1 majordom majordom 655 Nov 3 17:03 /usr/local/lib/majordomo +-1.94.4/lists/wookie +-rw-rw---- 1 majordom majordom 14588 Jan 19 10:28 /usr/local/lib/majordomo +-1.94.4/lists/wookie.config +-rw-rw-r-- 1 majordom majordom 23 Jan 14 1997 /usr/local/lib/majordomo +-1.94.4/lists/wookie.info + + Now the differences that make this work that may not be the same as + instructed by the majordomo instructions: + 1. Put the majordomo.aliases file in /etc, not in the majordomo + install directory (/usr/local/lib/majordomo). + 2. Make the permissions on /usr/local/lib/majordomo 0751, not 0775. + 3. Make the permissions on /usr/local/lib/majordomo/Log 0664, owned + by majordom, group majordom. + 4. /usr/local/lib/majordomo/lists is mode 0755, owner majordom, group + majordom. + 5. The permissions/owners for the lists should be as shown above. + These permissions/ownership allow majordom to continue to manage + the lists. + _________________________________________________________________ + +Q3.33 -- How do I configure my system in general with sendmail 8.9? + + Date: May 24, 1999 + + The following is taken directly from the DIRECTORY PERMISSIONS section + of the top-level README file in the sendmail distribution. + + Sendmail often gets blamed for many problems that are actually the + result of other problems, such as overly permissive modes on + directories. For this reason, sendmail checks the modes on system + directories and files to determine if can have been trusted. For + sendmail to run without complaining, you MUST execute the following + command: + chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue + chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue + + You will probably have to tweak this for your environment (for + example, some systems put the spool directory into /usr/spool instead + of /var/spool and use /etc/mail for aliases file instead of /etc). If + you set the RunAsUser option in your sendmail.cf, the + /var/spool/mqueue directory will have to be owned by the RunAsUser + user. As a general rule, after you have compiled sendmail, run the + command + sendmail -v -bi + + to initialize the alias database. If it gives messages such as + WARNING: writable directory /etc + WARNING: writable directory /usr/spool/mqueue + + then the directories listed have inappropriate write permissions and + should be secured to avoid various possible security attacks. + + Beginning with sendmail 8.9, these checks have become more strict to + prevent users from being able to access files they would normally not + be able to read. In particular, .forward and :include: files in unsafe + directory paths (directory paths which are group or world writable) + will no longer be allowed. This would mean that if user joe's home + directory was writable by group staff, sendmail would not use his + .forward file. This behavior can be altered, at the expense of system + security, by setting the DontBlameSendmail option. For example, to + allow .forward files in group writable directories: + O DontBlameSendmail=forwardfileingroupwritabledirpath + + Or to allow them in both group and world writable directories: + O DontBlameSendmail=forwardfileinunsafedirpath + + Items from these unsafe .forward and :include: files will be marked as + unsafe addresses -- the items can not be deliveries to files or + programs. This behavior can also be altered via DontBlameSendmail: + O DontBlameSendmail=forwardfileinunsafedirpath, + forwardfileinunsafedirpathsafe + + The first flag allows the .forward file to be read, the second allows + the items in the file to be marked as safe for file and program + delivery. + + Other files affected by this strengthened security include class files + (i.e. Fw /etc/sendmail.cw), persistent host status files, and the + files specified by the ErrorHeader and HelpFile options. Similar + DontBlameSendmail flags are available for the class, ErrorHeader, and + HelpFile files. + + If you have an unsafe configuration of .forward and :include: files, + you can make it safe by finding all such files, and doing a "chmod + go-w $FILE" on each. Also, do a "chmod go-w $DIR" for each directory + in the file's path. + + + sendmail.org + + 4. GENERAL SENDMAIL ISSUES + + * 4.1 Should I use a wildcard MX for my domain? + * 4.2 How can I set up an auto-responder? + * 4.3 How can I get sendmail to deliver local mail to $HOME/.mail + instead of into /usr/spool/mail (or /usr/mail)? + * 4.4 Why does it deliver the mail interactively when I'm trying to + get it to go into queue only mode? + * 4.5 How can I solve "MX list for hostname points back to hostname" + and "config error: mail loops back to myself" messages? + * 4.6 Why does my sendmail process sometimes hang when connecting + over a SLIP/PPP link? + * 4.7 How can I summarize the statistics generated by sendmail in + the syslog? + * 4.8 How can I check my sendmail.cf to ensure that it's re-writing + addresses correctly? + * 4.9 What is procmail, and where can I get it? + * 4.10 How can I solve "cannot alias non-local names" errors? + * 4.11 Is sendmail Year-2000 (Y2K) compliant? + * 4.12 How can I batch remote mail to be sent using my ISP while + delivering local mail immediately? + * 4.13 What does "unknown mailer error 1" mean? + * 4.14 How do I queue mail for another domain? + * 4.15 How do create attachments with sendmail? + * 4.16 How do I find sendmail's version number? + _________________________________________________________________ + +Q4.1 -- Should I use a wildcard MX for my domain? + + Date: July 9, 1996 + Updated: November 5, 1997 + + If at all possible, no. + + Wildcard MX records have lots of semantic "gotcha"s. For example, they + will match a host "unknown.your.domain" -- if you don't explicitly + test for unknown hosts in your domain, you will get "MX list for + hostname points back to hostname" or "config error: mail loops back to + myself". + + See RFCs 1535, 1536, and 1912 (updates RFC 1537) for more detail and + other related (or common) problems. See also _DNS and BIND_ by Albitz + and Liu. + + They can also cause your system to add your domain to outgoing FQDNs + in a desperate attempt to get the mail to where it's supposed to go, + but because *.your.domain is valid due to the wildcard MX, delivery to + not.real.domain.your.domain will get dumped on you, and you may even + find yourself in a loop as the domain keeps getting tacked on time + after time after time (the "config error: mail loops back to myself" + problem). + + Wildcard MX records are just a bad idea, plain and simple. They don't + work the way you'd expect, and virtually no one gets them right. Avoid + them at all costs. + _________________________________________________________________ + +Q4.2 -- How can I set up an auto-responder? + + Date: March 23, 1996 + Updated: February 16, 1999 + + This is a local mailer issue, not a sendmail issue. Depending on what + you're doing, look at procmail (see Q4.9), ftpmail, or Majordomo. + + The latest version of Majordomo can be found at + ftp://ftp.greatcircle.com/pub/majordomo/. It is written in Perl and + requires either Perl 4.036, and appears to run with only minor tweaks + under 5.001a or later. Make sure to check out the web interface for + Majordomo called LWGate at + http://www.netspace.org/users/dwb/lwgate.html. The latest versions of + Perl (both 4.x and 5.x) can be found in + http://www.metronet.com/perlinfo/src/. More information about Perl can + be found at http://www.metronet.com/perlinfo/perl5.html + + The latest version of ftpmail can be found at + ftp://src.doc.ic.ac.uk/packages/ftpmail or any comp.sources.misc + archive (volume 37). + _________________________________________________________________ + +Subject: Q4.3 -- How can I get sendmail to deliver local mail to $HOME/.mail +instead of into /usr/spool/mail (or /usr/mail)? + + Date: July 9, 1996 + Updated: January 7, 1999 + + Again, this is a local mailer issue, not a sendmail issue. Either + modify your local mailer (source code will be required) or change the + program called in the "local" mailer configuration description to be a + new program that does this local delivery. One program that is capable + of doing this is procmail (see Q4.9), although there are probably many + others as well. + _________________________________________________________________ + +Subject: Q4.4 -- Why does it deliver the mail interactively when I'm trying to +get it to go into queue only mode? + + Date: March 23, 1996 + + Or, I'm trying to use the "don't deliver to expensive mailer" flag, + and it delivers the mail interactively anyway. I can see it does it: + here's the output of "sendmail -v foo@somehost" (or Mail -v or + equivalent). + + The -v flag to sendmail (which is implied by the -v flag to Mail and + other programs in that family) tells sendmail to watch the + transaction. Since you have explicitly asked to see what's going on, + it assumes that you do not want to to auto-queue, and turns that + feature off. Remove the -v flag and use a "tail -f" of the log instead + to see what's going on. + + If you are trying to use the "don't deliver to expensive mailer" flag + (mailer flag "e"), be sure you also turn on global option "c" -- + otherwise it ignores the mailer flag. + _________________________________________________________________ + +Subject: Q4.5 -- How can I solve "MX list for hostname points back to hostname" +and "config error: mail loops back to myself" messages? + + Date: January 17, 1997 + Updated: November 5, 1997 + + I'm getting these error messages: + 553 MX list for domain.net points back to relay.domain.net + 554 <user@domain.net>... Local configuration error + + How can I solve this problem? + + You have asked mail to the domain (e.g., domain.net) to be forwarded + to a specific host (in this case, relay.domain.net) by using an MX + record, but the relay machine doesn't recognize itself as domain.net. + Add domain.net to /etc/sendmail.cw (if you are using + FEATURE(use_cw_file)) or add "Cw domain.net" to your configuration + file. + + IMPORTANT: When making changes to your configuration file, be sure you + kill and restart the sendmail daemon (for ANY change in the + configuration, not just this one): + kill `head -1 /etc/sendmail.pid` + sh -c "`tail -1 /etc/sendmail.pid`" + + NOTA BENE: kill -1 does not work with versions prior to 8.7.y! + + With version 8.8.z sendmail, if the daemon was started up with a full + pathname (i.e., "/usr/lib/sendmail -bd -q13m"), then you should be + able to send it a HUP signal ("kill -1", or more safely, "kill -HUP") + and have it reload itself (version 8.7.y sendmail cannot do this + safely, and represents a security risk if it's not replaced with + version 8.8.3 or later). + _________________________________________________________________ + +Subject: Q4.6 -- Why does my sendmail process sometimes hang when connecting +over a SLIP/PPP link? + + Date: March 23, 1996 + + I'm connected to the network via a SLIP/PPP link. Sometimes my + sendmail process hangs (although it looks like part of the message has + been transfered). Everything else works. What's wrong? + + Most likely, the problem isn't sendmail at all, but the low level + network connection. It's important that the MTU (Maximum Transfer + Unit) for the SLIP connection be set properly at both ends. If they + disagree, large packets will be trashed and the connection will hang. + _________________________________________________________________ + +Subject: Q4.7 -- How can I summarize the statistics generated by sendmail in +the syslog? + + Date: April 9, 1997 + Updated: January 4, 1999 + + This question is addressed on pages 445-449 of _sendmail, 2nd Ed_ (see + page 319 of first edition) by Bryan Costales (see entry + sendmail-faq//book/ISBN/1-56592-222-0 in Q6.1). + + An updated version of this syslog-stat.pl script (so that it + understands the log format used in version 8 sendmail) is at + ftp://ftp.his.com/pub/brad/sendmail/syslog_stats. The updated version + of ssl has been uploaded to the SMTP Resources Directory (in + ftp://ftp.is.co.za/networking/mail/tools/), as well as + ftp://ftp.his.com/pub/brad/sendmail/ssl. There is also another program + (written by Bryan Beecher) at + ftp://ftp.his.com/pub/brad/sendmail/smtpstats. + + If you're interested in summarizing POP statistics, there is + ftp://ftp.his.com/pub/brad/sendmail/popstats, also written by Bryan + Beecher, and popstats.pl, written by Ryan Matteson. + + To see what else is available today, check the Comprehensive Perl + Archive Network ftp://ftp.funet.fi/pub/languages/perl/CPAN/CPAN or + ftp://ftp.cis.ufl.edu/pub/perl/CPAN/CPAN for the site nearest you. For + the scripts themselves, look under CPAN/scripts/mailstuff/ at any CPAN + site. For more information, see the comp.lang.perl.* FAQs at + ftp://ftp.cis.ufl.edu:/pub/perl/faq/FAQ or + ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/lang/perl/. + + If you're interested in using these kinds of tools to help you do some + near real-time monitoring of your system, you might be interested in + MEWS (Mail Early Warning System). From the README: + If you've ever written a perl script to parse sendmail + log files looking for errors, MEWS might be of interest to + you. If you've ever thought about writing a perl script to + munge sendmail log files, cringed a little and hurriedly + came up with an excuse not to do it, read on. + + If you don't have a Solaris 2.5 machine, you can probably + stop reading here. + + The Mail Early Warning System (MEWS) gives postmasters + immediate notification of trouble spots on your mail + backbone. It only works with sendmail. + + To explain it in a nutshell, whenever sendmail returns a + 4xx or 5xx SMTP code, with the MEWS modifications, it also + sends the code over UDP to a daemon which then replays the + error message to interested parties. The man pages go into + a little bit more detail. + + If this sounds like something you might be interested in getting more + details about, you can find the MEWS archive at + ftp://ftp.qualcomm.com/pub/people/eamonn/mews.tar.Z. + _________________________________________________________________ + +Subject: Q4.8 -- How can I check my sendmail.cf to ensure that it's re-writing +addresses correctly? + + Date: July 9, 1996 + + The recommended program for this is "checksendmail" by Rob Kolstad. + Old versions of this are available on various archive sites, but + currently, the only way to get the most recent version (which has been + updated to understand version 8.7 long option name syntax, as well as + now supporting both Perl 4.x and Perl 5.x) is from Rob himself. + + The latest archive will be made publicly available (most likely + through the SMTPRD run by Andras Salamon; see Q6.5, entry + sendmail-faq//online/index/14) as soon as it is received. + _________________________________________________________________ + +Subject: Q4.9 -- What is procmail, and where can I get it? + + Date: April 8, 1997 + Updated: February 28, 1999 + + The program "procmail" is a replacement for the local mailer + (variously called /bin/mail, /usr/bin/mail, mail.local, rmail, + etc...). It has been ported to run on virtually every Unix-like OS + you're likely to run into, and has a whole host of features. It is + typically about 30% faster performing the job of the local mailer than + programs such as /bin/mail or /usr/bin/mail, it has been hammered on + widely to make it extremely secure (much more so than most local + mailers) and very robust. Procmail is also capable of helping you put + a quota on a user's mailbox through the standard Unix quota mechanism + (see Q4.3). + + In short, whatever you've got, you're almost guaranteed that procmail + is better (if nothing else, the author has been able to focus lots of + time and energy into making it the best and fastest tool available, + while most system vendors just throw something together as fast as + they can and move on to the whole rest of the OS). + + However, this only begins to scratch the surface of what procmail is + capable of. It's most important feature is the fact that it gives you + a standard way to create rules (procmail calls them "recipes") to + process your mail before the messages get put into your mailbox, and + for that feature alone, it is one of the most important tools any + administrator can have in their repertoire. By filtering out or + automatically dealing with 80% of your daily cruft, it lets you spend + more time on the hard 20%. + + Note that recent releases of version 8 sendmail natively support using + procmail as an alternate local mailer (see "FEATURE(local_procmail)" + for version 8.7 and above). They also support procmail as an + additional local mailer, if you're concerned about flat-out replacing + your current local mailer with procmail (see "MAILER(procmail)" in + version 8.7 and above). + + You can also install procmail as a user and run it out of your + .forward file, although this tends to be a bit slower and less + efficient. + + More information about procmail can be found at + http://www.procmail.org/ and the latest version can be found at + ftp://ftp.procmail.org/pub/procmail/. + + Procmail is also the core to a mailing list management package called + "SmartList", so if you've already got procmail, adding SmartList may + be a good option. Some listowners prefer Majordomo, Listserv, or one + of those other programs, but SmartList has more than a few adherents + as well. Your personal tastes will dictate whether you swear by + SmartList or at it. + _________________________________________________________________ + +Subject: Q4.10 -- How can I solve "cannot alias non-local names" errors? + + Date: March 24, 1997 + + I upgraded from my vendor's sendmail to the latest version and now I'm + getting these error messages when I run "newaliases": + /etc/aliases: line 13: MAILER-DAEMON... cannot alias non-local names + /etc/aliases: line 14: postmaster... cannot alias non-local names + + How can I solve this problem? + + Your local mailer doesn't have the "A" flag specified. Edit the Mlocal + line in sendmail.cf and add "A" to the flags listed after "F=". + + Better yet, if you're running a recent version of sendmail that uses + m4 to generate .cf files from .mc files, regenerate your sendmail.cf + and see if that fixes the problem. Remember to install the new + sendmail.cf and restart the sendmail daemon. + _________________________________________________________________ + +Subject: Q4.11 -- Is sendmail Year-2000 (Y2K) compliant? + + Date: April 24, 1997 + Updated: July 7, 1999 + + Please refer to the Sendmail Year 2000 Readiness Disclosure page. + _________________________________________________________________ + +Subject: Q4.12 -- How can I batch remote mail to be sent using my ISP while +delivering local mail immediately? + + Date: October 14, 1997 + Updated: February 9, 1999 + + First, you need to get sendmail not to use DNS on your local machine + so your host doesn't trying to connect to your ISP for a DNS query. + See Q3.22 for more information. + + You also need to designate a "smart host" or external relay to handle + all mail that you can't deliver locally (this would be your ISP's + mailhost). + + You need to configure it so that the smtp mailer is considered + "expensive" by adding the F=e mailer flag and tell sendmail not to + connect to expensive mailers by default by setting the HoldExpensive + option to True. + + You need to add mydomain.com to the sendmail.cw file or the Cw line in + the sendmail.cf. See Q4.5. + + Finally, you need to run a program periodically to check in with your + ISP and get them to deliver any mail they may have queued for you. See + Q3.23. + _________________________________________________________________ + +Subject: Q4.13 -- What does "unknown mailer error 1" mean? + + Date: September 24, 1998 + + In general, sendmail does not perform final delivery of messages, but + relies on a local delivery agent instead. Such an agent, mail.local, + is provided with the sendmail distribution. Any such agent that + sendmail invokes for message delivery, as specified on an M line in + sendmail.cf, must exit with code 0 (success), or one of the failure + codes noted in src/sysexits.h. These generally run in the range 64 - + 78, so 1 would be out of range, and lead to sendmail generating the + above error. + _________________________________________________________________ + +Subject: Q4.14 -- How do I queue mail for another domain? + + Date: April 28, 1999 + + Situation: Your system mailserver.my.domain should act as a backup + mailserver for mailserver.client.domain. The client wants to receive + mail for the address user@client.domain. This requires: + 1. MX Records: +client.domain. IN MX 10 mailserver.client.domain. +client.domain. IN MX 20 mailserver.my.domain. +mailserver.client.domain. IN MX 10 mailserver.client.domain. +mailserver.client.domain. IN MX 20 mailserver.my.domain. + The last two records are there "just in case" (someone forgot + masquerading). + Make sure you use the real names of all systems. + mailserver.my.domain must know its own name, otherwise you'll get + the famous mail loops back to myself error. + Instead of using MX records that point to + mailserver.client.domain, you can use the FEATURE(mailertable) on + mailserver.my.domain as explained in cf/README for routing + e-mails. + 2. On your system: do nothing unless you have anti-relay rules + installed (which you really should have!). In this case, add + client.domain to the required files (8.9) (or for 8.8). Don't add + client.domain or mailserver.client.domain to class w on your + system! + 3. sendmail on your system will try to deliver mail during queue + runs, however, the client may trigger delivery by using the ETRN + command. + _________________________________________________________________ + +Subject: Q4.15 -- How do I create attachments with sendmail? + + Date: May 26, 1999 + + You don't. Sendmail is a mail transfer agent (MTA). Creating e-mail + messages, including adding attachments or signatures, is the function + of a mail user agent (MUA). Some popular MUAs include mutt, elm, exmh, + Netscape, Eudora and Pine. Some specialized packages (metamail, some + Perl modules, etc.) can also be used to create messages with + attachments. + _________________________________________________________________ + +Subject: Q4.16 -- How do I find sendmail's version number? + + Date: August 2, 1999 + + To find out which version is actually running, from without, telnet to + the SMTP port (port 25). The daemon usually announces its name and + version number, as in + thishost% telnet that.host 25 + Trying IP_addr... + Connected to that.host. + Escape character is '^]'. + 220 that.host ESMTP Sendmail 8.9.3/8.9.3; Mon, 2 Aug 1999 11:39:34 -0700 + ^] + telnet> quit + + To query a binary on your local host, the following command should + display its version number, along with some extra configuration + information, possibly including the configuration version number: + % echo \$Z | /usr/sbin/sendmail -bt -d0 + Version 8.9.3 + Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND + NETINET NETISO NETUNIX NEWDB QUEUE SCANF SMTP USERDB XDEBUG + + ============ SYSTEM IDENTITY (after readcf) ============ + (short domain name) $w = knecht + (canonical domain name) $j = knecht.sendmail.org + (subdomain name) $m = sendmail.org + (node name) $k = knecht.sendmail.org + ======================================================== + + ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) + Enter <ruleset> <address> + > 8.9.3 + % + + Adjust the pathname as needed; /usr/lib and /usr/sbin are the most + common locations. + + + sendmail.org + + 5. VENDOR/OS SPECIFIC SENDMAIL ISSUES + + * 5.1 Sun Microsystems SunOS/Solaris 1.x/2.x + + 5.1.1 How can I solve "line 273: replacement $3 out of + bounds" errors? + + 5.1.2 How can I solve "line 445: bad ruleset 96 (50 max)" + errors? + + 5.1.3 Why does version 8 sendmail (< 8.7.5) sometimes hang + under Solaris 2.5? + + 5.1.4 Why can't I use SunOS/Solaris to get email to certain + large sites? + + 5.1.5 Why do I have trouble compiling on Solaris? + + 5.1.6 How does 8.X compare to 8.X+Sun? + * 5.2 IBM AIX + + 5.2.1 The system resource controller always reports sendmail + as "inoperative". What's wrong? + + 5.2.2 Why can't I use AIX to get email to some sites? + + 5.2.3 Why can't I get sendmail 8.7.1 to use MX records with + AIX 3.2.5? + _________________________________________________________________ + +5.1 -- Sun Microsystems SunOS/Solaris 1.x/2.x + _________________________________________________________________ + + Q5.1.1 -- How can I solve "line 273: replacement $3 out of bounds" errors? + + Date: March 23, 1996 + + When I use sendmail V8 with a Sun config file I get lines like: + /etc/sendmail.cf: line 273: replacement $3 out of bounds + + the line in question reads: + R$*<@$%y>$* $1<@$2.LOCAL>$3 user@ether + + what does this mean? How do I fix it? + + V8 doesn't recognize the Sun "$%y" syntax, so as far as it is + concerned, there is only a $1 and a $2 (but no $3) in this line. Read + Rick McCarty's paper on "Converting Standard Sun Config Files to + Sendmail Version 8", in the contrib directory (file + "converting.sun.configs") in the latest version 8 sendmail + distribution for a full discussion of how to do this. + _________________________________________________________________ + + Q5.1.2 -- How can I solve "line 445: bad ruleset 96 (50 max)" errors? + + Date: March 23, 1996 + + When I use sendmail V8 on a Sun, I sometimes get lines like: + /etc/sendmail.cf: line 445: bad ruleset 96 (50 max) + + what does this mean? How do I fix it? + + You're somehow trying to start up the old Sun sendmail (or + sendmail.mx) with a version 8 sendmail config file, which Sun's + sendmail doesn't like. Check your /etc/rc.local, any procedures that + have been created to stop and re-start the sendmail processes, etc.... + Make sure that you've switched everything over to using the new + sendmail. To keep this problem from ever happening again, try the + following (make sure you're logged in as root): + mv /usr/lib/sendmail /usr/lib/sendmail.old + ln -s /usr/local/lib/sendmail.v8 /usr/lib/sendmail + mv /usr/lib/sendmail.mx /usr/lib/sendmail.mx.old + ln -s /usr/local/lib/sendmail.v8 /usr/lib/sendmail.mx + chmod 0000 /usr/lib/sendmail.old + chmod 0000 /usr/lib/sendmail.mx.old + + Assuming, of course, that you have installed sendmail V8 in + /usr/local/lib/sendmail.v8. + _________________________________________________________________ + + Q5.1.3 -- Why does version 8 sendmail (< 8.7.5) sometimes hang under Solaris + 2.5? + + Date: May 23, 1996 + + In moving from Solaris 2.4 to Solaris 2.5, the kernel changed its name + and is now in /kernel/genunix instead of /kernel/unix, so _PATH_UNIX + in conf.h is pointing to the wrong place. + + If you can't upgrade to the latest release of sendmail 8.8.z, the next + best thing to do is change _PATH_UNIX in conf.h (in the solaris2 part) + to point to the generic interface /dev/ksyms, like so: + # define _PATH_UNIX "/dev/ksyms" + _________________________________________________________________ + + Q5.1.4 -- Why can't I use SunOS/Solaris to get email to certain large sites? + + Date: November 24, 1996 + + This is most likely a problem in your resolver libraries (DNS, + /etc/hosts, NIS, etc...). Older Sun (and Solaris?) resolver libraries + allocated enough room for only five IP addresses for each host name, + and if any program ever ran across a name with more than five IP + addresses for it, the program would crash. + + For example, this would keep you from getting mail to CompuServe, + since (at the time of this writing) they list eleven IP addresses for + mx1.compuserve.com (one of the named MXes for compuserve.com). + + This will affect you even if you use version 8 sendmail, since it's a + problem in the resolver libraries, and not in sendmail itself. + + You should either get patches to the resolver libraries from Sun, or + the latest version of BIND (see Q2.12) and install their resolver + library routines. Between the two, installing BIND is a bit more work, + but it typically gives you much more up-to-date code to help you + resist attacks to your systems, more capable programs to be used for + serving the DNS (including support for IPv6 and several other + features), and some very useful utility programs. + _________________________________________________________________ + + Q5.1.5 -- Why do I have trouble compiling on Solaris? + + Date: October 20, 1997 + + Many people have experienced compilation problems on Solaris, with the + compiler typically complaining about tm_zone or TopFrame. The Solaris + section of our Compiling Sendmail page explains these. + _________________________________________________________________ + + Q5.1.6 -- How does 8.X compare to 8.X+Sun? + + Date: August 29, 1998 + + With a Vn/Berkeley config file, they're identical. There are a few + minor differences between 8.X with a Vn/Berkeley config file and + 8.X+Sun with the same config file, but the V line changed to Vn/Sun. + But most differences are the backwards compatibility hacks needed for + 8.X+Sun to support old V1/Sun config files. + + There are three web pages which discuss these in detail: Berkeley + migration (from SMI-8.6 to 8.X), Sun migration (from SMI-8.6 to + 8.X+Sun), and Differences (5 sections comparing and contrasting config + files and binaries). + _________________________________________________________________ + +5.2 -- IBM AIX + _________________________________________________________________ + + Q5.2.1 -- The system resource controller always reports sendmail as + "inoperative". What's wrong? + + Date: July 5, 1996 + + When I use version 8 sendmail on an IBM RS/6000 running AIX, the + system resource controller always reports sendmail as "inoperative", + even though it's actually running. What's wrong? + + When running as a daemon, sendmail detaches from its parent process, + fooling the SRC into thinking that sendmail has exited. To fix this, + issue the commands: + kill `head -1 /etc/sendmail.pid` + chssys -s sendmail -f 9 -n 15 -S -a "-d99.100" + # use "-d0.1" in sendmail 8.6.x + startsrc -s sendmail -a "-bd -q30m" + # your sendmail args may vary + + Now the SRC should report the correct status of sendmail. If you are + using version 8.6.x, use "-d0.1" instead of "-d99.100" (the debug + options changed somewhat in version 8.7). In 8.6.x a side-effect of + the "-d0.1" option is that a few lines of debug output will be printed + on the system console every time sendmail starts up. + + For more information, read up on the System Resource Controller, the + lssrc command and the chssys command in the online AIX documentation. + _________________________________________________________________ + + Q5.2.2 -- Why can't I use AIX to get email to some sites? + + Date: April 8, 1997 + + When I use IBM's sendmail on an IBM RS/6000 running AIX trying to get + to certain sites, it seems that I can get to some of them and not + others. What's wrong? + + There are two possible problems here: + + 1) Your version of sendmail is not configured to recognize MX records + in the DNS. Search through your sendmail.cf looking for "OK MX" or "OK + ALL". Older configurations had this line commented out, and this will + cause mail from you to some sites to fail (because those sites have MX + records, but no A records in their DNS for the specific Fully + Qualified Domain Name you're trying to mail to). + + For more information, see the comp.unix.aix FAQ + ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/. + + 2) There is a negative caching bug in AIX 3.2.5 with /usr/sbin/named + executables that are less than 103000 bytes long. Ask your IBM + representative to give you PMP 3251, or the most recent patch that + fixes this problem for your particular configuration and version of + the OS. + _________________________________________________________________ + + Q5.2.3 -- Why can't I get sendmail 8.7.1 to use MX records with AIX 3.2.5? + + Date: July 5, 1996 + + IBM, in their infinite wisdom, provided a header file that would + easily mis-compile. This resulted in the struct{} for the DNS query to + be mis-allocated, and MX processing would barf. + + Fix 1) upgrade to 8.7.5 - this has a code fix for this problem. + + Fix 2) Install the BIND 4.9.4 libraries and include files and tweak + the Makefile.AIX to use them - I *think* these Get It Right (if not, + at least it'll die during compile rather than failing weirdly at + runtime). + + Fix 3) Hack Makefile.AIX to pass a -DBIT_ZERO_ON_LEFT to cause the + headers to use the right #ifdefs. + + + sendmail.org + + 6. ADDITIONAL INFORMATION SOURCES (RFC 1807 bibliography format) + + * 6.1 Reference material devoted exclusively to sendmail + * 6.2 Reference material with chapters or sections on sendmail + * 6.3 Reference material on subjects related to sendmail + * 6.4 World-wide web index pages on sendmail + * 6.5 World-wide web index pages Internet email in general + * 6.6 Online tutorials for sendmail + * 6.7 Online archives of mailing lists and Usenet newsgroups, + relating to Internet email + _________________________________________________________________ + +Q6 -- Additional information sources + + Date: April 8, 1997 + Updated: April 14, 1999 + + This probably isn't in strict RFC 1807 format, but I'm getting closer. + Unfortunately, the format detailed in RFC 1807 was never intended to + be used in this fashion, so I'm doing a bit of square-peg fitting into + round holes. + + Note that the publisher ids that I've assigned should not be + misconstrued to imply that I have actually published all these + documents, it's just that I need some sort of reasonable entry for the + RFC 1807 "ID" field, and in lieu of information to the contrary + indicating what the actual publishers have registered, I have assigned + my own, independent, "third-party" IDs. Hopefully, the bibliographic + entries below make it obvious who the real publishers of the various + documents are. + _________________________________________________________________ + +6.1 Reference material devoted exclusively to sendmail + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/reference/1 + ENTRY:: March 23, 1996 + TYPE:: Reference manual, available online in printable format + REVISION:: April 8, 1997; Updated "CONTACT" information + TITLE:: Sendmail Installation and Operation Guide + AUTHOR:: Allman, Eric + CONTACT:: Eric Allman <eric@Sendmail.ORG> + DATE:: November 19, 1995 + PAGES:: 69 + RETRIEVAL:: Contents of manual is in doc/op/op.ps of sendmail source + archive + KEYWORD:: version 8.7.5 sendmail + LANGUAGE:: English + NOTES:: {g|n}roff "me" macro format version is in doc/op/op.me + See: URL:http://www.sendmail.org/ + + ABSTRACT:: + + The documentation written by Eric Allman himself, comes with the + sendmail distribution. The file in doc/op/op.me (nroff "me" macro + format) may have a different number of pages depending on the type of + device it is printed on, etc.... + + Eric provides his free consulting in the form of continuing + development on sendmail, and occasional posts to comp.mail.sendmail. + Please don't be so rude as to ask him to provide further free + consulting directly to you. If you (or your company) are willing to + compensate him for his consulting time, he may be willing to listen. + At the very least, you should make sure you've exhausted all other + courses of action before resorting to adding another message to the + thousands he gets per day. + + Check the sendmail home page for late-breaking updates and other + useful information. + + If you want to be notified regarding future updates to sendmail and + other items of potential interest, you may want to subscribe to the + sendmail-announce mailing list. Address your subscription requests to + "majordomo@lists.sendmail.org" with "subscribe sendmail-announce" as + the body of the message. + + END:: sendmail-faq//online/reference/1 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/1-56592-222-0 + ENTRY:: March 23, 1996 + REVISION:: April 8, 1997; Updated entire entry re: 2nd Ed. + TYPE:: Reference book, hardcopy + TITLE:: sendmail + AUTHOR:: Costales, Bryan + AUTHOR:: Allman, Eric + CONTACT:: Bryan Costales <bcx@BCX.COM> + O'Reilly & Associates, Inc. + 103 Morris Street, Suite A + Sebastapol, CA 95472 + Order by phone: 800-998-9938 (US/Canada inquiries) + 800-889-8969 (US/Canada credit card orders) + 707-829-0515 (local/overseas) + DATE:: January, 1997 + PAGES:: 1021 + COPYRIGHT:: Copyright (c) 1997 O'Reilly & Associates, Inc. All rights + reserved. + LANGUAGE:: English + NOTES:: See: URL:http://www.ora.com/catalog/sendmail2/ + + ABSTRACT:: + + The definitive reference for version 8 sendmail (specifically, version + 8.8). If you can have only one book on the subject of sendmail, this + one is it. + + Bryan provides his consulting to the world in the form of his book, + unless you're willing to compensate him for his services as well. Like + Eric, you should make sure you've exhausted all other courses of + action before you spend any of his valuable time. + + END:: sendmail-faq//book/ISBN/1-56592-222-0 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/1-55558-127-7 + ENTRY:: March 23, 1996 + TYPE:: Reference book, hardcopy + REVISION:: Sep 9, 1996; fixed typo + TITLE:: Sendmail: Theory and Practice + AUTHOR:: Avolio, Frederick M. + AUTHOR:: Vixie, Paul A. + CONTACT:: Fred Avolio <fma@al.org>, Paul Vixie <vix@al.org> + Digital Press + 225 Wildwood Avenue + Woburn, MA 01801, USA + Ordering Info: voice 1 800 366 2665 + fax 1 800 446 6520 + DATE:: 1994 + PAGES:: 262 + COPYRIGHT:: Copyright (c) by 1995 Butterworth-Heinemann + LANGUAGE:: English + NOTES:: See: URL:http://www.vix.com/vix/smtap/ + + ABSTRACT:: + + Centers more on IDA sendmail (at least partly because version 8 didn't + exist when they began the book). Written more like a college Sophomore + or Junior level textbook. + + While you'll probably never let the Costales book out of your grubby + little hands (especially if you do much work with version 8 sendmail), + this is a book you'll probably read once or maybe twice, learn some + very valuable things, but then likely put on a shelf and not read or + reference again (unless you have to write up a bibliographic entry for + it). Makes a better introduction to sendmail for management types, + especially if you don't want them getting their hands on too much + "dangerous" technical information. Also a *lot* smaller and less + imposing. + + If possible, I recommend getting both, but if you can only get one, + get Costales unless you're going to be working exclusively with IDA + sendmail, in which case Avolio & Vixie will probably be more useful. + + Note that Paul Vixie is extremely busy working on further development + of BIND, the Internet de facto standard program for serving the DNS, + upon which all Internet services depend, mail being only one of them. + Like Eric and Bryan, he's also very busy. Unless you're willing to + compensate him for his services, please let him get real work done. + + END:: sendmail-faq//book/ISBN/1-55558-127-7 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/1-56592-278-6 + ENTRY:: April 14, 1999 + REVISION:: + TYPE:: Pocket size reference, hardcopy + TITLE:: sendmail Desktop Reference + AUTHOR:: Costales, Bryan + AUTHOR:: Allman, Eric + CONTACT:: Bryan Costales <bcx@BCX.COM> + O'Reilly & Associates, Inc. + 103 Morris Street, Suite A + Sebastapol, CA 95472 + Order by phone: 800-998-9938 (US/Canada inquiries) + 800-889-8969 (US/Canada credit card orders) + 707-829-0515 (local/overseas) + DATE:: June, 1997 + PAGES:: 68 + COPYRIGHT:: Copyright (c) 1997 O'Reilly & Associates, Inc. All rights + reserved. + LANGUAGE:: English + NOTES:: See: URL:http://www.ora.com/catalog/sendmailqr/ + + ABSTRACT:: + + A companion to the sendmail book. This small guide fits in pocket and + saves you having to carry the thousand page book in your briefcase. + For detail or tutorial information, see the full sendmail book. There + are sections on the config file, databases and configuring with m4. + There are extensive cross-references to the full sendmail book. + + END:: sendmail-faq//book/ISBN/1-56592-278-6 + _________________________________________________________________ + +6.2 Reference material with chapters or sections on sendmail + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/0-13-151051-7 + ENTRY:: March 23, 1996 + TYPE:: Reference book, hardcopy + REVISION:: May 23, 1996; Updated abstract. + TITLE:: Unix System Administration Handbook, Second Edition + AUTHOR:: Nemeth, Evi + AUTHOR:: Snyder, Garth + AUTHOR:: Seebass, Scott + AUTHOR:: Hein, Trent R. + CONTACT:: <sa-book@admin.com> + Prentice-Hall, Inc. + Upper Saddle River, New Jersey 07458 + DATE:: January, 1995 + PAGES:: 780 + COPYRIGHT:: Copyright (c) 1995 by Prentice Hall PTR + LANGUAGE:: English + NOTES:: See: URL:http://www.admin.com/ + + ABSTRACT:: + + Still the best hands-on Unix System Administration book around. Covers + far more than just sendmail, but the sixty-four pages (pages 455-518 + in the third printing) it does devote are very well written and quite + useful. Also provides a version of Rob Kolstad's checksendmail script + on the accompanying CD-ROM. + + Note that Eric Allman and Marshall Kirk McKusick wrote the Foreword + for the Second Edition. This should give you at least an inkling as to + how essential this book is, even for experienced Unix administrators. + + END:: sendmail-faq//book/ISBN/0-13-151051-7 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/0-201-58629=0 + ENTRY:: March 23, 1996 + TYPE:: Reference book, hardcopy + REVISION:: March 27, 1996; Changed ID format to include ISBN, + moved URL to NOTES field from OTHER_ACCESS field, + also updated ABSTRACT + REVISION:: March 29, 1996; Updated ID, PAGES, COPYRIGHT, and ABSTRACT + TITLE:: Practical Internetworking With TCP/IP and UNIX + AUTHOR:: Carl-Mitchell, Smoot + AUTHOR:: Quarterman, John S. + CONTACT:: <tic@tic.com> + Addison Wesley Publishing Company + Computer Science & Engineering Division + One Jacob Way + Reading, MA 01867 + USA + Orders: voice://800-822-6339 (USA) + fax://617-942-1117 + DATE:: 1993 + PAGES:: 476 + COPYRIGHT:: Copyright (c) 1993 by Addison-Wesley Publishing + Company, Inc. + LANGUAGE:: English + NOTES:: See URL:http://heg-school.aw.com/cseng/authors/mitchell/ + practical/practical.html + + ABSTRACT:: + + Devotes 50 pages (most of chapter 8) to discussion of sendmail. As far + as TCP/IP networking books go that also happen to discuss sendmail, it + seems well-written and clear (better than I recall Hunt's book being), + but rather dated in the face of books devoted to the topic and all the + recent development activity in the sendmail community. Forget about + the references, though. The newest sendmail-related reference listed + is dated 1983, ten years before the date on this book and most + certainly wildly out-of-date now. + + There are other books written on the subject of Internetworking with + TCP/IP (most notably Comer), but this particular book seems to have a + unique mix of theory (if perhaps a bit dated) and practical advice. + Other books tend to have lots of one or the other, or split their + theory and nitty-gritty details into separate books in a series (like + Comer). + + Assuming that an update will be coming out soon, it probably deserves + a place on the shelf of most System or Network Administrators, right + next to _Internetworking with TCP/IP_ by Comer, _Managing Internet + Information Services_ by Liu, et. al., _DNS and BIND_ by Albitz and + Liu, _Unix System Administration_ by Nemeth, et. al., and last, but + certainly not least, _sendmail_ by Costales. However, it deserves this + place more because of the non-sendmail related material, as opposed to + what sendmail-related material there is. + + END:: sendmail-faq//book/ISBN/0-201-58629-0 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/1-56592-322-7 + ENTRY:: April 14, 1999 + TYPE:: Reference book, hardcopy + REVISION:: April 8, 1997; updated URL in NOTES section + TITLE:: TCP/IP Network Administration 2nd Edition + AUTHOR:: Hunt, Craig + CONTACT:: O'Reilly & Associates, Inc. + 103 Morris Street, Suite A + Sebastapol, CA 95472 + Order by phone: 800-998-9938 (US/Canada inquiries) + 800-889-8969 (US/Canada credit card orders) + 707-829-0515 (local/overseas) + DATE:: January, 1998 + PAGES:: 630 + LANGUAGE:: English + NOTES:: See: URL:http://www.ora.com/catalog/tcp2/ + + ABSTRACT:: + + Chapter 10 is devoted to sendmail. A very good treatment of sendmail + in 50 pages and less daunting than the Costales book. If you only own + one, of course make it the Costales book. Appendix E is a 50 page + sendmail reference which covers compiling sendmail, sendmail options, + sendmail macros and the sendmail K command. The introductary chapters + of the book are helpful in understanding the big picture of network + services. + + END:: sendmail-faq//book/ISBN/1-56592-322-7 + _________________________________________________________________ + +6.3 Reference material on subjects related to sendmail + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/1-56592-512-2 + ENTRY:: April 14, 1999 + TYPE:: Reference book, hardcopy + REVISION:: April 14, 1999; Updated entire entry for 3rd Ed. + TITLE:: DNS and BIND 3rd Edition + AUTHOR:: Albitz, Paul + AUTHOR:: Liu, Cricket + CONTACT:: O'Reilly & Associates, Inc. + 103 Morris Street, Suite A + Order by phone: 800-998-9938 (US/Canada inquiries) + 800-889-8969 (US/Canada credit card orders) + 707-829-0515 (local/overseas) + DATE:: September, 1998 + PAGES:: 502 + COPYRIGHT:: Copyright (c) 1998 O'Reilly & Associates, Inc. All rights + reserved. + LANGUAGE:: English + NOTES:: See: URL:http://www.ora.com/catalog/dns3/ + + ABSTRACT:: + + As definitive as Costales is on sendmail, this book is on the subject + of the Domain Name System (DNS) and the most common server software + for the DNS, namely BIND. + + The third edition deals with the new 8.1.2 version of BIND as well as + the older 4.9 versions. Wherever there is a difference in behavior of + the versions, the book points out which version does what. Anyone + still using the first edition should strongly consider replacing it + now since the new features will be the basis for the next generation + of name servers. + + Since the sending of Internet mail is so very heavily dependent on the + DNS, it obviously also belongs on the shelf of any Postmaster or + System Administrator whose site does Internet email. That means + virtually every administrator of every site on the Internet. + + END:: sendmail-faq//book/ISBN/1-56592-512-2 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//book/ISBN/1-56592-153-4 + ENTRY:: April 8, 1997 + TYPE:: Reference book, hardcopy + TITLE:: Using & Managing UUCP + AUTHOR:: Ravin, Ed + AUTHOR:: O'Reilly, Tim + AUTHOR:: Dougherty, Dale + AUTHOR:: Todino, Grace + CONTACT:: O'Reilly & Associates, Inc. + 103 Morris Street, Suite A + Order by phone: 800-998-9938 (US/Canada inquiries) + 800-889-8969 (US/Canada credit card orders) + 707-829-0515 (local/overseas) + DATE:: September, 1996 + PAGES:: 424 + LANGUAGE:: English + NOTES:: See: URL:http://www.ora.com/catalog/umuucp/ + + ABSTRACT:: + + Replaces _Managing UUCP and Usenet_ by Todino and O'Reilly as the + definitive book for using, installing, and managing UUCP. + + The general assumption with version 8 sendmail is that virtually no + one uses UUCP to send email anymore, but if that assumption isn't true + for you, then you probably need this book. + + END:: sendmail-faq//book/ISBN/1-56592-153-4 + _________________________________________________________________ + +6.4 World-wide web index/resource pages on sendmail + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/index/10 + ENTRY:: March 23, 1996 + TYPE:: Online sendmail index + REVISION:: April 14, 1999; updated to sendmail.org address + TITLE:: sendmail FAQ Support Page + AUTHOR:: Beck, John + CONTACT:: John Beck <sendmail+faq@sendmail.org> +OTHER_ACCESS:: URL:http://www.sendmail.org/faq/ + LANGUAGE:: English + + ABSTRACT:: + + Support Page for this FAQ. + + END:: sendmail-faq//online/index/10 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/index/17 + ENTRY:: March 25, 1996 + TYPE:: Online sendmail index + REVISION:: April 14, 1999; updated to sendmail.org address + TITLE:: comp.mail.sendmail Most Frequently Asked Questions Support Page + AUTHOR:: Aßmann, Claus + CONTACT:: Claus Aßmann <ca@sendmail.org> +OTHER_ACCESS:: URL:http://www.sendmail.org/~ca/email/english.html + LANGUAGE:: English + + ABSTRACT:: + + Most Frequently Asked Questions on comp.mail.sendmail and their + answers. Also has some links to a few other resources. + + END:: sendmail-faq//online/index/17 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/resources/22 + ENTRY:: November 24, 1996 + TITLE:: IICONS Sendmail Resources + AUTHOR:: Caloca, Paul + CONTACT:: Paul Caloca <pcaloca@iicons.com> + COPYRIGHT:: Copyright (c) 1996 Paul Caloca. All Rights Reserved. +OTHER_ACCESS:: URL:http://www.iicons.com/sendmail/index.html + LANGUAGE:: English + + ABSTRACT:: + + Provides information on how to compile Sendmail and the NEWDB db.1.85 + for Solaris 2. Also has a section on which Sun patches update Solaris + 2 to BIND 4.9.3. + + Has pointers to some non-Sun/Solaris sendmail resources, especially + including CERT Advisories related to sendmail. + + END:: sendmail-faq//online/index/22 + _________________________________________________________________ + +6.5 World-wide web index pages and other reference on Internet email in general + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/index/12 + ENTRY:: March 23, 1996 + TYPE:: Online general Internet email index + REVISION:: March 27, 1996; moved URL from RETRIEVAL field to + OTHER_ACCESS field. + TITLE:: Internet Mail Consortium web site + CORP-AUTHOR:: Internet Mail Consortium + CONTACT:: <info@imc.org> +OTHER_ACCESS:: URL:http://www.imc.org/ + LANGUAGE:: English + + ABSTRACT:: + + If it has to do with Internet email, you'll probably find it here or a + link to it from here. + + They have or have information on email-related Usenet FAQs, RFCs, + Internet Drafts (documents that are in the process of becoming RFCs), + IETF Working Groups, security standards, and are running a few + email-related mailing lists. + + Tends to be focussed on the standards issues. + + If you care about Internet email, you should make it your duty in life + to check this site frequently. + + END:: sendmail-faq//online/index/12 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/index/13 + ENTRY:: March 23, 1996 + TYPE:: Online general Internet email index + REVISION:: August 20, 1996; Updated URL. + TITLE:: Email References + AUTHOR:: Wohler, Bill + CONTACT:: Bill Wohler <wohler@worldtalk.com> +OTHER_ACCESS:: URL:http://www.worldtalk.com/html/msg_resources/email_ref.html + LANGUAGE:: English + + ABSTRACT:: + + The most exhaustive index site I know of for Internet email related + documents outside of the Internet Mail Consortium. + + Also has pointers to other organizations that relate to Internet + email, such as the Electronic Messaging Association and the European + Electronic Messaging Association. + + Tends to be focussed on the server and standards issues. + + END:: sendmail-faq//online/index/13 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/index/14 + ENTRY:: March 23, 1996 + TYPE:: Online general Internet email index + REVISION:: June 28, 1996; Added acronym for SMTPRD + TITLE:: SMTP Resources Directory (SMTPRD) + AUTHOR:: Salamon, Andras + AUTHOR:: Knowles, Brad + CONTACT:: Andras Salamon <smtprd@dns.net> +OTHER_ACCESS:: URL:http://www.dns.net/smtprd/ + LANGUAGE:: English + + ABSTRACT:: + + Another good index site, but still very much in the early phases of + gestation. Based very heavily on the DNS Resources Directory, also by + Andras Salamon. + + A well-rounded site, for the amount of material it covers so far. + + END:: sendmail-faq//online/index/14 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/index/15 + ENTRY:: March 23, 1996 + TYPE:: Online general Internet email index + REVISION:: March 27, 1996; moved URL from RETRIEVAL field to + OTHER_ACCESS field. + TITLE:: E-Mail Web Resources + AUTHOR:: Wall, Matt + CONTACT:: Matt Wall <wall+@cmu.edu> +OTHER_ACCESS:: URL:http://andrew2.andrew.cmu.edu/cyrus/email/email.html + LANGUAGE:: English + + ABSTRACT:: + + Another good index site, tends to be more focussed on client side and + LAN email packages. Also lists some email services, which no one else + that I've seen appears to have taken the time to catalog. + + Excellent side-by-side feature comparison of various MUAs and their + compliance with various Internet protocols. + + END:: sendmail-faq//online/index/15 + _________________________________________________________________ + +6.6 Online tutorials for sendmail + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/tutorial/9 + ENTRY:: March 23, 1996 + TYPE:: Online sendmail tutorial + REVISION:: March 27, 1996; moved URL from RETRIEVAL field to + OTHER_ACCESS field. + REVISION:: August 29, 1998; updated URL. + TITLE:: Sendmail V8: A (Smoother) Engine Powers Network Email + AUTHOR:: Reich, Richard + CONTACT:: Richard Reich <richard@reich.com> + DATE:: February 8, 1996 + COPYRIGHT:: Copyright (c) 1995 The McGraw-Hill Companies, Inc. + All Rights Reserved. +OTHER_ACCESS:: URL:http://www.networkcomputing.com/unixworld/tutorial/ + 008/008.txt.html + LANGUAGE:: English + NOTES:: UnixWorld Online: Tutorial: Article No. 008 + + ABSTRACT:: + + Good technical introduction. Some useful references. Notably does not + reference this FAQ as a place to get more information. + + END:: sendmail-faq//online/article/9 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/tutorial/16 + ENTRY:: March 23, 1996 + TYPE:: Online sendmail tutorial + REVISION:: March 27, 1996; moved URL from RETRIEVAL field to + OTHER_ACCESS field. + TITLE:: Sendmail -- Care and Feeding + AUTHOR:: Quinton, Reg + CONTACT:: Reg Quinton <reggers@julian.uwo.ca> + Computing and Communications Services + The University of Western Ontario + London, Ontario N6A 5B7 + Canada + DATE:: March 24, 1992 +OTHER_ACCESS:: URL:ftp://ftp.sterling.com/mail/sendmail/uwo-course/ + sendmail.txt.Z + LANGUAGE:: English + NOTES:: Postscript version also available. See ftp://ftp.sterling.com/ + mail/sendmail/uwo-course/sendmail.ps.Z + + ABSTRACT:: + + Dated. Only here until I find better. + + END:: sendmail-faq//online/tutorial/16 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/tutorial/21 + ENTRY:: March 27, 1996 + TYPE:: Online sendmail tutorial + REVISION:: August 29, 1998; updated URL. + TITLE:: Explosion in a Punctuation Factory + AUTHOR:: Bryan Costales + CONTACT:: Becca Thomas <editor@unixworld.com> + DATE:: January 1994 + COPYRIGHT:: Copyright (c) 1995 The McGraw-Hill Companies, Inc. + All Rights Reserved. +OTHER_ACCESS:: URL:http://www.networkcomputing.com/unixworld/tutorial/ + 01/01.txt.html + LANGUAGE:: English + + ABSTRACT:: + + Good introduction on how sendmail re-write rules work. + + END:: sendmail-faq//online/article/21 + _________________________________________________________________ + +6.7 Online archives of mailing lists and Usenet newsgroups, relating to +Internet email + + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/archive/18 + ENTRY:: March 25, 1996 + TYPE:: Online Usenet newgroup archive + REVISION:: March 27, 1996; moved URL from RETRIEVAL field to + OTHER_ACCESS field. + TITLE:: DejaNews +OTHER_ACCESS:: URL:http://www.dejanews.com + LANGUAGE:: English + NOTES:: Archives/indexes only Usenet news. + + ABSTRACT:: + + The first, and still most focussed, Usenet news archive/index site. + Others archive/index news as well as other things, but none that I've + seen do it better. + + Go to "Power Search" then "Query Filter" if you wish to restrict the + newsgroups you search on to something like just comp.mail.sendmail and + not all newsgroups. + + END:: sendmail-faq//online/archive/18 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/archive/19 + ENTRY:: March 25, 1996 + TYPE:: Online Usenet newgroup archive + REVISION:: March 27, 1996; moved URL from RETRIEVAL field to + OTHER_ACCESS field. + TITLE:: AltaVista +OTHER_ACCESS:: URL:http://www.altavista.digital.com + LANGUAGE:: English + NOTES:: Archives/indexes Usenet news and World-wide web pages. + + ABSTRACT:: + + One of the leading indexes of world-wide web pages, and their + archive/index of Usenet news is obviously secondary. + + END:: sendmail-faq//online/archive/19 + BIB-VERSION:: CS-TR-v2.1 + ID:: sendmail-faq//online/archive/20 + ENTRY:: March 25, 1996 + TYPE:: Online Usenet newgroup archive + REVISION:: April 8, 1997; Additional information based on experience + TITLE:: InReference +OTHER_ACCESS:: URL:http://www.reference.com + LANGUAGE:: English + + ABSTRACT:: + + Had promise to be the best Usenet news/publicly accessible mailing + list index/archive site in the world. The best minds that were working + on the project have since left, and the difference is visible. You'll + probably be happier with DejaNews instead. + + END:: sendmail-faq//online/archive/20 + + + sendmail.org 7. THANKS! + + Special thanks to: + + Eric Allman The core of the material here comes from his FAQ for + version 8.6.9 sendmail. I couldn't even have gotten started were it + not for him. And if he hadn't written sendmail, there obviously + wouldn't even be a FAQ. Heck, there might not even be an Internet. + Paul Southworth Provides FAQ posting services, useful comments on + various sections, and the mailclient-faq. I couldn't have kept doing + this were it not for his help. + Ed Ravin Virtually all the material regarding the use of sendmail on + AIX is his, and most of it has been carried over verbatim. + + Thanks also to: + + Neil Hoggarth, Andras Salamon, Johan Svensson, Christopher X. + Candreva, Bill Wohler, Matthew Wall, Henry W. Farkas, Claus Assmann, + Curt Sampson, Rebecca Lasher, Jim Davis, David Keegel, Betty Lee, + Alain Durand, Walter Schweizer, Christophe Wolfhugel, Al Gilman, + Valdis Kletnieks, John Gardiner Myers, Paul DuBois, Adam Bentley, Dave + Sill, Dave Wreski, Paul Caloca, Eamonn Coleman, Michael Fuhr, Betty + Lee, Derrell Lipman, Era Eriksson, Richard Troxel, and the readers and + posters of comp.mail.sendmail. + diff --git a/debian/ida-aliases.m4 b/debian/ida-aliases.m4 new file mode 100644 index 0000000..d5a905b --- /dev/null +++ b/debian/ida-aliases.m4 @@ -0,0 +1,23 @@ +divert(-1) + +#################################################################### +## IDA style non-local aliasing. +## +## Neil Rickert <rickert@cs.niu.edu> +## +#################################################################### + +divert(0)dnl +VERSIONID(`$Id: ida-aliases.m4,v 1.1 1999/02/09 00:35:21 rickert Exp $') +divert(-1) + + +PUSHDIVERT(3)dnl +### Check aliases for non-local users. +R$+<@$+> $:$1<@$2><${opMode}> Are we building aliases? +R$+<@$=w.><$-> $:$1<@$2.> Don't touch local addresses +R$+<@$+><i> $:$1<@$2><>i +R$+<@$+><$-> $:$1<@$2><>$(aliases $1@$2 $: $) +R$+<@$+><>$+ $#local $:$1@$2 +R$+<@$+><>$* $:$1<@$2> +POPDIVERT diff --git a/debian/ida-aliases.m4.README b/debian/ida-aliases.m4.README new file mode 100644 index 0000000..708a42e --- /dev/null +++ b/debian/ida-aliases.m4.README @@ -0,0 +1,168 @@ +From rickert@cs.niu.edu Fri Apr 23 12:06:20 1999 +Path: rtpnews.raleigh.ibm.com!newsfeed.btv.ibm.com!news.chips.ibm.com!znr.news.ans.net!abq.news.ans.net!newsjunkie.ans.net!philabs!blanket.mitre.org!newsfeed.berkeley.edu!newsfeed.enteract.com!feed1.news.rcn.net!rcn!howland.erols.net!vixen.cso.uiuc.edu!husk.cso.niu.edu!not-for-mail +From: rickert@cs.niu.edu (Neil Rickert) +Newsgroups: comp.os.linux.networking,comp.mail.sendmail +Subject: Re: using an aliases file for remote addresses +Date: 23 Apr 1999 07:31:40 -0500 +Organization: Northern Illinois University +Lines: 153 +Message-ID: <7fpp7c$fpd@ux.cs.niu.edu> +References: <7fpij9$pmv$1@opera.iinet.net.au> +NNTP-Posting-Host: ux.cs.niu.edu +Xref: rtpnews.raleigh.ibm.com comp.os.linux.networking:165108 comp.mail.sendmail:55105 + +"Chris Severn" <severnx@iinet.net.au> writes: + +>Is it possible to have a SMTP server which checks the destination addresses +>of email, and redirects certain email addresses (based on the name and +>domain) to a local account, but passes everything else as normal out to the +>internet. I know that the sendmail.cw file can do this for whole domains, +>but I have to differentiate between addresses. + + Save the enclosed as 'feature/ida-aliases.m4' under your 'sendmail/cf' +directory, or wherever you build your 'cf' file. Then use +FEATURE(ida-aliases)dnl +in your '.mc' file. + +This will allow you to put non-local addresses in your aliases file +to accomplish what you are trying to do. Note that it might cause +you problems if you have really long alias expansions (the RHS of +aliases entries) for non-local aliases. Use :include: files for +large mailing lists. + + ----- cut here ---- +divert(-1) + +#################################################################### +## IDA style non-local aliasing. +## +## Neil Rickert <rickert@cs.niu.edu> +## +#################################################################### + +divert(0)dnl +VERSIONID(`$Id: ida-aliases.m4,v 1.1 1999/02/09 00:35:21 rickert Exp $') +divert(-1) + + +PUSHDIVERT(3)dnl +### Check aliases for non-local users. +R$+<@$+> $:$1<@$2><${opMode}> Are we building aliases? +R$+<@$=w.><$-> $:$1<@$2.> Don't touch local addresses +R$+<@$+><i> $:$1<@$2><>i +R$+<@$+><$-> $:$1<@$2><>$(aliases $1@$2 $: $) +R$+<@$+><>$+ $#local $:$1@$2 +R$+<@$+><>$* $:$1<@$2> +POPDIVERT + + ----- cut here ---- + +>I'm running sendmail on a Redhat 5.1 (soon to be 5.2) distribution on a +>Pentium. + +>Chris Severn +>-- +>Delete the 'x's to remove the spamblock +>Except spammers, for whom my email address is abuse@localhost + + + +>If you're not quite sure what I mean by the short question, then please read +>the long question : + +>I've got two similar networks. + +>They have a linux box running POP/SMTP and squid server connected by a modem +>to an ISP, and by ethernet to a local private network of about 20 machines +>(Windoze 95/98 mainly). The clients run Outlook and Internet Explorer. + +>The two networks aren't connected to each other in any way, except through +>the internet by the modems. + +>Each of the two linux gateway machines has it's own domain name, lets call +>them mail.host1.com.au and mail.host2.com.au. (These are aliases for the +>machine names host1.com.au and host2.com.au). + +>Now, that all fine, and everybody has their own email addresses which they +>can use, because they've got their own account on the local linux machine, +>which is set up on the clients as the POP and SMTP servers. + +>The problem is however, that the two networks belong to different divisions +>of the same company, and now some people are moving from one office to the +>other, but want to keep their existing email addresses. + +>Hence, someone using host1 now, who has a @mail.host1.com.au email address, +>now wants their mail delivered for collection to host2, but still using +>their @mail.host1.com.au address. + +>So, the way it's set up at the moment, I've created a new account with the +>same name at host2, and in host1's /etc/aliases I've put the entry +>bill: bill@mail.host2.com.au. +>So, any mail which gets to host1 for bill, gets bounced to bill's address at +>host2, which is where he now collects it from. + +>That's not really a problem, exept that it creates too much excess network +>traffic - especially as the only link to the internet is via 33.6k modems. +>I've resigned myself to the fact that it can't be helped without adding a +>smarter router at the ISP (and that's not really an option at the moment). + +>One thing I would like to fix though is when someone at host2 mails to +>bill@mail.host1.com.au (remember - that's his preferred email address, even +>though technically he can be reached at bill@mail.host2.com.au). The mail +>will be put on host2 by SMTP, host2 will send it down the modem line to "the +>internet", and then it will go up another modem line to host1, which will +>look up it's /etc/aliases file, and then redirect the mail back to +>bill@mail.host2.com.au, which means it goes back down that modem line to the +>internet, back up the host2 modem line, and gets put in bills mailbox. So, +>it's just gone through 4 modem links, when it didn't have to go through any. + +>How do I make the host2 computer know that it shouldn't relay any messages +>for bill@mail.host1.com.au to the internet, but instead just deliver them +>locally to the user bill ? + +>I've considered (and tried successfully) making host2 think that it is also +>host1 by using the sendmail.cw file, but that creates problems when there is +>the same user name for different people on both hosts. It also means that I +>must get sendmail to pass any mail to names it doesn't recognise to the +>other host (so that legitimate mail to the other host doesn't get kept +>locally due to it thinking it is the other host). This means that +>incorrectly addressed mail can get bounced around too much, using too much +>bandwidth. + +>So, what I want is to make host2 think that it is host1 for certain +>destination email addresses only. Something like the /etc/aliases file, but +>which acts on mail being passed through, rather than only acting on mail +>destined for that machine. Is there such a thing ? + +>I've also considered using the sendmail.cw file as already mentioned to make +>host2 think that it's host1 as well. But, this time we don't bounce unknown +>names to the other machine. In host2's /etc/aliases, we just list all the +>legitimate names which exist on host1 (and aren't getting bounced around), +>and send them onto that machine using it's IP address or alternative machine +>name. Addresses which exist on both hosts would be checked in the +>/etc/aliases by the whole email address, rather than just the name. +>Example: +>fred: fred@host1.com.au +>support@mail.host1.com.au: support@host1.com.au +>In this example, fred exists only on host1, and therefore only the name +>requires checking. Support exists on both hosts, so it needs checking for +>the whole address. host1.com.au is a non-aliased address of the host1 +>machine. + +>The problem with this method is that it is complicated to manage - we must +>make sure any new or deleted accounts on host1 are mirrored in host2's +>/etc/aliases file. There is too much chance of error. + +>So, sorry to be so long, but I'd appreciate suggestions as how to accomplish +>selective aliasing for mail being passed through. + +>Thanks. + +>Chris Severn +>-- +>Delete the 'x's to remove the spamblock +>Except spammers, for whom my email address is abuse@localhost + + + + diff --git a/debian/local/configure b/debian/local/configure new file mode 100644 index 0000000..648e260 --- /dev/null +++ b/debian/local/configure @@ -0,0 +1,903 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=configure.in + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +# +# Check for presence if NISPLUS headers +# +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:530: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 545 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 562 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 579 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +for ac_hdr in rpcsvc/nis.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:613: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 618 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + + +# Fini - update site.config.m4 for sendmail build +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "site.config.m4" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CPP@%$CPP%g +s%@ac_cv_header_rpcsvc_nis_h@%$ac_cv_header_rpcsvc_nis_h%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"site.config.m4"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/debian/local/configure.in b/debian/local/configure.in new file mode 100644 index 0000000..7099c2b --- /dev/null +++ b/debian/local/configure.in @@ -0,0 +1,10 @@ +AC_INIT(configure.in) + +# +# Check for presence if NISPLUS headers +# +AC_CHECK_HEADERS(rpcsvc/nis.h) +AC_SUBST(ac_cv_header_rpcsvc_nis_h) + +# Fini - update site.config.m4 for sendmail build +AC_OUTPUT(site.config.m4) diff --git a/debian/local/el33t.h b/debian/local/el33t.h new file mode 100644 index 0000000..ce7bf94 --- /dev/null +++ b/debian/local/el33t.h @@ -0,0 +1,6 @@ +#define _FFR_DSN_RRT_OPTION 1 +#define _FFR_PIDFILE_OPTION 1 +#define _FFR_WRITABLE_DIRECTORIES_ARE_FATAL_OPTION 1 +#define _FFR_DONT_PROBE_INTERFACES_OPTION 1 +#define _FFR_MAXRCPT_OPTION 1 +#define _FFR_DEADLETTERDROP_OPTION 1 diff --git a/debian/local/ip-down.d b/debian/local/ip-down.d new file mode 100644 index 0000000..1881437 --- /dev/null +++ b/debian/local/ip-down.d @@ -0,0 +1,43 @@ +#!/bin/sh +# +# This script is called when ppp disconnects from the network. +# +# Here is where we'll stop sendmail if needed +# +# Written By Richard Nelson <cowboy@debian.org> +# +# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc: +# include(`/etc/mail/dialup.m4')dnl +# include(`/etc/mail/provider.m4')dnl +# +# Exit by default, check for validity before commenting out the next line: +exit 0 + +# New mail will only be queued +file="/etc/mail/dialup.m4" +if [ -f "$file" ]; then + echo "LOCAL_CONFIG" >> $file + echo "#------------------------------------------------------------" >> $file + echo "#" > $file + echo "# Dynamic updates from $0" >> $file + echo "#" >> $file + echo "# sendmail is to only queue messages until connected again" >> $file + echo "define(\`confDELIVERY_MODE', \`deferred')dnl" >> $file + echo "# Allow the queue to age without carping every four hours" >> $file + echo "define(\`confTO_QUEUEWARN',\`1d')dnl" >> $file + echo "# Don't keep host status while the network is down" >> $file + echo "define(\`confHOST_STATUS_DIRECTORY')dnl" >> $file + echo "#------------------------------------------------------------" >> $file + fi + +# Build a new sendmail.cf from sendmail.mc, including our address. +# NOTE: The following line (without the #) must be in /etc/mail/sendmail.mc: +# include(`/etc/mail/dialup.m4') +m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc \ + >/etc/mail/sendmail.cf.pnew +chmod 0640 /etc/mail/sendmail.cf.pnew +chown root.mail /etc/mail/sendmail.cf.pnew +mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf + +# Stop/reload sendmail daemon as needed +/etc/init.d/sendmail reload diff --git a/debian/local/ip-up.d b/debian/local/ip-up.d new file mode 100644 index 0000000..9053a4e --- /dev/null +++ b/debian/local/ip-up.d @@ -0,0 +1,100 @@ +#!/bin/sh +# +# This script is called when ppp connects to the network. +# +# Here is where we'll start sendmail if needed, and will +# run the queue in either case. +# +# Written By Richard Nelson <cowboy@debian.org> +# +# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc: +# include(`/etc/mail/dialup.m4')dnl +# include(`/etc/mail/provider.m4')dnl +# +# ALSO: make sure ipparam is specified somewhere in the ppp options; +# it will be used as the name of a file in /etc/mail/peers +# +# Exit by default, check for validity before commenting out the next line: +exit 0 + +# Define our domain name (from PPP) for sendmail. + +# These variables are for the use of the scripts run by run-parts +#PPP_IFACE="$1" +#PPP_TTY="$2" +#PPP_SPEED="$3" +#PPP_LOCAL="$4" +#PPP_REMOTE="$5" +#PPP_IPPARAM="$6" + +if [ ! -z "$PPP_LOCAL" ]; then + addr=$PPP_LOCAL + provider=$PPP_IPPARAM +else + addr=$1 + provider=$2 + fi + +# Determine our fqdn from our ISP +maxloop=20 +cntr=0 +name="" +until (test ! -z "$name"); do + cntr=$(($cntr+1)) + name=$(nslookup $addr | grep '^Name:' | awk '{print $2}') + test=$(echo $name | cut -d ' ' -f 1) + if [ "$name" != "**" ]; then + break + elif (($cntr > $maxloop)); then + name="" + break + fi + done + +if [ ! -z "$name" ]; then + file="/etc/mail/dialup.m4" + echo "LOCAL_CONFIG" >> $file + echo "#------------------------------------------------------------" >> $file + echo "#" > $file + echo "# Dynamic updates from $0" >> $file + echo "#" >> $file + echo "# Define our true hostname (from our ISP) becomes \$j" >> $file + echo "define(\`confDOMAIN_NAME', \`$name')dnl" >> $file + echo "# Make sure we accept mail as this name (for bounces, etc)" >> $file + echo "Cw$name" >> $file + echo "# Add our hostname to class G for genericstable support" >> $file + echo "CG$name" >> $file + echo "#------------------------------------------------------------" >> $file + fi + +# Add smarthost information (if any)... But not if provider.m4 is a link ! +if [ -f /etc/mail/peers/$provider -a ! -L /etc/mail/provider.m4 ]; then + file="/etc/mail/provider.m4" + echo "LOCAL_CONFIG" >> $file + echo "#------------------------------------------------------------" >> $file + echo "#" > $file + echo "# Dynamic updates from $0" >> $file + echo "#" >> $file + echo "# Provider information from /etc/mail/peers/$provider" >> $file + cat /etc/mail/peers/$provider >> $file + echo "#------------------------------------------------------------" >> $file + fi + +# Build a new sendmail.cf from sendmail.mc, including our address. +# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc: +# include(`/etc/mail/dialup.m4')dnl +# include(`/etc/mail/provider.m4')dnl +m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc \ + >/etc/mail/sendmail.cf.pnew +chmod 0640 /etc/mail/sendmail.cf.pnew +chown root.mail /etc/mail/sendmail.cf.pnew +mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf + +# Purge any latent host status that might cause us to *NOT* send mail +purgestat + +# Start/reload sendmail as needed +/etc/init.d/sendmail reload # may be up, or down + +# Process the sendmail queue (background so as to not defer other ip-up work) +runq & diff --git a/debian/local/parsemc b/debian/local/parsemc new file mode 100644 index 0000000..81a180e --- /dev/null +++ b/debian/local/parsemc @@ -0,0 +1,608 @@ +#!/bin/bash +# +# Parse Sendmail config for databases +# +# Copyright (c) 1999, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1999/05/19 10:00:00 cowboy> +# +# Notes (to all): +# * assumes makemap dbtype /etc/mail/database < /etc/mail/database +# * Does *not* run with sh=ash (no echo -e support) +# +# Notes (to self): +# * changes made herein *must* be reflected in parsemc,updatedb,debian.m4 +# * remember to change gawk to awk before release (gawk is more anal) +# * multiple db options not supported +# * chmod/chown of secondary alias databases not being done - no harm... +# * userdb can also have multiple databases and then a forward! +# * need sendmail stop/start +# +# List of db features +db_features="access_db bitdomain domaintable genericstable \ + mailertable uucpdomain virtusertable use_cw_file use_ct_file"; +export db_features; +# kluge for userdb, cr, ct, and cw files support +db_files="confCR_FILE confUSERDB_SPEC ALIAS_FILE"; +db_files="sendmail.mc $db_features $db_files"; +export db_files; +# +# Variables for documentation +date=$(date) +export date +user=$USER +export user +hostname=$(hostname) +export hostname +script=$0 +export script +directory=$(pwd) +export directory + +#------------------------------------------------------------------------ +# My first awk program ;-} +pattern='BEGIN { \ + # List of db features, split into an array \ + str = ENVIRON["db_features"]; \ + split(str, db_features); \ + str = ENVIRON["db_files"]; \ + split(str, db_files); \ + # Prefill entries based upon sendmail/debian defaults \ + str = "sendmail.mc m4 - /etc/mail/sendmail.mc -"; \ + split(str, entry); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "MAIL_SETTINGS_DIR /etc/mail/ - - -"; \ + split(str, entry); \ + db_loc=entry[2]; \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "DATABASE_MAP_TYPE hash - - -"; \ + split(str, entry); \ + db_type=entry[2]; \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "confUSERDB_SPEC btree -o /etc/mail/users -"; \ + split(str, entry); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "confCR_FILE - -o /etc/mail/relay-domains %[^\#]"; \ + split(str, entry); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "confCT_FILE - -o /etc/mail/trusted-users %[^\#]"; \ + split(str, entry); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "confCW_FILE - -o /etc/mail/local-host-names %[^\#]"; \ + split(str, entry); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + str = "ALIAS_FILE newaliases - /etc/mail/aliases -"; \ + split(str, entry); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + }; \ + # Look for default database location \ + # define(MAIL_SETTINGS_DIR, /etc/mail/)dnl # comment \ + /^[:space:]*define\([:space:]*`?MAIL_SETTINGS_DIR/ { \ + str = $0; \ + # Strip garbage from string \ + sub(/define\(/, "", str); \ + sub(/\)(dnl)?.*/, "", str); \ + sub(/\,/, "", str); \ + gsub(/`/, "", str); \ + gsub(/'"'"'/, "", str); \ + split(str, entry); \ + entry[5] = "-"; \ + entry[4] = "-"; \ + entry[3] = "-"; \ + db_loc=entry[2]; \ + # Save lastmost entry \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + } \ + # Look for default database type \ + # define(DATABASE_MAP_TYPE, hash)dnl # comment \ + /^[:space:]*define\([:space:]*`?DATABASE_MAP_TYPE/ { \ + str = $0; \ + # Strip garbage from string \ + sub(/define\(/, "", str); \ + sub(/\)(dnl)?.*/, "", str); \ + sub(/\,/, "", str); \ + gsub(/`/, "", str); \ + gsub(/'"'"'/, "", str); \ + split(str, entry); \ + entry[5] = "-"; \ + entry[4] = "-"; \ + entry[3] = "-"; \ + db_type=entry[2]; \ + # Save lastmost entry \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + } \ + # Look for userdb specification \ + # define(confUSERDB_SPEC, /etc/mail/users.db)dnl # comment \ + /^[:space:]*define\([:space:]*`?confUSERDB_SPEC/ { \ + str = $0; \ + # Strip garbage from string \ + sub(/define\(/, "", str); \ + sub(/\)(dnl)?.*/, "", str); \ + sub(/\,/, "", str); \ + gsub(/`/, "", str); \ + gsub(/'"'"'/, "", str); \ + split(str, entry); \ + entry[5] = "-"; \ + entry[4] = entry[2]; \ + entry[3] = "-o"; \ + entry[2] = "btree"; \ + # Save lastmost entry \ + sub(/\.db/, "", entry[4]); \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + } \ + # Look for all confC?_FILE specifications \ + # define(confCR_FILE, -o /etc/mail/relay-domains %[^\#])dnl \ + # define(confCT_FILE, -o /etc/mail/sendmail.ct %[^\#])dnl \ + # define(confCW_FILE, -o /etc/mail/sendmail.cw %[^\#])dnl \ + /^[:space:]*define\([:space:]*`?confC[RTW]_FILE/ { \ + str = $0; \ + # Strip garbage from string \ + sub(/define\(/, "", str); \ + sub(/\)(dnl)?.*/, "", str); \ + sub(/\,/, "", str); \ + gsub(/`/, "", str); \ + gsub(/'"'"'/, "", str); \ + split(str, entry); \ + # Default elided info - format: \ + # name [ [opts] file [opts] ] \ + if (entry[2] == "-o") { \ + entry[5] = entry[4]; \ + entry[4] = entry[3]; \ + entry[3] = entry[2]; \ + } \ + else { \ + entry[5] = entry[3]; \ + entry[4] = entry[2]; \ + entry[3] = "-"; \ + entry[2] = "-"; \ + } \ + # Save lastmost entry \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + } \ + # Look for all ALIAS_FILE specifications \ + #define(ALIAS_FILE, /etc/mail/aliases.private,/etc/mail/aliases)dnl \ + /^[:space:]*define\([:space:]*`?ALIAS_FILE/ { \ + str = $0; \ + # Strip garbage from string \ + sub(/define\(/, "", str); \ + sub(/\)(dnl)?.*/, "", str); \ + gsub(/ /, "", str); \ + sub(/\,/, " ", str); \ + gsub(/`/, "", str); \ + gsub(/'"'"'/, "", str); \ + split(str, entry); \ + entry[5] = "-"; \ + entry[4] = entry[2]; \ + entry[3] = "-"; \ + entry[2] = "newaliases"; \ + # Save lastmost entry \ + dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + } \ + # Locate all non-commented FEATURE macros \ + # FEATURE(name[, type [flags] file])dnl #comment \ + /^[:space:]*FEATURE\(.*\)/ { \ + str = $0; \ + # Strip garbage from string \ + sub(/FEATURE\(/, "", str); \ + sub(/\)(dnl)?.*/, "", str); \ + if (index(str, ",") != 0) { \ + sub(/\,/, "", str); \ + gsub(/`/, "", str); \ + gsub(/'"'"'/, "", str); \ + }; \ + split(str, entry); \ + # Ignore non-db features \ + for (x in db_features) { \ + if (entry[1] == db_features[x]) { \ + # Default elided info - format: \ + # name [type [opts] file] \ + if (entry[2] == "") { \ + entry[5] = "-"; \ + entry[4] = db_loc""entry[1]; \ + entry[3] = "-o"; \ + entry[2] = db_type; \ + if (entry[1] == "use_ct_file" || \ + entry[1] == "use_cw_file") { \ + if (entry[1] == "use_ct_file") \ + str = entry[1]":"dbs["confCT_FILE"]; \ + else \ + str = entry[1]":"dbs["confCW_FILE"]; \ + split(str, entry, ":"); \ + } \ + else if (entry[1] == "access_db") \ + entry[4] = db_loc"access"; \ + else if (entry[1] == "uucpdomain") \ + entry[4] = db_loc"uudomain"; \ + } \ + else if (entry[3] == "") { \ + entry[5] = "-"; \ + entry[4] = entry[2]; \ + entry[3] = "-"; \ + entry[2] = db_type; \ + } \ + else if (entry[4] == "") { \ + entry[5] = "-"; \ + entry[4] = entry[3]; \ + entry[3] = "-"; \ + }; \ + # Save lastmost entry \ + sub(/\.db/, "", entry[4]); \ + dbs[entry[1]]=entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \ + }; \ + }; \ + }; \ + END { \ + # Print the found features \ + date = ENVIRON["date"]; \ + user = ENVIRON["user"]; \ + hostname = ENVIRON["hostname"]; \ + script = ENVIRON["script"]; \ + directory = ENVIRON["directory"]; \ + print "####################################################################"; \ + print "##### This file is automatically generated -- edit at your own risk"; \ + print "#####"; \ + print "##### file: /etc/mail/databases"; \ + print "##### generated via: "script; \ + print "##### by: "user"@"hostname; \ + print "##### on: "date; \ + print "##### in: "directory; \ + print "#####"; \ + print "##### The following databases are used by sendmail"; \ + print "#####"; \ + print "####################################################################"; \ + # delete unneeded elements \ + #delete dbs["MAIL_SETTINGS_DIR"]; \ + #delete dbs["DATABASE_MAP_TYPE"]; \ + #delete dbs["confCT_FILE"]; \ + #delete dbs["confCW_FILE"]; \ + for (x in dbs) \ + if (x != "ALIAS_FILE" && \ + x != "confUSERDB_SPEC") { \ + print x":"dbs[x]; \ + } \ + else { \ + split(x":"dbs[x], entry, ":"); \ + pfx = entry[1]":"entry[2]":"entry[3]; \ + str = entry[4]; \ + sfx = entry[5]":"; \ + sub(/\,/, " ", str); \ + split(str, entry); \ + for (y in entry) \ + print pfx":"entry[y]":"sfx; \ + } \ + }; \ + '; + +#------------------------------------------------------------------------ +# Make sure not using text mailertable (it doesn't work) +if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then + sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \ + /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new + chown root.mail /etc/mail/sendmail.mc.new + chmod 0664 /etc/mail/sendmail.mc.new + mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc + fi; + +#------------------------------------------------------------------------ +# parse /etc/mail/sendmail.mc +echo "Scanning /etc/mail/sendmail.mc" +awk -- "$pattern" /etc/mail/sendmail.mc > /etc/mail/databases; \ +chown root.mail /etc/mail/databases +chmod 0664 /etc/mail/databases +#cat /etc/mail/databases +#exit 0 + +#------------------------------------------------------------------------ +# check for extant, non automagically generated Makefile and abort if found +CFGFILE="/etc/mail/Makefile" +HEADER="##### This file is automatically generated -- edit at your own risk" +if [ -s $CFGFILE ]; then + if ! head -3 $CFGFILE | grep -q "^$HEADER" ; then + echo "Error: the current $CFGFILE is not automatically generated." + if [ "$1" != "force" ]; then + echo "Use \"$0 force\" to force (re)generation." + exit 1 + else + echo "force specified, (re)generating file anyway." + fi; + fi; + + fi; + +#------------------------------------------------------------------------ +echo -n "Creating /etc/mail/Makefile" +makefile="/etc/mail/Makefile.new " +cat <<EOT > $makefile +#!/usr/bin/make -f +#################################################################### +##### This file is automatically generated -- edit at your own risk +##### +##### file: /etc/mail/Makefile +##### generated via: $script +##### by: $user@$hostname +##### on: $date +##### in: $directory +##### +##### Makefile for Sendmail databases +##### +#################################################################### +SHELL=/bin/sh + +# flag used to ensure only one newaliases command is run +newaliases_run=0 + +# +# all, the default target will update everything +# +all: \\ +EOT +echo -n "." +# +# create all target +# +cnt=0 +for file in $db_files; do + line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases); + while ([ "$line" != "" ]); do + str=$(echo "$line" | cut -d " +" -f 1) + line=$(echo "$line" | cut -d " +" -f 2) + # Strip line back into four pieces: feature, type, opts, name + dbfeat=$(echo "$str" | cut -d ":" -f 1) + dbtype=$(echo "$str" | cut -d ":" -f 2) + dbopts=$(echo "$str" | cut -d ":" -f 3) + dbname=$(echo "$str" | cut -d ":" -f 4) + dbregx=$(echo "$str" | cut -d ":" -f 5) + if [ $(dirname "$dbname") = "/etc/mail" ]; then + dbsname=$(basename "$dbname") + else + dbsname="$dbname" + fi; + if [ "$dbtype" != "-" ]; then + cnt=`expr $cnt + 1`; + if [ $cnt -ne 1 ]; then + echo -e " \\" >> $makefile + fi; + if [ "$dbtype" = "m4" ]; then + echo -ne "\tsendmail.cf" >> $makefile + else + echo -ne "\t$dbsname.db" >> $makefile + fi; + fi; + done; + done; + +#------------------------------------------------------------------------ +cat <<EOT >> $makefile + +# +# clean target, remove sendmail.cf and databases +# +clean: +EOT +echo -n "." +for file in $db_files; do + line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases); + while ([ "$line" != "" ]); do + str=$(echo "$line" | cut -d " +" -f 1) + line=$(echo "$line" | cut -d " +" -f 2) + + # Strip line back into four pieces: feature, type, opts, name + dbfeat=$(echo "$str" | cut -d ":" -f 1) + dbtype=$(echo "$str" | cut -d ":" -f 2) + dbopts=$(echo "$str" | cut -d ":" -f 3) + dbname=$(echo "$str" | cut -d ":" -f 4) + dbregx=$(echo "$str" | cut -d ":" -f 5) + if [ $(dirname "$dbname") = "/etc/mail" ]; then + dbsname=$(basename "$dbname") + else + dbsname="$dbname" + fi; + if [ "$dbtype" != "-" ]; then + if [ "$dbtype" = "m4" ]; then + echo -e "\trm -f sendmail.cf" >> $makefile + else + echo -e "\trm -f $dbsname.db" >> $makefile + fi; + fi; + done; + done; + +#------------------------------------------------------------------------ +cat <<EOT >> $makefile + +# +# Individual targets +# +EOT +echo -n "." +cnt=0 +for file in $db_files; do + line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases); + while ([ "$line" != "" ]); do + str=$(echo "$line" | cut -d " +" -f 1) + line=$(echo "$line" | cut -d " +" -f 2) + + # Strip line back into four pieces: feature, type, opts, name + dbfeat=$(echo "$str" | cut -d ":" -f 1) + dbtype=$(echo "$str" | cut -d ":" -f 2) + dbopts=$(echo "$str" | cut -d ":" -f 3) + dbname=$(echo "$str" | cut -d ":" -f 4) + dbregx=$(echo "$str" | cut -d ":" -f 5) + if [ $(dirname "$dbname") = "/etc/mail" ]; then + dbsname=$(basename "$dbname") + else + dbsname="$dbname" + fi; + if [ "$dbtype" != "-" ]; then + cnt=`expr $cnt + 1`; + if [ $cnt -ne 1 ]; then + echo -e " " >> $makefile + fi; + if [ "$dbtype" = "m4" ]; then + echo -ne "sendmail.cf:\t$dbsname" >> $makefile + echo -e " dialup.m4 provider.m4" >> $makefile + else + echo -e "$dbsname.db:\t$dbsname" >> $makefile + fi; + pad="\t" + sfx="" + if [ "$dbopts" = "-o" ]; then + pad="\t\t" + sfx="; \\" + echo -e "\trm -f $dbname.db" >> $makefile + echo -e "\tif [ -s $dbname ] && \\" >> $makefile + echo -e "\t " \ + "egrep -qe \"^[[:space:]]*[^\$$\#]\"" \ + "$dbname; then \\" \ + >> $makefile + fi; + case "$dbtype" in + btree) + echo -e $pad"makemap -d $dbtype" \ + "$dbname.db < $dbname"$sfx >> $makefile + echo -e $pad"chown root.mail $dbname.db"$sfx \ + >> $makefile + echo -e $pad"chmod 0664 $dbname.db"$sfx \ + >> $makefile + ;; + dbm | btree | hash) + echo -e $pad"makemap $dbtype" \ + "$dbname.db < $dbname"$sfx >> $makefile + echo -e $pad"chown root.mail $dbname.db"$sfx \ + >> $makefile + echo -e $pad"chmod 0664 $dbname.db"$sfx \ + >> $makefile + ;; + text) + true; + ;; + newaliases) + echo -ne $pad"if [ \$(newaliases_run)" \ + >> $makefile + echo -e " -eq 0 ]; then \\" \ + >> $makefile + echo -e $pad"\tnewaliases_run=1; \\" \ + >> $makefile + echo -e $pad"\tnewaliases; \\" >> $makefile + echo -e $pad"\tfi" >> $makefile + echo -e $pad"chown root.mail $dbname.db" \ + >> $makefile + echo -e $pad"chmod 0664 $dbname.db" \ + >> $makefile + ;; + m4) + cat <<EOT >> $makefile + echo "Generating /etc/mail/sendmail.cf ..." + m4 \\ + /usr/share/sendmail/sendmail.cf/m4/cf.m4 \\ + /etc/mail/sendmail.mc \\ + > /etc/mail/sendmail.cf.new \\ + 2> /etc/mail/sendmail.cf.errors + chown root.mail /etc/mail/sendmail.cf.new + chmod 0644 /etc/mail/sendmail.cf.new + if [ ! -s /etc/mail/sendmail.cf.errors ]; then \\ + rm /etc/mail/sendmail.cf.errors; \\ + else \\ + cat /etc/mail/sendmail.cf.errors; \\ + echo ""; \\ + fi; + # Can't tell if the errors are fatal or not ;-{ + mv -f /etc/mail/sendmail.cf.new /etc/mail/sendmail.cf; +EOT + ;; + *) + echo -e $pad"# $dbtype map not done herein" \ + >> $makefile + ;; + esac + if [ "$dbopts" = "-o" ]; then + echo -e "\t\tfi;" >> $makefile + fi; + fi; + done; + done; + +cat <<EOT >> $makefile +# +# Optional targets... Will be touched if they don't exist. +# +EOT +echo -n "." +cnt=0 +for file in $db_files; do + line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases); + while ([ "$line" != "" ]); do + str=$(echo "$line" | cut -d " +" -f 1) + line=$(echo "$line" | cut -d " +" -f 2) + + # Strip line back into four pieces: feature, type, opts, name + dbfeat=$(echo "$str" | cut -d ":" -f 1) + dbtype=$(echo "$str" | cut -d ":" -f 2) + dbopts=$(echo "$str" | cut -d ":" -f 3) + dbname=$(echo "$str" | cut -d ":" -f 4) + dbregx=$(echo "$str" | cut -d ":" -f 5) + if [ $(dirname "$dbname") = "/etc/mail" ]; then + dbsname=$(basename "$dbname") + else + dbsname="$dbname" + fi; + + if [ "$dbopts" = "-o" ]; then + cnt=`expr $cnt + 1`; + if [ $cnt -ne 1 ]; then + echo -e " " >> $makefile + fi; + echo -e "$dbsname:" >>$makefile + echo -e "\ttouch $dbname" >>$makefile + echo -e "\tchmod 0664 $dbname" >>$makefile + echo -e "\tchown root.mail $dbname" >>$makefile + fi; + + done; + done; + +cat <<EOT >> $makefile + +# +# A few special targets that may not exists... +# + +# dialup.m4 - created/updated by /etc/ppp/ip-up.d/sendmail +# used to provide the true, hopefully resolvable +# hostname (from the ISP nameservers) +# +# To activate, put this in /etc/mail/sendmail.mc: +# include(\`/etc/mail/dialup.m4')dnl +dialup.m4: + touch /etc/mail/dialup.m4 + chmod 0664 /etc/mail/dialup.m4 + chown root.mail /etc/mail/dialup.m4 + +# provider.m4 - created by the user, or /etc/ppp/ip-up.d/sendmail +# used to provide ISP information (masquerade_as, etc.) +# If its a link, it will *not* be overwritten +# +# To activate, put this in /etc/mail/sendmail.mc: +# include(\`/etc/mail/provider.m4')dnl +provider.m4: + touch /etc/mail/provider.m4 + chmod 0664 /etc/mail/provider.m4 + chown root.mail /etc/mail/provider.m4 + +EOT +echo -n "." + +echo " done." + +#------------------------------------------------------------------------ +chown root.mail $makefile +chmod 0770 $makefile +mv $makefile /etc/mail/Makefile +exit 0 diff --git a/debian/local/provider b/debian/local/provider new file mode 100644 index 0000000..2a5bfa4 --- /dev/null +++ b/debian/local/provider @@ -0,0 +1,10 @@ +#/etc/mail/peers/provider +# +# Sample provider file for sendmail +# used to provide ISP information (masquerade_as, smarthost, etc.) +# +# This is what I use when connecting to mindspring.com: +# remove the leading dnl to activate +LOCAL_CONFIG +dnldefine(`SMART_HOST', `mail.mindspring.com.')dnl +dnlMASQUERADE_AS(mindspring.com)dnl diff --git a/debian/local/runq b/debian/local/runq new file mode 100644 index 0000000..a62522c --- /dev/null +++ b/debian/local/runq @@ -0,0 +1,27 @@ +#!/bin/sh + +usage="Usage: $0 [OPTION]... +Run the sendmail queue (sendmail -q) + + --help display this help and exit + --version output version information and exit + +Report bugs to submit@bugs.debian.org" + +case $# in + 1 ) + case "z${1}" in + z--help ) + echo "$usage"; exit 0 ;; + z--version ) + echo -n "runq (Debian GNU/Linux) 1.00. "; + echo "Copyright (c) 1997 Johnie Ingram. >= GNU GPL 2." + exit 0 ;; + * ) ;; + esac + ;; + * ) ;; +esac + +COMMAND=/usr/sbin/sendmail +exec $COMMAND -q $* diff --git a/debian/local/runq.1 b/debian/local/runq.1 new file mode 100644 index 0000000..99f97a9 --- /dev/null +++ b/debian/local/runq.1 @@ -0,0 +1,31 @@ +.TH TRUE 1 "1997 July 20" "Debian Distribution" \" -*- nroff -*- +.SH NAME +runq \- run the sendmail queue +.SH SYNOPSIS +.B runq +.br +.B runq +.I sendmail options +.br +.B runq +{ \-\-help, \-\-version } +.SH DESCRIPTION +This +.B runq +command is a wrapper around sendmail which tells it to run the mail +queue in the background. +.SH OPTIONS +When called with exactly one argument, the following options are +handled internally: +.TP +.I "\-\-help" +Print a usage message on standard output and exit successfully. +.TP +.I "\-\-version" +Print version information on standard output then exit successfully. +.P +In other cases, the options are simply passed on to +.B sendmail -q. +.SH "SEE ALSO" +.LP +.BR sendmail (8). diff --git a/debian/local/sendmailconfig b/debian/local/sendmailconfig new file mode 100644 index 0000000..96e6c88 --- /dev/null +++ b/debian/local/sendmailconfig @@ -0,0 +1,650 @@ +#!/bin/sh +# +# Interactively configure Sendmail for Debian +# +# Robert Leslie <rob@mars.org>, +# Rick Nelson <cowboy@debian.org> + +PATH="/usr/sbin:/usr/bin:/sbin:/bin" +FILE="/etc/mail/sendmail.mc" +#FILE="/u/src/sendmail/sendmail.mc" + +set +e +reload="yes" +umask 022 + +#------------------------------------------------------------------------------ + +while [ $# -gt 0 ] +do + case "$1" in + --no-reload) + reload="" + shift + ;; + + *) + echo "Usage: $0 [--no-reload]" >&2 + exit 1 + ;; + esac +done + +#------------------------------------------------------------------------------ + +descrip() { + echo "" + echo "$1" + echo "$1" | sed -e 's/./-/g' + cat - + echo "" +} + +yesno() { + local N="N" Y="Y" + local q="$1" def=$(eval "echo -n \$$2") + + while : + do + echo -n "$q? [$def] " + read REPLY + REPLY=$(echo -n "$REPLY" | sed -e "s/^\ *//" -e "s/^\t*//") + test -n "$REPLY" || REPLY="$def" + + case "$REPLY" in + [Yy]*) + echo yes > /dev/null + eval "$2=\"Y\"" + return 0 + ;; + + [Nn]*) + echo no > /dev/null + eval "$2=\"N\"" + return 1 + ;; + esac + done +} + +input() { + local q="$1" def=$(eval "echo -n \$$2") + + echo -n "$q? [$def] " + read REPLY + REPLY=$(echo "$REPLY" | sed -e 's/^[ ]*//' -e 's/[ ]*$//' | cat) + test -n "$REPLY" || REPLY="$def" + + if [ NONE = "$3" ]; then + test NONE != "$REPLY" || REPLY="" + fi + + eval "$2=\"$REPLY\"" +} + +testconfig() { + CONFIG=$(grep "$1" $FILE 2>/dev/null) +} + +testwrap() { + WRAP=$(grep "^[^#:]*sendmail[^:]*[:]" /etc/hosts.allow 2>/dev/null) +} + +updatewrap() { + echo "Updating /etc/hosts.allow, adding \"sendmail: all\"." + echo "sendmail: all" | cat - /etc/hosts.allow >/etc/hosts.allow.new + mv -f /etc/hosts.allow.new /etc/hosts.allow + if [ -e /etc/init.d/netbase ]; then + /etc/init.d/netbase reload >/dev/null + else + /etc/init.d/inetd reload >/dev/null + fi +} + +makecf() { + echo "Updating sendmail databases ..." + /usr/share/sendmail/updatedb + + testwrap + if [ "$WRAP" = "" ]; then + updatewrap + fi + + if [ "$reload" ] && \ + yesno "Reload the running sendmail now with the new configuration" Y + then + echo "Reloading sendmail ..." + /etc/init.d/sendmail reload >/dev/null + fi +} + +#------------------------------------------------------------------------------ + +if [ -f $FILE ]; then + if yesno "Configure sendmail with the existing /etc/mail/sendmail.mc" Y + then + makecf + exit 0 + fi +fi + +############################################################################### + +exec 3>$FILE.new +trap "rm -f $FILE.new" 0 + +############################################################################### + +descrip "Sendmail Configuration" <<-EOT +By answering the following questions, you can configure sendmail for your +system. Default values are determined either by your existing configuration +or from common usage. +EOT + +echo -n "Press [ENTER] " +read REPLY + +cat /usr/share/sendmail/sendmail.cf/cf/debproto.mc >&3 +echo "LOCAL_CONFIG" >&3 + +############################################################################### + +descrip "Mail Name" <<EOT +Your \`mail name' is the hostname portion of the address to be shown on +outgoing news and mail messages (following the username and @ sign). This +name will be used by other programs besides sendmail; it should be the single, +full domain name (FQDN) from which mail will appear to originate. +EOT + +mailname=$(cat /etc/mailname 2>/dev/null || hostname --fqdn) +input "Mail name" mailname + +echo "$mailname" >/etc/mailname + +############################################################################### + +#descrip "Null Client" <<EOT +#A special configuration known as the "null client" can be created for this +#host if all mail should be forwarded to a central hub via a local SMTP-based +#network. This may be a suitable configuration if you want to forward all of +#your mail to your local Internet service provider (ISP) for delivery. +# +#To enable this option, give the name of the host to which all mail should be +#forwarded. Otherwise leave the option empty or answer \`NONE' to disable it. +#EOT + +nullclient="" +! testconfig "FEATURE(nullclient" || + nullclient=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *\([^)]*\).*/\1/') +# +#input "Null client forward host" nullclient NONE +# +#test -z "$nullclient" || echo "FEATURE(nullclient, $nullclient)dnl" >&3 + +if [ -n "$nullclient" ]; then + echo " " + echo " *** IMPORTANT *** " + echo " " + echo "You are using a nullclient setup. This is ill advised as it" + echo "makes your machine an open relay: If you ever connect to the" + echo "internet, anyone can forge mail and send it through your machine" + echo "to anyone else on the internet! - not a pretty picture." + echo " " + echo "I will convert this into a Smart Host config for you. A Smart Host" + echo "setup is a superset of nullclient - you lose nothing, but gain local" + echo "delivery without kluges, and, of course you're no longer an open relay" + echo " " + echo "You will need to accept your nullclient hostname below, when asked" + echo "for a smart host." + echo " " + echo "Press <Enter> to continue" + read yn + fi + +############################################################################### +descrip "Smart Host" <<EOT +A "Smart Host" is one that can deliver mail to external machines. By using +a "Smart Host", we don't need DNS, or good connectivity ourselves. This is +most likely what you want if you have a dialup link, or sit behind a firewall. + +To enable this option, give the name of the host to which all non-local mail +should be forwarded. Otherwise leave the option empty. +EOT + +smarthost="" +if [ -n "$nullclient" ]; then + smarthost="$nullclient" + fi +! testconfig "define(\`SMART_HOST'" || + smarthost=$(echo -n "$CONFIG" | sed -e 's/[^:]*:*\([^)]*\).*/\1/') +input "Smart Host:" smarthost "" + +test -z "$smarthost" || echo "define(\`SMART_HOST', \`$smarthost')dnl" >&3 +if [ -n "$nullclient" -a ! -z "$smarthost" ]; then + echo "undefine(\`ALIAS_FILE')dnl" >&3 + echo "define(\`confFORWARD_PATH', \`')dnl" >&3 + echo "define(\`MAIL_HUB', \`$smarthost')dnl" >&3 + echo "MASQUERADE_AS(\`$smarthost')dnl" >&3 + echo "FEATURE(\`allmasquerade')dnl" >&3 + echo "FEATURE(\`masquerade_envelope')dnl" >&3 + fi +############################################################################### + +descrip "Address Canonification" <<EOT +Usually sendmail will canonify all addresses by consulting a name server and +resolving hosts to their fully qualified domain name (FQDN). Under special +circumstances you may want to disable this feature, for example if this +machine acts only as a mail gateway. +EOT + +test -z "$nullclient" || cat <<EOT +Since this host will be configured as a null client, this option controls +whether addresses will be qualified with \`$mailname' when +sent to the central hub via SMTP. Disabling this feature may cause mail to +appear to come from (and be qualified by the domain for) the hub machine +rather than this host. + +EOT + +nocanonify="N" +! testconfig "FEATURE(nocanonify)" || nocanonify="Y" + +! yesno "Disable address canonification" nocanonify || + echo "FEATURE(nocanonify)dnl" >&3 + +############################################################################### + +if [ -z "$nullclient" ] +then + +############################################################################### + +descrip "SMTP Mailer" <<EOT +If you plan to exchange mail with other computers, you should enable the +SMTP mailer. Even if you don't plan to exchange mail with other computers, +it is still a good idea to enable this so local programs can use it. +EOT + +smtp="Y" +if [ -f $FILE ] +then + testconfig "MAILER(smtp)" || smtp="N" +fi + +yesno "Enable the SMTP mailer" smtp || true + +############################################################################### + +descrip "Masquerade Envelope" <<EOT +If you want mail envelopes (as well as mail headers) to appear to come from +\`$mailname', you can enable this option. +EOT + +masqenvelope="Y" +if [ -f $FILE ] +then + testconfig "FEATURE(masquerade_envelope)" || masqenvelope="N" +fi + +! yesno "Masquerade envelopes" masqenvelope || + echo "FEATURE(masquerade_envelope)dnl" >&3 + +############################################################################### + +descrip "All Masquerade" <<EOT +If enabled, this feature will cause recipient addresses to also appear to come +from \`$mailname'. Normally they get the local hostname. +Although this may be right for ordinary users, it can break local aliases. For +example, if you send to "localalias", the originating sendmail will find that +alias and send to all members, but send the message with +"To: localalias@$mailname". Since that alias likely does +not exist, replies will fail. Use this feature ONLY if you can guarantee that +the ENTIRE namespace of \`$mailname' supersets all the +local entries. If in doubt, it is safe to leave this option disabled. +EOT + +allmasquerade="N" +! testconfig "FEATURE(allmasquerade)" || allmasquerade="Y" + +! yesno "All masquerade" allmasquerade || + echo "FEATURE(allmasquerade)dnl" >&3 + +############################################################################### + +descrip "Always Add Domain" <<EOT +If enabled, the local host domain is included even on locally delivered mail. +Normally it is not added unless it is already present. +EOT + +alwaysdomain="N" +! testconfig "FEATURE(always_add_domain)" || alwaysdomain="Y" + +! yesno "Always add domain" alwaysdomain || + echo "FEATURE(always_add_domain)dnl" >&3 + +############################################################################### + +descrip "Mail Acceptance" <<EOT +Sendmail is usually configured to accept mail for your mail name +($mailname). However, under special circumstances you +may not wish sendmail to do this, particularly if (and disabling this option +generally requires that) mail for \`$mailname' is MXed +to another host. If in doubt, it is safe to leave this option enabled. +EOT + +acceptmailname="Y" +if [ -f $FILE ] +then + testconfig "^Cw.*$mailname" || acceptmailname="N" +fi + +yesno "Accept mail for \`$mailname'" acceptmailname || true +test "N" = "$acceptmailname" || echo "Cw$mailname" >&3 + +############################################################################### + +descrip "Alternate Names" <<EOT +In addition to the canonical mail name \`$mailname', you can +add any number of additional alternate names to recognize for receiving mail. +If other hosts are MXed to you for local mail, this is where you should list +them. This list is saved into the file /etc/mail/sendmail.cw so it can be +changed later as needed. + +To answer this question, separate each alternate name with a space, or answer +\`NONE' to eliminate all alternate names. +EOT + +if [ -f /etc/mail/local-host-names ]; then + cw_file="/etc/mail/local-host-names" +else + cw_file="/etc/mail/sendmail.cw" + fi +altnames=$(cat "$cw_file" 2>/dev/null | tr -s '\n \t' ' ' | + sed -e 's/^ *//' -e 's/ *$//') +input "Alternate names" altnames NONE + +if [ -n "$altnames" ] +then + echo "$altnames" | tr -s ' \t' '\n' >$cw_file +else + cat /dev/null >$cw_file +fi + +echo "FEATURE(use_cw_file)dnl" >&3 + +############################################################################### + +descrip "Trusted Users" <<EOT +Sendmail allows a special group of users to set their envelope "From" address +using the -f option without generating a warning message. If you have +software such as Majordomo installed, you will want to include the usernames +from such software here. Note that "root", "daemon", and "uucp" are included +automatically and do not need to be specified. This list is saved into the +file /etc/mail/sendmail.ct so it can be changed later as needed. + +To answer this question, separate each username with a space, or answer +\`NONE' to eliminate all usernames. +EOT + +if [ -f /etc/mail/trusted-users ]; then + ct_file="/etc/mail/trusted-users" +else + ct_file="/etc/mail/sendmail.ct" + fi + +trusted=$(cat "$ct_file" 2>/dev/null | tr -s '\n \t' ' ' | + sed -e 's/^ *//' -e 's/ *$//') +input "Trusted users" trusted NONE + +if [ -n "$trusted" ] +then + echo "$trusted" | tr -s ' \t' '\n' >$ct_file +else + cat /dev/null >$ct_file +fi + +echo "FEATURE(use_ct_file)dnl" >&3 + +############################################################################### + +descrip "Redirect Feature" <<EOT +If enabled, this feature will allow you to alias old names to +<new-address>.REDIRECT, causing sendmail to return mail to the sender with +an error but indicating the recipient's new address. +EOT + +redirect="N" +! testconfig "FEATURE(redirect)" || redirect="Y" + +! yesno "Enable redirect option" redirect || echo "FEATURE(redirect)dnl" >&3 + +############################################################################### + +descrip "UUCP Addresses" <<EOT +Sendmail can be configured to be smart about UUCP addresses, or it can do +nothing special with UUCP addresses at all. If you care about UUCP, you will +need to do some additional configuration, perhaps outside of this script. + +*** NOTE *** If you use a smart host, it is important that you say "Yes" +here to prevent a multi-level relay hole - unless you know for *SURE* that +your smart-host does not deal with UUCP addresses. +EOT + +uucp="N" +if [ -f $FILE ] +then + testconfig "FEATURE(nouucp)" || uucp="Y" +fi + +yesno "Enable UUCP addressing" uucp || echo "FEATURE(nouucp)dnl" >&3 + +############################################################################### + +descrip "Sticky Host" <<EOT +If enabled, mail sent to \`user@$mailname' is marked as +"sticky" -- that is, the local addresses aren't matched against UDB and don't +go through ruleset 5. This is used if you want a setup where \`user' is not +necessarily the same as \`user@$mailname', e.g., to make +a distinct domain-wide namespace. If in doubt, it is safe to leave this +option disabled. +EOT + +sticky="N" +! testconfig "FEATURE(stickyhost)" || sticky="Y" + +! yesno "Enable sticky host option" sticky || echo "FEATURE(stickyhost)dnl" >&3 + +############################################################################### + +descrip "DNS" <<EOT +If you are directly connected to the Internet and have access to a domain +name server, you should enable this option. +EOT + +dns="Y" +! testconfig "FEATURE(nodns)" || dns="N" + +yesno "Enable DNS" dns || echo "FEATURE(nodns)dnl" >&3 + +############################################################################### + +if [ Y = "$dns" ] +then + +############################################################################### + +descrip "Best MX is Local" <<EOT +If enabled, this option will cause sendmail to accept mail as though locally +addressed for any host that lists this machine as the best possible MX record. +This generates additional DNS traffic, but should be OK for low-to-medium +traffic hosts. N.B.: This feature is fundamentally incompatible with wildcard +MX records. If you have a wildcard MX record that matches your domain, you +cannot use this feature. +EOT + +bestmxlocal="N" +! testconfig "FEATURE(bestmx_is_local)" || bestmxlocal="Y" + +! yesno "Assume best MX is local" bestmxlocal || + echo "FEATURE(bestmx_is_local)dnl" >&3 + +############################################################################### + +fi # finished DNS configuration + +############################################################################### + +descrip "Mailertable" <<EOT +If enabled, this option causes sendmail to read mail routing rules from +the text file /etc/mail/mailertable. This is needed for unusual mailers like +ifmail and fax programs. +More information is in /usr/share/doc/sendmail/op.txt.gz. +EOT + +mailertable="N" +! testconfig "FEATURE(mailertable" || mailertable="Y" + +! yesno "Enable the mailertable feature" mailertable || + echo "FEATURE(mailertable)dnl" >&3 + +############################################################################### + +descrip "Sendmail Restricted Shell" <<EOT +If enabled, this option causes sendmail to use the sendmail restricted shell +program (smrsh) instead of /bin/sh for mailing to programs. This improves your +ability to control what gets run via email; only those programs which appear +in a special directory can be run. If you enable this option, please carefully +read the smrsh(8) man page for further information. +EOT + +smrsh="N" +! testconfig "FEATURE(smrsh" || smrsh="Y" + +! yesno "Use the Sendmail Restricted Shell (smrsh)" smrsh || + echo "FEATURE(smrsh, \`/usr/lib/sm.bin/smrsh')dnl" >&3 + +############################################################################### + +descrip "Mailer Name" <<EOT +You can change the name used for internally generated outgoing messages. +Usually this is \`MAILER-DAEMON' but it would not be unreasonable to change +it to something such as \`postmaster'. +EOT + +daemon="MAILER-DAEMON" +! testconfig "confMAILER_NAME" || + daemon=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/') + +input "Mailer name" daemon + +test "MAILER-DAEMON" = "$daemon" || + echo "define(\`confMAILER_NAME', \`$daemon')dnl" >&3 + +############################################################################### + +descrip "Me Too" <<EOT +Sendmail normally excludes the sender address from group expansion. Enabling +this option will cause the sender to be included. +EOT + +metoo="N" +! testconfig "confME_TOO.*True" || metoo="Y" + +! yesno "Enable me too option" metoo || + echo "define(\`confME_TOO', True)dnl" >&3 + +############################################################################### + +descrip "Message Timeouts" <<EOT +Sendmail will issue a warning message to the sender if it can't deliver a +message within a reasonable amount of time. It will also send a failure +notification and give up trying to deliver the message if it can't deliver it +after an unreasonable amount of time. + +You can configure the message timeouts after which warning and failure +notifications are sent. Sendmail's defaults are 4 hours and 5 days (4h/5d), +respectively, but many people feel warnings after only 4 hours are premature. +EOT + +qw="4h" +! testconfig "confTO_QUEUEWARN" || + qw=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/') + +qr="5d" +! testconfig "confTO_QUEUERETURN" || + qr=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/') + +timeouts="$qw/$qr" + +input "Message timeouts" timeouts + +qw=$(expr "$timeouts" : '\([^/]*\)/') +qr=$(expr "$timeouts" : '[^/]*/\(.*\)') + +test "4h" = "$qw" || echo "define(\`confTO_QUEUEWARN', \`$qw')dnl" >&3 +test "5d" = "$qr" || echo "define(\`confTO_QUEUERETURN', \`$qr')dnl" >&3 + +############################################################################### +echo "MAILER_DEFINITIONS" >&3 +echo "MAILER(local)dnl" >&3 + +test "N" = "$smtp" || echo "MAILER(smtp)dnl" >&3 + +############################################################################### + +if [ -e /etc/ifmail/config ] && \ + [ -e /usr/share/sendmail/sendmail.cf/mailer/ifmail.m4 ]; +then + echo "MAILER(ifmail)dnl" >&3 +fi + +############################################################################### + +fi # finished non-"null client" configuration + + +############################################################################### + +echo "" >&3 +echo "LOCAL_CONFIG" >&3 +if [ -z $nullclient ]; then + echo "MASQUERADE_AS($mailname)dnl" >&3 + fi + +if [ -f $FILE ]; then + sed -n -e '/^## Custom/,$p' $FILE >&3 +else + echo "## Custom configurations below (will be preserved)" >&3 +fi + +descrip "Configuration Complete" <<EOT +Advanced configuration, such as alternate mailers, the use of mailertables, +Bitnet domains, and UUCP domains can be accomplished by manually editing the +/etc/mail/sendmail.mc configuration file and rerunning +\`$0' to generate the appropriate /etc/mail/sendmail.cf +file. (Local changes made at the end of /etc/mail/sendmail.mc will be +preserved by \`$0'.) + +The m4 library files for sendmail configuration are kept in the +/usr/share/sendmail/sendmail.cf directory. You may wish to review the +documentation in /usr/share/doc/sendmail to assist in further customization. + +You may wish to customize your alias database; see the aliases(5) man page +for information on the format and use of the /etc/aliases file. +EOT + +############################################################################### + +exec 3>&- + +if [ -f $FILE ] +then + echo "Saving old /etc/mail/sendmail.mc as /etc/mail/sendmail.mc.old ..." + mv -f $FILE $FILE.old +fi + +mv -f $FILE.new $FILE +trap 0 + +makecf +exit 0 diff --git a/debian/local/sendmailconfig.8 b/debian/local/sendmailconfig.8 new file mode 100644 index 0000000..b2cd52c --- /dev/null +++ b/debian/local/sendmailconfig.8 @@ -0,0 +1,41 @@ +.TH SENDMAILCONFIG 8 21-Jan-1997 +.SH NAME +sendmailconfig \- configure sendmail for Debian systems +.SH SYNOPSIS +sendmailconfig [--no-reload] +.SH DESCRIPTION +.B sendmailconfig +is used to simplify the configuration of sendmail(8) for use on Debian +systems. +.PP +In the simplest case, you may run this program to (re)configure sendmail for +your Debian system at any time. It will modify the file /etc/mail/sendmail.mc +in order to create a working sendmail configuration which will be written to +the file /etc/mail/sendmail.cf. +.PP +For advanced configurations, you can modify the sendmail.mc file before +generating sendmail.cf. Future invokations of +.B sendmailconfig +will preserve these changes provided they are made at the end of the file. +.PP +Normally +.B sendmailconfig +will ask if you want to reload sendmail after making changes to its +configuration. The --no-reload option will avoid this question. +.SH FILES +.TP +/etc/mail/sendmail.mc +sendmail m4 input to generate sendmail.cf +.TP +/etc/mail/sendmail.cf +actual sendmail configuration file +.TP +/etc/mail/sendmail.cw +names for which we will accept mail in the standard configuration +.TP +/etc/mail/sendmail.ct +names of trusted users in the standard configuration +.SH SEE ALSO +sendmail(8) +.SH AUTHOR +Robert Leslie <rob@mars.org> diff --git a/debian/local/sensible-mda.8 b/debian/local/sensible-mda.8 new file mode 100644 index 0000000..bdb1186 --- /dev/null +++ b/debian/local/sensible-mda.8 @@ -0,0 +1,80 @@ +.\" Copyright (c) 1998, 1999 Richard A Nelson <cowboy@debian.org> +.\" All rights reserved. +.\" +.\" You may distribute under the terms of the GNU General Public +.\" License +.\" +.\" $Id: sendmailconfig.8,v 2.0 1999/10/21 11:30:00 cowboy Exp $ +.\" +.TH SENDMAILCONFIG 8 "October 21 1999" +.UC 4 +.SH NAME +sensible\-mda \- a generic sendmail local MDA for Debian systems +.SH SYNOPSIS +.B sensible\-mda +.IR from +.IR to +.IR detail +.IR client\-addr +.br +.SH DESCRIPTION +.B sensible\-mda +is used to simplify the installation and configuration of +.BR sendmail (8) +for use on Debian systems. With sensible\-mda, sendmail can support +a plethora of MDAs (procmail, deliver, etc.) without having pick any +.I one +of them as required. +.LP +.SH FUNCTION +.B sensible\-mda +is called by sendmail as a local mailer when the following exists in +sendmail.mc: +.br +.I define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl +.LP +sensible-mda +will look for the following MDAs (in this order), and pass the mail +on to the first SUID MDA found: +.BR procmail (1), +.BR deliver (8) +.LP +.SH OPTIONS +Available command line options are the following: +.TP +.I from +The sender of this email +(sendmail $g variable) +.TP +.I to +The recipient of this email +(sendmail $u variable) +.TP +.I detail +The detail portion of the recipient userid +(sendmail $h variable) +\- ie: +.br +cowboy\+\fIsendmail\fP@debian.org +.TP +.I client\-addr +TCP/IP address of the sender +(sendmail ${client_addr} variable) +Not used (for the nonce) +.SH FILES +.TP +.I /etc/mail/sendmail.mc +sendmail m4 input to generate sendmail.cf +.TP +.I /etc/mail/sendmail.cf +actual sendmail configuration file (treated as a binary file) +.SH "SEE ALSO" +.BR sendmail (8), +.BR procmail (1), +.BR deliver (8) +.br +.SH BUGS +None known so far. +.SH AUTHOR +Richard Nelson <cowboy@debian.org> +.SH HISTORY diff --git a/debian/local/sensible-mda.c b/debian/local/sensible-mda.c new file mode 100644 index 0000000..d42b0cb --- /dev/null +++ b/debian/local/sensible-mda.c @@ -0,0 +1,124 @@ +/* + * sensible-mda.c + * Copyright (c) 1998, Johnie Ingram. + * Copyright (c) 1998, Richard Nelson <cowboy@debian.org>. + * Time-stamp: <1998/08/13 10:00:00 cowboy> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include <stdio.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <unistd.h> +#include <pwd.h> +#include <sys/types.h> + +// TODO: declare -x TCPREMOTEIP="$3" + +#define PROCMAIL "/usr/bin/procmail" +#define DELIVER "/usr/bin/deliver" +#define PROCMAILRCS "/etc/procmailrcs/" + +static void help(void); +static unsigned char program[64]; + +static struct stat MDA_stat; +static struct stat procmailrc_stat; +static int done = 1; +static struct passwd* passwd_entry; + +int +main (int argc, char *argv[]) +{ + + char *procmailrc; + + /*----------------------------------------------------------------*/ + /* Parse input to determine to whom to speak and who we are... */ + /* Must have at least three parameters unless first is ?,-?,/?. */ + /*----------------------------------------------------------------*/ + (void) strcpy(program, argv[0]); + if (argc >= 2 && + (strcmp(argv[1],"?") == 0 || strcmp(argv[1],"-?") == 0 || + strcmp(argv[1],"/?") == 0 || strcmp(argv[1],"\\?") == 0 || + strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"--help") == 0)) { + help(); + return (0); + } + if (argc < 3) { + (void)printf("%s - Required parameters elided.\n",program); + help(); + return (0); + } + + + if (!stat(PROCMAIL, &MDA_stat)) { + if (MDA_stat.st_mode & S_ISUID) { + procmailrc=malloc(strlen(PROCMAILRCS)+strlen(argv[2])+1); + sprintf(procmailrc,"%s%s",PROCMAILRCS,argv[2]); + passwd_entry=getpwnam(argv[2]); + /* + * If argv[2] is a valid user & + * /etc/procmailrcs/argv[2] exists & is owned by argv[2] + */ + if (passwd_entry && + !stat(procmailrc, &procmailrc_stat) && + procmailrc_stat.st_uid==passwd_entry->pw_uid) { + done = 0; + execl (PROCMAIL, PROCMAIL, "-t", + "-f", argv[1], "-m", procmailrc, "-a", argv[3], NULL); + } else { + done = 0; + execl (PROCMAIL, PROCMAIL, "-t", + "-f", argv[1], "-a", argv[3], "-d", argv[2], NULL); + } + } + else + fprintf(stderr, "Ack!?! %s is not setuid!\n", PROCMAIL); + } + + if (done && !stat(DELIVER, &MDA_stat)) { + if (MDA_stat.st_mode & S_ISUID) { + done = 0; + execl (DELIVER, DELIVER, "-r", argv[1], argv[2], NULL); + } + else + fprintf(stderr, "Ack!?! %s is not setuid!\n", DELIVER); + } + + fprintf (stderr, "Huh? Neither %s nor %s was found (or was suid)!\n", + PROCMAIL, DELIVER); + + return (75); +} + + +/*-------------------------------------------------------------------*/ +/* Help... */ +/*-------------------------------------------------------------------*/ +static void help(void) +{ + (void)printf("\n%s - Help information.\n" + "%s: sendmail MTA->MDA wrapper, supporting these MDAs:\n" + "\tprocmail, deliver\n" + "\n" + "Syntax: %s from to\n" + ,program, program, program + ); + return; +} + diff --git a/debian/local/service.switch b/debian/local/service.switch new file mode 100644 index 0000000..2a64668 --- /dev/null +++ b/debian/local/service.switch @@ -0,0 +1,7 @@ +# /etc/mail/nsswitch.conf +# +# This is the format that sendmail expects (no colon after the service) +# +passwd files +hosts files dns +aliases files diff --git a/debian/local/service.switch-nodns b/debian/local/service.switch-nodns new file mode 100644 index 0000000..583b238 --- /dev/null +++ b/debian/local/service.switch-nodns @@ -0,0 +1,8 @@ +# /etc/mail/nsswitch.conf +# +# This is the format that sendmail expects (no colon after the service) +# This file will prevent dns usage +# +passwd files +hosts files +aliases files diff --git a/debian/local/site.config.m4.in b/debian/local/site.config.m4.in new file mode 100644 index 0000000..b2eab3e --- /dev/null +++ b/debian/local/site.config.m4.in @@ -0,0 +1,59 @@ +# +# Debian site config file for building sendmail +# +# src +APPENDDEF(`confENVDEF', `-DTCPWRAPPERS=1')dnl +APPENDDEF(`confENVDEF', `-D_PATH_VARTMP=\"/var/lib/sendmail/\"')dnl +APPENDDEF(`confENVDEF', `-DPICKY_HELO_CHECK')dnl +APPENDDEF(`confENVDEF', `-D_PATH_SENDMAILCF=\"/etc/mail/sendmail.cf\"')dnl +# src - mime header size (pine, etc. exploit) +APPENDDEF(`confENVDEF', `-D_FFR_MAX_MIME_HEADER_LENGTH=1')dnl +# src - header length DOS +APPENDDEF(`confENVDEF', `-D_FFR_MAX_HEADERS_LENGTH=1') +# src - For Future Reference... undocumented niceties +dnl APPENDDEF(`confENVDEF', `-include ../../debian/el33t.h')dnl +APPENDDEF(`confENVDEF', `-D_FFR_DSN_RRT_OPTION=1')dnl +APPENDDEF(`confENVDEF', `-D_FFR_PIDFILE_OPTION=1')dnl +APPENDDEF(`confENVDEF', `-D_FFR_DEADLETTERDROP_OPTION=1')dnl +# +# smrsh +APPENDDEF(`confENVDEF', `-DCMDDIR=\"/usr/lib/sm.bin\"')dnl +APPENDDEF(`confENVDEF', `-DPATH=\"/usr/bin:/bin\"')dnl +# +# rmail +APPENDDEF(`confENVDEF', `-D_PATH_SENDMAIL=\"/usr/sbin/sendmail\"')dnl +# +# compilation +define(`confCC', `gcc')dnl +define(`confOPTIMIZE', `-O0 -g -Wall')dnl +# +# Database maps, based upon presence of NISPLUS from autoconf +define(`ac_cv_header_rpcsvc_nis_h', `@ac_cv_header_rpcsvc_nis_h@')dnl +ifelse(ac_cv_header_rpcsvc_nis_h, `yes', + `define(`confMAPDEF', `-DNEWDB -DMAP_REGEX -DNIS -DNISPLUS')', + `define(`confMAPDEF', `-DNEWDB -DMAP_REGEX -DNIS')' + )dnl +# +# paths, owners, and modes +define(`confEBINDIR', `/usr/lib/sm.bin')dnl #mail.local,smrsh,etc. +define(`confHDIR', `/usr/lib')dnl +define(`confHFDIR', `/usr/share/sendmail')dnl +define(`confMANROOT', `/usr/share/man/man')dnl +define(`confMANOWN', `root')dnl +define(`confMANGRP', `root')dnl +define(`confMANMODE', `0744')dnl +define(`confMBINDIR', `/usr/sbin')dnl #MTA dir +define(`confSBINDIR', `/usr/sbin')dnl #root dir +define(`confSBINOWN', `root')dnl +define(`confSBINGRP', `mail')dnl +define(`confSBINMODE', `07555')dnl +define(`confSTDIR', `/var/lib/sendmail')dnl +define(`confUBINDIR', `/usr/bin')dnl #usr dir +define(`confUBINOWN', `root')dnl +define(`confUBINGRP', `mail')dnl +define(`confUBINMODE', `0755')dnl +# +# don't install man pages +define(`confNO_MAN_INSTALL', `true')dnl +# +# flags diff --git a/debian/local/updatedb b/debian/local/updatedb new file mode 100644 index 0000000..389af5a --- /dev/null +++ b/debian/local/updatedb @@ -0,0 +1,481 @@ +#!/bin/sh -e +# +# Update Sendmail databases for Debian +# +# Copyright (c) 1999, Richard Nelson <cowboy@debian.org>. +# Time-stamp: <1999/05/19 10:00:00 cowboy> +# +# Notes (to all): +# * assumes makemap dbtype /etc/mail/database < /etc/mail/database +# +# Notes (to self): +# * changes made herein *must* be reflected in parsemc,updatedb,debian.m4 +# * multiple db options not supported +# * userdb can also have multiple databases and then a forward! +# * need sendmail stop/start +# +set -e + +# List of db features +db_features="access_db bitdomain domaintable genericstable \ + mailertable uucpdomain virtusertable use_ct_file use_cw_file"; +export db_features; +# kluge for userdb, cr,ct,and cw files support +db_files="confCR_FILE confUSERDB_SPEC ALIAS_FILE"; +db_files="sendmail.mc $db_features $db_files"; +export db_files; + +# control amount of output +verbosity=0; + +# flag used to ensure only one newaliases command is run +newaliases_run=0; + +# flag used to indicate a dataset has been moved, may need another update +changed=0; + +# max return code +max_rc=0; +missing_rqd=0; +missing_opt=0; +m4_errors=0; + +#------------------------------------------------------------- +# Initial update of sendmail.mc/databases +#------------------------------------------------------------- +initial () { + if [ $verbosity -gt 1 ]; then + echo "initial()"; + fi; + + # Make sure not using text mailertable (it doesn't work) + if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then + sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \ + /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new + chown root.mail /etc/mail/sendmail.mc.new + chmod 0664 /etc/mail/sendmail.mc.new + mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc + fi; + + # Make sure the data file is current using the version of + # parsemc that corresponds to this version of updatedb + $(dirname $0)/parsemc || true + } + +#------------------------------------------------------------- +# Handle found databases +#------------------------------------------------------------- +is_found () { + if [ $verbosity -gt 1 ]; then + echo "is_found()"; + fi; + process=1; + + case "$dbfeat" in + ALIAS_FILE) + if [ ! -f /etc/aliases -a -f /etc/mail/aliases ]; then + echo "Linking /etc/aliases to /etc/mail/aliases" + ln -sf mail/aliases /etc/aliases + fi + ;; + esac + } + +#------------------------------------------------------------- +# Handle missing databases: +# moving /etc/xxx to /etc/mail/xxx +# rename /etc/mail/xxx to /etc/mail/yyy +#------------------------------------------------------------- +is_not_found () { + if [ $verbosity -gt 1 ]; then + echo "is_not_found()"; + fi; + process=0; + + case "$dbfeat" in + use_cw_file) + if [ -f /etc/local-host-names ]; then + if [ ! -L /etc/local-host-names ]; then + echo "Moving /etc/local-host-names to /etc/mail/." + mv /etc/local-host-names /etc/mail/ + process=1; + else + echo "/etc/local-host-names is a link," \ + "move it to /etc/mail/local-host-names" + missing_rqd=`expr $missing_rqd + 1`; + fi; + elif [ -f /etc/mail/sendmail.cw ]; then + echo "Renaming sendmail.cw to local-host-names." + mv /etc/mail/sendmail.cw /etc/mail/local-host-names + process=1; + elif [ -f /etc/sendmail.cw ]; then + if [ ! -L /etc/sendmail.cw ]; then + echo "Moving /etc/sendmail.cw to /etc/mail/" + mv /etc/sendmail.cw /etc/mail/local-host-names + process=1; + else + echo "/etc/sendmail.cw is a link," \ + "move it to /etc/mail/local-host-names" + missing_rqd=`expr $missing_rqd + 1`; + fi + elif [ "$dbopts" = "-o" ]; then + echo "Informational: $dbfeat source" \ + "file not found: $dbname" + missing_opt=`expr $missing_opt + 1`; + else + echo "Error: $dbfeat source file not found: $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi + ;; + use_ct_file) + if [ -f /etc/trusted-users ]; then + if [ ! -L /etc/trusted-users ]; then + echo "Moving /etc/trusted-users to /etc/mail/." + mv /etc/trusted-users /etc/mail/ + process=1; + else + echo "/etc/trusted-users is a link," \ + "move it to /etc/mail/trusted-users" + missing_rqd=`expr $missing_rqd + 1`; + fi; + elif [ -f /etc/mail/sendmail.ct ]; then + echo "Renaming sendmail.ct to trusted-users." + mv /etc/mail/sendmail.ct /etc/mail/trusted-users + process=1; + elif [ -f /etc/sendmail.ct ]; then + if [ ! -L /etc/sendmail.ct ]; then + echo "Moving /etc/sendmail.ct to /etc/mail/" + mv /etc/sendmail.ct /etc/mail/trusted-users + process=1; + else + echo "/etc/sendmail.ct is a link," \ + "move it to /etc/mail/trusted-users" + missing_rqd=`expr $missing_rqd + 1`; + fi + elif [ "$dbopts" = "-o" ]; then + echo "Informational: $dbfeat source" \ + "file not found: $dbname" + missing_opt=`expr $missing_opt + 1`; + else + echo "Error: $dbfeat source file not found: $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi + ;; + ALIAS_FILE) + if [ -f /etc/$dbsname ]; then + if [ ! -L /etc/$dbsname ]; then + echo "Moving /etc/aliases to /etc/mail/aliases " + echo "and linking /etc/aliases to /etc/mail/aliases" + echo "This preserves current function/abilities" + mv -f /etc/$dbsname /etc/mail/ + ln -sf mail/aliases /etc/aliases + #ln -sf /etc/mail/aliases /etc/aliases + if [ -f /etc/$dbsname.db ]; then + mv -f /etc/$dbsname.db /etc/mail/ + fi + if [ -f /etc/$dbsname.pag ]; then + mv -f /etc/$dbsname.pag /etc/mail/ + fi + if [ -f /etc/$dbsname.dir ]; then + mv -f /etc/$dbsname.dir /etc/mail/ + fi + process=1; + changed=1; + else + echo "/etc/$dbsname is a link, move it to $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi; + elif [ "$dbopts" = "-o" ]; then + echo "Informational: $dbfeat source" \ + "file not found: $dbname" + missing_opt=`expr $missing_opt + 1`; + else + echo "Error: $dbfeat source file not found: $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi; + ;; + m4) + if [ -f /etc/$dbsname ]; then + if [ ! -L /etc/$dbsname ]; then + echo "Moving /etc/sendmail.{mc,cf} to /etc/mail/"; + mv -f /etc/sendmail.mc /etc/mail/ + if [ -f /etc/sendmail.cf ]; then + mv -f /etc/sendmail.cf /etc/mail/ + fi + process=1; + else + echo "/etc/$dbsname is a link, move it to $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi; + elif [ "$dbopts" = "-o" ]; then + echo "Informational: $dbfeat source" \ + "file not found: $dbname" + missing_opt=`expr $missing_opt + 1`; + else + echo "Error: $dbfeat source file not found: $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi; + ;; + *) + if [ -f /etc/$dbsname ]; then + if [ ! -L /etc/$dbsname ]; then + echo "Moving /etc/$dbsname{,.*} to $dbname"; + mv -f /etc/$dbsname /etc/mail/ + if [ -f /etc/$dbsname.db ]; then + mv -f /etc/$dbsname.db /etc/mail/ + fi + if [ -f /etc/$dbsname.pag ]; then + mv -f /etc/$dbsname.pag /etc/mail/ + fi + if [ -f /etc/$dbsname.dir ]; then + mv -f /etc/$dbsname.dir /etc/mail/ + fi + process=1; + else + echo "/etc/$dbsname is a link, move it to $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi; + elif [ "$dbopts" = "-o" ]; then + echo "Informational: $dbfeat source" \ + "file not found: $dbname" + missing_opt=`expr $missing_opt + 1`; + else + echo "Error: $dbfeat source file not found: $dbname" + missing_rqd=`expr $missing_rqd + 1`; + fi; + ;; + esac + } + +#------------------------------------------------------------- +# Handle empty databases +#------------------------------------------------------------- +is_empty () { + if [ $verbosity -gt 1 ]; then + echo "is_empty()"; + fi; + if [ $process -eq 1 ]; then + if [ "$dbtype" != "-" ]; then + rm -f $dbname.db + rm -f $dbname.pag + rm -f $dbname.dir + fi + case "$dbfeat" in + *) + echo "Informational: $dbfeat file empty: $dbname" + if [ "$dbopts" = "-o" ]; then + process=0; + fi; + ;; + esac + fi + } + +#------------------------------------------------------------- +# Handle no data (exists, but is only comments) databases +#------------------------------------------------------------- +is_comments () { + if [ $verbosity -gt 1 ]; then + echo "is_comments()"; + fi; + if [ $process -eq 1 ]; then + if [ "$dbtype" != "-" ]; then + rm -f $dbname.db + rm -f $dbname.pag + rm -f $dbname.dir + fi + case "$dbfeat" in + *) + echo "Informational: $dbfeat no data: $dbname" + if [ "$dbopts" = "-o" ]; then + process=0; + fi; + ;; + esac + fi + } + +#------------------------------------------------------------- +# Handle normal databases (exists, has data) +#------------------------------------------------------------- +is_normal () { + if [ $verbosity -gt 1 ]; then + echo "is_normal()"; + fi; + if [ $process -eq 1 -a $max_rc -eq 0 ]; then + if [ "$dbtype" != "-" ]; then + case "$dbtype" in + btree) + makemap -d $dbtype $dbname.db < $dbname + chown root.mail $dbname.db + chmod 0664 $dbname.db + ;; + dbm | btree | hash) + makemap $dbtype $dbname.db < $dbname + chown root.mail $dbname.db + chmod 0664 $dbname.db + ;; + text) + true; + ;; + newaliases) + if [ $newaliases_run -eq 0 -o \ + $changed -eq 1 ]; then + newaliases_run=1 + newaliases + fi + chown root.mail $dbname.db + chmod 0664 $dbname.db + ;; + m4) + echo "Generating /etc/mail/sendmail.cf ..." + m4 \ + /usr/share/sendmail/sendmail.cf/m4/cf.m4 \ + /etc/mail/sendmail.mc \ + > /etc/mail/sendmail.cf.new \ + 2> /etc/mail/sendmail.cf.errors + chown root.mail /etc/mail/sendmail.cf.new + chmod 0644 /etc/mail/sendmail.cf.new + if [ ! -s /etc/mail/sendmail.cf.errors ]; then + rm /etc/mail/sendmail.cf.errors; + else + cat /etc/mail/sendmail.cf.errors; + echo " "; + m4_errors=1; + fi; + # Can't tell if the errors are fatal or not ;-{ + mv -f /etc/mail/sendmail.cf.new \ + /etc/mail/sendmail.cf + ;; + *) + echo "$dbtype map not done herein" + ;; + esac + fi; + fi; + } + +#------------------------------------------------------------- +# Handle completion +#------------------------------------------------------------- +final () { + if [ $verbosity -gt 1 ]; then + echo "final()"; + fi; + } + + +# status report if not for single database +if [ -z "$1" ]; then + echo "Checking sendmail.cf and databases." + fi; + +initial + +for file in $db_files; do \ + line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases || true); + while ([ "$line" != "" ]); do + str=$(echo "$line" | cut -d " +" -f 1) + line=$(echo "$line" | cut -d " +" -f 2) + + # Strip line back into four pieces: feature, type, opts, name + dbfeat=$(echo "$str" | cut -d ":" -f 1) + dbtype=$(echo "$str" | cut -d ":" -f 2) + dbopts=$(echo "$str" | cut -d ":" -f 3) + dbname=$(echo "$str" | cut -d ":" -f 4) + dbregx=$(echo "$str" | cut -d ":" -f 5) + if [ $(dirname "$dbname") = "/etc/mail" ]; then + dbsname=$(basename "$dbname") + elif [ $(dirname "$dbname") = "/etc/" ]; then + dbsname=$(basename "$dbname") + else + dbsname="$dbname" + fi; + if [ "$dbopts" = "-" ]; then + dbopts=""; + fi; + if [ "$dbregx" = "-" ]; then + dbregx=""; + fi; + + # Check to see if we're doing one, or all + if [ ! -z "$1" ]; then + if [ "$1" = "$dbfeat" -o \ + "$1" = "$dbname" -o \ + "$1" = "$dbsname" ]; then + true; + else + continue; + fi; + fi; + + changed=0; + if [ $verbosity -gt 0 ]; then + echo "Processing $dbname..."; + fi; + + + # Check for database existance + if [ -f "$dbname" ]; then + is_found + else + is_not_found + fi; + + # Check for something in database + if [ ! -s "$dbname" ]; then + is_empty + fi; + + # Check for real data (not just comments) + if [ $process -eq 1 ]; then + if ! egrep -q -e "^[[:space:]]*[^$\#]" $dbname; then + is_comments + fi; + fi; + + # Finally, assume a normal file... + is_normal + + done; + done; + +final + +# Final notices... +if [ $missing_opt -ne 0 ]; then + echo " " + echo "Informational: $missing_opt optional database(s) sources" + echo " were not found, please investigate." + fi; +if [ $missing_rqd -ne 0 ]; then + echo " " + echo "Error: $missing_rqd required database(s) sources" + echo " were not found, correct this before starting sendmail!" + if [ $max_rc -lt 2 ]; then + max_rc=2; + fi; + fi; +if [ $missing_opt -ne 0 -o $missing_rqd -ne 0 ]; then + echo " " + echo "$0 assumes that databases, and their source datasets" + echo "have the same base name (not counting the .db). If this is not" + echo "true, $0 can not rebuild your databases to make sure" + echo "they will work with the newer sendmail. You will have to do this" + echo "yourself - before starting sendmail." + echo " " + fi; +if [ $m4_errors -ne 0 ]; then + echo " " + echo "Warning: These messages were issued while creating sendmail.cf" + echo " make sure they are benign before starting sendmail!" + echo " " + cat /etc/mail/sendmail.cf.errors; + echo " " + if [ $max_rc -lt 2 ]; then + max_rc=2; + fi; + fi; +exit $max_rc diff --git a/debian/notes b/debian/notes new file mode 100644 index 0000000..5fe8ab8 --- /dev/null +++ b/debian/notes @@ -0,0 +1,8 @@ +* debhelper v2: + * sendmail.prerm + * rules (dh_movefiles, dh_installinit, dh_perl) +* make sure text map is changed to hash for mailertable +* make use of scanf(3) patterns: + Fc file %^[\#] +dpkg-source -x, dpkg-buildpackage -B -rsudo and then fetch the changes file, pgp-ing and ready, the flag -B is important to the binary-indep section of the debian/rules file --- thats all +*haggie!koptein@ppp014asc.fho-emden.de* powerpc builds all packages with an auto-builder (wanna-build), but it is currently broken with an db error diff --git a/debian/patches/Makefile b/debian/patches/Makefile new file mode 100644 index 0000000..847f7a9 --- /dev/null +++ b/debian/patches/Makefile @@ -0,0 +1,51 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# +# This file is also based upon prior sendmail makefiles +# +# Richard Nelson <cowboy@debian.org> + + +#------------- +create: + diff -cr ../../cf/m4/proto.m4 proto.m4 > patch.ldap.m4 || /bin/true + #diff -cr ../../cf/mailer/local.m4 local.m4 > patch.dont_masquerade_local || /bin/true + #diff -cr ../../cf/feature/local_procmail.m4 local_procmail.m4 > patch.local_procmail || /bin/true + #diff -cr ../../src/conf.h conf.h > patch.IP_SRCROUTE || /bin/true + #diff -cr ../../src/daemon.c daemon.c >> patch.IP_SRCROUTE || /bin/true + +patch: + patch -p1 --version-control=never -l < debian/patches/mime-patch + patch -p5 --version-control=never < debian/patches/mrbl.p3 + patch -p3 --version-control=never < debian/patches/patch.local_procmail + patch -p2 --version-control=never < debian/patches/patch.IP_SRCROUTE + patch -p2 --version-control=never < debian/patches/patch.dont_masquerade_local + patch -p2 --version-control=never < debian/patches/patch.ldap.m4 + cd src && patch -p0 --version-control=never < ../debian/patches/patch.ldap.src + cd rmail && patch -p0 --version-control=never < ../debian/patches/patch.rmail + cd src && patch -p0 --version-control=never < ../debian/patches/patch.DOS + patch -p0 --version-control=never -l < debian/patches/cf.mailer.cyrus.m4 + patch -p0 --version-control=never -l < debian/patches/patch.mail.local + patch -p0 --version-control=never -l < debian/patches/sendmail.8.9.3.security.cr.patch + patch -p1 --version-control=never -l < debian/patches/prescan.8.9.3.patch + + +unpatch: + patch -R -p1 --version-control=never -l < debian/patches/mime-patch + patch -R -p5 --version-control=never < debian/patches/mrbl.p3 + patch -R -p3 --version-control=never < debian/patches/patch.local_procmail + patch -R -p2 --version-control=never < debian/patches/patch.IP_SRCROUTE + patch -R -p2 --version-control=never < debian/patches/patch.dont_masquerade_local + patch -R -p2 --version-control=never < debian/patches/patch.ldap.m4 + cd src && patch -R -p0 --version-control=never < ../debian/patches/patch.ldap.src + cd rmail && patch -R -p0 --version-control=never < ../debian/patches/patch.rmail + cd src && patch -R -p0 --version-control=never < ../debian/patches/patch.DOS + patch -R -p0 --version-control=never -l < debian/patches/cf.mailer.cyrus.m4 + patch -R -p0 --version-control=never -l < debian/patches/patch.mail.local + patch -R -p0 --version-control=never -l < debian/patches/sendmail.8.9.3.security.cr.patch + patch -R -p1 --version-control=never -l < debian/patches/prescan.8.9.3.patch + +#------------- +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/patches/align.893.p1 b/debian/patches/align.893.p1 new file mode 100644 index 0000000..ff6add3 --- /dev/null +++ b/debian/patches/align.893.p1 @@ -0,0 +1,17 @@ +--- ./src/main.c.ORIG Sun Jan 10 00:31:13 1999 ++++ sendmail-8.9.3/src/main.c Sat Oct 30 04:29:25 1999 +@@ -528,10 +528,12 @@ + { + for (i = 0; hp->h_addr_list[i] != NULL; i++) + { ++ struct in_addr ia; + char ipbuf[103]; + ++ bcopy(hp->h_addr_list[i], &ia, INADDRSZ); + snprintf(ipbuf, sizeof ipbuf, "[%.100s]", +- inet_ntoa(*((struct in_addr *) hp->h_addr_list[i]))); ++ inet_ntoa(ia)); + if (tTd(0, 4)) + printf("\ta.k.a.: %s\n", ipbuf); + setclass('w', ipbuf); + diff --git a/debian/patches/cf.mailer.cyrus.m4 b/debian/patches/cf.mailer.cyrus.m4 new file mode 100644 index 0000000..85f7632 --- /dev/null +++ b/debian/patches/cf.mailer.cyrus.m4 @@ -0,0 +1,18 @@ +--- ./cf/mailer/cyrus.m4 Tue May 2 14:40:24 2000 ++++ ./debian/patches/cf/mailer/cyrus.m4 Tue May 2 14:41:21 2000 +@@ -35,11 +35,11 @@ + # + + ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@/:|')') +-ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)') +-ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')') ++ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/sbin/cyrdeliver)') ++ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `cyrdeliver -e -m $h -- $u')') + ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')') + ifdef(`CYRUS_BB_MAILER_FLAGS',, `define(`CYRUS_BB_MAILER_FLAGS', `')') +-ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `deliver -e -m $u')') ++ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `cyrdeliver -e -m $u')') + + POPDIVERT + + diff --git a/debian/patches/mime-patch b/debian/patches/mime-patch new file mode 100644 index 0000000..cf939b2 --- /dev/null +++ b/debian/patches/mime-patch @@ -0,0 +1,62 @@ +*** sendmail-8.9.3/src/mime.c.ORIG Tue Jan 19 01:35:11 1999 +--- sendmail-8.9.3/src/mime.c Sat Mar 13 01:39:15 1999 +*************** +*** 443,449 **** + { + /* no encoding necessary */ + if (cte != NULL && +! bitset(MCIF_INMIME, mci->mci_flags) && + !bitset(M87F_NO8TO7, flags)) + { + /* +--- 443,450 ---- + { + /* no encoding necessary */ + if (cte != NULL && +! bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, +! mci->mci_flags) && + !bitset(M87F_NO8TO7, flags)) + { + /* +*** sendmail-8.9.3/src/headers.c.ORIG Tue Jan 26 15:54:50 1999 +--- sendmail-8.9.3/src/headers.c Tue Mar 16 20:43:31 1999 +*************** +*** 1369,1375 **** + + /* + ** If we are converting this to a MIME message, add the +! ** MIME headers. + */ + + #if MIME8TO7 +--- 1369,1375 ---- + + /* + ** If we are converting this to a MIME message, add the +! ** MIME headers (but not in MIME mode!). + */ + + #if MIME8TO7 +*************** +*** 1377,1386 **** + bitset(EF_HAS8BIT, e->e_flags) && + !bitset(EF_DONT_MIME, e->e_flags) && + !bitnset(M_8BITS, mci->mci_mailer->m_flags) && +! !bitset(MCIF_CVT8TO7|MCIF_CVT7TO8, mci->mci_flags)) + { +! if (hvalue("MIME-Version", e->e_header) == NULL) +! putline("MIME-Version: 1.0", mci); + if (hvalue("Content-Type", e->e_header) == NULL) + { + snprintf(obuf, sizeof obuf, +--- 1377,1386 ---- + bitset(EF_HAS8BIT, e->e_flags) && + !bitset(EF_DONT_MIME, e->e_flags) && + !bitnset(M_8BITS, mci->mci_mailer->m_flags) && +! !bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, mci->mci_flags) && +! hvalue("MIME-Version", e->e_header) == NULL) + { +! putline("MIME-Version: 1.0", mci); + if (hvalue("Content-Type", e->e_header) == NULL) + { + snprintf(obuf, sizeof obuf, diff --git a/debian/patches/mime-patch.README b/debian/patches/mime-patch.README new file mode 100644 index 0000000..e73635b --- /dev/null +++ b/debian/patches/mime-patch.README @@ -0,0 +1,31 @@ +From: per@erix.ericsson.se (Per Hedeland) +Newsgroups: news.software.nntp,comp.mail.sendmail +Subject: Re: Duplicate "Content-Transfer-Encoding" header +Date: 13 Apr 1999 01:21:51 GMT +Organization: Ericsson Utvecklings AB, Stockholm, Sweden +Lines: 61 +Message-ID: <7eu67f$p6b$1@news.du.etx.ericsson.se> +References: <7et2k9$rk8$1@niobium.hgmp.mrc.ac.uk> +NNTP-Posting-Host: super.du.etx.ericsson.se +NNTP-Posting-User: per +X-Newsreader: trn 4.0-test69 (20 September 1998) +Xref: news.cistron.nl news.software.nntp:47781 comp.mail.sendmail:68808 + +In article <7et2k9$rk8$1@niobium.hgmp.mrc.ac.uk> ggibbs@hgmp.mrc.ac.uk +(Geoff Gibbs) writes: +>I have a mail/news gateway running, using the mailpost/news2mail +>software which comes with INN 2.2. +>It is being fed from sendmail 8.9.1a +> +>I am seeing the error message :- +> +>post failed Duplicate "Content-Transfer-Encoding" header + +Upgrade to sendmail 8.9.3 + the patch below. Of course the duplicate +header may have been introduced *before* the message arrived at *your* +sendmail, in which case this won't help - but at least your sendmail +won't be the cause. + +--Per Hedeland +per@erix.ericsson.se + diff --git a/debian/patches/mrbl.p3 b/debian/patches/mrbl.p3 new file mode 100644 index 0000000..f73d239 --- /dev/null +++ b/debian/patches/mrbl.p3 @@ -0,0 +1,168 @@ +diff -cr ./feature/rbl.m4 /home/ca/smi/sendmail/cf/feature/rbl.m4 +*** ./feature/rbl.m4 Tue Dec 29 09:42:13 1998 +--- /home/ca/smi/sendmail/cf/feature/rbl.m4 Sat Feb 20 13:58:31 1999 +*************** +*** 1,6 **** + divert(-1) + # +! # Copyright (c) 1998 Sendmail, Inc. 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 +--- 1,7 ---- + divert(-1) + # +! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. +! # 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 +*************** +*** 9,15 **** + # + + divert(0) +! VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/1998') + divert(-1) +! +! define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl +--- 10,24 ---- + # + + divert(0) +! ifdef(`_RBL_R_',`dnl',`dnl +! VERSIONID(`$Id: rbl.m4,v 8.12 1999/02/20 21:58:31 ca Exp $')') + divert(-1) +! define(`_RBL_SRV_',ifelse(_ARG_,`',`rbl.maps.vix.com',_ARG_))dnl +! define(`_RBL_MSG_',ifelse(_ARG2_,`',`"Mail from " $`'&{client_addr} " refused by blackhole site '_RBL_SRV_`"',_ARG2_))dnl +! define(`_RBL_R_',defn(`_RBL_R_') +! ` +! # DNS based IP address spam list '_RBL_SRV_` +! R$`'* $`': $`'&{client_addr} +! R$`'-.$`'-.$`'-.$`'- $`': <?> $`'(host $`'4.$`'3.$`'2.$`'1.'_RBL_SRV_`. $`': OK $`') +! R<?>OK $`': OKSOFAR +! R<?>$`'+ $`'#error $`'@ 5.7.1 $`': '_RBL_MSG_) +diff -cr ./m4/cfhead.m4 /home/ca/smi/sendmail/cf/m4/cfhead.m4 +*** ./m4/cfhead.m4 Tue Dec 29 09:42:08 1998 +--- /home/ca/smi/sendmail/cf/m4/cfhead.m4 Sat Feb 20 13:58:32 1999 +*************** +*** 1,5 **** + # +! # Copyright (c) 1998 Sendmail, Inc. All rights reserved. + # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. +--- 1,6 ---- + # +! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. +! # All rights reserved. + # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. +*************** +*** 40,51 **** + define(`__OSTYPE__', $1) + define(`_ARG_', $2) + include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') + define(`MAILER', + `ifdef(`_MAILER_$1_', `dnl`'', + `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')') +! define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'') +! define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') +! define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'') + define(`VERSIONID', ``##### $1 #####'') + define(`LOCAL_RULE_0', `divert(3)') + define(`LOCAL_RULE_1', +--- 41,73 ---- + define(`__OSTYPE__', $1) + define(`_ARG_', $2) + include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') ++ ## new FEATUREs ++ define(`_RBL_R_',`') ++ ## access to further arguments in FEATURE/HACK ++ define(`_ACC_ARG_1_',`$1') ++ define(`_ACC_ARG_2_',`$2') ++ define(`_ACC_ARG_3_',`$3') ++ define(`_ACC_ARG_4_',`$4') ++ define(`_ACC_ARG_5_',`$5') ++ define(`_ACC_ARG_6_',`$6') ++ define(`_ACC_ARG_7_',`$7') ++ define(`_ACC_ARG_8_',`$8') ++ define(`_ACC_ARG_9_',`$9') ++ define(`_ARG1_',`_ACC_ARG_1_(_ARGS_)') ++ define(`_ARG2_',`_ACC_ARG_2_(_ARGS_)') ++ define(`_ARG3_',`_ACC_ARG_3_(_ARGS_)') ++ define(`_ARG4_',`_ACC_ARG_4_(_ARGS_)') ++ define(`_ARG5_',`_ACC_ARG_5_(_ARGS_)') ++ define(`_ARG6_',`_ACC_ARG_6_(_ARGS_)') ++ define(`_ARG7_',`_ACC_ARG_7_(_ARGS_)') ++ define(`_ARG8_',`_ACC_ARG_8_(_ARGS_)') ++ define(`_ARG9_',`_ACC_ARG_9_(_ARGS_)') + define(`MAILER', + `ifdef(`_MAILER_$1_', `dnl`'', + `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')') +! define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', `$2')include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'') +! define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', `$2')define(`_ARGS_', `shift($@)')include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') +! define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', `$2')define(`_ARGS_', `shift($@)')include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'') + define(`VERSIONID', ``##### $1 #####'') + define(`LOCAL_RULE_0', `divert(3)') + define(`LOCAL_RULE_1', +diff -cr ./m4/proto.m4 /home/ca/smi/sendmail/cf/m4/proto.m4 +*** ./m4/proto.m4 Tue Feb 2 15:21:30 1999 +--- /home/ca/smi/sendmail/cf/m4/proto.m4 Sat Feb 20 13:58:33 1999 +*************** +*** 1,6 **** + divert(-1) + # +! # Copyright (c) 1998 Sendmail, Inc. All rights reserved. + # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. +--- 1,7 ---- + divert(-1) + # +! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. +! # All rights reserved. + # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. +*************** +*** 12,18 **** + # + divert(0) + +! VERSIONID(`@(#)proto.m4 8.243 (Berkeley) 2/2/1999') + + MAILER(local)dnl + +--- 13,19 ---- + # + divert(0) + +! VERSIONID(`$Id: proto.m4,v 8.247 1999/02/20 21:58:33 ca Exp $') + + MAILER(local)dnl + +*************** +*** 1108,1120 **** + R<DISCARD> $* $#discard $: discard + R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + +! ifdef(`_RBL_', `dnl +! # DNS based IP address spam lists +! R$* $: $&{client_addr} +! R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) +! ROK $@ OK +! R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused by blackhole site _RBL_"', +! `dnl') + + ###################################################################### + ### check_mail -- check SMTP ``MAIL FROM:'' command argument +--- 1109,1115 ---- + R<DISCARD> $* $#discard $: discard + R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + +! _RBL_R_ + + ###################################################################### + ### check_mail -- check SMTP ``MAIL FROM:'' command argument diff --git a/debian/patches/mrbl.p3.README b/debian/patches/mrbl.p3.README new file mode 100644 index 0000000..313795c --- /dev/null +++ b/debian/patches/mrbl.p3.README @@ -0,0 +1,12 @@ + +Upgrade to 8.9.3, and install the multiple rbl patch from: + http://www.Sendmail.ORG/~ca/email/patches/mrbl.p3 + http://www.sendmail.org +Then use + FEATURE(rbl,`rbl.maps.vix.com',` Mail from $&{client_addr} + rejected - rbl; see http://maps.vix.com') + FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr} + rejected - dul; see http://maps.vix.com') + FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr} + rejected - open relay; see http://www.orbs.org') + diff --git a/debian/patches/patch.DOS b/debian/patches/patch.DOS new file mode 100644 index 0000000..7b595b9 --- /dev/null +++ b/debian/patches/patch.DOS @@ -0,0 +1,21 @@ +--- main.c~orig Sat Jan 9 15:31:13 1999 ++++ main.c Wed Nov 17 19:04:44 1999 +@@ -984,6 +984,18 @@ + usrerr("Permission denied"); + finis(FALSE, EX_USAGE); + } ++ if (OpMode == MD_INITALIAS && ++ RealUid != 0 && ++ RealUid != TrustedUid && ++ !wordinclass(RealUserName, 't')) ++ { ++ if (LogLevel > 1) ++ sm_syslog(LOG_ALERT, NOQID, ++ "user %d attempted to rebuild the alias map", ++ RealUid); ++ usrerr("Permission denied"); ++ finis(FALSE, EX_USAGE); ++ } + + if (MeToo) + BlankEnvelope.e_flags |= EF_METOO; diff --git a/debian/patches/patch.IP_SRCROUTE b/debian/patches/patch.IP_SRCROUTE new file mode 100644 index 0000000..84b7ee8 --- /dev/null +++ b/debian/patches/patch.IP_SRCROUTE @@ -0,0 +1,94 @@ +*** ../../src/conf.h Mon Apr 12 15:12:30 1999 +--- conf.h Thu Apr 8 15:35:20 1999 +*************** +*** 1284,1290 **** + # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ + # define GIDSET_T gid_t /* from <linux/types.h> */ + # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ +! # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ + # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ + # ifndef HASFLOCK + # include <linux/version.h> +--- 1284,1290 ---- + # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ + # define GIDSET_T gid_t /* from <linux/types.h> */ + # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ +! # define IP_SRCROUTE 1 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ + # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ + # ifndef HASFLOCK + # include <linux/version.h> +*** ../../src/daemon.c Mon Apr 12 15:12:30 1999 +--- daemon.c Mon Apr 12 15:37:50 1999 +*************** +*** 42,48 **** + # if IP_SRCROUTE + # include <netinet/in_systm.h> + # include <netinet/ip.h> +! # include <netinet/ip_var.h> + # endif + + /* +--- 42,50 ---- + # if IP_SRCROUTE + # include <netinet/in_systm.h> + # include <netinet/ip.h> +! # ifndef __linux__ +! # include <netinet/ip_var.h> +! # endif + # endif + + /* +*************** +*** 1570,1584 **** + u_char *o; + int l; + struct in_addr addr; + struct ipoption ipopt; +! + ipoptlen = sizeof ipopt; + if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS, + (char *) &ipopt, &ipoptlen) < 0) + goto noipsr; + if (ipoptlen == 0) + goto noipsr; + o = (u_char *) ipopt.ipopt_list; + while (o != NULL && o < (u_char *) &ipopt + ipoptlen) + { + switch (*o) +--- 1572,1593 ---- + u_char *o; + int l; + struct in_addr addr; ++ # ifndef __linux__ + struct ipoption ipopt; +! # else +! struct ip_options ipopt; +! # endif + ipoptlen = sizeof ipopt; + if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS, + (char *) &ipopt, &ipoptlen) < 0) + goto noipsr; + if (ipoptlen == 0) + goto noipsr; ++ # ifndef __linux__ + o = (u_char *) ipopt.ipopt_list; ++ # else ++ o = (u_char *) ipopt.__data; ++ # endif + while (o != NULL && o < (u_char *) &ipopt + ipoptlen) + { + switch (*o) +*************** +*** 1609,1615 **** +--- 1618,1628 ---- + snprintf(p, SPACELEFT(hbuf, p), " [%s@%.*s", + *o == IPOPT_SSRR ? "!" : "", + l > 240 ? 120 : l / 2, ++ # ifndef __linux__ + inet_ntoa(GET_IPOPT_DST(ipopt.ipopt_dst))); ++ # else ++ ipopt.faddr); ++ # endif + i = strlen(p); + p += i; + l -= strlen(p); diff --git a/debian/patches/patch.dont_masquerade_local b/debian/patches/patch.dont_masquerade_local new file mode 100644 index 0000000..f4484b9 --- /dev/null +++ b/debian/patches/patch.dont_masquerade_local @@ -0,0 +1,39 @@ +diff -cr ../../cf/mailer/local.m4 local.m4 +*** ../../cf/mailer/local.m4 Thu Apr 22 18:23:05 1999 +--- local.m4 Thu Apr 22 18:40:37 1999 +*************** +*** 39,45 **** + R<@> $n errors to mailer-daemon + R@ <@ $*> $n temporarily bypass Sun bogosity + R$+ $: $>50 $1 add local domain if needed +! R$* $: $>94 $1 do masquerading + + # + # Envelope recipient rewriting +--- 39,46 ---- + R<@> $n errors to mailer-daemon + R@ <@ $*> $n temporarily bypass Sun bogosity + R$+ $: $>50 $1 add local domain if needed +! ifdef(`_DONT_MASQUERADE_LOCAL_', `dnl', `dnl +! R$* $: $>94 $1 do masquerading') + + # + # Envelope recipient rewriting +*************** +*** 54,60 **** + R<@> $n errors to mailer-daemon + R@ <@ $*> $n temporarily bypass Sun bogosity + R$+ $: $>50 $1 add local domain if needed +! R$* $: $>93 $1 do masquerading + + # + # Header recipient rewriting +--- 55,62 ---- + R<@> $n errors to mailer-daemon + R@ <@ $*> $n temporarily bypass Sun bogosity + R$+ $: $>50 $1 add local domain if needed +! ifdef(`_DONT_MASQUERADE_LOCAL_', `dnl', `dnl +! R$* $: $>93 $1 do masquerading') + + # + # Header recipient rewriting diff --git a/debian/patches/patch.ldap.m4 b/debian/patches/patch.ldap.m4 new file mode 100644 index 0000000..823bc13 --- /dev/null +++ b/debian/patches/patch.ldap.m4 @@ -0,0 +1,17 @@ +*** ../../cf/m4/proto.m4 Thu Apr 22 18:23:04 1999 +--- proto.m4 Fri Apr 23 11:41:47 1999 +*************** +*** 870,875 **** +--- 870,881 ---- + R< $* . > $+ $: < $1 > $2 strip extra dot', + `dnl') + ++ ifdef(`_LDAP_MAP_', `dnl ++ # Now attempt to lookup in ldap (ldap map) ++ R< $L > $+ $: < $L > $( ldap $1 $) look up user ++ R< $* > $+ @ $+ $: < $3 > $2 Rewrite if forward', ++ `dnl') ++ + # see if we have a relay or a hub + R< > $+ $: < $H > $1 try hub + R< > $+ $: < $R > $1 try relay diff --git a/debian/patches/patch.ldap.src b/debian/patches/patch.ldap.src new file mode 100644 index 0000000..4b4a4df --- /dev/null +++ b/debian/patches/patch.ldap.src @@ -0,0 +1,377 @@ +Index: ldap_map.h +=================================================================== +RCS file: /usr/local/src/cvsroot/sendmail.8.9/src/ldap_map.h,v +retrieving revision 1.1.1.8 +retrieving revision 1.9 +diff -u -r1.1.1.8 -r1.9 +--- ldap_map.h 1999/02/15 19:35:30 1.1.1.8 ++++ ldap_map.h 1999/02/15 20:04:06 1.9 +@@ -37,8 +37,8 @@ + /* args for ldap_bind_s */ + LDAP *ld; + char *binddn; +- char *passwd; +- int method; ++ char *secret; ++ int method; + + /* args for ldap_search_st */ + char *base; +@@ -55,13 +55,32 @@ + #define DEFAULT_LDAP_MAP_PORT LDAP_PORT + #define DEFAULT_LDAP_MAP_SCOPE LDAP_SCOPE_SUBTREE + #define DEFAULT_LDAP_MAP_BINDDN NULL +-#define DEFAULT_LDAP_MAP_PASSWD NULL ++#define DEFAULT_LDAP_MAP_SECRET NULL + #define DEFAULT_LDAP_MAP_METHOD LDAP_AUTH_SIMPLE + #define DEFAULT_LDAP_MAP_TIMELIMIT 5 + #define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER + #define DEFAULT_LDAP_MAP_SIZELIMIT 0 + #define DEFAULT_LDAP_MAP_ATTRSONLY 0 + #define LDAP_MAP_MAX_FILTER 1024 ++ ++/* authentication methods available */ ++ ++#define LDAP_MAP_AUTH_METHOD_MAX 3 ++#define LDAP_MAP_MAX_PASSWD 256 ++ ++char *ldap_map_auth_methods[] = { ++ "LDAP_AUTH_NONE", ++ "LDAP_AUTH_SIMPLE", ++ "LDAP_AUTH_KRBV4" ++} ; ++ ++int ldap_map_auth_methods_code[LDAP_MAP_AUTH_METHOD_MAX] = { ++ LDAP_AUTH_NONE, ++ LDAP_AUTH_SIMPLE, ++ LDAP_AUTH_KRBV4 ++} ; ++ ++ + #ifdef LDAP_REFERRALS + # define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS + #else /* LDAP_REFERRALS */ +Index: map.c +=================================================================== +RCS file: /usr/local/src/cvsroot/sendmail.8.9/src/map.c,v +retrieving revision 1.1.1.11 +retrieving revision 1.20 +diff -u -r1.1.1.11 -r1.20 +--- map.c 1999/02/15 19:35:31 1.1.1.11 ++++ map.c 1999/03/30 21:22:41 1.20 +@@ -2621,6 +2621,10 @@ + #endif + return FALSE; + } ++ /* We could call aliaswait here, but it only adds extra ++ code to the ldap map lookup. The aliaswait "@:@" convention ++ does not make much sense in the ldap tcp-based model. ++ */ + return TRUE; + } + +@@ -2647,7 +2651,7 @@ + LDAP_MAP_STRUCT *lmap; + LDAP *ld; + register EVENT *ev = NULL; +- ++ register int bind_result; + if (tTd(38, 2)) + printf("ldap_map_start(%s)\n", map->map_mname); + +@@ -2713,12 +2717,12 @@ + lmap->ld = ld; + return TRUE; + #else +- if (ldap_bind_s(ld, lmap->binddn,lmap->passwd,lmap->method) != LDAP_SUCCESS) ++ if (ldap_bind_s(ld, lmap->binddn,lmap->secret,lmap->method) != LDAP_SUCCESS) + { + if (!bitset(MF_OPTIONAL, map->map_mflags)) + { +- syserr("421 Cannot bind to map %s in ldap server %s", +- map->map_mname, lmap->ldaphost); ++ syserr("421 Cannot bind to map %s in ldap server %s, %s", ++ map->map_mname, lmap->ldaphost,ldap_err2string(bind_result)); + } + } + else +@@ -2727,7 +2731,6 @@ + lmap->ld = ld; + return TRUE; + } +- + return FALSE; + #endif + } +@@ -2811,13 +2814,13 @@ + { + LDAP_MAP_STRUCT *lmap = NULL; + LDAPMessage *entry; +- char *vp; ++ char *vp,*vp_tmp; + auto int vsize; + char keybuf[MAXNAME + 1]; + char filter[LDAP_MAP_MAX_FILTER + 1]; + char **attr_values = NULL; +- char *result; +- int name_len; ++ char *result,*tmp; ++ int name_len,val_count,i; + char *fp, *p, *q; + + if (tTd(38, 20)) +@@ -2899,39 +2902,88 @@ + } + } + ++ result = NULL; ++ *statp = EX_NOTFOUND; ++ + entry = ldap_first_entry(lmap->ld,lmap->res); + if (entry == NULL) + { +- result = NULL; +- *statp = EX_NOTFOUND; + goto quick_exit; + } + +- /* Need to build the args for map_rewrite here */ +- attr_values = ldap_get_values(lmap->ld,entry,lmap->attr[0]); +- if (attr_values == NULL) +- { +- /* bad things happened */ +- result = NULL; +- *statp = EX_NOTFOUND; +- goto quick_exit; ++ vp = NULL ; ++ ++ /* Cycle through all entries. */ ++ do { ++ /* Need to build the args for map_rewrite here */ ++ attr_values = ldap_get_values(lmap->ld,entry,lmap->attr[0]); ++ if (attr_values != NULL ) ++ { ++ *statp = EX_OK; ++ ++ /* ++ * If there is more that one munge then into ++ * a comma sep string ++ */ ++ val_count = ldap_count_values(attr_values) ; ++ /* count size */ ++ vsize = 0 ; ++ for( i = 0 ; i < val_count && attr_values[i] != NULL ; i++ ) { ++ vsize += strlen(attr_values[i]) + strlen(", ") ; ++ } ++ vp_tmp = (char * ) malloc(vsize) ; ++ if ( vp_tmp != NULL ) ++ { ++ /* first */ ++ snprintf(vp_tmp,vsize,"%s",attr_values[0]) ; ++ tmp = vp_tmp + strlen(vp_tmp); ++ /*rest */ ++ for( i = 1 ; i < (val_count ) && attr_values[i] != NULL ; i++ ) { ++ snprintf(tmp,(vsize - strlen(vp_tmp)),", %s",attr_values[i]) ; ++ tmp = vp_tmp + strlen(vp_tmp) ; ++ } ++ ++ } else { ++ /* Report memory error */ ++ if (!bitset(MF_OPTIONAL, map->map_mflags)) ++ { ++ syserr("Out of memory in ldap_map_lookup"); ++ } ++ } ++ } ++ if ( vp == NULL ) ++ { ++ vp = vp_tmp ; ++ } else { ++ vsize = strlen(vp) + strlen(vp_tmp) + strlen(", ") + 1 ; ++ tmp = ( char *) malloc( vsize ) ; ++ snprintf(tmp,vsize,"%s, %s",vp,vp_tmp) ; ++ /* Free things in correct order. */ ++ free ( vp_tmp) ; /* vsize malloc above */ ++ vp_tmp = vp ; /* tmp malloc from previous loop */ ++ vp = tmp ; ++ free ( vp_tmp ) ; ++ } ++ ldap_value_free(attr_values); ++ attr_values = NULL ; ++ ++ } while ( (entry = ldap_next_entry( lmap->ld, entry ) ) != NULL ) ; ++ ++ if ( *statp == EX_OK ) { ++ ++ vsize = strlen(vp); ++ ++ if (LogLevel > 9) ++ sm_syslog(LOG_INFO, CurEnv->e_id, ++ "ldap %.100s => %s", ++ name, vp); ++ if (bitset(MF_MATCHONLY, map->map_mflags)) ++ result = map_rewrite(map, name, strlen(name), NULL); ++ else ++ result = map_rewrite(map, vp, vsize, av); ++ free(vp) ; ++ + } +- +- *statp = EX_OK; +- +- /* If there is more that one use the first */ +- vp = attr_values[0]; +- vsize = strlen(vp); +- +- if (LogLevel > 9) +- sm_syslog(LOG_INFO, CurEnv->e_id, +- "ldap %.100s => %s", +- name, vp); +- if (bitset(MF_MATCHONLY, map->map_mflags)) +- result = map_rewrite(map, name, strlen(name), NULL); +- else +- result = map_rewrite(map, vp, vsize, av); +- + quick_exit: + if (attr_values != NULL) + ldap_value_free(attr_values); +@@ -2982,8 +3034,12 @@ + char *args; + { + register char *p = args; +- register int done; ++ register int done,i; + LDAP_MAP_STRUCT *lmap; ++ static char m_tmp[MAXPATHLEN+LDAP_MAP_MAX_PASSWD]; ++ FILE * sfd ; ++ int sff = SFF_OPENASROOT|SFF_ROOTOK|SFF_NOWLINK|SFF_NOWWFILES|SFF_NOGWFILES; ++ char *tmp ; + + /* We need to alloc an LDAP_MAP_STRUCT struct */ + lmap = (LDAP_MAP_STRUCT *) xalloc(sizeof(LDAP_MAP_STRUCT)); +@@ -3002,7 +3058,8 @@ + + /* Default char ptrs to NULL */ + lmap->binddn = NULL; +- lmap->passwd = NULL; ++ ++ lmap->secret = NULL; + lmap->base = NULL; + lmap->ldaphost = NULL; + +@@ -3088,7 +3145,9 @@ + break; + + case 's': /* search scope */ +- if (strncasecmp(++p, "base", 4) == 0) ++ while (isascii(*++p) && isspace(*p)) ++ continue; ++ if (strncasecmp(p, "base", 4) == 0) + { + lmap->scope = LDAP_SCOPE_BASE; + } +@@ -3142,7 +3201,36 @@ + lmap->timelimit = atoi(p); + lmap->timeout.tv_sec = lmap->timelimit; + break; +- ++ case 'D': /* Dn to bind to server as */ ++ while (isascii(*++p) && isspace(*p)) ++ continue; ++ lmap->binddn = p; ++ break; ++ case 'M': /* Method for binding */ ++ while (isascii(*++p) && isspace(*p)) ++ continue; ++ /* Need to map ascii method to int here */ ++ tmp = p ; ++ /* Argh, can't use ldap_map_dequote here */ ++ if ( *tmp == '"' ) { ++ while ( isascii(*++tmp) && isspace(*tmp)) ++ continue; ++ } ++ for(i = 0 ; i < LDAP_MAP_AUTH_METHOD_MAX ; i++ ) { ++ if ( strncmp(tmp,ldap_map_auth_methods[i],strlen(ldap_map_auth_methods[i])) == 0 ) { ++ lmap->method = ldap_map_auth_methods_code[i] ; ++ } ++ } ++ ++ break ; ++ /* This is a string that is dependent on the ++ * method used defined above. ++ */ ++ case 'S': /* Secret for binding */ ++ while (isascii(*++p) && isspace(*p)) ++ continue; ++ lmap->secret = p ; ++ break ; + } + + /* need to account for quoted strings here arggg... */ +@@ -3189,16 +3277,60 @@ + return FALSE; + } + +- if (lmap->binddn != NULL) +- lmap->binddn = newstr(ldap_map_dequote(lmap->binddn)); ++ if (lmap->binddn != NULL) { ++ lmap->binddn = newstr(ldap_map_dequote(lmap->binddn)); ++ ++ if ( lmap->secret != NULL ) { ++ /* need to use method to map secret to passwd string */ ++ switch(lmap->method) ++ { ++ ++ case LDAP_AUTH_NONE: /* Do nothing */ ++ break; ++ case LDAP_AUTH_SIMPLE: /* Secret is the name of a file with ++ the first line as the pwd. */ ++ ++ ++ sfd = safefopen(ldap_map_dequote(lmap->secret),O_RDONLY,0,sff); ++ if ( sfd == NULL ) ++ { ++ syserr("LDAP map: cannot open secret %s",ldap_map_dequote(lmap->secret)); ++ return FALSE ; ++ } else ++ { ++ lmap->secret = sfgets(m_tmp,LDAP_MAP_MAX_PASSWD,sfd,0,"ldap_map_parseargs") ; ++ fclose(sfd) ; ++ if ( lmap->secret != NULL ) ++ { ++ /* chomp newline */ ++ if (m_tmp[strlen(m_tmp)-1] == '\n') ++ m_tmp[strlen(m_tmp)-1] = '\0'; ++ ++ lmap->secret = newstr(m_tmp) ; ++ } ++ } ++ break ; ++ case LDAP_AUTH_KRBV4: /* Secret is where the tgt file ++ is stashed */ ++ /* We could be paranoid here.. */ ++ snprintf(m_tmp,MAXPATHLEN+LDAP_MAP_MAX_PASSWD,"KRBTKFILE=%s",ldap_map_dequote(lmap->secret)); ++ putenv(m_tmp); ++ lmap->secret = NULL ; ++ break ; ++ default : /* Should NEVER get here */ ++ syserr("LDAP map: Garbage in lmap method" ) ; ++ return FALSE ; ++ break ; ++ } /* end switch */ ++ } ++ } + else + lmap->binddn = DEFAULT_LDAP_MAP_BINDDN; +- + +- if (lmap->passwd != NULL) +- lmap->passwd = newstr(ldap_map_dequote(lmap->passwd)); ++ if (lmap->secret != NULL) ++ lmap->secret = newstr(ldap_map_dequote(lmap->secret)); + else +- lmap->passwd = DEFAULT_LDAP_MAP_PASSWD; ++ lmap->secret = DEFAULT_LDAP_MAP_SECRET; + + if (lmap->base != NULL) + lmap->base = newstr(ldap_map_dequote(lmap->base)); diff --git a/debian/patches/patch.local_procmail b/debian/patches/patch.local_procmail new file mode 100644 index 0000000..df6ea83 --- /dev/null +++ b/debian/patches/patch.local_procmail @@ -0,0 +1,68 @@ +# Make sure FEATURE(local_procmail) comes before MAILER(local) +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c '../../cf/feature/local_procmail.m4' 'local_procmail.m4' +Index: ./../../cf/feature/local_procmail.m4 +*** ./../../cf/feature/local_procmail.m4 Mon Jul 19 15:45:59 1999 +--- ./local_procmail.m4 Mon Jul 19 15:46:56 1999 +*************** +*** 12,20 **** + # + + divert(0) +! VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/1998') + divert(-1) + + define(`LOCAL_MAILER_PATH', + ifelse(_ARG_, `', + ifdef(`PROCMAIL_MAILER_PATH', +--- 12,22 ---- + # + + divert(0) +! VERSIONID(`@(#)local_procmail.m4 8.13 (Debian) 7/19/1999') + divert(-1) + ++ ifdef(`_MAILER_local_', ++ `errprint(`*** FEATURE(local_procmail) must occur before MAILER(local)')')dnl + define(`LOCAL_MAILER_PATH', + ifelse(_ARG_, `', + ifdef(`PROCMAIL_MAILER_PATH', +*************** +*** 22,25 **** + `/usr/local/bin/procmail'), + _ARG_)) + define(`LOCAL_MAILER_FLAGS', `SPfhn9') +! define(`LOCAL_MAILER_ARGS', `procmail -Y -a $h -d $u') +--- 24,27 ---- + `/usr/local/bin/procmail'), + _ARG_)) + define(`LOCAL_MAILER_FLAGS', `SPfhn9') +! define(`LOCAL_MAILER_ARGS', `procmail -a $h -d $u') +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Mon Jul 19 15:59:28 1999 +# Generated by : makepatch 2.00 +# Recurse directories : Yes +# p '../../cf/feature/local_procmail.m4' 715 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Mon Jul 19 15:59:28 1999] #### +#### Checksum: 68 2121 26700 #### diff --git a/debian/patches/patch.mail.local b/debian/patches/patch.mail.local new file mode 100644 index 0000000..d0c8b0d --- /dev/null +++ b/debian/patches/patch.mail.local @@ -0,0 +1,68 @@ +diff -wur ./mail.local/mail.local.c ./debian/patches/mail.local/mail.local.c +--- ./mail.local/mail.local.c Tue Dec 29 18:42:53 1998 ++++ ./debian/patches/mail.local/mail.local.c Sun May 7 17:30:14 2000 +@@ -593,6 +593,7 @@ + FILE *fp = NULL; + time_t tval; + int fd, eline; ++ int prevfl, fl = 1; + char line[2048]; + char tmpbuf[sizeof _PATH_LOCTMP + 1]; + +@@ -620,12 +621,13 @@ + for (eline = 1; fgets(line, sizeof(line), stdin);) { + size_t line_len = strlen(line); + ++ prevfl=fl; + if (line_len >= 2 && + line[line_len - 2] == '\r' && + line[line_len - 1] == '\n') { + strcpy(line + line_len - 2, "\n"); + } +- if (lmtprcpts && line[0] == '.') { ++ if (prevfl && lmtprcpts && line[0] == '.') { + char *src = line + 1, *dest = line; + + if (line[1] == '\n') +@@ -634,7 +636,39 @@ + *dest++ = *src++; + *dest = '\0'; + } +- if (line[0] == '\n') ++ ++ fl=0; ++ if (line_len > 0) ++ { ++ if (line[line_len - 1] == '\n') ++ { ++ if (line_len >= 2 && ++ line[line_len - 2] == '\r') ++ { ++ line[line_len - 2] = '\n'; ++ line[line_len - 1] = '\0'; ++ line_len--; ++ } ++ fl = 1; ++ } ++ else if (line[line_len - 1] == '\r') ++ { ++ int peek; ++ /* Did we just miss the CRLF? */ ++ peek = fgetc(stdin); ++ if (peek == '\n') ++ { ++ line[line_len - 1] = '\n'; ++ fl = 1; ++ } ++ else ++ (void) ungetc(peek, stdin); ++ } ++ } ++ else ++ fl = 1; ++ ++ if (prevfl && line[0] == '\n') + eline = 1; + else { + if (eline && line[0] == 'F' && + diff --git a/debian/patches/patch.rmail b/debian/patches/patch.rmail new file mode 100644 index 0000000..c42593d --- /dev/null +++ b/debian/patches/patch.rmail @@ -0,0 +1,52 @@ +# Allow background delivery of mail, instead of queueing +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c '../../rmail/rmail.c' 'rmail.c' +Index: ./../../rmail/rmail.c +Prereq: 8.18 +*** ./../../rmail/rmail.c Tue Dec 29 12:43:05 1998 +--- ./rmail.c Mon Sep 13 10:47:12 1999 +*************** +*** 273,279 **** + i = 0; + args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */ + args[i++] = "-oee"; /* No errors, just status. */ +! args[i++] = "-odq"; /* Queue it, don't try to deliver. */ + args[i++] = "-oi"; /* Ignore '.' on a line by itself. */ + + /* set from system and protocol used */ +--- 273,279 ---- + i = 0; + args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */ + args[i++] = "-oee"; /* No errors, just status. */ +! args[i++] = "-odi"; /* deliver in the foreground. */ + args[i++] = "-oi"; /* Ignore '.' on a line by itself. */ + + /* set from system and protocol used */ +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Mon Sep 13 10:47:49 1999 +# Generated by : makepatch 2.00 +# Recurse directories : Yes +# p '../../rmail/rmail.c' 10101 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Mon Sep 13 10:47:49 1999] #### +#### Checksum: 51 1826 6572 #### diff --git a/debian/patches/prescan.8.9.3.patch b/debian/patches/prescan.8.9.3.patch new file mode 100644 index 0000000..03bb80c --- /dev/null +++ b/debian/patches/prescan.8.9.3.patch @@ -0,0 +1,122 @@ +Index: conf.c +=================================================================== +RCS file: /cvs/sendmail/conf.c,v +retrieving revision 8.456 +retrieving revision 8.456.2.2 +diff -c -r8.456 -r8.456.2.2 +*** sendmail-8.9.3/src/conf.c 7 Feb 1999 07:26:35 -0000 8.456 +--- conf.c 28 Mar 2003 06:03:22 -0000 8.456.2.2 +*************** +*** 286,291 **** +--- 286,293 ---- + DontLockReadFiles = TRUE; + DoubleBounceAddr = "postmaster"; + MaxHeadersLength = MAXHDRSLEN; ++ MaxMimeHeaderLength = MAXLINE; ++ MaxMimeFieldLength = MaxMimeHeaderLength / 2; + snprintf(buf, sizeof buf, "%s%sdead.letter", + _PATH_VARTMP, + _PATH_VARTMP[sizeof _PATH_VARTMP - 2] == '/' ? "" : "/"); +Index: parseaddr.c +=================================================================== +RCS file: /cvs/sendmail/parseaddr.c,v +retrieving revision 8.159 +retrieving revision 8.159.2.3 +diff -c -r8.159 -r8.159.2.3 +*** sendmail-8.9.3/src/parseaddr.c 7 Feb 1999 07:26:40 -0000 8.159 +--- parseaddr.c 27 Mar 2003 19:42:23 -0000 8.159.2.3 +*************** +*** 403,409 **** + }; + + +! # define NOCHAR -1 /* signal nothing in lookahead token */ + + char ** + prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) +--- 403,409 ---- + }; + + +! # define NOCHAR (-1) /* signal nothing in lookahead token */ + + char ** + prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) +*************** +*** 486,491 **** +--- 486,492 ---- + /* see if there is room */ + if (q >= &pvpbuf[pvpbsize - 5]) + { ++ addrtoolong: + usrerr("553 Address too long"); + if (strlen(addr) > (SIZE_T) MAXNAME) + addr[MAXNAME] = '\0'; +*************** +*** 497,507 **** + } + + /* squirrel it away */ + *q++ = c; + } + + /* read a new input character */ +! c = *p++; + if (c == '\0') + { + /* diagnose and patch up bad syntax */ +--- 498,512 ---- + } + + /* squirrel it away */ ++ #if !ALLOW_255 ++ if ((char) c == (char) -1 && !tTd(82, 101)) ++ c &= 0x7f; ++ #endif /* !ALLOW_255 */ + *q++ = c; + } + + /* read a new input character */ +! c = (*p++) & 0x00ff; + if (c == '\0') + { + /* diagnose and patch up bad syntax */ +*************** +*** 556,561 **** +--- 561,569 ---- + } + else if (c != '!' || state == QST) + { ++ /* see if there is room */ ++ if (q >= &pvpbuf[pvpbsize - 5]) ++ goto addrtoolong; + *q++ = '\\'; + continue; + } +*************** +*** 637,642 **** +--- 645,653 ---- + /* new token */ + if (tok != q) + { ++ /* see if there is room */ ++ if (q >= &pvpbuf[pvpbsize - 5]) ++ goto addrtoolong; + *q++ = '\0'; + if (tTd(22, 36)) + { +Index: version.c +=================================================================== +*** sendmail-8.9.3/src/version.c Thu Feb 4 16:38:46 1999 +--- version.c Wed Mar 19 16:33:35 2003 +*************** +*** 14,17 **** + static char sccsid[] = "@(#)version.c 8.9.3.1 (Berkeley) 2/4/1999"; + #endif /* not lint */ + +! char Version[] = "8.9.3"; +--- 14,17 ---- + static char sccsid[] = "@(#)version.c 8.9.3.1 (Berkeley) 2/4/1999"; + #endif /* not lint */ + +! char Version[] = "8.9.3p2"; diff --git a/debian/patches/proto.m4.8.9.3 b/debian/patches/proto.m4.8.9.3 new file mode 100644 index 0000000..fec4494 --- /dev/null +++ b/debian/patches/proto.m4.8.9.3 @@ -0,0 +1,13 @@ +*** ./sendmail-8.9.3/cf/m4/proto.m4 Tue Feb 2 15:21:30 1999 +--- proto.m4.n Tue Dec 3 15:32:38 2002 +*************** +*** 1100,1105 **** +--- 1100,1107 ---- + + ifdef(`ACCESS_TABLE', `dnl + R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 > ++ # empty client_name ++ R $| $+ $: $>LookUpAddress < $1 > <?> < $1 > + R<?> < $+ > $: $>LookUpAddress < $1 > <?> < $1 > + R<?> < $+ > $: $1 + R<OK> < $* > $@ OK diff --git a/debian/patches/sendmail.8.9.3.security.cr.patch b/debian/patches/sendmail.8.9.3.security.cr.patch new file mode 100644 index 0000000..394ddf6 --- /dev/null +++ b/debian/patches/sendmail.8.9.3.security.cr.patch @@ -0,0 +1,487 @@ +Index: headers.c +=================================================================== +RCS file: /cvs/sendmail/headers.c,v +retrieving revision 8.139 +retrieving revision 8.139.2.1 +diff -u -w -r8.139 -r8.139.2.1 +--- src/headers.c 7 Feb 1999 07:26:37 -0000 8.139 ++++ src/headers.c 20 Jan 2003 18:51:34 -0000 8.139.2.1 +@@ -501,9 +501,10 @@ + { + if (bitset(H_FROM, h->h_flags)) + { +- extern char *crackaddr __P((char *)); ++ extern char *crackaddr __P((char *, ENVELOPE *)); + +- expand(crackaddr(buf), buf, sizeof buf, e); ++ expand(crackaddr(buf, e), buf, ++ sizeof buf, e); + } + h->h_value = newstr(buf); + h->h_flags &= ~H_DEFAULT; +@@ -803,7 +804,11 @@ + ** it and replaces it with "$g". The parse is totally ad hoc + ** and isn't even guaranteed to leave something syntactically + ** identical to what it started with. However, it does leave +-** something semantically identical. ++** something semantically identical if possible, else at least ++** syntactically correct. ++** ++** For example, it changes "Real Name <real@example.com> (Comment)" ++** to "Real Name <$g> (Comment)". + ** + ** This algorithm has been cleaned up to handle a wider range + ** of cases -- notably quoted and backslash escaped strings. +@@ -812,6 +817,7 @@ + ** + ** Parameters: + ** addr -- the address to be cracked. ++** e -- the current envelope. + ** + ** Returns: + ** a pointer to the new version. +@@ -824,28 +830,50 @@ + ** be copied if it is to be reused. + */ + ++#define SM_HAVE_ROOM ((bp < buflim) && (buflim <= bufend)) ++ ++/* ++** Append a character to bp if we have room. ++** If not, punt and return $g. ++*/ ++ ++#define SM_APPEND_CHAR(c) \ ++ do \ ++ { \ ++ if (SM_HAVE_ROOM) \ ++ *bp++ = (c); \ ++ else \ ++ goto returng; \ ++ } while (0) ++ ++#if MAXNAME < 10 ++ERROR MAXNAME must be at least 10 ++#endif /* MAXNAME < 10 */ ++ + char * +-crackaddr(addr) ++crackaddr(addr, e) + register char *addr; ++ ENVELOPE *e; + { + register char *p; + register char c; +- int cmtlev; +- int realcmtlev; +- int anglelev, realanglelev; +- int copylev; +- int bracklev; +- bool qmode; +- bool realqmode; +- bool skipping; +- bool putgmac = FALSE; +- bool quoteit = FALSE; +- bool gotangle = FALSE; +- bool gotcolon = FALSE; ++ int cmtlev; /* comment level in input string */ ++ int realcmtlev; /* comment level in output string */ ++ int anglelev; /* angle level in input string */ ++ int copylev; /* 0 == in address, >0 copying */ ++ int bracklev; /* bracket level for IPv6 addr check */ ++ bool addangle; /* put closing angle in output */ ++ bool qmode; /* quoting in original string? */ ++ bool realqmode; /* quoting in output string? */ ++ bool putgmac = FALSE; /* already wrote $g */ ++ bool quoteit = FALSE; /* need to quote next character */ ++ bool gotangle = FALSE; /* found first '<' */ ++ bool gotcolon = FALSE; /* found a ':' */ + register char *bp; + char *buflim; + char *bufhead; + char *addrhead; ++ char *bufend; + static char buf[MAXNAME + 1]; + + if (tTd(33, 1)) +@@ -860,25 +888,22 @@ + ** adjusted later if we find them. + */ + ++ buflim = bufend = &buf[sizeof(buf) - 1]; + bp = bufhead = buf; +- buflim = &buf[sizeof buf - 7]; + p = addrhead = addr; +- copylev = anglelev = realanglelev = cmtlev = realcmtlev = 0; ++ copylev = anglelev = cmtlev = realcmtlev = 0; + bracklev = 0; +- qmode = realqmode = FALSE; ++ qmode = realqmode = addangle = FALSE; + + while ((c = *p++) != '\0') + { + /* +- ** If the buffer is overful, go into a special "skipping" +- ** mode that tries to keep legal syntax but doesn't actually +- ** output things. ++ ** Try to keep legal syntax using spare buffer space ++ ** (maintained by buflim). + */ + +- skipping = bp >= buflim; +- +- if (copylev > 0 && !skipping) +- *bp++ = c; ++ if (copylev > 0) ++ SM_APPEND_CHAR(c); + + /* check for backslash escapes */ + if (c == '\\') +@@ -893,8 +918,8 @@ + p--; + goto putg; + } +- if (copylev > 0 && !skipping) +- *bp++ = c; ++ if (copylev > 0) ++ SM_APPEND_CHAR(c); + goto putg; + } + +@@ -902,8 +927,14 @@ + if (c == '"' && cmtlev <= 0) + { + qmode = !qmode; +- if (copylev > 0 && !skipping) ++ if (copylev > 0 && SM_HAVE_ROOM) ++ { ++ if (realqmode) ++ buflim--; ++ else ++ buflim++; + realqmode = !realqmode; ++ } + continue; + } + if (qmode) +@@ -915,15 +946,15 @@ + cmtlev++; + + /* allow space for closing paren */ +- if (!skipping) ++ if (SM_HAVE_ROOM) + { + buflim--; + realcmtlev++; + if (copylev++ <= 0) + { + if (bp != bufhead) +- *bp++ = ' '; +- *bp++ = c; ++ SM_APPEND_CHAR(' '); ++ SM_APPEND_CHAR(c); + } + } + } +@@ -933,7 +964,7 @@ + { + cmtlev--; + copylev--; +- if (!skipping) ++ if (SM_HAVE_ROOM) + { + realcmtlev--; + buflim++; +@@ -944,7 +975,7 @@ + else if (c == ')') + { + /* syntax error: unmatched ) */ +- if (copylev > 0 && !skipping) ++ if (copylev > 0 && SM_HAVE_ROOM) + bp--; + } + +@@ -962,7 +993,7 @@ + + /* + ** Check for DECnet phase IV ``::'' (host::user) +- ** or ** DECnet phase V ``:.'' syntaxes. The latter ++ ** or DECnet phase V ``:.'' syntaxes. The latter + ** covers ``user@DEC:.tay.myhost'' and + ** ``DEC:.tay.myhost::user'' syntaxes (bletch). + */ +@@ -971,10 +1002,10 @@ + { + if (cmtlev <= 0 && !qmode) + quoteit = TRUE; +- if (copylev > 0 && !skipping) ++ if (copylev > 0) + { +- *bp++ = c; +- *bp++ = *p; ++ SM_APPEND_CHAR(c); ++ SM_APPEND_CHAR(*p); + } + p++; + goto putg; +@@ -985,41 +1016,43 @@ + bp = bufhead; + if (quoteit) + { +- *bp++ = '"'; ++ SM_APPEND_CHAR('"'); + + /* back up over the ':' and any spaces */ + --p; +- while (isascii(*--p) && isspace(*p)) ++ while (p > addr && ++ isascii(*--p) && isspace(*p)) + continue; + p++; + } + for (q = addrhead; q < p; ) + { + c = *q++; +- if (bp < buflim) +- { + if (quoteit && c == '"') +- *bp++ = '\\'; +- *bp++ = c; ++ { ++ SM_APPEND_CHAR('\\'); ++ SM_APPEND_CHAR(c); + } ++ else ++ SM_APPEND_CHAR(c); + } + if (quoteit) + { + if (bp == &bufhead[1]) + bp--; + else +- *bp++ = '"'; ++ SM_APPEND_CHAR('"'); + while ((c = *p++) != ':') +- { +- if (bp < buflim) +- *bp++ = c; +- } +- *bp++ = c; ++ SM_APPEND_CHAR(c); ++ SM_APPEND_CHAR(c); + } + + /* any trailing white space is part of group: */ +- while (isascii(*p) && isspace(*p) && bp < buflim) +- *bp++ = *p++; ++ while (isascii(*p) && isspace(*p)) ++ { ++ SM_APPEND_CHAR(*p); ++ p++; ++ } + copylev = 0; + putgmac = quoteit = FALSE; + bufhead = bp; +@@ -1028,10 +1061,7 @@ + } + + if (c == ';' && copylev <= 0 && !ColonOkInAddr) +- { +- if (bp < buflim) +- *bp++ = c; +- } ++ SM_APPEND_CHAR(c); + + /* check for characters that may have to be quoted */ + if (strchr(MustQuoteChars, c) != NULL) +@@ -1059,42 +1089,45 @@ + + /* oops -- have to change our mind */ + anglelev = 1; +- if (!skipping) +- realanglelev = 1; ++ if (SM_HAVE_ROOM) ++ { ++ if (!addangle) ++ buflim--; ++ addangle = TRUE; ++ } + + bp = bufhead; + if (quoteit) + { +- *bp++ = '"'; ++ SM_APPEND_CHAR('"'); + + /* back up over the '<' and any spaces */ + --p; +- while (isascii(*--p) && isspace(*p)) ++ while (p > addr && ++ isascii(*--p) && isspace(*p)) + continue; + p++; + } + for (q = addrhead; q < p; ) + { + c = *q++; +- if (bp < buflim) +- { + if (quoteit && c == '"') +- *bp++ = '\\'; +- *bp++ = c; ++ { ++ SM_APPEND_CHAR('\\'); ++ SM_APPEND_CHAR(c); + } ++ else ++ SM_APPEND_CHAR(c); + } + if (quoteit) + { + if (bp == &buf[1]) + bp--; + else +- *bp++ = '"'; ++ SM_APPEND_CHAR('"'); + while ((c = *p++) != '<') +- { +- if (bp < buflim) +- *bp++ = c; +- } +- *bp++ = c; ++ SM_APPEND_CHAR(c); ++ SM_APPEND_CHAR(c); + } + copylev = 0; + putgmac = quoteit = FALSE; +@@ -1106,13 +1139,14 @@ + if (anglelev > 0) + { + anglelev--; +- if (!skipping) ++ if (SM_HAVE_ROOM) + { +- realanglelev--; ++ if (addangle) + buflim++; ++ addangle = FALSE; + } + } +- else if (!skipping) ++ else if (SM_HAVE_ROOM) + { + /* syntax error: unmatched > */ + if (copylev > 0) +@@ -1121,7 +1155,7 @@ + continue; + } + if (copylev++ <= 0) +- *bp++ = c; ++ SM_APPEND_CHAR(c); + continue; + } + +@@ -1129,30 +1163,42 @@ + putg: + if (copylev <= 0 && !putgmac) + { +- if (bp > bufhead && bp[-1] == ')') +- *bp++ = ' '; +- *bp++ = MACROEXPAND; +- *bp++ = 'g'; ++ if (bp > buf && bp[-1] == ')') ++ SM_APPEND_CHAR(' '); ++ SM_APPEND_CHAR(MACROEXPAND); ++ SM_APPEND_CHAR('g'); + putgmac = TRUE; + } + } + + /* repair any syntactic damage */ +- if (realqmode) ++ if (realqmode && bp < bufend) + *bp++ = '"'; +- while (realcmtlev-- > 0) ++ while (realcmtlev-- > 0 && bp < bufend) + *bp++ = ')'; +- while (realanglelev-- > 0) ++ if (addangle && bp < bufend) + *bp++ = '>'; +- *bp++ = '\0'; ++ *bp = '\0'; ++ if (bp < bufend) ++ goto success; + ++ returng: ++ /* String too long, punt */ ++ buf[0] = '<'; ++ buf[1] = MACROEXPAND; ++ buf[2]= 'g'; ++ buf[3] = '>'; ++ buf[4]= '\0'; ++ sm_syslog(LOG_ALERT, e->e_id, ++ "Dropped invalid comments from header address"); ++ ++ success: + if (tTd(33, 1)) + { + printf("crackaddr=>`"); + xputs(buf); + printf("'\n"); + } +- + return (buf); + } + /* +Index: main.c +=================================================================== +RCS file: /cvs/sendmail/main.c,v +retrieving revision 8.326 +retrieving revision 8.326.2.2 +diff -u -w -r8.326 -r8.326.2.2 +--- src/main.c 7 Feb 1999 07:43:59 -0000 8.326 ++++ src/main.c 20 Jan 2003 18:51:34 -0000 8.326.2.2 +@@ -2349,7 +2349,7 @@ + static int tryflags = RF_COPYNONE; + char exbuf[MAXLINE]; + extern bool invalidaddr __P((char *, char *)); +- extern char *crackaddr __P((char *)); ++ extern char *crackaddr __P((char *, ENVELOPE *)); + extern void dump_class __P((STAB *, int)); + extern void translate_dollars __P((char *)); + extern void help __P((char *)); +@@ -2671,7 +2671,7 @@ + printf("Usage: /parse address\n"); + return; + } +- q = crackaddr(p); ++ q = crackaddr(p, e); + printf("Cracked address = "); + xputs(q); + printf("\nParsing %s %s address\n", +Index: parseaddr.c +=================================================================== +RCS file: /cvs/sendmail/parseaddr.c,v +retrieving revision 8.159 +retrieving revision 8.159.2.1 +diff -u -w -r8.159 -r8.159.2.1 +--- src/parseaddr.c 7 Feb 1999 07:26:40 -0000 8.159 ++++ src/parseaddr.c 20 Jan 2003 18:51:35 -0000 8.159.2.1 +@@ -2053,7 +2053,7 @@ + static char buf[MAXNAME + 1]; + char lbuf[MAXNAME + 1]; + char pvpbuf[PSBUFSIZE]; +- extern char *crackaddr __P((char *)); ++ extern char *crackaddr __P((char *, ENVELOPE *)); + + if (tTd(12, 1)) + printf("remotename(%s)\n", name); +@@ -2076,7 +2076,7 @@ + if (bitset(RF_CANONICAL, flags) || bitnset(M_NOCOMMENT, m->m_flags)) + fancy = "\201g"; + else +- fancy = crackaddr(name); ++ fancy = crackaddr(name, e); + + /* + ** Turn the name into canonical form. diff --git a/debian/patches/src.conf.h.linux b/debian/patches/src.conf.h.linux new file mode 100644 index 0000000..745cbce --- /dev/null +++ b/debian/patches/src.conf.h.linux @@ -0,0 +1,54 @@ +diff -c './src/conf.h' 'conf.h' +Index: ./src/conf.h +Prereq: 8.385 +*** sendmail-8.9.3/src/conf.h Wed Jul 25 12:23:19 2001 +--- ./src/conf.h Tue Jul 31 16:33:50 2001 +*************** +*** 1274,1280 **** + + #ifdef __linux__ + # define BSD 1 /* include BSD defines */ +! # define USESETEUID 0 /* Have it due to POSIX, but doesn't work */ + # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ + # define HASUNAME 1 /* use System V uname(2) system call */ + # define HASUNSETENV 1 /* has unsetenv(3) call */ +--- 1274,1280 ---- + + #ifdef __linux__ + # define BSD 1 /* include BSD defines */ +! # define USESETEUID 1 /* Have it due to POSIX, but doesn't work */ + # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ + # define HASUNAME 1 /* use System V uname(2) system call */ + # define HASUNSETENV 1 /* has unsetenv(3) call */ +*************** +*** 1283,1289 **** + # endif + # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ + # define GIDSET_T gid_t /* from <linux/types.h> */ +! # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ + # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ + # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ + # ifndef HASFLOCK +--- 1283,1289 ---- + # endif + # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ + # define GIDSET_T gid_t /* from <linux/types.h> */ +! # define HASGETUSERSHELL 1 /* getusershell(3) broken in Slackware 2.0 */ + # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ + # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ + # ifndef HASFLOCK +*************** +*** 1307,1312 **** +--- 1307,1318 ---- + # endif + # include <sys/sysmacros.h> + # undef atol /* wounded in <stdlib.h> */ ++ # if !defined(KERNEL_VERSION) /* not defined in 2.0.x kernel series */ ++ # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) ++ # endif /* !defined(KERNEL_VERSION) */ ++ # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) ++ # define HASFCHMOD 1 /* fchmod(2) */ ++ # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) */ + #endif + + diff --git a/debian/patches/util.c.893.patch b/debian/patches/util.c.893.patch new file mode 100644 index 0000000..fb71fcd --- /dev/null +++ b/debian/patches/util.c.893.patch @@ -0,0 +1,48 @@ +--- ./src/util.c.orig Fri Jan 22 07:18:40 1999 ++++ sendmail-8.9.3/src/util.c Thu Apr 29 02:34:21 1999 +@@ -2086,6 +2086,8 @@ + ProcListVec = npv; + } + ProcListVec[i].proc_pid = pid; ++ if (ProcListVec[i].proc_task != NULL) ++ free(ProcListVec[i].proc_task); + ProcListVec[i].proc_task = newstr(task); + + /* if process adding itself, it's not a child */ +@@ -2142,11 +2144,6 @@ + if (ProcListVec[i].proc_pid == pid) + { + ProcListVec[i].proc_pid = NO_PID; +- if (ProcListVec[i].proc_task != NULL) +- { +- free(ProcListVec[i].proc_task); +- ProcListVec[i].proc_task = NULL; +- } + break; + } + } +@@ -2172,11 +2169,6 @@ + for (i = 1; i < ProcListSize; i++) + { + ProcListVec[i].proc_pid = NO_PID; +- if (ProcListVec[i].proc_task != NULL) +- { +- free(ProcListVec[i].proc_task); +- ProcListVec[i].proc_task = NULL; +- } + } + CurChildren = 0; + } +@@ -2207,11 +2199,6 @@ + "proc_list_probe: lost pid %d", + (int) ProcListVec[i].proc_pid); + ProcListVec[i].proc_pid = NO_PID; +- if (ProcListVec[i].proc_task != NULL) +- { +- free(ProcListVec[i].proc_task); +- ProcListVec[i].proc_task = NULL; +- } + CurChildren--; + } + } + diff --git a/debian/proto.m4 b/debian/proto.m4 new file mode 100644 index 0000000..863b42c --- /dev/null +++ b/debian/proto.m4 @@ -0,0 +1,1329 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 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. +# +# +divert(0) + +VERSIONID(`@(#)proto.m4 8.243 (Berkeley) 2/2/1999') + +MAILER(local)dnl + +# level 8 config file format +V8/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') +divert(-1) + +# do some sanity checking +ifdef(`__OSTYPE__',, + `errprint(`*** ERROR: No system type defined (use OSTYPE macro)')') + +# pick our default mailers +ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `esmtp')') +ifdef(`confLOCAL_MAILER',, `define(`confLOCAL_MAILER', `local')') +ifdef(`confRELAY_MAILER',, + `define(`confRELAY_MAILER', + `ifdef(`_MAILER_smtp_', `relay', + `ifdef(`_MAILER_uucp', `uucp-new', `unknown')')')') +ifdef(`confUUCP_MAILER',, `define(`confUUCP_MAILER', `uucp-old')') +define(`_SMTP_', `confSMTP_MAILER')dnl for readability only +define(`_LOCAL_', `confLOCAL_MAILER')dnl for readability only +define(`_RELAY_', `confRELAY_MAILER')dnl for readability only +define(`_UUCP_', `confUUCP_MAILER')dnl for readability only + +# set our default hashed database type +ifdef(`DATABASE_MAP_TYPE',, `define(`DATABASE_MAP_TYPE', `hash')') + +# back compatibility with old config files +ifdef(`confDEF_GROUP_ID', + `errprint(`*** confDEF_GROUP_ID is obsolete.') + errprint(` Use confDEF_USER_ID with a colon in the value instead.')') +ifdef(`confREAD_TIMEOUT', + `errprint(`*** confREAD_TIMEOUT is obsolete.') + errprint(` Use individual confTO_<timeout> parameters instead.')') +ifdef(`confMESSAGE_TIMEOUT', + `define(`_ARG_', index(confMESSAGE_TIMEOUT, /)) + ifelse(_ARG_, -1, + `define(`confTO_QUEUERETURN', confMESSAGE_TIMEOUT)', + `define(`confTO_QUEUERETURN', + substr(confMESSAGE_TIMEOUT, 0, _ARG_)) + define(`confTO_QUEUEWARN', + substr(confMESSAGE_TIMEOUT, eval(_ARG_+1)))')') +ifdef(`confMIN_FREE_BLOCKS', `ifelse(index(confMIN_FREE_BLOCKS, /), -1,, + `errprint(`*** compound confMIN_FREE_BLOCKS is obsolete.') + errprint(` Use confMAX_MESSAGE_SIZE for the second part of the value.')')') + +# clean option definitions below.... +define(`_OPTION', `ifdef(`$2', `O $1=$2', `#O $1`'ifelse($3, `',, `=$3')')')dnl + +divert(0)dnl + +# override file safeties - setting this option compromises system security +# need to set this now for the sake of class files +_OPTION(DontBlameSendmail, `confDONT_BLAME_SENDMAIL', safe) + +################## +# local info # +################## + +Cwlocalhost +ifdef(`USE_CW_FILE', +`# file containing names of hosts for which we receive email +Fw`'confCW_FILE', + `dnl') + +# my official domain name +# ... `define' this only if sendmail cannot automatically determine your domain +ifdef(`confDOMAIN_NAME', `Dj`'confDOMAIN_NAME', `#Dj$w.Foo.COM') + +ifdef(`_NULL_CLIENT_ONLY_', `divert(-1)')dnl + +CP. + +ifdef(`UUCP_RELAY', +`# UUCP relay host +DY`'UUCP_RELAY +CPUUCP + +')dnl +ifdef(`BITNET_RELAY', +`# BITNET relay host +DB`'BITNET_RELAY +CPBITNET + +')dnl +ifdef(`DECNET_RELAY', +`define(`_USE_DECNET_SYNTAX_', 1)dnl +# DECnet relay host +DC`'DECNET_RELAY +CPDECNET + +')dnl +ifdef(`FAX_RELAY', +`# FAX relay host +DF`'FAX_RELAY +CPFAX + +')dnl +# "Smart" relay host (may be null) +DS`'ifdef(`SMART_HOST', SMART_HOST) + +ifdef(`LUSER_RELAY', `dnl +# place to which unknown users should be forwarded +Kuser user -m -a<> +DL`'LUSER_RELAY', +`dnl') + +# operators that cannot be in local usernames (i.e., network indicators) +CO @ % ifdef(`_NO_UUCP_', `', `!') + +# a class with just dot (for identifying canonical names) +C.. + +# a class with just a left bracket (for identifying domain literals) +C[[ + +ifdef(`MAILER_TABLE', `dnl +# Mailer table (overriding domains) +Kmailertable MAILER_TABLE', +`dnl') + +ifdef(`DOMAIN_TABLE', `dnl +# Domain table (adding domains) +Kdomaintable DOMAIN_TABLE', +`dnl') + +ifdef(`GENERICS_TABLE', `dnl +# Generics table (mapping outgoing addresses) +Kgenerics GENERICS_TABLE', +`dnl') + +ifdef(`UUDOMAIN_TABLE', `dnl +# UUCP domain table +Kuudomain UUDOMAIN_TABLE', +`dnl') + +ifdef(`BITDOMAIN_TABLE', `dnl +# BITNET mapping table +Kbitdomain BITDOMAIN_TABLE', +`dnl') + +ifdef(`VIRTUSER_TABLE', `dnl +# Virtual user table (maps incoming users) +Kvirtuser VIRTUSER_TABLE', +`dnl') + +ifdef(`ACCESS_TABLE', `dnl +# Access list database (for spam stomping) +Kaccess ACCESS_TABLE', +`dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +# MX map (to allow relaying to hosts that we MX for) +Kmxserved bestmx -z: -T<TEMP>', +`dnl') + +ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',`dnl',`dnl +# Resolve map (to check if a host exists in check_mail) +Kresolve host -a<OK> -T<TEMP>') + +ifdef(`confCR_FILE', `dnl +# Hosts that will permit relaying ($=R) +FR`'confCR_FILE', +`dnl') + +# who I send unqualified names to (null means deliver locally) +DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY) + +# who gets all local email traffic ($R has precedence for unqualified names) +DH`'ifdef(`MAIL_HUB', MAIL_HUB) + +# dequoting map +Kdequote dequote + +divert(0)dnl # end of nullclient diversion +# class E: names that should be exposed as from this host, even if we masquerade +ifdef(`_NULL_CLIENT_ONLY_', `#', +`# class L: names that should be delivered locally, even if we have a relay +# class M: domains that should be converted to $M +#CL root +')CE root +undivert(5)dnl + +# who I masquerade as (null for no masquerading) (see also $=M) +DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME) + +# my name for error messages +ifdef(`confMAILER_NAME', `Dn`'confMAILER_NAME', `#DnMAILER-DAEMON') + +undivert(6)dnl +include(_CF_DIR_`m4/version.m4') + +############### +# Options # +############### + +# strip message body to 7 bits on input? +_OPTION(SevenBitInput, `confSEVEN_BIT_INPUT') + +# 8-bit data handling +_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', adaptive) + +ifdef(`_NULL_CLIENT_ONLY_', `dnl', ` +# wait for alias file rebuild (default units: minutes) +_OPTION(AliasWait, `confALIAS_WAIT', 5m) + +# location of alias file +_OPTION(AliasFile, `ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', /etc/mail/aliases, /etc/aliases)) +') +# minimum number of free blocks on filesystem +_OPTION(MinFreeBlocks, `confMIN_FREE_BLOCKS', 100) + +# maximum message size +_OPTION(MaxMessageSize, `confMAX_MESSAGE_SIZE', 1000000) + +# substitution for space (blank) characters +_OPTION(BlankSub, `confBLANK_SUB', _) + +# avoid connecting to "expensive" mailers on initial submission? +_OPTION(HoldExpensive, `confCON_EXPENSIVE') + +# checkpoint queue runs after every N successful deliveries +_OPTION(CheckpointInterval, `confCHECKPOINT_INTERVAL', 10) + +# default delivery mode +_OPTION(DeliveryMode, `confDELIVERY_MODE', background) + +# automatically rebuild the alias database? +_OPTION(AutoRebuildAliases, `confAUTO_REBUILD') + +# error message header/file +_OPTION(ErrorHeader, `confERROR_MESSAGE', ifdef(`_USE_ETC_MAIL_', /etc/mail/error-header, /etc/sendmail.oE)) + +# error mode +_OPTION(ErrorMode, `confERROR_MODE', print) + +# save Unix-style "From_" lines at top of header? +_OPTION(SaveFromLine, `confSAVE_FROM_LINES') + +# temporary file mode +_OPTION(TempFileMode, `confTEMP_FILE_MODE', 0600) + +# match recipients against GECOS field? +_OPTION(MatchGECOS, `confMATCH_GECOS') + +# maximum hop count +_OPTION(MaxHopCount, `confMAX_HOP', 17) + +# location of help file +O HelpFile=ifdef(`HELP_FILE', HELP_FILE, ifdef(`_USE_ETC_MAIL_', /etc/mail/helpfile, /usr/lib/sendmail.hf)) + +# ignore dots as terminators in incoming messages? +_OPTION(IgnoreDots, `confIGNORE_DOTS') + +# name resolver options +_OPTION(ResolverOptions, `confBIND_OPTS', +AAONLY) + +# deliver MIME-encapsulated error messages? +_OPTION(SendMimeErrors, `confMIME_FORMAT_ERRORS') + +# Forward file search path +_OPTION(ForwardPath, `confFORWARD_PATH', /var/forward/$u:$z/.forward.$w:$z/.forward) + +# open connection cache size +_OPTION(ConnectionCacheSize, `confMCI_CACHE_SIZE', 2) + +# open connection cache timeout +_OPTION(ConnectionCacheTimeout, `confMCI_CACHE_TIMEOUT', 5m) + +# persistent host status directory +_OPTION(HostStatusDirectory, `confHOST_STATUS_DIRECTORY', .hoststat) + +# single thread deliveries (requires HostStatusDirectory)? +_OPTION(SingleThreadDelivery, `confSINGLE_THREAD_DELIVERY') + +# use Errors-To: header? +_OPTION(UseErrorsTo, `confUSE_ERRORS_TO') + +# log level +_OPTION(LogLevel, `confLOG_LEVEL', 10) + +# send to me too, even in an alias expansion? +_OPTION(MeToo, `confME_TOO') + +# verify RHS in newaliases? +_OPTION(CheckAliases, `confCHECK_ALIASES') + +# default messages to old style headers if no special punctuation? +_OPTION(OldStyleHeaders, `confOLD_STYLE_HEADERS') + +# SMTP daemon options +_OPTION(DaemonPortOptions, `confDAEMON_OPTIONS', Port=esmtp) + +# privacy flags +_OPTION(PrivacyOptions, `confPRIVACY_FLAGS', authwarnings) + +# who (if anyone) should get extra copies of error messages +_OPTION(PostMasterCopy, `confCOPY_ERRORS_TO', Postmaster) + +# slope of queue-only function +_OPTION(QueueFactor, `confQUEUE_FACTOR', 600000) + +# queue directory +O QueueDirectory=ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue) + +# timeouts (many of these) +_OPTION(Timeout.initial, `confTO_INITIAL', 5m) +_OPTION(Timeout.connect, `confTO_CONNECT', 5m) +_OPTION(Timeout.iconnect, `confTO_ICONNECT', 5m) +_OPTION(Timeout.helo, `confTO_HELO', 5m) +_OPTION(Timeout.mail, `confTO_MAIL', 10m) +_OPTION(Timeout.rcpt, `confTO_RCPT', 1h) +_OPTION(Timeout.datainit, `confTO_DATAINIT', 5m) +_OPTION(Timeout.datablock, `confTO_DATABLOCK', 1h) +_OPTION(Timeout.datafinal, `confTO_DATAFINAL', 1h) +_OPTION(Timeout.rset, `confTO_RSET', 5m) +_OPTION(Timeout.quit, `confTO_QUIT', 2m) +_OPTION(Timeout.misc, `confTO_MISC', 2m) +_OPTION(Timeout.command, `confTO_COMMAND', 1h) +_OPTION(Timeout.ident, `confTO_IDENT', 30s) +_OPTION(Timeout.fileopen, `confTO_FILEOPEN', 60s) +_OPTION(Timeout.queuereturn, `confTO_QUEUERETURN', 5d) +_OPTION(Timeout.queuereturn.normal, `confTO_QUEUERETURN_NORMAL', 5d) +_OPTION(Timeout.queuereturn.urgent, `confTO_QUEUERETURN_URGENT', 2d) +_OPTION(Timeout.queuereturn.non-urgent, `confTO_QUEUERETURN_NONURGENT', 7d) +_OPTION(Timeout.queuewarn, `confTO_QUEUEWARN', 4h) +_OPTION(Timeout.queuewarn.normal, `confTO_QUEUEWARN_NORMAL', 4h) +_OPTION(Timeout.queuewarn.urgent, `confTO_QUEUEWARN_URGENT', 1h) +_OPTION(Timeout.queuewarn.non-urgent, `confTO_QUEUEWARN_NONURGENT', 12h) +_OPTION(Timeout.hoststatus, `confTO_HOSTSTATUS', 30m) + +# should we not prune routes in route-addr syntax addresses? +_OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES') + +# queue up everything before forking? +_OPTION(SuperSafe, `confSAFE_QUEUE') + +# status file +O StatusFile=ifdef(`STATUS_FILE', `STATUS_FILE', ifdef(`_USE_ETC_MAIL_', /etc/mail/statistics, /etc/sendmail.st)) + +# time zone handling: +# if undefined, use system default +# if defined but null, use TZ envariable passed in +# if defined and non-null, use that info +ifelse(confTIME_ZONE, `USE_SYSTEM', `#O TimeZoneSpec=', + confTIME_ZONE, `USE_TZ', `O TimeZoneSpec=', + `O TimeZoneSpec=confTIME_ZONE') + +# default UID (can be username or userid:groupid) +_OPTION(DefaultUser, `confDEF_USER_ID', mailnull) + +# list of locations of user database file (null means no lookup) +_OPTION(UserDatabaseSpec, `confUSERDB_SPEC', ifdef(`_USE_ETC_MAIL_', /etc/mail/userdb, /etc/userdb)) + +# fallback MX host +_OPTION(FallbackMXhost, `confFALLBACK_MX', fall.back.host.net) + +# if we are the best MX host for a site, try it directly instead of config err +_OPTION(TryNullMXList, `confTRY_NULL_MX_LIST') + +# load average at which we just queue messages +_OPTION(QueueLA, `confQUEUE_LA', 8) + +# load average at which we refuse connections +_OPTION(RefuseLA, `confREFUSE_LA', 12) + +# maximum number of children we allow at one time +_OPTION(MaxDaemonChildren, `confMAX_DAEMON_CHILDREN', 12) + +# maximum number of new connections per second +_OPTION(ConnectionRateThrottle, `confCONNECTION_RATE_THROTTLE', 3) + +# work recipient factor +_OPTION(RecipientFactor, `confWORK_RECIPIENT_FACTOR', 30000) + +# deliver each queued job in a separate process? +_OPTION(ForkEachJob, `confSEPARATE_PROC') + +# work class factor +_OPTION(ClassFactor, `confWORK_CLASS_FACTOR', 1800) + +# work time factor +_OPTION(RetryFactor, `confWORK_TIME_FACTOR', 90000) + +# shall we sort the queue by hostname first? +_OPTION(QueueSortOrder, `confQUEUE_SORT_ORDER', priority) + +# minimum time in queue before retry +_OPTION(MinQueueAge, `confMIN_QUEUE_AGE', 30m) + +# default character set +_OPTION(DefaultCharSet, `confDEF_CHAR_SET', iso-8859-1) + +# service switch file (ignored on Solaris, Ultrix, OSF/1, others) +_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', ifdef(`_USE_ETC_MAIL_', /etc/mail/service.switch, /etc/service.switch)) + +# hosts file (normally /etc/hosts) +_OPTION(HostsFile, `confHOSTS_FILE', /etc/hosts) + +# dialup line delay on connection failure +_OPTION(DialDelay, `confDIAL_DELAY', 10s) + +# action to take if there are no recipients in the message +_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', add-to-undisclosed) + +# chrooted environment for writing to files +_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', /arch) + +# are colons OK in addresses? +_OPTION(ColonOkInAddr, `confCOLON_OK_IN_ADDR') + +# how many jobs can you process in the queue? +_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', 10000) + +# shall I avoid expanding CNAMEs (violates protocols)? +_OPTION(DontExpandCnames, `confDONT_EXPAND_CNAMES') + +# SMTP initial login message (old $e macro) +_OPTION(SmtpGreetingMessage, `confSMTP_LOGIN_MSG') + +# UNIX initial From header format (old $l macro) +_OPTION(UnixFromLine, `confFROM_LINE') + +# From: lines that have embedded newlines are unwrapped onto one line +_OPTION(SingleLineFromHeader, `confSINGLE_LINE_FROM_HEADER', False) + +# Allow HELO SMTP command that does not `include' a host name +_OPTION(AllowBogusHELO, `confALLOW_BOGUS_HELO', False) + +# Characters to be quoted in a full name phrase (@,;:\()[] are automatic) +_OPTION(MustQuoteChars, `confMUST_QUOTE_CHARS', .) + +# delimiter (operator) characters (old $o macro) +_OPTION(OperatorChars, `confOPERATORS') + +# shall I avoid calling initgroups(3) because of high NIS costs? +_OPTION(DontInitGroups, `confDONT_INIT_GROUPS') + +# are group-writable `:include:' and .forward files (un)trustworthy? +_OPTION(UnsafeGroupWrites, `confUNSAFE_GROUP_WRITES') + +# where do errors that occur when sending errors get sent? +_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS', postmaster) + +# what user id do we assume for the majority of the processing? +_OPTION(RunAsUser, `confRUN_AS_USER', sendmail) + +# maximum number of recipients per SMTP envelope +_OPTION(MaxRecipientsPerMessage, `confMAX_RCPTS_PER_MESSAGE', 100) + +# shall we get local names from our installed interfaces? +_OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES') + +ifdef(`confTRUSTED_USER', +`# Trusted user for file ownership and starting the daemon +O TrustedUser=confTRUSTED_USER +') +ifdef(`confCONTROL_SOCKET_NAME', +`# Control socket for daemon management +O ControlSocketName=confCONTROL_SOCKET_NAME +') +ifdef(`confMAX_MIME_HEADER_LENGTH', +`# Maximum MIME header length to protect MUAs +O MaxMimeHeaderLength=confMAX_MIME_HEADER_LENGTH +') +ifdef(`confMAX_HEADERS_LENGTH', +`# Maximum length of the sum of all headers +O MaxHeadersLength=confMAX_HEADERS_LENGTH +') + +########################### +# Message precedences # +########################### + +Pfirst-class=0 +Pspecial-delivery=100 +Plist=-30 +Pbulk=-60 +Pjunk=-100 + +##################### +# Trusted users # +##################### + +# this is equivalent to setting class "t" +ifdef(`_USE_CT_FILE_', `', `#')Ft`'ifdef(`confCT_FILE', confCT_FILE, ifdef(`_USE_ETC_MAIL_', `/etc/mail/trusted-users', `/etc/sendmail.ct')) +Troot +Tdaemon +ifdef(`_NO_UUCP_', `dnl', `Tuucp') +ifdef(`confTRUSTED_USERS', `T`'confTRUSTED_USERS', `dnl') + +######################### +# Format of headers # +######################### + +ifdef(`confFROM_HEADER',, `define(`confFROM_HEADER', `$?x$x <$g>$|$g$.')')dnl +H?P?Return-Path: <$g> +HReceived: confRECEIVED_HEADER +H?D?Resent-Date: $a +H?D?Date: $a +H?F?Resent-From: confFROM_HEADER +H?F?From: confFROM_HEADER +H?x?Full-Name: $x +# HPosted-Date: $a +# H?l?Received-Date: $b +H?M?Resent-Message-Id: <$t.$i@$j> +H?M?Message-Id: <$t.$i@$j> +ifdef(`_NULL_CLIENT_ONLY_', + `include(_CF_DIR_`'m4/nullrelay.m4)m4exit', + `dnl') +# +###################################################################### +###################################################################### +##### +##### REWRITING RULES +##### +###################################################################### +###################################################################### + +############################################ +### Ruleset 3 -- Name Canonicalization ### +############################################ +S3 + +# handle null input (translate to <@> special case) +R$@ $@ <@> + +# strip group: syntax (not inside angle brackets!) and trailing semicolon +R$* $: $1 <@> mark addresses +R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr> +R@ $* <@> $: @ $1 unmark @host:... +R$* :: $* <@> $: $1 :: $2 unmark node::addr +R:`include': $* <@> $: :`include': $1 unmark :`include':... +R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs +R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon +R$* : $* <@> $: $2 strip colon if marked +R$* <@> $: $1 unmark +R$* ; $1 strip trailing semi +R$* < $* ; > $1 < $2 > bogus bracketed semi + +# null input now results from list:; syntax +R$@ $@ :; <@> + +# strip angle brackets -- note RFC733 heuristic to get innermost item +R$* $: < $1 > housekeeping <> +R$+ < $* > < $2 > strip excess on left +R< $* > $+ < $1 > strip excess on right +R<> $@ < @ > MAIL FROM:<> case +R< $+ > $: $1 remove housekeeping <> + +# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later +R@ $+ , $+ @ $1 : $2 change all "," to ":" + +# localize and dispose of route-based addresses +R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr> + +# find focus for list syntax +R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax +R $+ : $* ; $@ $1 : $2; list syntax + +# find focus for @ syntax addresses +R$+ @ $+ $: $1 < @ $2 > focus on domain +R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right +R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical + +# do some sanity checking +R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs + +ifdef(`_NO_UUCP_', `dnl', +`# convert old-style addresses to a domain-based address +R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names +R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps +R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains +') +ifdef(`_USE_DECNET_SYNTAX_', +`# convert node::user addresses into a domain-based address +R$- :: $+ $@ $>96 $2 < @ $1 .DECNET > resolve DECnet names +R$- . $- :: $+ $@ $>96 $3 < @ $1.$2 .DECNET > numeric DECnet addr +', + `dnl') +# if we have % signs, take the rightmost one +R$* % $* $1 @ $2 First make them all @s. +R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. +R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish + +# else we must be a local name +R$* $@ $>96 $1 + + +################################################ +### Ruleset 96 -- bottom half of ruleset 3 ### +################################################ + +S96 + +# handle special cases for local names +R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all +R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain +ifdef(`_NO_UUCP_', `dnl', +`R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain') +R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] +R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal +R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr + +ifdef(`DOMAIN_TABLE', `dnl +# look up domains in the domain table +R$* < @ $+ > $* $: $1 < @ $(domaintable $2 $) > $3', `dnl') + +undivert(2)dnl + +ifdef(`BITDOMAIN_TABLE', `dnl +# handle BITNET mapping +R$* < @ $+ .BITNET > $* $: $1 < @ $(bitdomain $2 $: $2.BITNET $) > $3', `dnl') + +ifdef(`UUDOMAIN_TABLE', `dnl +# handle UUCP mapping +R$* < @ $+ .UUCP > $* $: $1 < @ $(uudomain $2 $: $2.UUCP $) > $3', `dnl') + +ifdef(`_NO_UUCP_', `dnl', +`ifdef(`UUCP_RELAY', +`# pass UUCP addresses straight through +R$* < @ $+ . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', +`# if really UUCP, handle it immediately +ifdef(`_CLASS_U_', +`R$* < @ $=U . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_V_', +`R$* < @ $=V . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_W_', +`R$* < @ $=W . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_X_', +`R$* < @ $=X . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_Y_', +`R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') + +ifdef(`_NO_CANONIFY_', `dnl', `dnl +# try UUCP traffic as a local address +R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 +R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3') +')') +ifdef(`_NO_CANONIFY_', `dnl', `dnl +# pass to name server to make hostname canonical +R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4') + +# local host aliases and pseudo-domains are always canonical +R$* < @ $=w > $* $: $1 < @ $2 . > $3 +R$* < @ $j > $* $: $1 < @ $j . > $2 +ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', +`R$* < @ $* $=M > $* $: $1 < @ $2 $3 . > $4', +`R$* < @ $=M > $* $: $1 < @ $2 . > $3') +R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4 +R$* < @ $* . . > $* $1 < @ $2 . > $3 + + +################################################## +### Ruleset 4 -- Final Output Post-rewriting ### +################################################## +S4 + +R$* <@> $@ handle <> and list:; + +# strip trailing dot off possibly canonical name +R$* < @ $+ . > $* $1 < @ $2 > $3 + +# eliminate internal code -- should never get this far! +R$* < @ *LOCAL* > $* $1 < @ $j > $2 + +# externalize local domain info +R$* < $+ > $* $1 $2 $3 defocus +R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical +R@ $* $@ @ $1 ... and exit + +ifdef(`_NO_UUCP_', `dnl', +`# UUCP must always be presented in old form +R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u') + +ifdef(`_USE_DECNET_SYNTAX_', +`# put DECnet back in :: form +R$+ @ $+ . DECNET $2 :: $1 u@h.DECNET => h::u', + `dnl') +# delete duplicate local names +R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host + + + +############################################################## +### Ruleset 97 -- recanonicalize and call ruleset zero ### +### (used for recursive calls) ### +############################################################## + +S`'97 +R$* $: $>3 $1 +R$* $@ $>0 $1 + + +###################################### +### Ruleset 0 -- Parse Address ### +###################################### + +S0 + +R$* $: $>Parse0 $1 initial parsing +R<@> $#_LOCAL_ $: <@> special case error msgs +R$* $: $>98 $1 handle local hacks +R$* $: $>Parse1 $1 final parsing + +# +# Parse0 -- do initial syntax checking and eliminate local addresses. +# This should either return with the (possibly modified) input +# or return with a #error mailer. It should not return with a +# #mailer other than the #error mailer. +# + +SParse0 +R<@> $@ <@> special case error msgs +R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses" +#R@ <@ $* > < @ $1 > catch "@@host" bogosity +R<@ $+> $#error $@ 5.1.3 $: "User address required" +R$* $: <> $1 +R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3 +R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part" +R<> $* $1 +R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name" +R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name" + +# now delete the local info -- note $=O to find characters that cause forwarding +R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user +R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ... +R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here +R< @ $+ > $#error $@ 5.1.3 $: "User address required" +R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ... +R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo" +R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required" +R$* $=O $* < @ *LOCAL* > + $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ... +R$* < @ *LOCAL* > $: $1 + +# +# Parse1 -- the bottom half of ruleset 0. +# + +SParse1 +ifdef(`_MAILER_smtp_', +`# handle numeric address spec +R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec +R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send', + `dnl') + +ifdef(`VIRTUSER_TABLE', `dnl +# handle virtual users +R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > +R<@> $+ + $* < @ $* . > + $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > +R<@> $+ + $* < @ $* . > + $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > +R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > +R<@> $+ $: $1 +R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< $+ > $+ < @ $+ > $: $>97 $1', +`dnl') + +# short circuit local delivery so forwarded email works +ifdef(`_MAILER_usenet_', `dnl +R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially', `dnl') +ifdef(`_STICKY_LOCAL_DOMAIN_', +`R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub +R< $+ > $+ < $+ > $>95 < $1 > $2 < $3 > yep .... +R< > $+ + $* < $+ > $#_LOCAL_ $: $1 + $2 plussed name? +R< > $+ < $+ > $#_LOCAL_ $: @ $1 nope, local address', +`R$=L < @ $=w . > $#_LOCAL_ $: @ $1 special local names +R$+ < @ $=w . > $#_LOCAL_ $: $1 regular local name') + +ifdef(`MAILER_TABLE', `dnl +# not local -- try mailer table lookup +R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name +R< $+ . > $* $: < $1 > $2 strip trailing dot +R< $+ > $* $: < $(mailertable $1 $) > $2 lookup +R< $~[ : $* > $* $>95 < $1 : $2 > $3 check -- resolved? +R< $+ > $* $: $>90 <$1> $2 try domain', +`dnl') +undivert(4)dnl + +ifdef(`_NO_UUCP_', `dnl', +`# resolve remotely connected UUCP links (if any) +ifdef(`_CLASS_V_', +`R$* < @ $=V . UUCP . > $* $: $>95 < $V > $1 <@$2.UUCP.> $3', + `dnl') +ifdef(`_CLASS_W_', +`R$* < @ $=W . UUCP . > $* $: $>95 < $W > $1 <@$2.UUCP.> $3', + `dnl') +ifdef(`_CLASS_X_', +`R$* < @ $=X . UUCP . > $* $: $>95 < $X > $1 <@$2.UUCP.> $3', + `dnl')') + +# resolve fake top level domains by forwarding to other hosts +ifdef(`BITNET_RELAY', +`R$*<@$+.BITNET.>$* $: $>95 < $B > $1 <@$2.BITNET.> $3 user@host.BITNET', + `dnl') +ifdef(`DECNET_RELAY', +`R$*<@$+.DECNET.>$* $: $>95 < $C > $1 <@$2.DECNET.> $3 user@host.DECNET', + `dnl') +ifdef(`_MAILER_pop_', +`R$+ < @ POP. > $#pop $: $1 user@POP', + `dnl') +ifdef(`_MAILER_fax_', +`R$+ < @ $+ .FAX. > $#fax $@ $2 $: $1 user@host.FAX', +`ifdef(`FAX_RELAY', +`R$*<@$+.FAX.>$* $: $>95 < $F > $1 <@$2.FAX.> $3 user@host.FAX', + `dnl')') + +ifdef(`UUCP_RELAY', +`# forward non-local UUCP traffic to our UUCP relay +R$*<@$*.UUCP.>$* $: $>95 < $Y > $1 <@$2.UUCP.> $3 uucp mail', +`ifdef(`_MAILER_uucp_', +`# forward other UUCP traffic straight to UUCP +R$* < @ $+ .UUCP. > $* $#_UUCP_ $@ $2 $: $1 < @ $2 .UUCP. > $3 user@host.UUCP', + `dnl')') +ifdef(`_MAILER_usenet_', ` +# addresses sent to net.group.USENET will get forwarded to a newsgroup +R$+ . USENET $#usenet $: $1', + `dnl') + +ifdef(`_LOCAL_RULES_', +`# figure out what should stay in our local mail system +undivert(1)', `dnl') + +# pass names that still have a host to a smarthost (if defined) +R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name + +# deal with other remote names +ifdef(`_MAILER_smtp_', +`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain', +`R$* < @$* > $* $#error $@ 5.1.2 $: "Unrecognized host name " $2') + +# handle locally delivered names +R$=L $#_LOCAL_ $: @ $1 special local names +R$+ $#_LOCAL_ $: $1 regular local names + +########################################################################### +### Ruleset 5 -- special rewriting after aliases have been expanded ### +########################################################################### + +S5 + +# deal with plussed users so aliases work nicely +R$+ + * $#_LOCAL_ $@ $&h $: $1 +R$+ + $* $#_LOCAL_ $@ + $2 $: $1 + * + +# prepend an empty "forward host" on the front +R$+ $: <> $1 + +ifdef(`LUSER_RELAY', `dnl +# send unrecognized local users to a relay host +R< > $+ $: < $L . > $(user $1 $) look up user +R< $* > $+ <> $* $: < > $2 $3 found; strip $L +R< $* . > $+ $: < $1 > $2 strip extra dot', +`dnl') + +# see if we have a relay or a hub +R< > $+ $: < $H > $1 try hub +R< > $+ $: < $R > $1 try relay +R< > $+ $: < > < $1 $&h > nope, restore +detail +R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part +R< > < $+ > + $* $#_LOCAL_ $@ $2 $: @ $1 strip the extra + +R< > < $+ > $@ $1 no +detail +R$+ $: $1 <> $&h add +detail back in +R$+ <> + $* $: $1 + $2 check whether +detail +R$+ <> $* $: $1 else discard +R< local : $* > $* $: $>95 < local : $1 > $2 no host extension +R< error : $* > $* $: $>95 < error : $1 > $2 no host extension +R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 > +R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 > + +ifdef(`MAILER_TABLE', `dnl +################################################################### +### Ruleset 90 -- try domain part of mailertable entry ### +################################################################### + +S90 +R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4 +R$* <$~[ : $* > $* $>95 < $2 : $3 > $4 check -- resolved? +R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again +R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "." +R< $~[ : $* > $* $>95 < $1 : $2 > $3 "." found? +R< $* > $* $@ $2 no mailertable match', +`dnl') + +################################################################### +### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ### +################################################################### + +S95 +R< > $* $@ $1 strip off null relay +R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< local : $* > $* $>CanonLocal < $1 > $2 +R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user +R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer +R< $=w > $* $@ $2 delete local host +R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer + +################################################################### +### Ruleset CanonLocal -- canonify local: syntax ### +################################################################### + +SCanonLocal +# strip local host from routed addresses +R< $* > < @ $+ > : $+ $@ $>97 $3 +R< $* > $+ $=O $+ < @ $+ > $@ $>97 $2 $3 $4 + +# strip trailing dot from any host name that may appear +R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 > + +# handle local: syntax -- use old user, either with or without host +R< > $* < @ $* > $* $#_LOCAL_ $@ $1@$2 $: $1 +R< > $+ $#_LOCAL_ $@ $1 $: $1 + +# handle local:user@host syntax -- ignore host part +R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 > + +# handle local:user syntax +R< $+ > $* <@ $* > $* $#_LOCAL_ $@ $2@$3 $: $1 +R< $+ > $* $#_LOCAL_ $@ $2 $: $1 + +################################################################### +### Ruleset 93 -- convert header names to masqueraded form ### +################################################################### + +S93 + +ifdef(`GENERICS_TABLE', `dnl +# handle generics database +ifdef(`_GENERICS_ENTIRE_DOMAIN_', +`R$+ < @ $* $=G . > $: < $1@$2$3 > $1 < @ $2$3 . > @ mark', +`R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark') +R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark +R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 > +R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 > +R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified +R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified +R< > $* $: $1 not found', +`dnl') + +# special case the users that should be exposed +R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed +ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', +`R$=E < @ $* $=M . > $@ $1 < @ $2 $3 . >', +`R$=E < @ $=M . > $@ $1 < @ $2 . >') +ifdef(`_LIMITED_MASQUERADE_', `dnl', +`R$=E < @ $=w . > $@ $1 < @ $2 . >') + +# handle domain-specific masquerading +ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', +`R$* < @ $* $=M . > $* $: $1 < @ $2 $3 . @ $M > $4 convert masqueraded doms', +`R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms') +ifdef(`_LIMITED_MASQUERADE_', `dnl', +`R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3') +R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2 +R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null +R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null + +################################################################### +### Ruleset 94 -- convert envelope names to masqueraded form ### +################################################################### + +S94 +ifdef(`_MASQUERADE_ENVELOPE_', +`R$+ $@ $>93 $1', +`R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2') + +################################################################### +### Ruleset 98 -- local part of ruleset zero (can be null) ### +################################################################### + +S98 +undivert(3)dnl + +ifelse(substr(confDELIVERY_MODE,0,1), `d', `errprint(`WARNING: Antispam rules not available in deferred delivery mode.')') +ifdef(`ACCESS_TABLE', `dnl +###################################################################### +### LookUpDomain -- search for domain in access database +### +### Parameters: +### <$1> -- key (domain name) +### <$2> -- default (what to return if not found in db) +### <$3> -- passthru (additional data passed unchanged through) +###################################################################### + +SLookUpDomain +R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> +R<?> <$+.$+> <$+> <$*> $@ $>LookUpDomain <$2> <$3> <$4> +R<?> <$+> <$+> <$*> $@ <$2> <$3> +R<$*> <$+> <$+> <$*> $@ <$1> <$4> + +###################################################################### +### LookUpAddress -- search for host address in access database +### +### Parameters: +### <$1> -- key (dot quadded host address) +### <$2> -- default (what to return if not found in db) +### <$3> -- passthru (additional data passed through) +###################################################################### + +SLookUpAddress +R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> +R<?> <$+.$-> <$+> <$*> $@ $>LookUpAddress <$1> <$3> <$4> +R<?> <$+> <$+> <$*> $@ <$2> <$3> +R<$*> <$+> <$+> <$*> $@ <$1> <$4>', +`dnl') + +###################################################################### +### CanonAddr -- Convert an address into a standard form for +### relay checking. Route address syntax is +### crudely converted into a %-hack address. +### +### Parameters: +### $1 -- full recipient address +### +### Returns: +### parsed address, not in source route form +###################################################################### + +SCanonAddr +R$* $: $>Parse0 $>3 $1 make domain canonical +R< @ $+ > : $* @ $* < @ $1 > : $2 % $3 change @ to % in src route +R$* < @ $+ > : $* : $* $3 $1 < @ $2 > : $4 change to % hack. +R$* < @ $+ > : $* $3 $1 < @ $2 > + +###################################################################### +### ParseRecipient -- Strip off hosts in $=R as well as possibly +### $* $=m or the access database. +### Check user portion for host separators. +### +### Parameters: +### $1 -- full recipient address +### +### Returns: +### parsed, non-local-relaying address +###################################################################### + +SParseRecipient +R$* $: <?> $>CanonAddr $1 +R<?> $* < @ $* . > <?> $1 < @ $2 > strip trailing dots +R<?> $- < @ $* > $: <?> $(dequote $1 $) < @ $2 > dequote local part + +# if no $=O character, no host in the user portion, we are done +R<?> $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4> +R<?> $* $@ $1 + +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +# if we relay, check username portion for user%host so host can be checked also +R<NO> $* < @ $* $=m > $: <RELAY> $1 < @ $2 $3 >', `dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +R<NO> $* < @ $+ > $: <MX> < : $(mxserved $2 $) : > < $1 < @$2 > > +R<MX> < : $* <TEMP> : > $* $#error $@ 4.7.1 $: "450 Can not check MX records for recipient host " $1 +R<MX> < $* : $=w. : $* > < $+ > $: <RELAY> $4 +R<MX> < : $* : > < $+ > $: <NO> $2', `dnl') + +ifdef(`_RELAY_HOSTS_ONLY_', +`R<NO> $* < @ $=R > $: <RELAY> $1 < @ $2 > +ifdef(`ACCESS_TABLE', `dnl +R<NO> $* < @ $+ > $: <$(access $2 $: NO $)> $1 < @ $2 >',`dnl')', +`R<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 > +ifdef(`ACCESS_TABLE', `dnl +R<NO> $* < @ $+ > $: $>LookUpDomain <$2> <NO> <$1 < @ $2 >> +R<$+> <$+> $: <$1> $2',`dnl')') + +R<RELAY> $* < @ $* > $@ $>ParseRecipient $1 +R<$-> $* $@ $2 + +###################################################################### +### check_relay -- check hostname/address on SMTP startup +###################################################################### + +SLocal_check_relay +Scheck_relay +R$* $: $1 $| $>"Local_check_relay" $1 +R$* $| $* $| $#$* $#$3 +R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2 + +SBasic_check_relay +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +ifdef(`ACCESS_TABLE', `dnl +R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 > +R<?> < $+ > $: $>LookUpAddress < $1 > <?> < $1 > +R<?> < $+ > $: $1 +R<OK> < $* > $@ OK +R<RELAY> < $* > $@ RELAY +R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')" +R<DISCARD> $* $#discard $: discard +R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + +ifdef(`_RBL_', `dnl +# DNS based IP address spam lists +R$* $: $&{client_addr} +R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) +ROK $@ OK +R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused by blackhole site _RBL_"', +`dnl') + +###################################################################### +### check_mail -- check SMTP ``MAIL FROM:'' command argument +###################################################################### + +SLocal_check_mail +Scheck_mail +R$* $: $1 $| $>"Local_check_mail" $1 +R$* $| $#$* $#$2 +R$* $| $* $@ $>"Basic_check_mail" $1 + +SBasic_check_mail +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +R<> $@ <OK> +R$* $: <?> $>CanonAddr $1 +R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots +# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc) +R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4 +ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_', +`R<?> $* < @ $+ > $* $: <OK> $1 < @ $2 > $3 ... unresolvable OK', +`R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3 +R<? $* <$->> $* < @ $+ > $* + $: <$2> $3 < @ $4 > $5') + +ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl +# handle case of @localhost on address +R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost > +R<$+> $* < @localhost.$m > + $: < ? $&{client_name} > <$1> $2 < @localhost.$m > +ifdef(`_NO_UUCP_', `dnl', +`R<$+> $* < @localhost.UUCP > + $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >') +R<? $=w> <$+> $* <?> <$2> $3 +R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required" +R<?> <$+> $* $: <$1> $2') + +ifdef(`ACCESS_TABLE', `dnl +# lookup localpart (user@) +R<$+> $* < @ $+ > $* $: <USER $(access $2@ $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try full address (user@domain rest) +R<USER ?> <$+> $* < @ $* > $* + $: <USER $(access $2@$3$4 $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try address (user@domain) +R<USER ?> <$+> $+ < @ $+ > $* + $: <USER $(access $2@$3 $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try (sub)domain (domain) +R<USER ?> <$+> $* < @ $+ > $* + $: $>LookUpDomain <$3> <$1> <> +# check unqualified user in access database +R<?> $* $: <USER $(access $1@ $: ? $) > <?> $1 +# retransform for further use +R<USER $+> <$+> $* $: <$1> $3', +`dnl') + +ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl +# handle case of no @domain on address +R<?> $* $: < ? $&{client_name} > $1 +R<?> $* $@ <OK> ...local unqualed ok +R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required" + ...remote is not') +# check results +R<?> $* $@ <OK> +R<OK> $* $@ <OK> +R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve" +R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist" +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ <RELAY> +R<DISCARD> $* $#discard $: discard +R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')" +R<$+> $* $#error $@ 5.7.1 $: $1 error from access db', +`dnl') + +###################################################################### +### check_rcpt -- check SMTP ``RCPT TO:'' command argument +###################################################################### + +SLocal_check_rcpt +Scheck_rcpt +R$* $: $1 $| $>"Local_check_rcpt" $1 +R$* $| $#$* $#$2 +R$* $| $* $@ $>"Basic_check_rcpt" $1 + +SBasic_check_rcpt +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +ifdef(`_LOOSE_RELAY_CHECK_',`dnl +R$* $: $>CanonAddr $1 +R$* < @ $* . > $1 < @ $2 > strip trailing dots', +`R$* $: $>ParseRecipient $1 strip relayable hosts') + +ifdef(`_BESTMX_IS_LOCAL_',`dnl +ifelse(_BESTMX_IS_LOCAL_, `', `dnl +# unlimited bestmx +R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3', +`dnl +# limit bestmx to $=B +R$* < @ $* $=B > $* $: $1 < @ $2 $3 @@ $(bestmx $2 $3 $) > $4') +R$* $=O $* < @ $* @@ $=w . > $* $@ $>Basic_check_rcpt $1 $2 $3 +R$* < @ $* @@ $=w . > $* $: $1 < @ $3 > $4 +R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4') + +ifdef(`_BLACKLIST_RCPT_',`dnl +ifdef(`ACCESS_TABLE', `dnl +# blacklist local users or any host from receiving mail +R$* $: <?> $1 +R<?> $+ < @ $=w > $: <> <USER $1> <FULL $1@$2> <HOST $2> <$1 < @ $2 >> +R<?> $+ < @ $* > $: <> <FULL $1@$2> <HOST $2> <$1 < @ $2 >> +R<?> $+ $: <> <USER $1> <$1> +R<> <USER $+> $* $: <$(access $1 $: $)> $2 +R<> <FULL $+> $* $: <$(access $1 $: $)> $2 +R<OK> <FULL $+> $* $: <$(access $1 $: $)> $2 +R<> <HOST $+> $* $: <$(access $1 $: $)> $2 +R<OK> <HOST $+> $* $: <$(access $1 $: $)> $2 +R<> <$*> $: $1 +R<OK> <$*> $: $1 +R<RELAY> <$*> $: $1 +R<REJECT> $* $#error $@ 5.2.1 $: "550 Mailbox disabled for this recipient" +R<$+> $* $#error $@ 5.2.1 $: $1 error from access db', `dnl')', `dnl') + +ifdef(`_PROMISCUOUS_RELAY_', `dnl', `dnl +# anything terminating locally is ok +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +R$+ < @ $* $=m > $@ OK', `dnl') +R$+ < @ $=w > $@ OK +ifdef(`_RELAY_HOSTS_ONLY_', +`R$+ < @ $=R > $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$+ < @ $* > $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', +`R$+ < @ $* $=R > $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$+ < @ $* > $: $>LookUpDomain <$2> <?> <$1 < @ $2 >>',`dnl')') +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ RELAY +R<$*> <$*> $: $2',`dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +# allow relaying for hosts which we MX serve +R$+ < @ $* > $: < : $(mxserved $2 $) : > $1 < @ $2 > +R< : $* <TEMP> : > $* $#error $@ 4.7.1 $: "450 Can not check MX records for recipient host " $1 +R<$* : $=w . : $*> $* $@ OK +R< : $* : > $* $: $2', +`dnl') + +# check for local user (i.e. unqualified address) +R$* $: <?> $1 +R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 > +# local user is ok +R<?> $+ $@ OK +R<$+> $* $: $2 + +# anything originating locally is ok +R$* $: <?> $&{client_name} +# check if bracketed IP address (forward lookup != reverse lookup) +R<?> [$+] $: <BAD> [$1] +# pass to name server to make hostname canonical +R<?> $* $~P $: <?> $[ $1 $2 $] +R<$-> $* $: $2 +R$* . $1 strip trailing dots +R$@ $@ OK +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +R$* $=m $@ OK', `dnl') +R$=w $@ OK +ifdef(`_RELAY_HOSTS_ONLY_', +`R$=R $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$* $: <$(access $1 $: ? $)> <$1>',`dnl')', +`R$* $=R $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$* $: $>LookUpDomain <$1> <?> <$1>',`dnl')') +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ RELAY +R<$*> <$*> $: $2',`dnl') + +# check IP address +R$* $: $&{client_addr} +R$@ $@ OK originated locally +R0 $@ OK originated locally +R$=R $* $@ OK relayable IP address +ifdef(`ACCESS_TABLE', `dnl +R$* $: $>LookUpAddress <$1> <?> <$1> +R<RELAY> $* $@ RELAY relayable IP address +R<$*> <$*> $: $2', `dnl') +R$* $: [ $1 ] put brackets around it... +R$=w $@ OK ... and see if it is local + +ifdef(`_RELAY_LOCAL_FROM_', `dnl +# anything with a local FROM is ok +R$* $: $1 $| $>CanonAddr $&f +R$* $| $+ < @ $=w . > $@ OK FROM local +R$* $| $* $: $1 +', `dnl') + +# anything else is bogus +R$* $#error $@ 5.7.1 $: "550 Relaying denied"') + +undivert(9)dnl +# +###################################################################### +###################################################################### +##### +`##### MAILER DEFINITIONS' +##### +###################################################################### +###################################################################### +undivert(7)dnl diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..06dd8ea --- /dev/null +++ b/debian/rules @@ -0,0 +1,427 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# +# This file is also based upon prior sendmail makefiles +# +# This file will make sendmail on either slink or potato, the only thing +# to watch for is to make sure the changelog correctly reflects the +# appropriate distribution! +# +# Richard Nelson <cowboy@debian.org> + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE= + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +package=sendmail +version=$(shell expr `pwd` : '.*-\([0-9.].*\)') +version_main=$(shell expr `pwd` : '.*-\([0-9]*.[0-9.]*\)') + +# Many things depend upon which release (slink, potato, etc.) +ifeq ("$(shell dh_testversion 2.0.40 && echo potato)", "potato") + DH_COMPAT = 2 + TEMP_DIR = $(shell echo "debian/tmp debian/$(package)" | \ + cut -d " " -f $(DH_COMPAT)) + DOC_PFX = usr/share/doc + MAN_PFX = usr/share/man +else + DH_COMPAT = 1 + TEMP_DIR = debian/tmp + DOC_PFX = usr/doc + MAN_PFX = usr/man + endif + +export DH_COMPAT +MAN_DIR="$(TEMP_DIR)/$(MAN_PFX)" +DOC_DIR="$(TEMP_DIR)/$(DOC_PFX)" + + +#------------- +info: + + #-------------------------------------------------------------------- + # The following information will be used for this run: + # Package = $(package) + # version = $(version) + # DH_VERBOSE = $(DH_VERBOSE) + # DH_OPTIONS = $(DH_OPTIONS) + # DH_COMPAT = $(DH_COMPAT) + # TEMP_DIR = $(TEMP_DIR) + # MAN_PFX = $(MAN_PFX) + # DOC_PFX = $(DOC_PFX) + #-------------------------------------------------------------------- + + +#------------- +setup: setup-stamp +setup-stamp: info + + # Mark some files executable, dpkg-source -x undoes me here... + chmod a+x \ + debian/rules \ + debian/local/configure \ + debian/local/sendmailconfig \ + debian/local/updatedb \ + debian/local/parsemc + + # Create proper debian/$(package).dirs file + # This way, we can build for either slink or potato + sed "s?MAN_PFX?$(MAN_PFX)?g" \ + debian/$(package).dirs.template \ + | sed "s?\DOC_PFX?$(DOC_PFX)?g" \ + > debian/$(package).dirs + + # Use autoconf for some Slink/Potato differences + #cd debian/local && autoconf + cd debian/local && ./configure + + touch setup-stamp + + +#------------- +clean: + dh_testdir + dh_testroot + rm -f setup-stamp build-stamp install-stamp + + # Add here commands to clean up after the build process. + #-$(MAKE) clean + #-$(MAKE) distclean + + # First, remove any patches + if [ -f patch-stamp ]; then $(MAKE) -f debian/rules unpatch; fi + + # Finally, clean the whole enchilada + #-$(MAKE) clean -S + + # Debian stuff + rm -f debian/check.tar debian/local/sensible-mda + rm -f debian/local/site.config.m4 + rm -f debian/local/config.* + rm -rf debian/tmp debian/$(package) + + # Local approximation of distclean + for file in \ + mail.local mailstats makemap praliases rmail smrsh src; do \ + rm -rf $$(find . -name "obj*" -type d); \ + done; + + # Cleanup after build (for pristine source, smaller diffs) + #find .. -name $(package)*.asc -size 0 -maxdepth 1 -exec rm {} ";" + + dh_clean + +#------------- +build: build-stamp +build-stamp: setup-stamp + dh_testdir + + # Add here commands to compile the package. + #$(MAKE) + + # First, install any patches + if [ ! -f patch-stamp ]; then $(MAKE) -f debian/rules patch; fi + + # Finally, build the whole enchilada + cd mail.local && ./Build -f ../debian/local/site.config.m4 \ + LIBS="" + cd mailstats && ./Build -f ../debian/local/site.config.m4 \ + LIBS="" + cd makemap && ./Build -f ../debian/local/site.config.m4 \ + LIBS="-ldb" + cd praliases && ./Build -f ../debian/local/site.config.m4 \ + LIBS="-ldb" + cd rmail && ./Build -f ../debian/local/site.config.m4 \ + LIBS="" + cd smrsh && ./Build -f ../debian/local/site.config.m4 \ + LIBS="" + cd src && ./Build -f ../debian/local/site.config.m4 \ + LIBS="-ldb -lwrap -lnsl -lresolv" + # LIBS="-ldb2 -lwrap -lnsl -lresolv -lldap -llber-openldap" + # MAPDEF="-DNEWDB -DMAP_REGEX -DLDAPMAP $(DNIS_DEF)" + + # Debian stuff + cd debian/local && gcc -O2 -o sensible-mda sensible-mda.c + + # Cleanup after build (for pristine source, smaller diffs) + # None - Must leave patches to prevent rebuilds + + touch build-stamp + +#------------- +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + #dh_clean -k + dh_clean + + dh_installdirs + + # Add here commands to install the package into $(TEMP_DIR). + #$(MAKE) prefix=`pwd`/$(TEMP_DIR)/usr install + + # sendmail install proper... with a little help ;-} + #$(MAKE) install DESTDIR="$$(pwd)/$(TEMP_DIR)" + cd mail.local/obj* && $(MAKE) force-install \ + DESTDIR="../../$(TEMP_DIR)" + cd mailstats/obj* && $(MAKE) install \ + DESTDIR="../../$(TEMP_DIR)" + cd makemap/obj* && $(MAKE) install \ + DESTDIR="../../$(TEMP_DIR)" + cd praliases/obj* && $(MAKE) install \ + DESTDIR="../../$(TEMP_DIR)" + cd rmail/obj* && $(MAKE) force-install \ + DESTDIR="../../$(TEMP_DIR)" + cd smrsh/obj* && $(MAKE) install \ + DESTDIR="../../$(TEMP_DIR)" + cd src/obj* && $(MAKE) install \ + DESTDIR="../../$(TEMP_DIR)" + + # correct what the m4 build process did... + mv $(TEMP_DIR)/usr/bin/rmail $(TEMP_DIR)/usr/sbin/rmail + #ln -sf ../sbin/rmail $(TEMP_DIR)/usr/bin/rmail + rm -f $(TEMP_DIR)/var/lib/sendmail/sendmail.st + chown root.mail $(TEMP_DIR)/usr/share/sendmail/sendmail.hf + # NOTE: whilst smptd is a valid alias for sendmail, we don't create + # one so that we can co-exists with smtpd (a firewall frontend) + # NOTE: newscache package also contains /usr/sbin/hoststat + cd $(TEMP_DIR)/usr/bin && \ + rm -f hoststat mailq newaliases purgestat smtpd + for file in \ + $(TEMP_DIR)/usr/bin/mailq \ + $(TEMP_DIR)/usr/lib/sendmail; do \ + ln -sf ../sbin/sendmail $$file; \ + done; + # newalias, purgestat, etc. aren't for the general user... + # yeah, yeah, I know... these can be done with -bxxx as well! + cd $(TEMP_DIR)/usr/sbin && for file in \ + newaliases purgestat \ + ; do \ + ln -sf sendmail $$file; \ + done; + + # create some usefull defaults in /usr/lib/sm.bin (for smrsh) + cd $(TEMP_DIR)/usr/lib/sm.bin && \ + ln -sf ../../bin/procmail procmail && \ + ln -sf ../../bin/deliver deliver && \ + ln -sf ../../bin/vacation vacation + + # sendmail documentation + install -pm 0444 doc/*/*.ps $(DOC_DIR)/$(package)/ + cd doc && { \ + for doc in \ + changes/changes intro/intro op/op usenix/usenix; do\ + base=$$(basename $$doc.txt); \ + test -f $$doc.txt || \ + nroff -me $$doc.me | \ + cat -s > ../$(DOC_DIR)/$(package)/$$base; \ + done; \ + } + + # m4 configuration directories + install -pm 0444 cf/README \ + $(DOC_DIR)/$(package)/cf.README + cp -a cf/* $(TEMP_DIR)/usr/share/$(package)/sendmail.cf + rm -f $(TEMP_DIR)/usr/share/$(package)/sendmail.cf/README + + # contributed stuff - scripts + sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/etrn.pl \ + | sed "s?/etc/sendmail.cf?/etc/mail/sendmail.cf?g" \ + > $(TEMP_DIR)/usr/sbin/etrn + chmod 0755 $(TEMP_DIR)/usr/sbin/etrn + sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/expn.pl \ + > $(TEMP_DIR)/usr/bin/expn + chmod 0755 $(TEMP_DIR)/usr/bin/expn + sed "s?/etc/sendmail.cf?/etc/mail/sendmail.cf?g" \ + debian/checksendmail/checksendmail.perl \ + > $(TEMP_DIR)/usr/sbin/checksendmail + chmod 0755 $(TEMP_DIR)/usr/sbin/checksendmail + # contributed stuff - man + sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/etrn.pl \ + > $(MAN_DIR)/man8/etrn.8 + sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/expn.pl \ + > $(MAN_DIR)/man8/expn.8 + install -p debian/checksendmail/checksendmail.8 \ + $(MAN_DIR)/man8/ + # contributed stuff - examples + sed "s?/bin/perl?/usr/bin/perl?g" contrib/passwd-to-alias.pl \ + > $(DOC_DIR)/$(package)/examples/passwd-to-alias + chmod 0755 $(DOC_DIR)/$(package)/examples/passwd-to-alias + + # Debian stuff - binaries + install -pm 0755 debian/local/sendmailconfig $(TEMP_DIR)/usr/sbin + install -pm 0755 debian/local/runq $(TEMP_DIR)/usr/sbin + install -pm 0755 debian/local/sensible-mda $(TEMP_DIR)/usr/lib/sm.bin + # Debian stuff - scripts + install -pm 0755 debian/local/parsemc $(TEMP_DIR)/usr/share/sendmail + install -pm 0755 debian/local/updatedb $(TEMP_DIR)/usr/share/sendmail + install -pm 0755 debian/local/ip-up.d \ + $(TEMP_DIR)/etc/ppp/ip-up.d/sendmail + install -pm 0755 debian/local/ip-down.d \ + $(TEMP_DIR)/etc/ppp/ip-down.d/sendmail + # Debian stuff - config files + install -pm 0660 -g mail debian/local/service.switch* \ + $(TEMP_DIR)/etc/mail/ + # Debian stuff - m4 + cp -a debian/cf/* $(TEMP_DIR)/usr/share/$(package)/sendmail.cf + install -pm 0660 -g mail debian/local/provider \ + $(TEMP_DIR)/etc/mail/peers/provider + + #$(MAKE) -f debian/rules hacks + + # Not quite debhelper v2 compliant yet + #dh_movefiles + + # Cleanup after build (for pristine source, smaller diffs) + $(MAKE) -f debian/rules unpatch + + touch install-stamp + +#------------- +# This single target is used to build all the packages, all at once, or +# one at a time. So keep in mind: any options passed to commands here will +# affect _all_ packages. Anything you want to only affect one package +# should be put in another target, such as the install target. +binary-common: + # Need this version of debhelper for DH_OPTIONS to work. + dh_testversion 1.1.17 + dh_testdir + dh_testroot + dh_installchangelogs -k RELEASE_NOTES + dh_installcron + if [ -x /usr/bin/dh_installdebconf ]; then dh_installdebconf; fi + dh_installdocs debian/Debian-specific + dh_installemacsen + dh_installexamples + chmod 0755 $(DOC_DIR)/$(package)/examples/passwd-to-alias + chmod 0755 $(DOC_DIR)/$(package)/examples/ip-up.d + chmod 0755 $(DOC_DIR)/$(package)/examples/ip-down.d + if [ -x /usr/bin/dh_installinfo ]; then dh_installinfo; fi + dh_installinit + # install $(TEMP_DIR).init.d $(TEMP_DIR)/etc/init.d/sendmail + dh_installmanpages + cd $(MAN_DIR)/man8 && \ + ln -sf sendmail.8.gz ./purgestat.8.gz + # ln -sf sendmail.8.gz ./hoststat.8.gz + # ln -sf sendmail.8.gz ./sendmail.real.8.gz + sed "s?/usr/adm/sm.bin?/usr/lib/sm.bin?g" smrsh/smrsh.8 \ + > $(MAN_DIR)/man8/smrsh.8 + dh_undocumented + dh_installmenu + if [ -x /usr/bin/dh_installpam ]; then dh_installpam; fi + # + $(MAKE) -s -f debian/rules buildinfo + # + if [ -x /usr/bin/dh_link ]; then dh_link; fi + dh_strip + dh_compress + dh_fixperms + # + # Cleanup misc permissions, etc... (fakeroot, etc.) + chmod a+x $(TEMP_DIR)/usr/share/sendmail/sendmail.cf/sh/* + # + # You may want to make some executables suid here. + chmod 04755 $(TEMP_DIR)/usr/sbin/sendmail + chown 0.8 $(TEMP_DIR)/usr/sbin/sendmail + chmod 0755 $(TEMP_DIR)/usr/sbin/mailstats + chown 0.8 $(TEMP_DIR)/usr/sbin/mailstats + chmod 04755 $(TEMP_DIR)/usr/lib/sm.bin/mail.local + chown 0.8 $(TEMP_DIR)/usr/lib/sm.bin/mail.local + chmod 0755 $(TEMP_DIR)/usr/lib/sm.bin/smrsh + chown 0.8 $(TEMP_DIR)/usr/lib/sm.bin/smrsh + chmod 0755 $(TEMP_DIR)/usr/lib/sm.bin/sensible-mda + chown 0.8 $(TEMP_DIR)/usr/lib/sm.bin/sensible-mda + # + dh_suidregister + dh_makeshlibs + dh_installdeb + # + # Can now clean up debian/*.debhelper scripts + rm -f debian/*.debhelper + dh_shlibdeps + # Handle perl specially, to support building under slink + if [ -x /usr/bin/dh_perl ]; then \ + dh_perl; \ + else \ + echo "perl:Depends=perl5" >> debian/substvars; \ + fi + dh_gencontrol + dh_md5sums -x + dh_builddeb + +#------------- +# Build architecture independant packages using the common target. +# (Uncomment this next line if you have such packages.) +#binary-indep: build install +# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +#------------- +# Build architecture dependant packages using the common target. +binary-arch: build install + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +#------------- +# Any other binary targets build just one binary package at a time. +binary-%: build install + make -f debian/rules binary-common DH_OPTIONS=-p$* + +#------------- +l33ch: + dh_testdir + #@echo >&2 'l33ch is obsolete'; false + cd debian && \ + wget --passive-ftp --timestamping \ + http://www.sendmail.org/faq/faq.txt + #ftp://rtfm.mit.edu/pub/usenet/comp.mail.sendmail/sendmail_FAQ + +#------------- +patch: patch-stamp +patch-stamp: + dh_testdir + + $(MAKE) -s -f debian/patches/Makefile patch + + touch patch-stamp + +unpatch: unpatch-stamp +unpatch-stamp: patch-stamp + dh_testdir + + $(MAKE) -s -f debian/patches/Makefile unpatch + + rm -f patch-stamp + +#------------- +hacks: +# cd debian && uudecode check.tar.uue +# cd $(DOC_DIR)/$(package) && tar -xf ../../../../check.tar +# cd $(DOC_DIR)/$(package)/hack; \ +# for file in *; do \ +# sed "s/dbm /hash /g" < $$file \ +# > ../../../share/sendmail.cf/hack/$$file; \ +# done +# sed "s/dbm /hash /g" $(DOC_DIR)/$(package)/README.check \ +# > $(DOC_DIR)/$(package)/README.Spam +# rm $(DOC_DIR)/$(package)/README.check +# rm -r $(DOC_DIR)/$(package)/hack/ + +#------------- +buildinfo: + @echo; dpkg -l gcc "libc6*" binutils ldso make libdb2 libdb2.6 \ + libopenldap1 dpkg-dev $(BUILDINFO) \ + | awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \ + | tee $(DOC_DIR)/$(package)/buildinfo.Debian; echo + chmod 644 $(DOC_DIR)/$(package)/buildinfo.Debian + +#------------- +# Below here is fairly generic really + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/sendmail-8.9.3-imrss-patches b/debian/sendmail-8.9.3-imrss-patches new file mode 100644 index 0000000..14138da --- /dev/null +++ b/debian/sendmail-8.9.3-imrss-patches @@ -0,0 +1,193 @@ +diff -rc2 --new-file ./cf/README ./cf/README +*** ./cf/README Wed Feb 3 14:06:38 1999 +--- ./cf/README Mon Apr 5 19:24:45 1999 +*************** +*** 852,860 **** + described below. + +! rbl Turns on rejection of hosts found in the Realtime Blackhole +! List. If an argument is provided it is used as the +! name sever to contact; otherwise, the main RBL server at +! rbl.maps.vix.com is used. For details, see +! http://maps.vix.com/rbl/. + + loose_relay_check +--- 852,873 ---- + described below. + +! rbl Turns on rejection of incoming E-mail from SMTP clients +! whose IP addresses are currently included in the MAPS +! Realtime Blackhole List (RBL), a list of known (fixed) +! spam sources. For additional information regarding the +! MAPS RBL list, see http://maps.vix.com/rbl/. +! +! imrss Turns on rejection of incoming E-mail from SMTP clients +! whose IP addresses are currently included in the Internet +! Mail Relay Services Survey (IMRSS) list of unrestricted +! "open" E-mail relay servers. For additional information +! regarding the IMRSS list, see http://www.imrss.org/. +! +! dssl Turns on rejection of incoming E-mail from SMTP clients +! whose IP addresses are currently included in the DynamicIP +! Spam Sources List (DSSL), a list of IP addresses of dynamic +! dialup ports for many commercial ISPs and some Universities. +! For additional information regarding the DSSL, see +! http://www.imrss.org/dssl/. + + loose_relay_check +*************** +*** 1385,1397 **** + Mail can't be sent to spammer@aol.com or anyone at cyberspammer.com. + +! There is also a ``Realtime Blackhole List'' run by the MAPS project +! at http://maps.vix.com/. This is a database maintained in DNS of +! spammers. To use this database, use + + FEATURE(`rbl') + +! This will cause sendmail to reject mail from any site in the +! Realtime Blackhole List database. You can specify an alternative +! RBL name server to contact by specifying an argument to the FEATURE. + + The features described above make use of the check_relay, check_mail, +--- 1398,1437 ---- + Mail can't be sent to spammer@aol.com or anyone at cyberspammer.com. + +! In addition to the above do-it-yourself spam contol mechanisms, you can also +! enable support in Sendmail for arbitrary combinations of some popular data +! bases of IP addrsses that may try to send spam to your local site via SMTP. +! The list described below are all accessed via a special (kludge?) form of +! DNS lookups. +! +! The first such list is the ``Realtime Blackhole List'' run by the MAPS +! project. Information about this list is available at http://maps.vix.com/rbl/. +! This is a database of the IP addresses of known (fixed) spam sources. To use +! the MAPS RBL list for blocking incoming E-mail, include the line: + + FEATURE(`rbl') + +! into your .mc file. This will cause Sendmail to reject mail from any IP +! address currently listed in the MAPS RBL database. +! +! Another list that can be used for junk E-mail filtering is the Internet +! Mail Relay Services Survey's (IMRSS) list of unsecured/unrestricted "open" +! E-mail relays. To use the IMRSS list of open relays for blocking incoming +! E-mail, include the line: +! +! FEATURE(`imrss') +! +! into your .mc file. This will cause Sendmail to reject mail from any IP +! address currently listed in the IMRSS open relays database. +! +! Yet another list that can be used for junk E-mail filtering is the DynamicIP +! Spam Sources List (DSSL). This is a list of the IP address of various +! "dynamic" dialup lines, mostly belonging to commercial Internet Service +! Providers and/or Universities. To use the DSSL list of dynamic dialups +! for blocking incoming E-mail, include the line: +! +! FEATURE(`dssl') +! +! into your .mc file. This will cause Sendmail to reject mail from any IP +! address currently listed in the DSSL database. + + The features described above make use of the check_relay, check_mail, +diff -rc2 --new-file ./cf/feature/dssl.m4 ./cf/feature/dssl.m4 +*** ./cf/feature/dssl.m4 Wed Dec 31 16:00:00 1969 +--- ./cf/feature/dssl.m4 Mon Apr 5 19:05:35 1999 +*************** +*** 0 **** +--- 1,15 ---- ++ divert(-1) ++ # ++ # Copyright (c) 1998 Sendmail, Inc. 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. ++ # ++ # ++ ++ divert(0) ++ VERSIONID(`@(#)imrss.m4 8.8 (Berkeley) 4/5/1999') ++ divert(-1) ++ ++ define(`_DSSL_',`dssl.imrss.org')dnl +diff -rc2 --new-file ./cf/feature/imrss.m4 ./cf/feature/imrss.m4 +*** ./cf/feature/imrss.m4 Wed Dec 31 16:00:00 1969 +--- ./cf/feature/imrss.m4 Mon Apr 5 19:05:20 1999 +*************** +*** 0 **** +--- 1,15 ---- ++ divert(-1) ++ # ++ # Copyright (c) 1998 Sendmail, Inc. 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. ++ # ++ # ++ ++ divert(0) ++ VERSIONID(`@(#)imrss.m4 8.8 (Berkeley) 4/5/1999') ++ divert(-1) ++ ++ define(`_IMRSS_',`mr-out.imrss.org')dnl +diff -rc2 --new-file ./cf/feature/rbl.m4 ./cf/feature/rbl.m4 +*** ./cf/feature/rbl.m4 Tue Dec 29 09:42:13 1998 +--- ./cf/feature/rbl.m4 Mon Apr 5 19:05:06 1999 +*************** +*** 13,15 **** + divert(-1) + +! define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl +--- 13,15 ---- + divert(-1) + +! define(`_RBL_',`rbl.maps.vix.com')dnl +diff -rc2 --new-file ./cf/m4/proto.m4 ./cf/m4/proto.m4 +*** ./cf/m4/proto.m4 Tue Feb 2 15:21:30 1999 +--- ./cf/m4/proto.m4 Tue Apr 6 00:18:06 1999 +*************** +*** 1109,1119 **** + R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + + ifdef(`_RBL_', `dnl +! # DNS based IP address spam lists + R$* $: $&{client_addr} + R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) +! ROK $@ OK +! R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused by blackhole site _RBL_"', + `dnl') + + ###################################################################### +--- 1109,1137 ---- + R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + ++ # For the sake of efficiency, spam blocking list checks are ordered by the ++ # amount of incoming traffic they are likely to affect, mostest firstest. ++ ++ ifdef(`_IMRSS_', `dnl ++ # DNS based IMRSS IP address list ++ R$* $: $&{client_addr} ++ R$-.$-.$-.$- $: $(host $4.$3.$2.$1._IMRSS_. $: OK $) ++ R$+. $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused. See http://www.imrss.org/error.html"', ++ `dnl') ++ ++ ifdef(`_DSSL_', `dnl ++ # DNS based DSSL IP address list ++ R$* $: $&{client_addr} ++ R$-.$-.$-.$- $: $(host $4.$3.$2.$1._DSSL_. $: OK $) ++ R$+. $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused. See http://www.imrss.org/dssl/unblock.html"', ++ `dnl') ++ + ifdef(`_RBL_', `dnl +! # DNS based MAPS RBL IP address list + R$* $: $&{client_addr} + R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) +! R$+. $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused. See http://maps.vix.com/rbl/enduser.html"', + `dnl') ++ ++ R$* $@ OK + + ###################################################################### diff --git a/debian/sendmail-FAQ.doc-base b/debian/sendmail-FAQ.doc-base new file mode 100644 index 0000000..00c0713 --- /dev/null +++ b/debian/sendmail-FAQ.doc-base @@ -0,0 +1,12 @@ +Document: Sendmail +Title: Sendmail Documentation +Author: Various +Abstract: Various tidbits of sendmail lore, both fact and fiction +Section: mail + +Format: text +Files: /usr/share/doc/sendmail/*.txt + +Format: HTML +Index: /usr/share/doc/sendmail/index.html +Files: /usr/share/doc/sendmail/*.html diff --git a/debian/sendmail.README.Debian b/debian/sendmail.README.Debian new file mode 100644 index 0000000..c62e1ee --- /dev/null +++ b/debian/sendmail.README.Debian @@ -0,0 +1,34 @@ + ***** Important notes on sendmail 8.9.2 **** + +1) Sendmail now always uses TCP wrappers (/etc/hosts.allow /etc/hosts.deny) + This is a change from prior versions where wrapper support was enabled + via sendmail.mc. + + Please make sure you add the appropriate entry to the /etc/hosts.* file. + The most likely candidate is to place sendmail: all in /etc/hosts.allow + +2) You should *really* read RELEASE_NOTES... There are *many* changes for + spam control. + A) Relaying is, by default, prohibitted + B) Mail from non-resolvable domains is, by default, prohibitted + + **** Other information **** + +This Debian package includes an automatic configuration utility +`sendmailconfig' which can be run at any time to modify the current sendmail +configuration. + +Most mail-related configuration files are kept in the /etc/mail directory. + +Specialized configurations can be accomplished by editing the file +/etc/mail/sendmail.mc by hand and then running `sendmailconfig' to generate +and use the appropriate corresponding sendmail.cf file. Such configurations +can make use of the m4 configuration macros kept in the +/usr/share/sendmail/sendmail.cf directory. + +See also the other documentation in this directory. + +Finally, the file /etc/aliases holds a text representation of the current mail +aliases. See the aliases(5) man page for more information. If you edit this +file, be sure to run `newaliases' to update the corresponding binary database. + diff --git a/debian/sendmail.TODO b/debian/sendmail.TODO new file mode 100644 index 0000000..06ce774 --- /dev/null +++ b/debian/sendmail.TODO @@ -0,0 +1,27 @@ +Misc: + cleanup/extend sendmailconfig + sendmail -> mgetty/fax linkage + sensible-mda understand maildrop mda (part of 40024) + +Doc: + add hoststat to sendmail manpage + +FHS: + * /usr/lib/sm.bin -> ? + * /usr/lib/sendmail (obsolete link used by rmail/pine/others) + +IRC comments: +* <wichert> cowboy: I use a LUSER_RELAY here, which sends everything to another machine. That other machine uses a different maildomain, so I would like the luserrelay to rewrite the from-address when relaying +<cowboy> wichert: does genericstable work with the relay? +<wichert> cowboy: that probably, but that will rewrite _all_ outgoing mail +<cowboy> wichert: so you want it rewritten *only* when going through the relay? +<wichert> cowboy: indeed. And only for the receiving persons +<cowboy> wichert: hrm... I guess a new mailer def for the relay eh? +<wichert> cowboy: probably, FEATUER(luser_relay,host,rewrite_to) or so, with the 3rd param being optional +<cowboy> wichert: hrm... so you using aliases now? +<wichert> cowboy: no, people who do a group-reply to something I sent just get errors now +<cowboy> wichert: interesting... have you considered masquerading as your luser_relay, and then using generictable/user db to override for the uids that actually exist? +<wichert> cowboy: sounds like a hack and certainly does not scale very well +<cowboy> wichert: most definetly true ;-{ + +* <wichert> cowboy: another thing: you might want to make a /usr/doc/sendmail/README.spam or so with info about all spam/relay-control hacks/features that are in the Debian package, with a couple of examples diff --git a/debian/sendmail.conffiles b/debian/sendmail.conffiles new file mode 100644 index 0000000..1c87967 --- /dev/null +++ b/debian/sendmail.conffiles @@ -0,0 +1,6 @@ +/etc/mail/service.switch +/etc/mail/service.switch-nodns +/etc/mail/peers/provider +/etc/init.d/sendmail +/etc/ppp/ip-up.d/sendmail +/etc/ppp/ip-down.d/sendmail diff --git a/debian/sendmail.copyright b/debian/sendmail.copyright new file mode 100644 index 0000000..b68a73b --- /dev/null +++ b/debian/sendmail.copyright @@ -0,0 +1,101 @@ +This is the Debian Linux prepackaged version of Sendmail, a powerful mail +transport agent. + +This package was put together by Robert Leslie <rob@mars.org>, was +maintained by Johnie Ingram <johnie@debian.org>, and is now being +maintained by Richard Nelson <cowboy@debian.org>. The sources were +were obtained from: + + ftp://ftp.sendmail.org/pub/sendmail/ + + The following copyright applies to this software: + + SENDMAIL LICENSE + +The following license terms and conditions apply, unless a different +license is obtained from Sendmail, Inc., 1401 Park Avenue, Emeryville, CA +94608, or by electronic mail at license@sendmail.com. + +License Terms: + +Use, Modification and Redistribution (including distribution of any +modified or derived work) in source and binary forms is permitted only if +each of the following conditions is met: + +1. Redistributions qualify as "freeware" or "Open Source Software" under + one of the following terms: + + (a) Redistributions are made at no charge beyond the reasonable cost of + materials and delivery. + + (b) Redistributions are accompanied by a copy of the Source Code or by an + irrevocable offer to provide a copy of the Source Code for up to three + years at the cost of materials and delivery. Such redistributions + must allow further use, modification, and redistribution of the Source + Code under substantially the same terms as this license. For the + purposes of redistribution "Source Code" means the complete source + code of sendmail including all modifications. + + Other forms of redistribution are allowed only under a separate royalty- + free agreement permitting such redistribution subject to standard + commercial terms and conditions. A copy of such agreement may be + obtained from Sendmail, Inc. at the above address. + +2. Redistributions of source code must retain the copyright notices as they + appear in each source code file, these license terms, and the + disclaimer/limitation of liability set forth as paragraph 6 below. + +3. Redistributions in binary form must reproduce the Copyright Notice, + these license terms, and the disclaimer/limitation of liability set + forth as paragraph 6 below, in the documentation and/or other materials + provided with the distribution. For the purposes of binary distribution + the "Copyright Notice" refers to the following language: + "Copyright (c) 1998 Sendmail, Inc. All rights reserved." + +4. Neither the name of Sendmail, Inc. nor the University of California nor + the names of their contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. The name "sendmail" is a trademark of Sendmail, Inc. + +5. All redistributions must comply with the conditions imposed by the + University of California on certain embedded code, whose copyright + notice and conditions for redistribution are as follows: + + (a) Copyright (c) 1988, 1993 The Regents of the University of + California. All rights reserved. + + (b) Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + (i) Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + (ii) Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + (iii) All advertising materials mentioning features or use of this + software must display the following acknowledgement: "This + product includes software developed by the University of + California, Berkeley and its contributors." + + (iv) Neither the name of the University nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY + SENDMAIL, INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF + CALIFORNIA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +(Version 8.6, last updated 6/24/1998) diff --git a/debian/sendmail.cron.daily b/debian/sendmail.cron.daily new file mode 100644 index 0000000..c2abbe4 --- /dev/null +++ b/debian/sendmail.cron.daily @@ -0,0 +1,36 @@ +#!/bin/sh +set +e + +copies=2 + +# backup "/etc/mail/sendmail.mc" +if [ -f /etc/mail/sendmail.mc ]; then + if [ ! -f /var/backups/sendmail.mc.bak ]; then + cp -pf /etc/mail/sendmail.mc /var/backups/sendmail.mc.bak + fi; + if ! cmp -s /var/backups/sendmail.mc.bak /etc/mail/sendmail.mc ; then + cd /var/backups + /usr/bin/savelog -p -c $copies sendmail.mc.bak > /dev/null + cp -pf /etc/mail/sendmail.mc /var/backups/sendmail.mc.bak + fi; + fi; + +# while we're here, might as well do sendmail.cf +if [ -f /etc/mail/sendmail.cf ]; then + if [ ! -f /var/backups/sendmail.cf.bak ]; then + cp -pf /etc/mail/sendmail.cf /var/backups/sendmail.cf.bak + fi; + if ! cmp -s /var/backups/sendmail.cf.bak /etc/mail/sendmail.cf ; then + cd /var/backups + # save previous generation only if differences are significant + diff -bBwI "^\#\#\#\#\# " \ + /var/backups/sendmail.cf.bak /etc/mail/sendmail.cf \ + > /dev/null + if [ $? -ne 0 ]; then + /usr/bin/savelog -p -c $copies sendmail.cf.bak \ + > /dev/null + fi; + cp -pf /etc/mail/sendmail.cf /var/backups/sendmail.cf.bak + fi; + fi; + diff --git a/debian/sendmail.dirs b/debian/sendmail.dirs new file mode 100644 index 0000000..aa336ae --- /dev/null +++ b/debian/sendmail.dirs @@ -0,0 +1,25 @@ +DEBIAN +etc/init.d +etc/mail +etc/mail/peers +etc/ppp/ip-up.d +etc/ppp/ip-down.d +usr/bin +usr/sbin +usr/lib/sm.bin +usr/share/doc/sendmail +usr/share/doc/sendmail/examples +usr/share/doc/sendmail/examples/db-examples +usr/share/man/man1 +usr/share/man/man5 +usr/share/man/man8 +usr/share/sendmail +usr/share/sendmail/sendmail.cf/cf +usr/share/sendmail/sendmail.cf/domain +usr/share/sendmail/sendmail.cf/feature +usr/share/sendmail/sendmail.cf/hack +usr/share/sendmail/sendmail.cf/m4 +usr/share/sendmail/sendmail.cf/mailer +usr/share/sendmail/sendmail.cf/ostype +usr/share/sendmail/sendmail.cf/sh +var/lib/sendmail diff --git a/debian/sendmail.dirs.template b/debian/sendmail.dirs.template new file mode 100644 index 0000000..ec4f856 --- /dev/null +++ b/debian/sendmail.dirs.template @@ -0,0 +1,25 @@ +DEBIAN +etc/init.d +etc/mail +etc/mail/peers +etc/ppp/ip-up.d +etc/ppp/ip-down.d +usr/bin +usr/sbin +usr/lib/sm.bin +DOC_PFX/sendmail +DOC_PFX/sendmail/examples +DOC_PFX/sendmail/examples/db-examples +MAN_PFX/man1 +MAN_PFX/man5 +MAN_PFX/man8 +usr/share/sendmail +usr/share/sendmail/sendmail.cf/cf +usr/share/sendmail/sendmail.cf/domain +usr/share/sendmail/sendmail.cf/feature +usr/share/sendmail/sendmail.cf/hack +usr/share/sendmail/sendmail.cf/m4 +usr/share/sendmail/sendmail.cf/mailer +usr/share/sendmail/sendmail.cf/ostype +usr/share/sendmail/sendmail.cf/sh +var/lib/sendmail diff --git a/debian/sendmail.docs b/debian/sendmail.docs new file mode 100644 index 0000000..e04d426 --- /dev/null +++ b/debian/sendmail.docs @@ -0,0 +1,4 @@ +KNOWNBUGS +README +RELEASE_NOTES +debian/faq.txt diff --git a/debian/sendmail.examples b/debian/sendmail.examples new file mode 100644 index 0000000..9bdd0d0 --- /dev/null +++ b/debian/sendmail.examples @@ -0,0 +1,4 @@ +debian/local/ip-up.d +debian/local/ip-down.d +debian/checksendmail/address.resolve +debian/db-examples diff --git a/debian/sendmail.init.d b/debian/sendmail.init.d new file mode 100644 index 0000000..0788bda --- /dev/null +++ b/debian/sendmail.init.d @@ -0,0 +1,169 @@ +#!/bin/sh +set -e +# Start or stop sendmail +# +# Robert Leslie <rob@mars.org> +# Johnie Ingram <johnie@netgod.net> +# David Rocher <rocher@mail.dotcom.fr> +# Richard Nelson <cowboy@debain.org> + +# How often to run the queue +Q="10m" + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/sendmail +COMMAND=/usr/sbin/sendmail +PIDFILE=/var/run/sendmail.pid +QUEUE=/var/spool/mqueue +START_CMD="start-stop-daemon \ + --pidfile $PIDFILE \ + --exec $DAEMON \ + --startas $COMMAND \ + --start" +STOP_CMD="start-stop-daemon \ + --pidfile $PIDFILE \ + --stop" +NAME=sendmail +FLAGS="defaults 50" + +# Support for coexistance with smtpd package +SMTPD=/usr/sbin/smtpd + +test -x $DAEMON -a -d /usr/share/sendmail || exit 0 + +# +# Clean sendmail queues (somewhat) +queue_clean () { + # remove lock files left because of kill/crash + # rm -f $QUEUE/[lnx]f* doesn't work with a plethora of files ;-{ + for i in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z; do + rm -f [lnx]f${i}* + done + # remove zero length qf files + for qffile in $QUEUE/qf*; do + if [ -r "$qffile" -a ! -s "$qffile" ]; then + echo -n "<zero: $qffile> " + rm -f "$qffile" + fi + done + # rename tf files to be qf if the qf does not exist + for tffile in $QUEUE/tf*; do + qffile=`echo "$tffile" | sed 's/t/q/'` + if [ -r "$tffile" -a ! -f "$qffile" ]; then + echo -n "<recovering: $tffile> " + mv "$tffile" "$qffile" + elif [ -f "$tffile" ]; then + echo -n "<extra: $tffile> " + rm -f "$tffile" + fi + done + # remove df files with no corresponding qf files + for dffile in $QUEUE/df*; do + qffile=`echo "$dffile" | sed 's/d/q/'` + if [ -r "$dffile" -a ! -f "$qffile" ]; then + echo -n "<incomplete: $dffile> " + mv "$dffile" `echo $dffile | sed 's/d/D/'` + fi + done + # announce files that have been saved during disaster recovery + for xffile in $QUEUE/[A-Z]f*; do + if [ -f "$xffile" ]; then + echo -n "<panic: $xffile> " + fi + done + } + +# +# enhanced sendmail startup +start() { + # cleanup queues + queue_clean; + + # Skip daemon run for the following: + # * sendmail hasn't been configured + # * smptd, a firewall frontend for sendmail, is installed + # * If running a nullclient + if [ ! -s /etc/mail/sendmail.mc ]; then + echo "sendmail has not been configured, not started." + echo "To configure sendmail, type sendmailconfig" + exit 0 + elif [ -x $SMTPD ] || \ + egrep -qe "^[[:space:]]*FEATURE(nullclient)" \ + /etc/mail/sendmail.mc \ + ; then + echo "sendmail daemon not needed, not started." + exit 0 + fi + # Ok, really start the puppy + cd /var/lib/sendmail + $START_CMD -- -bd -q"$Q" + } + +# +# enhanced sendmail shutdown +stop () { + $STOP_CMD --quiet --oknodo > /dev/null + # + # Now we have to wait until sendmail has _really_ stopped. + # + sleep 2 + if $STOP_CMD --quiet > /dev/null; then + echo -n "Waiting ." + cnt=0 + while $STOP_CMD --quiet > /dev/null; do + cnt=`expr $cnt + 1` + if [ $cnt -gt 60 ]; then + # + # Waited 120 seconds now. Fail. + # + echo -n " Failed " + break + fi + sleep 2 + echo -n "." + done + echo -n " Done " + fi + } + +case "$1" in + start) + echo -n "Starting mail transport agent: " + start + echo "$NAME." + ;; + + stop) + echo -n "Stopping mail transport agent: " + stop + echo "$NAME." + ;; + + restart) + $0 stop + $0 start + ;; + + reload) + echo -n "Reloading $NAME configuration..." + $STOP_CMD --signal HUP + echo "done." + ;; + + force-reload) + $0 reload + ;; + + debug) + echo -n "Dumping $NAME state..." + $STOP_CMD --signal USR1 + echo "done." + ;; + + *) + echo "Usage: /etc/init.d/sendmail {start|stop|restart|reload|force-reload|debug}" + exit 1 + ;; +esac + +exit 0 diff --git a/debian/sendmail.menu.test b/debian/sendmail.menu.test new file mode 100644 index 0000000..e86326c --- /dev/null +++ b/debian/sendmail.menu.test @@ -0,0 +1,24 @@ +?package(sendmail):needs="text" \ + section="Apps/Net/Sendmail" \ + title="runq" \ + longtitle="Send queued Mail" \ + description="runq is a sendmail command that will process the mail queue, attempting to deliver each message." \ + command="/usr/bin/runq" +?package(sendmail):needs="x11" \ + section="Apps/Net/Sendmail" \ + title="runq" \ + longtitle="Send queued Mail" \ + description="runq is a sendmail command that will process the mail queue, attempting to deliver each message." \ + command="/usr/bin/X11/xterm -e /usr/bin/runq" +?package(sendmail):needs="text" \ + section="Apps/Net/Sendmail" \ + title="Mail Queue" \ + longtitle="Display Mail Queue" \ + description="mailq is a sendmail command that will display the mail queue, listing each message." \ + command="/usr/bin/mailq" +?package(sendmail):needs="text" \ + section="Apps/Net/Sendmail" \ + title="Mail Queue" \ + longtitle="Display Mail Queue" \ + description="mailq is a sendmail command that will display the mail queue, listing each message." \ + command="/usr/bin/X11/xterm -e /usr/bin/mailq" diff --git a/debian/sendmail.postinst b/debian/sendmail.postinst new file mode 100644 index 0000000..1e4aa11 --- /dev/null +++ b/debian/sendmail.postinst @@ -0,0 +1,331 @@ +#!/bin/sh -e +set -e + +case "$1" in + configure) + # continue below + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; + esac + +#-------------------------------------------------------------------- +# Continuation of "$1" = "configure" + +#if [ "$2" = "" ]; then echo "first time"; fi + +# Note: can't use debhelper here because the actions aren't contiguous +#xxxHELPER# + +# This would be done via debhelper, but the start of sendmail must be delayed + +# Automatically added by dh_installdocs +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/sendmail -a -d /usr/share/doc/sendmail ]; then + ln -sf ../share/doc/sendmail /usr/doc/sendmail + fi +fi +# End automatically added section +# Automatically added by dh_installinit +update-rc.d sendmail defaults >/dev/null +#/etc/init.d/sendmail start +# End automatically added section +# Automatically added by dh_installmenu +#if test -x /usr/bin/update-menus ; then update-menus ; fi +# End automatically added section +# Automatically added by dh_suidregister +if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then + suidregister -s sendmail /usr/sbin/sendmail root mail 04755 +elif [ -e /usr/sbin/sendmail ]; then + chown root.mail /usr/sbin/sendmail + chmod 04755 /usr/sbin/sendmail + fi +if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then + suidregister -s sendmail /usr/lib/sm.bin/mail.local root mail 04755 +elif [ -e /usr/lib/sm.bin/mail.local ]; then + chown root.mail /usr/lib/sm.bin/mail.local + chmod 04755 /usr/lib/sm.bin/mail.local + fi +# End automatically added section + +/etc/init.d/sendmail stop +update-inetd --disable smtp + +#----------------------------------------------------------- +# Create any needed directories, and move any prior data to +# its new home + +if [ ! -d /etc/mail ]; then + mkdir /etc/mail + chown root.mail /etc/mail + chmod 02770 /etc/mail + fi + +if [ ! -f /etc/mail/aliases -a ! -f /etc/aliases ]; then + if [ -f /usr/doc/sendmail/examples/db-examples/aliases ]; then + cp /usr/doc/sendmail/examples/db-examples/aliases /etc/aliases + fi + fi + +if [ ! -d /var/spool/mail ]; then + mkdir /var/spool/mail + chown root.mail /var/spool/mail + chmod 03775 /var/spool/mail + fi + +if [ ! -d /var/spool/mqueue ]; then + mkdir /var/spool/mqueue + chown root.mail /var/spool/mqueue + chmod 0750 /var/spool/mqueue + fi + +if [ ! -d /var/lib/sendmail ]; then + mkdir /var/lib/sendmail + chown root.mail /var/lib/sendmail + chmod 02750 /var/lib/sendmail + fi + +if [ -d /var/state/sendmail/host_status ]; then + echo "Moving host_status to /var/lib/sendmail/host_status" + mv /var/state/sendmail/host_status /var/lib/sendmail/host_status +elif [ -d /var/sendmail ]; then + echo "Moving /var/sendmail to /var/lib/sendmail" + mv -f /var/sendmail/* /var/lib/sendmail/ || true + rm -rf /var/sendmail + fi +if [ ! -d /var/lib/sendmail/host_status ]; then + mkdir /var/lib/sendmail/host_status + fi +if [ -d /var/lib/sendmail/host_status ]; then + chown root.mail /var/lib/sendmail/host_status + chmod 02750 /var/lib/sendmail/host_status + fi + +if [ -f /var/log/sendmail.st ]; then + echo "Moving /var/log/sendmail.st to /var/lib/sendmail/sendmail.st" + mv /var/log/sendmail.st /var/lib/sendmail/sendmail.st + fi +if [ -f /var/lib/sendmail/sendmail.st ]; then + chown root.mail /var/lib/sendmail/sendmail.st + chmod 0660 /var/lib/sendmail/sendmail.st + fi + +#----------------------------------------------------------- +# Move sendmail.{mc,cf} from /etc/ to /etc/mail +if [ ! -f /etc/mail/sendmail.mc ]; then + if [ -f /etc/sendmail.mc ]; then + # Move from /etc/sendmail.* to /etc/mail/sendmail.* + echo "Moving /etc/sendmail.* to /etc/mail" + mv /etc/sendmail.mc /etc/mail/sendmail.mc + chown root.mail /etc/mail/sendmail.mc + chmod 0664 /etc/mail/sendmail.mc + mv /etc/sendmail.mc /etc/mail/sendmail.cf + fi; + fi; + +start_ask=0 +#----------------------------------------------------------- +#start(): start sendmail +start () { + if [ $start_ask -eq 1 ]; then + echo " " + echo -n "Start sendmail now? (Y/n) " + read yn + yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//") + test -n "$yn" || yn="Y" + case "$yn" in + [Yy]*) + /etc/init.d/sendmail start + ;; + [Nn]*) + echo " " + echo "Not started; to start later," \ + "type: /etc/init.d/sendmail start" + echo -n "Press [ENTER] " + read yn + ;; + esac + fi; + } + +#----------------------------------------------------------- +# configure(): save sendmail.cf, call sendmailconfig +configure () { + echo -n "Configure now ? (y/N) " + read yn + yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//") + test -n "$yn" || yn="N" + case "$yn" in + [Yy]*) + if [ -f /etc/mail/sendmail.cf ]; then + echo "Saving old /etc/mail/sendmail.cf" \ + "as /etc/mail/sendmail.cf.old ..." + mv -f /etc/mail/sendmail.cf \ + /etc/mail/sendmail.cf.old + chown root.mail /etc/mail/sendmail.cf.old + chmod 0644 /etc/mail/sendmail.cf.old + fi; + sendmailconfig --no-reload + start + ;; + [Nn]*) + echo -e "\nTo configure sendmail later, type" \ + "sendmailconfig" + echo "After configuring sendmail, you can" \ + "start it via /etc/init.d/sendmail start" + echo -n "Press [ENTER] " + read yn + ;; + esac + } + + +#----------------------------------------------------------- +# Create /etc/mail/sendmail.mc if it doesn't exist +if [ ! -f /etc/mail/sendmail.mc ]; then + cat <<-EOT + + You are doing a new install, or have erased /etc/mail/sendmail.mc. + If you've accidentaly erased /etc/mail/sendmail.mc, check /var/backups. + + Sendmail will not start until it is configured. + Do you wish to configure sendmail now, or wait until later? + + EOT + start_ask=1 + start_txt="" + configure + exit 0 + fi; + +#----------------------------------------------------------- +# Next, save the current files in safe place... +echo "Saving current /etc/mail/sendmail.{mc,cf} to /var/backups" +/etc/cron.daily/sendmail + +#----------------------------------------------------------- +# Perform some updated to an existing sendmail.mc to make +# sure it is compatible with the current executables. +changed=0 +if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then + echo "Correcting FEATURE(mailertable) in /etc/mail/sendmail.mc" + sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \ + /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new + changed=1 + chown root.mail /etc/mail/sendmail.mc.new + chmod 0664 /etc/mail/sendmail.mc.new + mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc + fi; +if (grep -q "^[[:space:]]*FEATURE(smrsh, \`/usr/sbin/smrsh')dnl" /etc/mail/sendmail.mc); then + echo "Correcting FEATURE(smrsh) in /etc/mail/sendmail.mc" + sed "s?FEATURE(smrsh, \`/usr/sbin/smrsh')dnl?FEATURE(smrsh, \`/usr/lib/sm.bin/smrsh')dnl?g" \ + /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new + changed=1 + chown root.mail /etc/mail/sendmail.mc.new + chmod 0664 /etc/mail/sendmail.mc.new + mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc + fi; + + +#----------------------------------------------------------- +# See if we can do this automagically... +cat <<-EOT + +It's usually a good idea to regenerate the sendmail.cf configuration +file with each new spin of the sendmail package. + +But, if you hand edited it instead of making changes through sendmail.mc, +then you want to say no, save your old sendmail.cf, run sendmailconfig, +then migrate your changes into the new version. + +EOT +echo -n "Automagically regenerate the sendmail.cf configuration file? (Y/n) " +read yn +yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//") +test -n "$yn" || yn="Y" +case "$yn" in + [Yy]*) + ;; + [Nn]*) + cat <<-EOT + + OK, your sendmail.cf has *not* been altered. + EOT + if [ $changed -eq 1 ]; then + cat <<-EOT + + *** Warning *** + There have been changes in the paths + of some databases and executables referenced + in /etc/mail/sendmail.mc. These changes + were made for you (see the "Correcting" messages + above), but they have *not* been + reflected in /etc/mail/sendmail.cf! + + Until you update /etc/mail/sendmail.cf as + outlined above, you should expect to have + problems running sendmail! + + "Well, a pet peeve of mine is people who + directly edit the .cf file instead of using + the m4 configuration files. Don't do it! + [laughs] I treat the .cf file as a binary + file - you should too." + -- Eric Allman 1999/10/18 + + EOT + fi; + echo "Do you wish to run sendmailconfig now, or later" + start_ask=0 + configure + case "$yn" in + [Yy]*) + cat <<-EOT + + Do you wish to start sendmail with the new sendmail.cf, + or do you wish to delay until you can merge any changes + from your older sendmail.cf.old? + EOT + start_ask=1 + start + ;; + esac + exit 0 + esac + +#----------------------------------------------------------- +# If we're still here, we're going the automagic path... +# Now, liberal application of smoke and mirrors +if [ -f /etc/mail/sendmail.mc ]; then + if [ -f /etc/mail/sendmail.cf ]; then + echo "Saving old /etc/mail/sendmail.cf" \ + "as /etc/mail/sendmail.cf.old ..." + cp -f /etc/mail/sendmail.cf \ + /etc/mail/sendmail.cf.old + chown root.mail /etc/mail/sendmail.cf.old + chmod 0644 /etc/mail/sendmail.cf.old + fi; + /usr/share/sendmail/updatedb || true + start_ask=1 + start + fi; + +exit 0 + +#----------------------------------------------------------- +#if test "$1" = configure && dpkg --compare-versions "$2" lt 8.9.3-4; then +#if (sed -n -e "/^DZ/s/^DZ//p" /etc/mail/sendmail.cf \ +#| grep "8.9.3" > /dev/null); then +#echo "Existing /etc/mail/sendmail.cf found, and it appears it may be" +#echo -n "compatible with this version of sendmail. Use it? [Y] " +# +# List herein (for reference) what debhelper would've done: +#xDEBHELPER# +exit 0 diff --git a/debian/sendmail.postrm b/debian/sendmail.postrm new file mode 100644 index 0000000..cf70ba9 --- /dev/null +++ b/debian/sendmail.postrm @@ -0,0 +1,41 @@ +#!/bin/sh -e +set -e + +case "$1" in + remove) + ;; + + purge) + rm -rf /var/sendmail + rm -rf /usr/doc/sendmail + rm -rf /usr/share/doc/sendmail + rm -rf /usr/share/sendmail + rm -rf /var/spool/mqueue + rm -f /etc/sendmail.cf \ + /etc/aliases.db /etc/aliases.dir /etc/aliases.pag + if [ -f /etc/mail/aliases -a -L /etc/aliases ]; then + mv /etc/mail/aliases /etc/aliases; + fi; + rm -rf /etc/mail/peers + #cd /etc/mail && make clean + rm -f /etc/mail/*.db /etc/mail/*.dir /etc/mail/*.pag + rm -f /etc/mail/sendmail.cf /etc/mail/sendmail.cf.old \ + /etc/mail/sendmail.mc /etc/mail/sendmail.mc.old \ + /etc/mail/databases /etc/mail/Makefile + rmdir /etc/mail 2>/dev/null || true + ;; + + upgrade) + ;; + + failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + ;; + esac + +#DEBHELPER# +exit 0 diff --git a/debian/sendmail.preinst b/debian/sendmail.preinst new file mode 100644 index 0000000..5393c22 --- /dev/null +++ b/debian/sendmail.preinst @@ -0,0 +1,21 @@ +#!/bin/sh -e +set -e + +case "$1" in + install) + ;; + + upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 0 + ;; + esac + +#DEBHELPER# +exit 0 diff --git a/debian/sendmail.prerm b/debian/sendmail.prerm new file mode 100644 index 0000000..840eabe --- /dev/null +++ b/debian/sendmail.prerm @@ -0,0 +1,36 @@ +#!/bin/sh -e +set -e + +case "$1" in + remove) + /etc/init.d/sendmail stop + ;; + + upgrade) + ;; + + failed-upgrade) + ;; + + deconfigure) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; + esac + +# The @DEBHELPER@ stuff causes problems with upgrades because of the +# length of time that sendmail is stopped... + +# Automatically added by dh_installdocs +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/sendmail ]; then + rm -f /usr/doc/sendmail +fi +# End automatically added section +# Automatically added by dh_installinit +#/etc/init.d/sendmail stop +# End automatically added section +#@DEBHELPER# +exit 0 diff --git a/debian/sendmail.suid b/debian/sendmail.suid new file mode 100644 index 0000000..04f6530 --- /dev/null +++ b/debian/sendmail.suid @@ -0,0 +1,3 @@ +/usr/lib/sm.bin/mail.local +/usr/sbin/sendmail +/usr/sbin/mailstats diff --git a/debian/socks_wrapper b/debian/socks_wrapper new file mode 100644 index 0000000..ad89379 --- /dev/null +++ b/debian/socks_wrapper @@ -0,0 +1,31 @@ +#!/bin/bash +# Richard Nelson <cowboy@debain.org> +# Socks5 support wrapper for sendmail + +DAEMON=/usr/sbin/sendmail.real +RUNSOCKS=/usr/bin/runsocks +BASENAME=$(basename $0) + +# Adjust command name based upon the presence of the socks5 wrapper +if [ -x $RUNSOCKS ]; then + COMMAND="$RUNSOCKS $DAEMON" +else + COMMAND="$DAEMON" + fi +#echo "$BASENAME command="$COMMAND + +# Exec the appropriate command +case "$BASENAME" in + # These don't need socks support, and must be called by name + "hoststat" | "mailq" | "newaliases" | "purgestat") + exec -a $BASENAME $DAEMON "$@" + ;; + # These need socks support + "sendmail") + exec -a $DAEMON $COMMAND "$@" + ;; + # Help... shouldn't be here + *) + echo "panic, $BASENAME is not a valid alias for sendmail." + ;; + esac diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..c799298 --- /dev/null +++ b/debian/watch @@ -0,0 +1,5 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +ftp.sendmail.org /pub/sendmail/ sendmail\.(.*)\.tar.gz debian uupdate |