From cb1b9d89c5278ac97b3fee2d39f9219bbda5180f Mon Sep 17 00:00:00 2001 From: "Richard A Nelson (Rick)" Date: Wed, 3 Nov 2010 22:05:00 +0000 Subject: Imported Debian patch 8.14.4-2 --- debian/examples/Makefile | 20 +-- debian/examples/Makefile.in | 8 +- .../examples/dhcp/dhclient-exit-hooks.d/sendmail | 49 +++++++ .../dhcp/dhclient-exit-hooks.d/sendmail.1.old | 158 +++++++++++++++++++++ .../dhcp/dhclient-exit-hooks.d/sendmail.in | 49 +++++++ .../dhcp/dhclient-exit-hooks.d/sendmail.md5sum | 1 + .../examples/dhcp3/dhclient-exit-hooks.d/sendmail | 49 ------- .../dhcp3/dhclient-exit-hooks.d/sendmail.1.old | 158 --------------------- .../dhcp3/dhclient-exit-hooks.d/sendmail.in | 49 ------- .../dhcp3/dhclient-exit-hooks.d/sendmail.md5sum | 1 - debian/examples/sasl/sasl.m4 | 4 +- debian/examples/tls/starttls.m4 | 4 +- 12 files changed, 275 insertions(+), 275 deletions(-) create mode 100644 debian/examples/dhcp/dhclient-exit-hooks.d/sendmail create mode 100644 debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.1.old create mode 100644 debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in create mode 100644 debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.md5sum delete mode 100644 debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail delete mode 100644 debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.1.old delete mode 100644 debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.in delete mode 100644 debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.md5sum (limited to 'debian/examples') diff --git a/debian/examples/Makefile b/debian/examples/Makefile index e6c9778..2a47027 100644 --- a/debian/examples/Makefile +++ b/debian/examples/Makefile @@ -192,7 +192,7 @@ sm_build_arch = amd64 sm_custom = sm_custom_s = sm_databases = REGEX, DB, NIS, NIS+, LDAP, DNS -sm_date = 2010-10-16 +sm_date = 2010-11-03 sm_depends = sm_dist_name = Debian sm_dist_vers = squeeze/sid @@ -243,7 +243,7 @@ sm_newdb_lib = -ldb-4.8 sm_praliases_envdef = sm_praliases_libs = -ldb-4.8 -lldap -llber sm_recommends = -sm_revision = -1 +sm_revision = -2 sm_rmail_envdef = sm_rmail_libs = -lldap -llber sm_sendmail_envdef = -D_PATH_SENDMAILPID=\"/var/run/sendmail/mta/sendmail.pid\" -DIP_SRCROUTE=1 -DLDAP_REFERRALS -D_FFR_LDAP_URI -D_FFR_LDAP_SETVERSION -DLDAP_DEPRECATED -DTCPWRAPPERS -DSASL -I/usr/include/sasl -DSTARTTLS -D_FFR_QUEUE_SCHED_DBG -D_FFR_SKIP_DOMAINS -D_FFR_GROUPREADABLEAUTHINFOFILE -D_FFR_DAEMON_NETUNIX -D_FFR_NO_PIPE -D_FFR_SHM_STATUS -D_FFR_RHS -D_FFR_MAIL_MACRO -D_FFR_QUEUEDELAY=1 -D_FFR_BADRCPT_SHUTDOWN -D_FFR_RESET_MACRO_GLOBALS -D_FFR_TLS_1 -D_FFR_DEAL_WITH_ERROR_SSL @@ -251,7 +251,7 @@ sm_sendmail_libs = -ldb-4.8 -lnsl -lldap -llber -lresolv -lwrap -lsasl2 -lcrypt sm_smrsh_envdef = -DCMDDIR=\"/etc/mail/smrsh\" -DPATH=\"/usr/bin:/bin\" sm_smrsh_libs = -lldap -llber sm_suggests = , sasl2-bin, libsasl2-modules, openssl -sm_time = 19:38:59 +sm_time = 22:21:32 sm_utc = +0000 sm_vacation_envdef = sm_vacation_libs = -ldb-4.8 -lldap -llber @@ -277,13 +277,13 @@ top_srcdir = .. #------------------------------------------------------------------------------ # vim: syntax=make # -# $Sendmail: Makefile,v 8.14.4 2010-10-16 19:38:59 cowboy Exp $ +# $Sendmail: Makefile,v 8.14.4 2010-11-03 22:21:32 cowboy Exp $ # # Copyright (c) 1998-2010 Richard Nelson. All Rights Reserved. # # examples/Makefile. Generated from Makefile.in by configure. # -# Rules file for Sendmail 8.14.4-1(527876) +# Rules file for Sendmail 8.14.4-2(527876) # on Debian squeeze/sid # via Debhelper V1 # @@ -291,7 +291,7 @@ top_srcdir = .. # on Debian slink, potato, woody, testing, sid, ... # but the generated file is customized to the version noted above. # -# Richard Nelson 2010-10-16 19:38:59 (+0000) +# Richard Nelson 2010-11-03 22:21:32 (+0000) #------------------------------------------------------------------------------ # # Shipped programs @@ -305,13 +305,13 @@ dist_man_MANS = checksendmail/checksendmail.8 # Shipped data # # Installed example subdirectories -EXAMPLES_DIRS = amavis db dhcp3 \ +EXAMPLES_DIRS = amavis db dhcp \ ldap logcheck milter network \ pam.d ppp resolvconf sasl tls # # Sigh... I wanted to use sysconf_SCRIPTS, but automake says NO! -nobase_dist_sysconf_DATA = dhcp3/dhclient-exit-hooks.d/sendmail \ +nobase_dist_sysconf_DATA = dhcp/dhclient-exit-hooks.d/sendmail \ logcheck/ignore.d.paranoid/sendmail \ logcheck/ignore.d.server/sendmail \ logcheck/ignore.d.workstation/sendmail \ @@ -630,14 +630,14 @@ install-data-hook: $(INSTALL_DATA) '{}' ${DESTDIR}${pkgdatadir}/examples/'{}'; \ done; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/milter/Makefile; - chmod a+rx ${DESTDIR}${pkgdatadir}/examples/dhcp3/dhclient-exit-hooks.d/sendmail; + chmod a+rx ${DESTDIR}${pkgdatadir}/examples/dhcp/dhclient-exit-hooks.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/network/if-down.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/network/if-post-down.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/network/if-up.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/ppp/ip-down.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/ppp/ip-up.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/resolvconf/update-libc.d/sendmail; - chmod a+rx ${DESTDIR}${sysconfdir}/dhcp3/dhclient-exit-hooks.d/sendmail; + chmod a+rx ${DESTDIR}${sysconfdir}/dhcp/dhclient-exit-hooks.d/sendmail; chmod a+rx ${DESTDIR}${sysconfdir}/network/if-down.d/sendmail; chmod a+rx ${DESTDIR}${sysconfdir}/network/if-post-down.d/sendmail; chmod a+rx ${DESTDIR}${sysconfdir}/network/if-up.d/sendmail; diff --git a/debian/examples/Makefile.in b/debian/examples/Makefile.in index 56ead40..671d543 100644 --- a/debian/examples/Makefile.in +++ b/debian/examples/Makefile.in @@ -305,13 +305,13 @@ dist_man_MANS = checksendmail/checksendmail.8 # Shipped data # # Installed example subdirectories -EXAMPLES_DIRS = amavis db dhcp3 \ +EXAMPLES_DIRS = amavis db dhcp \ ldap logcheck milter network \ pam.d ppp resolvconf sasl tls # # Sigh... I wanted to use sysconf_SCRIPTS, but automake says NO! -nobase_dist_sysconf_DATA = dhcp3/dhclient-exit-hooks.d/sendmail \ +nobase_dist_sysconf_DATA = dhcp/dhclient-exit-hooks.d/sendmail \ logcheck/ignore.d.paranoid/sendmail \ logcheck/ignore.d.server/sendmail \ logcheck/ignore.d.workstation/sendmail \ @@ -630,14 +630,14 @@ install-data-hook: $(INSTALL_DATA) '{}' ${DESTDIR}${pkgdatadir}/examples/'{}'; \ done; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/milter/Makefile; - chmod a+rx ${DESTDIR}${pkgdatadir}/examples/dhcp3/dhclient-exit-hooks.d/sendmail; + chmod a+rx ${DESTDIR}${pkgdatadir}/examples/dhcp/dhclient-exit-hooks.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/network/if-down.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/network/if-post-down.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/network/if-up.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/ppp/ip-down.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/ppp/ip-up.d/sendmail; chmod a+rx ${DESTDIR}${pkgdatadir}/examples/resolvconf/update-libc.d/sendmail; - chmod a+rx ${DESTDIR}${sysconfdir}/dhcp3/dhclient-exit-hooks.d/sendmail; + chmod a+rx ${DESTDIR}${sysconfdir}/dhcp/dhclient-exit-hooks.d/sendmail; chmod a+rx ${DESTDIR}${sysconfdir}/network/if-down.d/sendmail; chmod a+rx ${DESTDIR}${sysconfdir}/network/if-post-down.d/sendmail; chmod a+rx ${DESTDIR}${sysconfdir}/network/if-up.d/sendmail; diff --git a/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail new file mode 100644 index 0000000..7135a80 --- /dev/null +++ b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail @@ -0,0 +1,49 @@ +#!/bin/sh +# +# This script is called when a dhcp event occurs. +# +# Here is where we'll start/stop sendmail if needed. +# +# Written By Richard Nelson +# +# 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 +# +# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers. +# + +# No need to continue if we're called with an unsupported option +case "$reason" in + EXPIRE|FAIL|RELEASE|STOP) #down... and TIMEOUT too ??? + ;; + BOUND|RENEW|REBIND|REBOOT|TIMEOUT) #up... why TIMEOUT here ??? + ;; + *) + return; + ;; + esac; + +# Bring in some script functions to handle dynamic configuration +. /usr/share/sendmail/dynamic; + +# Note the interface that just changed +update_interface "$interface" "$reason"; + +# If the domain name has changed, update the provider information +if [ "$new_domain_name" != "$old_domain_name" ]; then + update_provider "$new_domain_name"; + fi; + +# If the ip address has changed, update the host information +if [ "$new_ip_address" != "$oldnew_ip_address" ]; then + update_host "$new_ip_address"; + fi; + +# If anything has been changed, update sendmail.cf and reload +# Actually, we'll delay the reload because we'll be hit in a moment +# to handle the change by /etc/network/if-up.d/sendmail +update_sendmail "dhcp" Delayed; + +return; + diff --git a/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.1.old b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.1.old new file mode 100644 index 0000000..ba6b98c --- /dev/null +++ b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.1.old @@ -0,0 +1,158 @@ +#!/bin/sh +# +# This script is called when dhcp 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 +# +# 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 +# +# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers. +# +# Exit by default, check for validity before commenting out the next line: +exit 0; + +provider_m4='/etc/mail/provider.m4'; +#provider_m4='provider.m4'; +dialup_m4='/etc/mail/dialup.m4'; +#dialup_m4='dialup.m4'; + +update_sendmail() { + # Build a new sendmail.cf from sendmail.mc, including our address. + m4 /etc/mail/sendmail.mc \ + > /etc/mail/sendmail.cf.pnew; + chmod 0644 /etc/mail/sendmail.cf.pnew; + chown mail: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 + AM='-Am'; + if [ ! -f /usr/share/sendmail/cf/feature/msp.m4 ]; then + AM=''; + fi; + sendmail $AM -bH -O Timeout.hoststatus=1s; + + # 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 & + }; + +update_provider() { + # Add smarthost information (if any)... + # But not if provider.m4 is a link ! + local domain; + domain="$1"; + if [ -f /etc/mail/peers/$domain -a ! -L $provider_m4 ]; then + cat <<-EOT > $provider_m4; + LOCAL_CONFIG + #------------------------------------------------------------ + # + # Dynamic provider updates from $0 + # + # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc + dnl include(\`/etc/mail/provider.m4')dnl + # + # Provider information from /etc/mail/peers/$domain + EOT + cat /etc/mail/peers/$domain >> $provider_m4; + cat <<-EOT >> $provider_m4; + #------------------------------------------------------------ + EOT + fi; + }; + +find_host() { + # Determine our fqdn from our ISP + local addr; + addr="$1"; + maxloop=20; + cntr=0; + host=''; + until (test ! -z "$host"); do + cntr=$(($cntr+1)); + rev=$(host $addr); + host=$(echo "$rev" | grep '^Name:' | awk '{print $2}'); + if [ -z "$host" ]; then + host=${rev##*domain name pointer }; + host=${host%.}; + fi; + test=$(echo $host | cut -d ' ' -f 1); + if [ "$host" != "**" ]; then + break; + elif (($cntr > $maxloop)); then + host=''; + break; + fi; + done; + echo "addr=$addr, name=$host"; + }; + +update_host() { + local host ip; + ip="$1"; + find_host "$ip"; + if [ ! -z "$host" ]; then + cat <<-EOT > $dialup_m4; + LOCAL_CONFIG + #------------------------------------------------------------ + # + # Dynamic host/ip updates from $0 + # + # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc + dnl include(\`/etc/mail/dialup.m4')dnl + # + # Chose one of the following two options: + # * Add our true hostname as a Virtual Host (we'll accept + # mail for it, but keep our local name for SMTP AUTH, etc) + C{VirtHost}$host + # + # * Define our true hostname (from our ISP) - becomes \$j + dnl define(\`confDOMAIN_NAME', \`$host')dnl + # + # Make sure we accept mail as this name (for bounces, etc) + Cw$host + Cw$ip + # Add our hostname to class G for genericstable support + CG$host + #------------------------------------------------------------ + EOT + fi; + }; + +# No need to continue if we're called with an unsupported option +if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] \ + && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] \ + && [ "$reason" != EXPIRE ] && [ "$reason" != FAIL ] + then + return; + fi; + +# Flag to denote changed have been made; +changed=0; + +# If the domain name has changed, update the provider information +if [ "$new_domain_name" != "$old_domain_name" ]; then + changed=1; + update_provider "$new_domain_name"; + fi; + +# If the ip address has changed, update the host information +if [ "$new_ip_address" != "$oldnew_ip_address" ]; then + changed=1; + update_host "$new_ip_address"; + fi; + +# If anything has been changed, update sendmail.cf and reload +if [ $changed -eq 1 ]; then + update_sendmail; + fi; + +exit 0; + diff --git a/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in new file mode 100644 index 0000000..c517033 --- /dev/null +++ b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in @@ -0,0 +1,49 @@ +#!/bin/sh +# +# This script is called when a dhcp event occurs. +# +# Here is where we'll start/stop sendmail if needed. +# +# Written By Richard Nelson +# +# 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 +# +# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers. +# + +# No need to continue if we're called with an unsupported option +case "$reason" in + EXPIRE|FAIL|RELEASE|STOP) #down... and TIMEOUT too ??? + ;; + BOUND|RENEW|REBIND|REBOOT|TIMEOUT) #up... why TIMEOUT here ??? + ;; + *) + return; + ;; + esac; + +# Bring in some script functions to handle dynamic configuration +. @datadir@/sendmail/dynamic; + +# Note the interface that just changed +update_interface "$interface" "$reason"; + +# If the domain name has changed, update the provider information +if [ "$new_domain_name" != "$old_domain_name" ]; then + update_provider "$new_domain_name"; + fi; + +# If the ip address has changed, update the host information +if [ "$new_ip_address" != "$oldnew_ip_address" ]; then + update_host "$new_ip_address"; + fi; + +# If anything has been changed, update sendmail.cf and reload +# Actually, we'll delay the reload because we'll be hit in a moment +# to handle the change by /etc/network/if-up.d/sendmail +update_sendmail "dhcp" Delayed; + +return; + diff --git a/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.md5sum b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.md5sum new file mode 100644 index 0000000..d18e257 --- /dev/null +++ b/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.md5sum @@ -0,0 +1 @@ +2adc5e32474fb128ee6c7b4425d06a58 sendmail diff --git a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail b/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail deleted file mode 100644 index 7135a80..0000000 --- a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# This script is called when a dhcp event occurs. -# -# Here is where we'll start/stop sendmail if needed. -# -# Written By Richard Nelson -# -# 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 -# -# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers. -# - -# No need to continue if we're called with an unsupported option -case "$reason" in - EXPIRE|FAIL|RELEASE|STOP) #down... and TIMEOUT too ??? - ;; - BOUND|RENEW|REBIND|REBOOT|TIMEOUT) #up... why TIMEOUT here ??? - ;; - *) - return; - ;; - esac; - -# Bring in some script functions to handle dynamic configuration -. /usr/share/sendmail/dynamic; - -# Note the interface that just changed -update_interface "$interface" "$reason"; - -# If the domain name has changed, update the provider information -if [ "$new_domain_name" != "$old_domain_name" ]; then - update_provider "$new_domain_name"; - fi; - -# If the ip address has changed, update the host information -if [ "$new_ip_address" != "$oldnew_ip_address" ]; then - update_host "$new_ip_address"; - fi; - -# If anything has been changed, update sendmail.cf and reload -# Actually, we'll delay the reload because we'll be hit in a moment -# to handle the change by /etc/network/if-up.d/sendmail -update_sendmail "dhcp" Delayed; - -return; - diff --git a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.1.old b/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.1.old deleted file mode 100644 index ba6b98c..0000000 --- a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.1.old +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/sh -# -# This script is called when dhcp 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 -# -# 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 -# -# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers. -# -# Exit by default, check for validity before commenting out the next line: -exit 0; - -provider_m4='/etc/mail/provider.m4'; -#provider_m4='provider.m4'; -dialup_m4='/etc/mail/dialup.m4'; -#dialup_m4='dialup.m4'; - -update_sendmail() { - # Build a new sendmail.cf from sendmail.mc, including our address. - m4 /etc/mail/sendmail.mc \ - > /etc/mail/sendmail.cf.pnew; - chmod 0644 /etc/mail/sendmail.cf.pnew; - chown mail: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 - AM='-Am'; - if [ ! -f /usr/share/sendmail/cf/feature/msp.m4 ]; then - AM=''; - fi; - sendmail $AM -bH -O Timeout.hoststatus=1s; - - # 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 & - }; - -update_provider() { - # Add smarthost information (if any)... - # But not if provider.m4 is a link ! - local domain; - domain="$1"; - if [ -f /etc/mail/peers/$domain -a ! -L $provider_m4 ]; then - cat <<-EOT > $provider_m4; - LOCAL_CONFIG - #------------------------------------------------------------ - # - # Dynamic provider updates from $0 - # - # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc - dnl include(\`/etc/mail/provider.m4')dnl - # - # Provider information from /etc/mail/peers/$domain - EOT - cat /etc/mail/peers/$domain >> $provider_m4; - cat <<-EOT >> $provider_m4; - #------------------------------------------------------------ - EOT - fi; - }; - -find_host() { - # Determine our fqdn from our ISP - local addr; - addr="$1"; - maxloop=20; - cntr=0; - host=''; - until (test ! -z "$host"); do - cntr=$(($cntr+1)); - rev=$(host $addr); - host=$(echo "$rev" | grep '^Name:' | awk '{print $2}'); - if [ -z "$host" ]; then - host=${rev##*domain name pointer }; - host=${host%.}; - fi; - test=$(echo $host | cut -d ' ' -f 1); - if [ "$host" != "**" ]; then - break; - elif (($cntr > $maxloop)); then - host=''; - break; - fi; - done; - echo "addr=$addr, name=$host"; - }; - -update_host() { - local host ip; - ip="$1"; - find_host "$ip"; - if [ ! -z "$host" ]; then - cat <<-EOT > $dialup_m4; - LOCAL_CONFIG - #------------------------------------------------------------ - # - # Dynamic host/ip updates from $0 - # - # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc - dnl include(\`/etc/mail/dialup.m4')dnl - # - # Chose one of the following two options: - # * Add our true hostname as a Virtual Host (we'll accept - # mail for it, but keep our local name for SMTP AUTH, etc) - C{VirtHost}$host - # - # * Define our true hostname (from our ISP) - becomes \$j - dnl define(\`confDOMAIN_NAME', \`$host')dnl - # - # Make sure we accept mail as this name (for bounces, etc) - Cw$host - Cw$ip - # Add our hostname to class G for genericstable support - CG$host - #------------------------------------------------------------ - EOT - fi; - }; - -# No need to continue if we're called with an unsupported option -if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] \ - && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] \ - && [ "$reason" != EXPIRE ] && [ "$reason" != FAIL ] - then - return; - fi; - -# Flag to denote changed have been made; -changed=0; - -# If the domain name has changed, update the provider information -if [ "$new_domain_name" != "$old_domain_name" ]; then - changed=1; - update_provider "$new_domain_name"; - fi; - -# If the ip address has changed, update the host information -if [ "$new_ip_address" != "$oldnew_ip_address" ]; then - changed=1; - update_host "$new_ip_address"; - fi; - -# If anything has been changed, update sendmail.cf and reload -if [ $changed -eq 1 ]; then - update_sendmail; - fi; - -exit 0; - diff --git a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.in b/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.in deleted file mode 100644 index c517033..0000000 --- a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.in +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# This script is called when a dhcp event occurs. -# -# Here is where we'll start/stop sendmail if needed. -# -# Written By Richard Nelson -# -# 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 -# -# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers. -# - -# No need to continue if we're called with an unsupported option -case "$reason" in - EXPIRE|FAIL|RELEASE|STOP) #down... and TIMEOUT too ??? - ;; - BOUND|RENEW|REBIND|REBOOT|TIMEOUT) #up... why TIMEOUT here ??? - ;; - *) - return; - ;; - esac; - -# Bring in some script functions to handle dynamic configuration -. @datadir@/sendmail/dynamic; - -# Note the interface that just changed -update_interface "$interface" "$reason"; - -# If the domain name has changed, update the provider information -if [ "$new_domain_name" != "$old_domain_name" ]; then - update_provider "$new_domain_name"; - fi; - -# If the ip address has changed, update the host information -if [ "$new_ip_address" != "$oldnew_ip_address" ]; then - update_host "$new_ip_address"; - fi; - -# If anything has been changed, update sendmail.cf and reload -# Actually, we'll delay the reload because we'll be hit in a moment -# to handle the change by /etc/network/if-up.d/sendmail -update_sendmail "dhcp" Delayed; - -return; - diff --git a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.md5sum b/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.md5sum deleted file mode 100644 index d18e257..0000000 --- a/debian/examples/dhcp3/dhclient-exit-hooks.d/sendmail.md5sum +++ /dev/null @@ -1 +0,0 @@ -2adc5e32474fb128ee6c7b4425d06a58 sendmail diff --git a/debian/examples/sasl/sasl.m4 b/debian/examples/sasl/sasl.m4 index 46f527f..e237939 100644 --- a/debian/examples/sasl/sasl.m4 +++ b/debian/examples/sasl/sasl.m4 @@ -1,6 +1,6 @@ divert(-1)dnl #----------------------------------------------------------------------------- -# $Sendmail: sasl.m4,v 8.14.4 2010-10-16 19:38:59 cowboy Exp $ +# $Sendmail: sasl.m4,v 8.14.4 2010-11-03 22:21:32 cowboy Exp $ # # Copyright (c) 2003-2010 Richard Nelson. All Rights Reserved. # @@ -15,7 +15,7 @@ divert(-1)dnl #----------------------------------------------------------------------------- # divert(0)dnl -VERSIONID(`$Id: sasl.m4, v 8.14.4-1 2010-10-16 19:38:59 cowboy Exp $') +VERSIONID(`$Id: sasl.m4, v 8.14.4-2 2010-11-03 22:21:32 cowboy Exp $') dnl # dnl #--------------------------------------------------------------------- dnl # Bring in Autoconf results diff --git a/debian/examples/tls/starttls.m4 b/debian/examples/tls/starttls.m4 index 2bc40df..0b5d167 100644 --- a/debian/examples/tls/starttls.m4 +++ b/debian/examples/tls/starttls.m4 @@ -1,6 +1,6 @@ divert(-1)dnl #----------------------------------------------------------------------------- -# $Sendmail: starttls.m4,v 8.14.4 2010-10-16 19:38:59 cowboy Exp $ +# $Sendmail: starttls.m4,v 8.14.4 2010-11-03 22:21:32 cowboy Exp $ # # Copyright (c) 2002-2010 Richard Nelson. All Rights Reserved. # @@ -15,7 +15,7 @@ divert(-1)dnl #----------------------------------------------------------------------------- # divert(0)dnl -VERSIONID(`$Id: starttls.m4,v 8.14.4-1 2010-10-16 19:38:59 cowboy Exp $') +VERSIONID(`$Id: starttls.m4,v 8.14.4-2 2010-11-03 22:21:32 cowboy Exp $') dnl # dnl #--------------------------------------------------------------------- dnl # Bring in Autoconf results -- cgit v1.2.3