--- old/exception_lists/copyright	Sat Feb  6 15:36:24 2016
+++ new/exception_lists/copyright	Sat Feb  6 15:36:24 2016
@@ -53,6 +53,281 @@
 usr/src/cmd/krb5/ldap_util/kdb5_ldap_policy.h
 usr/src/cmd/krb5/ldap_util/kdb5_ldap_realm.h
 usr/src/cmd/krb5/ldap_util/kdb5_ldap_services.h
+usr/src/cmd/sendmail/LICENSE
+usr/src/cmd/sendmail/aux/editmap.c
+usr/src/cmd/sendmail/aux/makemap.c
+usr/src/cmd/sendmail/aux/praliases.c
+usr/src/cmd/sendmail/cf/domain/generic.m4
+usr/src/cmd/sendmail/cf/feature/accept_unqualified_senders.m4
+usr/src/cmd/sendmail/cf/feature/accept_unresolvable_domains.m4
+usr/src/cmd/sendmail/cf/feature/access_db.m4
+usr/src/cmd/sendmail/cf/feature/allmasquerade.m4
+usr/src/cmd/sendmail/cf/feature/always_add_domain.m4
+usr/src/cmd/sendmail/cf/feature/badmx.m4
+usr/src/cmd/sendmail/cf/feature/bestmx_is_local.m4
+usr/src/cmd/sendmail/cf/feature/bitdomain.m4
+usr/src/cmd/sendmail/cf/feature/blacklist_recipients.m4
+usr/src/cmd/sendmail/cf/feature/block_bad_helo.m4
+usr/src/cmd/sendmail/cf/feature/compat_check.m4
+usr/src/cmd/sendmail/cf/feature/conncontrol.m4
+usr/src/cmd/sendmail/cf/feature/delay_checks.m4
+usr/src/cmd/sendmail/cf/feature/dnsbl.m4
+usr/src/cmd/sendmail/cf/feature/domaintable.m4
+usr/src/cmd/sendmail/cf/feature/enhdnsbl.m4
+usr/src/cmd/sendmail/cf/feature/generics_entire_domain.m4
+usr/src/cmd/sendmail/cf/feature/genericstable.m4
+usr/src/cmd/sendmail/cf/feature/greet_pause.m4
+usr/src/cmd/sendmail/cf/feature/ldap_routing.m4
+usr/src/cmd/sendmail/cf/feature/limited_masquerade.m4
+usr/src/cmd/sendmail/cf/feature/local_lmtp.m4
+usr/src/cmd/sendmail/cf/feature/local_no_masquerade.m4
+usr/src/cmd/sendmail/cf/feature/local_procmail.m4
+usr/src/cmd/sendmail/cf/feature/lookupdotdomain.m4
+usr/src/cmd/sendmail/cf/feature/loose_relay_check.m4
+usr/src/cmd/sendmail/cf/feature/mailertable.m4
+usr/src/cmd/sendmail/cf/feature/masquerade_entire_domain.m4
+usr/src/cmd/sendmail/cf/feature/masquerade_envelope.m4
+usr/src/cmd/sendmail/cf/feature/msp.m4
+usr/src/cmd/sendmail/cf/feature/mtamark.m4
+usr/src/cmd/sendmail/cf/feature/no_default_msa.m4
+usr/src/cmd/sendmail/cf/feature/nocanonify.m4
+usr/src/cmd/sendmail/cf/feature/notsticky.m4
+usr/src/cmd/sendmail/cf/feature/nouucp.m4
+usr/src/cmd/sendmail/cf/feature/nullclient.m4
+usr/src/cmd/sendmail/cf/feature/preserve_local_plus_detail.m4
+usr/src/cmd/sendmail/cf/feature/preserve_luser_host.m4
+usr/src/cmd/sendmail/cf/feature/promiscuous_relay.m4
+usr/src/cmd/sendmail/cf/feature/queuegroup.m4
+usr/src/cmd/sendmail/cf/feature/ratecontrol.m4
+usr/src/cmd/sendmail/cf/feature/redirect.m4
+usr/src/cmd/sendmail/cf/feature/relay_based_on_MX.m4
+usr/src/cmd/sendmail/cf/feature/relay_entire_domain.m4
+usr/src/cmd/sendmail/cf/feature/relay_hosts_only.m4
+usr/src/cmd/sendmail/cf/feature/relay_local_from.m4
+usr/src/cmd/sendmail/cf/feature/relay_mail_from.m4
+usr/src/cmd/sendmail/cf/feature/require_rdns.m4
+usr/src/cmd/sendmail/cf/feature/smrsh.m4
+usr/src/cmd/sendmail/cf/feature/stickyhost.m4
+usr/src/cmd/sendmail/cf/feature/use_client_ptr.m4
+usr/src/cmd/sendmail/cf/feature/use_ct_file.m4
+usr/src/cmd/sendmail/cf/feature/use_cw_file.m4
+usr/src/cmd/sendmail/cf/feature/uucpdomain.m4
+usr/src/cmd/sendmail/cf/feature/virtuser_entire_domain.m4
+usr/src/cmd/sendmail/cf/feature/virtusertable.m4
+usr/src/cmd/sendmail/cf/m4/cf.m4
+usr/src/cmd/sendmail/cf/m4/cfhead.m4
+usr/src/cmd/sendmail/cf/m4/proto.m4
+usr/src/cmd/sendmail/cf/m4/version.m4
+usr/src/cmd/sendmail/cf/mailer/local.m4
+usr/src/cmd/sendmail/cf/mailer/procmail.m4
+usr/src/cmd/sendmail/cf/mailer/smtp.m4
+usr/src/cmd/sendmail/cf/mailer/uucp.m4
+usr/src/cmd/sendmail/cf/ostype/solaris2.m4
+usr/src/cmd/sendmail/cf/ostype/solaris2.ml.m4
+usr/src/cmd/sendmail/cf/ostype/solaris2.pre5.m4
+usr/src/cmd/sendmail/cf/ostype/solaris8.m4
+usr/src/cmd/sendmail/include/libmilter/mfapi.h
+usr/src/cmd/sendmail/include/libmilter/mfdef.h
+usr/src/cmd/sendmail/include/libmilter/milter.h
+usr/src/cmd/sendmail/include/libsmdb/smdb.h
+usr/src/cmd/sendmail/include/sendmail/mailstats.h
+usr/src/cmd/sendmail/include/sendmail/pathnames.h
+usr/src/cmd/sendmail/include/sendmail/sendmail.h
+usr/src/cmd/sendmail/include/sm/assert.h
+usr/src/cmd/sendmail/include/sm/bdb.h
+usr/src/cmd/sendmail/include/sm/bitops.h
+usr/src/cmd/sendmail/include/sm/cdefs.h
+usr/src/cmd/sendmail/include/sm/cf.h
+usr/src/cmd/sendmail/include/sm/clock.h
+usr/src/cmd/sendmail/include/sm/conf.h
+usr/src/cmd/sendmail/include/sm/config.h
+usr/src/cmd/sendmail/include/sm/debug.h
+usr/src/cmd/sendmail/include/sm/errstring.h
+usr/src/cmd/sendmail/include/sm/exc.h
+usr/src/cmd/sendmail/include/sm/fdset.h
+usr/src/cmd/sendmail/include/sm/gen.h
+usr/src/cmd/sendmail/include/sm/heap.h
+usr/src/cmd/sendmail/include/sm/io.h
+usr/src/cmd/sendmail/include/sm/ldap.h
+usr/src/cmd/sendmail/include/sm/limits.h
+usr/src/cmd/sendmail/include/sm/mbdb.h
+usr/src/cmd/sendmail/include/sm/misc.h
+usr/src/cmd/sendmail/include/sm/os/sm_os_sunos.h
+usr/src/cmd/sendmail/include/sm/path.h
+usr/src/cmd/sendmail/include/sm/rpool.h
+usr/src/cmd/sendmail/include/sm/sem.h
+usr/src/cmd/sendmail/include/sm/sendmail.h
+usr/src/cmd/sendmail/include/sm/setjmp.h
+usr/src/cmd/sendmail/include/sm/shm.h
+usr/src/cmd/sendmail/include/sm/signal.h
+usr/src/cmd/sendmail/include/sm/string.h
+usr/src/cmd/sendmail/include/sm/sysexits.h
+usr/src/cmd/sendmail/include/sm/tailq.h
+usr/src/cmd/sendmail/include/sm/test.h
+usr/src/cmd/sendmail/include/sm/time.h
+usr/src/cmd/sendmail/include/sm/types.h
+usr/src/cmd/sendmail/include/sm/varargs.h
+usr/src/cmd/sendmail/include/sm/xtrap.h
+usr/src/cmd/sendmail/libmilter/comm.c
+usr/src/cmd/sendmail/libmilter/engine.c
+usr/src/cmd/sendmail/libmilter/example.c
+usr/src/cmd/sendmail/libmilter/handler.c
+usr/src/cmd/sendmail/libmilter/libmilter.h
+usr/src/cmd/sendmail/libmilter/listener.c
+usr/src/cmd/sendmail/libmilter/main.c
+usr/src/cmd/sendmail/libmilter/monitor.c
+usr/src/cmd/sendmail/libmilter/signal.c
+usr/src/cmd/sendmail/libmilter/sm_gethost.c
+usr/src/cmd/sendmail/libmilter/smfi.c
+usr/src/cmd/sendmail/libmilter/worker.c
+usr/src/cmd/sendmail/libsm/assert.c
+usr/src/cmd/sendmail/libsm/cf.c
+usr/src/cmd/sendmail/libsm/clock.c
+usr/src/cmd/sendmail/libsm/clrerr.c
+usr/src/cmd/sendmail/libsm/config.c
+usr/src/cmd/sendmail/libsm/debug.c
+usr/src/cmd/sendmail/libsm/errstring.c
+usr/src/cmd/sendmail/libsm/exc.c
+usr/src/cmd/sendmail/libsm/fclose.c
+usr/src/cmd/sendmail/libsm/feof.c
+usr/src/cmd/sendmail/libsm/ferror.c
+usr/src/cmd/sendmail/libsm/fflush.c
+usr/src/cmd/sendmail/libsm/fget.c
+usr/src/cmd/sendmail/libsm/findfp.c
+usr/src/cmd/sendmail/libsm/flags.c
+usr/src/cmd/sendmail/libsm/fopen.c
+usr/src/cmd/sendmail/libsm/fpos.c
+usr/src/cmd/sendmail/libsm/fprintf.c
+usr/src/cmd/sendmail/libsm/fpurge.c
+usr/src/cmd/sendmail/libsm/fput.c
+usr/src/cmd/sendmail/libsm/fread.c
+usr/src/cmd/sendmail/libsm/fscanf.c
+usr/src/cmd/sendmail/libsm/fseek.c
+usr/src/cmd/sendmail/libsm/fvwrite.c
+usr/src/cmd/sendmail/libsm/fvwrite.h
+usr/src/cmd/sendmail/libsm/fwalk.c
+usr/src/cmd/sendmail/libsm/fwrite.c
+usr/src/cmd/sendmail/libsm/get.c
+usr/src/cmd/sendmail/libsm/glue.h
+usr/src/cmd/sendmail/libsm/heap.c
+usr/src/cmd/sendmail/libsm/ldap.c
+usr/src/cmd/sendmail/libsm/local.h
+usr/src/cmd/sendmail/libsm/makebuf.c
+usr/src/cmd/sendmail/libsm/match.c
+usr/src/cmd/sendmail/libsm/mbdb.c
+usr/src/cmd/sendmail/libsm/memstat.c
+usr/src/cmd/sendmail/libsm/niprop.c
+usr/src/cmd/sendmail/libsm/path.c
+usr/src/cmd/sendmail/libsm/put.c
+usr/src/cmd/sendmail/libsm/refill.c
+usr/src/cmd/sendmail/libsm/rewind.c
+usr/src/cmd/sendmail/libsm/rpool.c
+usr/src/cmd/sendmail/libsm/sem.c
+usr/src/cmd/sendmail/libsm/setvbuf.c
+usr/src/cmd/sendmail/libsm/shm.c
+usr/src/cmd/sendmail/libsm/signal.c
+usr/src/cmd/sendmail/libsm/smstdio.c
+usr/src/cmd/sendmail/libsm/snprintf.c
+usr/src/cmd/sendmail/libsm/sscanf.c
+usr/src/cmd/sendmail/libsm/stdio.c
+usr/src/cmd/sendmail/libsm/strcasecmp.c
+usr/src/cmd/sendmail/libsm/strdup.c
+usr/src/cmd/sendmail/libsm/strerror.c
+usr/src/cmd/sendmail/libsm/strexit.c
+usr/src/cmd/sendmail/libsm/string.c
+usr/src/cmd/sendmail/libsm/stringf.c
+usr/src/cmd/sendmail/libsm/strio.c
+usr/src/cmd/sendmail/libsm/strl.c
+usr/src/cmd/sendmail/libsm/strrevcmp.c
+usr/src/cmd/sendmail/libsm/strto.c
+usr/src/cmd/sendmail/libsm/t-event.c
+usr/src/cmd/sendmail/libsm/t-exc.c
+usr/src/cmd/sendmail/libsm/t-fget.c
+usr/src/cmd/sendmail/libsm/t-float.c
+usr/src/cmd/sendmail/libsm/t-fopen.c
+usr/src/cmd/sendmail/libsm/t-heap.c
+usr/src/cmd/sendmail/libsm/t-match.c
+usr/src/cmd/sendmail/libsm/t-memstat.c
+usr/src/cmd/sendmail/libsm/t-path.c
+usr/src/cmd/sendmail/libsm/t-qic.c
+usr/src/cmd/sendmail/libsm/t-rpool.c
+usr/src/cmd/sendmail/libsm/t-scanf.c
+usr/src/cmd/sendmail/libsm/t-sem.c
+usr/src/cmd/sendmail/libsm/t-shm.c
+usr/src/cmd/sendmail/libsm/t-smstdio.c
+usr/src/cmd/sendmail/libsm/t-string.c
+usr/src/cmd/sendmail/libsm/t-strio.c
+usr/src/cmd/sendmail/libsm/t-strl.c
+usr/src/cmd/sendmail/libsm/t-strrevcmp.c
+usr/src/cmd/sendmail/libsm/test.c
+usr/src/cmd/sendmail/libsm/ungetc.c
+usr/src/cmd/sendmail/libsm/util.c
+usr/src/cmd/sendmail/libsm/vasprintf.c
+usr/src/cmd/sendmail/libsm/vfprintf.c
+usr/src/cmd/sendmail/libsm/vfscanf.c
+usr/src/cmd/sendmail/libsm/vprintf.c
+usr/src/cmd/sendmail/libsm/vsnprintf.c
+usr/src/cmd/sendmail/libsm/wbuf.c
+usr/src/cmd/sendmail/libsm/wsetup.c
+usr/src/cmd/sendmail/libsm/xtrap.c
+usr/src/cmd/sendmail/libsmdb/smdb.c
+usr/src/cmd/sendmail/libsmdb/smdb1.c
+usr/src/cmd/sendmail/libsmdb/smdb2.c
+usr/src/cmd/sendmail/libsmdb/smndbm.c
+usr/src/cmd/sendmail/libsmutil/cf.c
+usr/src/cmd/sendmail/libsmutil/debug.c
+usr/src/cmd/sendmail/libsmutil/err.c
+usr/src/cmd/sendmail/libsmutil/lockfile.c
+usr/src/cmd/sendmail/libsmutil/safefile.c
+usr/src/cmd/sendmail/libsmutil/snprintf.c
+usr/src/cmd/sendmail/src/alias.c
+usr/src/cmd/sendmail/src/arpadate.c
+usr/src/cmd/sendmail/src/bf.c
+usr/src/cmd/sendmail/src/bf.h
+usr/src/cmd/sendmail/src/collect.c
+usr/src/cmd/sendmail/src/conf.c
+usr/src/cmd/sendmail/src/conf.h
+usr/src/cmd/sendmail/src/control.c
+usr/src/cmd/sendmail/src/convtime.c
+usr/src/cmd/sendmail/src/daemon.c
+usr/src/cmd/sendmail/src/daemon.h
+usr/src/cmd/sendmail/src/deliver.c
+usr/src/cmd/sendmail/src/domain.c
+usr/src/cmd/sendmail/src/envelope.c
+usr/src/cmd/sendmail/src/err.c
+usr/src/cmd/sendmail/src/headers.c
+usr/src/cmd/sendmail/src/macro.c
+usr/src/cmd/sendmail/src/main.c
+usr/src/cmd/sendmail/src/map.c
+usr/src/cmd/sendmail/src/map.h
+usr/src/cmd/sendmail/src/mci.c
+usr/src/cmd/sendmail/src/milter.c
+usr/src/cmd/sendmail/src/mime.c
+usr/src/cmd/sendmail/src/parseaddr.c
+usr/src/cmd/sendmail/src/queue.c
+usr/src/cmd/sendmail/src/ratectrl.c
+usr/src/cmd/sendmail/src/readcf.c
+usr/src/cmd/sendmail/src/recipient.c
+usr/src/cmd/sendmail/src/sasl.c
+usr/src/cmd/sendmail/src/savemail.c
+usr/src/cmd/sendmail/src/sendmail.h
+usr/src/cmd/sendmail/src/sfsasl.c
+usr/src/cmd/sendmail/src/sfsasl.h
+usr/src/cmd/sendmail/src/sm_resolve.c
+usr/src/cmd/sendmail/src/sm_resolve.h
+usr/src/cmd/sendmail/src/srvrsmtp.c
+usr/src/cmd/sendmail/src/stab.c
+usr/src/cmd/sendmail/src/stats.c
+usr/src/cmd/sendmail/src/statusd_shm.h
+usr/src/cmd/sendmail/src/sysexits.c
+usr/src/cmd/sendmail/src/sysexits.h
+usr/src/cmd/sendmail/src/timers.h
+usr/src/cmd/sendmail/src/tls.c
+usr/src/cmd/sendmail/src/trace.c
+usr/src/cmd/sendmail/src/udb.c
+usr/src/cmd/sendmail/src/usersmtp.c
+usr/src/cmd/sendmail/src/util.c
+usr/src/cmd/sendmail/src/version.c
 usr/src/cmd/smbsrv/smbd/eventlog.dll
 usr/src/cmd/terminfo/termcap.src
 usr/src/cmd/terminfo/terminfo.src
--- old/exception_lists/cstyle	Sat Feb  6 15:36:24 2016
+++ new/exception_lists/cstyle	Sat Feb  6 15:36:24 2016
@@ -116,6 +116,206 @@
 usr/src/cmd/mandoc/term_ascii.c
 usr/src/cmd/mandoc/term_ps.c
 usr/src/cmd/mandoc/tree.c
+usr/src/cmd/sendmail/aux/editmap.c
+usr/src/cmd/sendmail/aux/makemap.c
+usr/src/cmd/sendmail/aux/praliases.c
+usr/src/cmd/sendmail/include/libmilter/mfapi.h
+usr/src/cmd/sendmail/include/libmilter/mfdef.h
+usr/src/cmd/sendmail/include/libmilter/milter.h
+usr/src/cmd/sendmail/include/libsmdb/smdb.h
+usr/src/cmd/sendmail/include/sendmail/mailstats.h
+usr/src/cmd/sendmail/include/sendmail/pathnames.h
+usr/src/cmd/sendmail/include/sendmail/sendmail.h
+usr/src/cmd/sendmail/include/sm/assert.h
+usr/src/cmd/sendmail/include/sm/bdb.h
+usr/src/cmd/sendmail/include/sm/bitops.h
+usr/src/cmd/sendmail/include/sm/cdefs.h
+usr/src/cmd/sendmail/include/sm/cf.h
+usr/src/cmd/sendmail/include/sm/clock.h
+usr/src/cmd/sendmail/include/sm/conf.h
+usr/src/cmd/sendmail/include/sm/config.h
+usr/src/cmd/sendmail/include/sm/debug.h
+usr/src/cmd/sendmail/include/sm/errstring.h
+usr/src/cmd/sendmail/include/sm/exc.h
+usr/src/cmd/sendmail/include/sm/fdset.h
+usr/src/cmd/sendmail/include/sm/gen.h
+usr/src/cmd/sendmail/include/sm/heap.h
+usr/src/cmd/sendmail/include/sm/io.h
+usr/src/cmd/sendmail/include/sm/ldap.h
+usr/src/cmd/sendmail/include/sm/limits.h
+usr/src/cmd/sendmail/include/sm/mbdb.h
+usr/src/cmd/sendmail/include/sm/misc.h
+usr/src/cmd/sendmail/include/sm/os/sm_os_sunos.h
+usr/src/cmd/sendmail/include/sm/path.h
+usr/src/cmd/sendmail/include/sm/rpool.h
+usr/src/cmd/sendmail/include/sm/sem.h
+usr/src/cmd/sendmail/include/sm/sendmail.h
+usr/src/cmd/sendmail/include/sm/setjmp.h
+usr/src/cmd/sendmail/include/sm/shm.h
+usr/src/cmd/sendmail/include/sm/signal.h
+usr/src/cmd/sendmail/include/sm/string.h
+usr/src/cmd/sendmail/include/sm/sysexits.h
+usr/src/cmd/sendmail/include/sm/tailq.h
+usr/src/cmd/sendmail/include/sm/test.h
+usr/src/cmd/sendmail/include/sm/time.h
+usr/src/cmd/sendmail/include/sm/types.h
+usr/src/cmd/sendmail/include/sm/varargs.h
+usr/src/cmd/sendmail/include/sm/xtrap.h
+usr/src/cmd/sendmail/libmilter/comm.c
+usr/src/cmd/sendmail/libmilter/engine.c
+usr/src/cmd/sendmail/libmilter/example.c
+usr/src/cmd/sendmail/libmilter/handler.c
+usr/src/cmd/sendmail/libmilter/libmilter.h
+usr/src/cmd/sendmail/libmilter/listener.c
+usr/src/cmd/sendmail/libmilter/main.c
+usr/src/cmd/sendmail/libmilter/monitor.c
+usr/src/cmd/sendmail/libmilter/signal.c
+usr/src/cmd/sendmail/libmilter/sm_gethost.c
+usr/src/cmd/sendmail/libmilter/smfi.c
+usr/src/cmd/sendmail/libmilter/worker.c
+usr/src/cmd/sendmail/libsm/assert.c
+usr/src/cmd/sendmail/libsm/cf.c
+usr/src/cmd/sendmail/libsm/clock.c
+usr/src/cmd/sendmail/libsm/clrerr.c
+usr/src/cmd/sendmail/libsm/config.c
+usr/src/cmd/sendmail/libsm/debug.c
+usr/src/cmd/sendmail/libsm/errstring.c
+usr/src/cmd/sendmail/libsm/exc.c
+usr/src/cmd/sendmail/libsm/fclose.c
+usr/src/cmd/sendmail/libsm/feof.c
+usr/src/cmd/sendmail/libsm/ferror.c
+usr/src/cmd/sendmail/libsm/fflush.c
+usr/src/cmd/sendmail/libsm/fget.c
+usr/src/cmd/sendmail/libsm/findfp.c
+usr/src/cmd/sendmail/libsm/flags.c
+usr/src/cmd/sendmail/libsm/fopen.c
+usr/src/cmd/sendmail/libsm/fpos.c
+usr/src/cmd/sendmail/libsm/fprintf.c
+usr/src/cmd/sendmail/libsm/fpurge.c
+usr/src/cmd/sendmail/libsm/fput.c
+usr/src/cmd/sendmail/libsm/fread.c
+usr/src/cmd/sendmail/libsm/fscanf.c
+usr/src/cmd/sendmail/libsm/fseek.c
+usr/src/cmd/sendmail/libsm/fvwrite.c
+usr/src/cmd/sendmail/libsm/fwalk.c
+usr/src/cmd/sendmail/libsm/fwrite.c
+usr/src/cmd/sendmail/libsm/get.c
+usr/src/cmd/sendmail/libsm/glue.h
+usr/src/cmd/sendmail/libsm/heap.c
+usr/src/cmd/sendmail/libsm/ldap.c
+usr/src/cmd/sendmail/libsm/local.h
+usr/src/cmd/sendmail/libsm/makebuf.c
+usr/src/cmd/sendmail/libsm/match.c
+usr/src/cmd/sendmail/libsm/mbdb.c
+usr/src/cmd/sendmail/libsm/memstat.c
+usr/src/cmd/sendmail/libsm/niprop.c
+usr/src/cmd/sendmail/libsm/path.c
+usr/src/cmd/sendmail/libsm/put.c
+usr/src/cmd/sendmail/libsm/refill.c
+usr/src/cmd/sendmail/libsm/rewind.c
+usr/src/cmd/sendmail/libsm/rpool.c
+usr/src/cmd/sendmail/libsm/sem.c
+usr/src/cmd/sendmail/libsm/setvbuf.c
+usr/src/cmd/sendmail/libsm/shm.c
+usr/src/cmd/sendmail/libsm/signal.c
+usr/src/cmd/sendmail/libsm/smstdio.c
+usr/src/cmd/sendmail/libsm/snprintf.c
+usr/src/cmd/sendmail/libsm/sscanf.c
+usr/src/cmd/sendmail/libsm/stdio.c
+usr/src/cmd/sendmail/libsm/strcasecmp.c
+usr/src/cmd/sendmail/libsm/strdup.c
+usr/src/cmd/sendmail/libsm/strerror.c
+usr/src/cmd/sendmail/libsm/strexit.c
+usr/src/cmd/sendmail/libsm/string.c
+usr/src/cmd/sendmail/libsm/stringf.c
+usr/src/cmd/sendmail/libsm/strio.c
+usr/src/cmd/sendmail/libsm/strl.c
+usr/src/cmd/sendmail/libsm/strrevcmp.c
+usr/src/cmd/sendmail/libsm/strto.c
+usr/src/cmd/sendmail/libsm/t-event.c
+usr/src/cmd/sendmail/libsm/t-exc.c
+usr/src/cmd/sendmail/libsm/t-fget.c
+usr/src/cmd/sendmail/libsm/t-float.c
+usr/src/cmd/sendmail/libsm/t-fopen.c
+usr/src/cmd/sendmail/libsm/t-heap.c
+usr/src/cmd/sendmail/libsm/t-match.c
+usr/src/cmd/sendmail/libsm/t-memstat.c
+usr/src/cmd/sendmail/libsm/t-path.c
+usr/src/cmd/sendmail/libsm/t-qic.c
+usr/src/cmd/sendmail/libsm/t-rpool.c
+usr/src/cmd/sendmail/libsm/t-scanf.c
+usr/src/cmd/sendmail/libsm/t-sem.c
+usr/src/cmd/sendmail/libsm/t-shm.c
+usr/src/cmd/sendmail/libsm/t-smstdio.c
+usr/src/cmd/sendmail/libsm/t-string.c
+usr/src/cmd/sendmail/libsm/t-strio.c
+usr/src/cmd/sendmail/libsm/t-strl.c
+usr/src/cmd/sendmail/libsm/t-strrevcmp.c
+usr/src/cmd/sendmail/libsm/test.c
+usr/src/cmd/sendmail/libsm/ungetc.c
+usr/src/cmd/sendmail/libsm/util.c
+usr/src/cmd/sendmail/libsm/vasprintf.c
+usr/src/cmd/sendmail/libsm/vfprintf.c
+usr/src/cmd/sendmail/libsm/vfscanf.c
+usr/src/cmd/sendmail/libsm/vprintf.c
+usr/src/cmd/sendmail/libsm/vsnprintf.c
+usr/src/cmd/sendmail/libsm/wbuf.c
+usr/src/cmd/sendmail/libsm/wsetup.c
+usr/src/cmd/sendmail/libsmdb/smdb.c
+usr/src/cmd/sendmail/libsmdb/smdb1.c
+usr/src/cmd/sendmail/libsmdb/smdb2.c
+usr/src/cmd/sendmail/libsmdb/smndbm.c
+usr/src/cmd/sendmail/libsmutil/cf.c
+usr/src/cmd/sendmail/libsmutil/lockfile.c
+usr/src/cmd/sendmail/libsmutil/safefile.c
+usr/src/cmd/sendmail/libsmutil/snprintf.c
+usr/src/cmd/sendmail/src/alias.c
+usr/src/cmd/sendmail/src/arpadate.c
+usr/src/cmd/sendmail/src/bf.c
+usr/src/cmd/sendmail/src/bf.h
+usr/src/cmd/sendmail/src/collect.c
+usr/src/cmd/sendmail/src/conf.c
+usr/src/cmd/sendmail/src/conf.h
+usr/src/cmd/sendmail/src/control.c
+usr/src/cmd/sendmail/src/convtime.c
+usr/src/cmd/sendmail/src/daemon.c
+usr/src/cmd/sendmail/src/daemon.h
+usr/src/cmd/sendmail/src/deliver.c
+usr/src/cmd/sendmail/src/domain.c
+usr/src/cmd/sendmail/src/envelope.c
+usr/src/cmd/sendmail/src/err.c
+usr/src/cmd/sendmail/src/headers.c
+usr/src/cmd/sendmail/src/macro.c
+usr/src/cmd/sendmail/src/main.c
+usr/src/cmd/sendmail/src/map.c
+usr/src/cmd/sendmail/src/map.h
+usr/src/cmd/sendmail/src/mci.c
+usr/src/cmd/sendmail/src/milter.c
+usr/src/cmd/sendmail/src/mime.c
+usr/src/cmd/sendmail/src/parseaddr.c
+usr/src/cmd/sendmail/src/queue.c
+usr/src/cmd/sendmail/src/ratectrl.c
+usr/src/cmd/sendmail/src/readcf.c
+usr/src/cmd/sendmail/src/recipient.c
+usr/src/cmd/sendmail/src/sasl.c
+usr/src/cmd/sendmail/src/savemail.c
+usr/src/cmd/sendmail/src/sendmail.h
+usr/src/cmd/sendmail/src/sfsasl.c
+usr/src/cmd/sendmail/src/sfsasl.h
+usr/src/cmd/sendmail/src/sm_resolve.c
+usr/src/cmd/sendmail/src/sm_resolve.h
+usr/src/cmd/sendmail/src/srvrsmtp.c
+usr/src/cmd/sendmail/src/stab.c
+usr/src/cmd/sendmail/src/stats.c
+usr/src/cmd/sendmail/src/statusd_shm.h
+usr/src/cmd/sendmail/src/sysexits.c
+usr/src/cmd/sendmail/src/sysexits.h
+usr/src/cmd/sendmail/src/timers.h
+usr/src/cmd/sendmail/src/tls.c
+usr/src/cmd/sendmail/src/trace.c
+usr/src/cmd/sendmail/src/udb.c
+usr/src/cmd/sendmail/src/usersmtp.c
+usr/src/cmd/sendmail/src/util.c
 usr/src/common/bzip2/bzlib.h
 usr/src/common/bzip2/crctable.c
 usr/src/common/bzip2/randtable.c
--- old/exception_lists/hdrchk	Sat Feb  6 15:36:24 2016
+++ new/exception_lists/hdrchk	Sat Feb  6 15:36:24 2016
@@ -32,6 +32,60 @@
 usr/src/cmd/mandoc/mdoc.h
 usr/src/cmd/mandoc/out.h
 usr/src/cmd/mandoc/term.h
+usr/src/cmd/sendmail/include/libmilter/mfapi.h
+usr/src/cmd/sendmail/include/libmilter/mfdef.h
+usr/src/cmd/sendmail/include/libmilter/milter.h
+usr/src/cmd/sendmail/include/libsmdb/smdb.h
+usr/src/cmd/sendmail/include/sendmail/mailstats.h
+usr/src/cmd/sendmail/include/sendmail/pathnames.h
+usr/src/cmd/sendmail/include/sendmail/sendmail.h
+usr/src/cmd/sendmail/include/sm/assert.h
+usr/src/cmd/sendmail/include/sm/bdb.h
+usr/src/cmd/sendmail/include/sm/bitops.h
+usr/src/cmd/sendmail/include/sm/cdefs.h
+usr/src/cmd/sendmail/include/sm/cf.h
+usr/src/cmd/sendmail/include/sm/clock.h
+usr/src/cmd/sendmail/include/sm/conf.h
+usr/src/cmd/sendmail/include/sm/config.h
+usr/src/cmd/sendmail/include/sm/debug.h
+usr/src/cmd/sendmail/include/sm/errstring.h
+usr/src/cmd/sendmail/include/sm/exc.h
+usr/src/cmd/sendmail/include/sm/fdset.h
+usr/src/cmd/sendmail/include/sm/gen.h
+usr/src/cmd/sendmail/include/sm/heap.h
+usr/src/cmd/sendmail/include/sm/ldap.h
+usr/src/cmd/sendmail/include/sm/limits.h
+usr/src/cmd/sendmail/include/sm/mbdb.h
+usr/src/cmd/sendmail/include/sm/misc.h
+usr/src/cmd/sendmail/include/sm/os/sm_os_sunos.h
+usr/src/cmd/sendmail/include/sm/path.h
+usr/src/cmd/sendmail/include/sm/rpool.h
+usr/src/cmd/sendmail/include/sm/sem.h
+usr/src/cmd/sendmail/include/sm/sendmail.h
+usr/src/cmd/sendmail/include/sm/setjmp.h
+usr/src/cmd/sendmail/include/sm/shm.h
+usr/src/cmd/sendmail/include/sm/signal.h
+usr/src/cmd/sendmail/include/sm/string.h
+usr/src/cmd/sendmail/include/sm/sysexits.h
+usr/src/cmd/sendmail/include/sm/test.h
+usr/src/cmd/sendmail/include/sm/time.h
+usr/src/cmd/sendmail/include/sm/types.h
+usr/src/cmd/sendmail/include/sm/varargs.h
+usr/src/cmd/sendmail/include/sm/xtrap.h
+usr/src/cmd/sendmail/libmilter/libmilter.h
+usr/src/cmd/sendmail/libsm/fvwrite.h
+usr/src/cmd/sendmail/libsm/glue.h
+usr/src/cmd/sendmail/libsm/local.h
+usr/src/cmd/sendmail/src/bf.h
+usr/src/cmd/sendmail/src/conf.h
+usr/src/cmd/sendmail/src/daemon.h
+usr/src/cmd/sendmail/src/map.h
+usr/src/cmd/sendmail/src/sendmail.h
+usr/src/cmd/sendmail/src/sfsasl.h
+usr/src/cmd/sendmail/src/sm_resolve.h
+usr/src/cmd/sendmail/src/statusd_shm.h
+usr/src/cmd/sendmail/src/sysexits.h
+usr/src/cmd/sendmail/src/timers.h
 usr/src/common/openssl/crypto/krb5/krb5_asn.h
 usr/src/grub/grub-0.97/stage2/shared.h
 usr/src/lib/gss_mechs/mech_krb5/et/error_table.h
--- old/usr/src/cmd/sendmail/LICENSE	Sat Feb  6 15:36:24 2016
+++ new/usr/src/cmd/sendmail/LICENSE	Sat Feb  6 15:36:24 2016
@@ -1,8 +1,9 @@
 			     SENDMAIL LICENSE
 
-The following license terms and conditions apply, unless a different
-license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350,
-Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com.
+The following license terms and conditions apply, unless a redistribution
+agreement or other license is obtained from Proofpoint, Inc., 892
+Ross Street, Sunnyvale, CA, 94089, USA, or by electronic mail at
+sendmail-license@proofpoint.com.
 
 License Terms:
 
@@ -22,10 +23,11 @@
        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 compilable
-       and linkable source code of sendmail including all modifications.
+       and linkable source code of sendmail and associated libraries and
+       utilities in the sendmail distribution including all modifications.
 
-2. Redistributions of source code must retain the copyright notices as they
-   appear in each source code file, these license terms, and the
+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,
@@ -33,16 +35,16 @@
    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-2009 Sendmail, Inc.  All rights reserved."
+   "Copyright (c) 1998-2014 Proofpoint, 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
+4. Neither the name of Proofpoint, Inc. nor the University of California nor
+   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.
+   permission.  The name "sendmail" is a trademark of Proofpoint, 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:
+   University of California on certain embedded code, which copyright
+   Notice and conditions for redistribution are as follows:
 
    (a) Copyright (c) 1988, 1993 The Regents of the University of
        California.  All rights reserved.
@@ -76,4 +78,4 @@
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 
-$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $
+$Revision: 8.23 $, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1	
--- old/usr/src/cmd/sendmail/aux/Makefile	Sat Feb  6 15:36:24 2016
+++ new/usr/src/cmd/sendmail/aux/Makefile	Sat Feb  6 15:36:24 2016
@@ -20,6 +20,7 @@
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
+# Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 # cmd/sendmail/aux/Makefile
@@ -117,7 +118,7 @@
 	$(ROOTUSRSBIN)/etrn $(ROOTUSRSBIN)/editmap
 
 clean:
-	$(RM) $(OBJS) *.o
+	$(RM) $(PROG) $(LIBPROG) $(USRSBINPROG) $(LIBSMTPSMPROG) $(OBJS) *.o
 
 lint:		lint_PROG
 
--- old/usr/src/cmd/sendmail/aux/editmap.c	Sat Feb  6 15:36:24 2016
+++ new/usr/src/cmd/sendmail/aux/editmap.c	Sat Feb  6 15:36:24 2016
@@ -11,8 +11,6 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
 #ifndef lint
 SM_UNUSED(static char copyright[]) =
@@ -54,6 +52,7 @@
 bool	DontInitGroups = false;
 uid_t	TrustedUid = 0;
 BITMAP256 DontBlameSendmail;
+bool	IntSig = false;
 
 #define BUFSIZE		1024
 #define ISSEP(c) (isascii(c) && isspace(c))
--- old/usr/src/cmd/sendmail/aux/makemap.c	Sat Feb  6 15:36:24 2016
+++ new/usr/src/cmd/sendmail/aux/makemap.c	Sat Feb  6 15:36:24 2016
@@ -11,8 +11,6 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
 
 SM_IDSTR(copyright,
@@ -50,6 +48,7 @@
 bool	DontInitGroups = false;
 uid_t	TrustedUid = 0;
 BITMAP256 DontBlameSendmail;
+bool	IntSig = false;
 
 #define BUFSIZE		1024
 #define ISSEP(c) (sep == '\0' ? isascii(c) && isspace(c) : (c) == sep)
--- old/usr/src/cmd/sendmail/aux/praliases.c	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/aux/praliases.c	Sat Feb  6 15:36:25 2016
@@ -51,6 +51,7 @@
 bool	DontInitGroups = false;
 uid_t	TrustedUid = 0;
 BITMAP256 DontBlameSendmail;
+bool	IntSig = false;
 
 # define DELIMITERS		" ,/"
 # define PATH_SEPARATOR		':'
--- old/usr/src/cmd/sendmail/cf/domain/generic.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/domain/generic.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -20,7 +20,7 @@
 #  files.
 #
 divert(0)
-VERSIONID(`$Id: generic.m4,v 8.15 1999/04/04 00:51:09 ca Exp $')
+VERSIONID(`$Id: generic.m4,v 8.16 2013-11-22 20:51:10 ca Exp $')
 define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl
 define(`confMAX_HEADERS_LENGTH', `32768')dnl
 FEATURE(`redirect')dnl
--- old/usr/src/cmd/sendmail/cf/feature/accept_unqualified_senders.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/accept_unqualified_senders.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.6 1999/02/07 07:26:07 gshapiro Exp $')
+VERSIONID(`$Id: accept_unqualified_senders.m4,v 8.7 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/accept_unresolvable_domains.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/accept_unresolvable_domains.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.10 1999/02/07 07:26:07 gshapiro Exp $')
+VERSIONID(`$Id: accept_unresolvable_domains.m4,v 8.11 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/access_db.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/access_db.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2002, 2004, 2006 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: access_db.m4,v 8.26 2004/06/24 18:10:02 ca Exp $')
+VERSIONID(`$Id: access_db.m4,v 8.28 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_ACCESS_TABLE_', `')
@@ -18,8 +17,13 @@
 define(`_TAG_DELIM_', `:')dnl should be in OperatorChars
 ifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')')
 ifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
+ifelse(lower(_ARG2_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
 ifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')')
 ifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
+ifelse(lower(_ARG3_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
+ifelse(lower(_ARG4_),`skip',`define(`_ACCESS_SKIP_', `1')')
+ifelse(lower(_ARG4_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
+ifelse(lower(_ARG4_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
 define(`_ATMPF_', `<TMPF>')dnl
 dnl check whether arg contains -T`'_ATMPF_
 dnl unless it is a sequence map
--- old/usr/src/cmd/sendmail/cf/feature/allmasquerade.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/allmasquerade.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: allmasquerade.m4,v 8.13 2000/09/12 22:00:53 ca Exp $')
+VERSIONID(`$Id: allmasquerade.m4,v 8.14 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_MAILER_local_',
--- old/usr/src/cmd/sendmail/cf/feature/always_add_domain.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/always_add_domain.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: always_add_domain.m4,v 8.11 2000/09/12 22:00:53 ca Exp $')
+VERSIONID(`$Id: always_add_domain.m4,v 8.12 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_MAILER_local_',
--- old/usr/src/cmd/sendmail/cf/feature/badmx.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/badmx.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: badmx.m4,v 1.1 2006/12/16 00:56:32 ca Exp $')
+VERSIONID(`$Id: badmx.m4,v 1.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_BADMX_CHK_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/bestmx_is_local.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/bestmx_is_local.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: bestmx_is_local.m4,v 8.26 2000/09/17 17:30:00 gshapiro Exp $')
+VERSIONID(`$Id: bestmx_is_local.m4,v 8.27 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_BESTMX_IS_LOCAL_', _ARG_)
--- old/usr/src/cmd/sendmail/cf/feature/bitdomain.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/bitdomain.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: bitdomain.m4,v 8.30 2002/06/27 23:23:57 gshapiro Exp $')
+VERSIONID(`$Id: bitdomain.m4,v 8.31 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_BITDOMAIN_TABLE_', `')
--- old/usr/src/cmd/sendmail/cf/feature/blacklist_recipients.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/blacklist_recipients.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: blacklist_recipients.m4,v 8.13 1999/04/02 02:25:13 gshapiro Exp $')
+VERSIONID(`$Id: blacklist_recipients.m4,v 8.14 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_ACCESS_TABLE_',
--- old/usr/src/cmd/sendmail/cf/feature/block_bad_helo.m4	Sat Feb  6 15:36:25 2016
+++ new/usr/src/cmd/sendmail/cf/feature/block_bad_helo.m4	Sat Feb  6 15:36:25 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)dnl
-VERSIONID(`$Id: block_bad_helo.m4,v 1.1 2006/06/15 22:49:30 ca Exp $')
+VERSIONID(`$Id: block_bad_helo.m4,v 1.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_BLOCK_BAD_HELO_', `')dnl
--- old/usr/src/cmd/sendmail/cf/feature/compat_check.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/compat_check.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,10 +7,9 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 divert(0)
-VERSIONID(`$Id: compat_check.m4,v 1.4 2002/02/26 22:15:31 gshapiro Exp $')
+VERSIONID(`$Id: compat_check.m4,v 1.5 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 ifdef(`_ACCESS_TABLE_', `',
 `errprint(`FEATURE(`compat_check') requires FEATURE(`access_db')
--- old/usr/src/cmd/sendmail/cf/feature/conncontrol.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/conncontrol.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2003, 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2003, 2004 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: conncontrol.m4,v 1.4 2004/02/19 21:31:47 ca Exp $')
+VERSIONID(`$Id: conncontrol.m4,v 1.5 2013-11-22 20:51:11 ca Exp $')
 
 divert(-1)
 ifdef(`_ACCESS_TABLE_', `
--- old/usr/src/cmd/sendmail/cf/feature/delay_checks.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/delay_checks.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1999-2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: delay_checks.m4,v 8.8 2000/12/05 18:50:45 ca Exp $')
+VERSIONID(`$Id: delay_checks.m4,v 8.9 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_DELAY_CHECKS_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/dnsbl.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/dnsbl.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2002, 2005-2007 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2002, 2005-2007 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,13 +7,12 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')')
 divert(0)
 ifdef(`_DNSBL_R_',`dnl',`dnl
-VERSIONID(`$Id: dnsbl.m4,v 8.33 2007/01/05 18:49:29 ca Exp $')
+VERSIONID(`$Id: dnsbl.m4,v 8.34 2013-11-22 20:51:11 ca Exp $')
 define(`_DNSBL_R_',`')
 ifelse(defn(`_ARG_'), `', 
 	`errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')')
--- old/usr/src/cmd/sendmail/cf/feature/domaintable.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/domaintable.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: domaintable.m4,v 8.24 2002/06/27 23:23:57 gshapiro Exp $')
+VERSIONID(`$Id: domaintable.m4,v 8.25 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_DOMAIN_TABLE_', `')
--- old/usr/src/cmd/sendmail/cf/feature/enhdnsbl.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/enhdnsbl.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000-2002, 2005-2007 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000-2002, 2005-2007 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,7 +7,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 ifelse(defn(`_ARG_'), `', 
@@ -14,7 +13,7 @@
 	`errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')')
 divert(0)
 ifdef(`_EDNSBL_R_',`dnl',`dnl
-VERSIONID(`$Id: enhdnsbl.m4,v 1.12 2007/01/08 18:22:05 ca Exp $')
+VERSIONID(`$Id: enhdnsbl.m4,v 1.13 2013-11-22 20:51:11 ca Exp $')
 LOCAL_CONFIG
 define(`_EDNSBL_R_',`')dnl
 # map for enhanced DNS based blacklist lookups
--- old/usr/src/cmd/sendmail/cf/feature/generics_entire_domain.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/generics_entire_domain.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: generics_entire_domain.m4,v 8.1 1999/03/16 00:43:05 ca Exp $')
+VERSIONID(`$Id: generics_entire_domain.m4,v 8.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_GENERICS_ENTIRE_DOMAIN_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/genericstable.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/genericstable.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: genericstable.m4,v 8.23 2002/06/27 23:23:57 gshapiro Exp $')
+VERSIONID(`$Id: genericstable.m4,v 8.24 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_GENERICS_TABLE_', `')
--- old/usr/src/cmd/sendmail/cf/feature/greet_pause.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/greet_pause.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2004 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: greet_pause.m4,v 1.4 2004/07/06 20:49:51 ca Exp $')
+VERSIONID(`$Id: greet_pause.m4,v 1.5 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifelse(len(X`'_ARG_),`1',`ifdef(`_ACCESS_TABLE_', `',
--- old/usr/src/cmd/sendmail/cf/feature/ldap_routing.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/ldap_routing.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1999-2002, 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1999-2002, 2004, 2007 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: ldap_routing.m4,v 8.14 2004/02/18 02:45:11 gshapiro Exp $')
+VERSIONID(`$Id: ldap_routing.m4,v 8.21 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 # Check first two arguments.  If they aren't set, may need to warn in proto.m4
--- old/usr/src/cmd/sendmail/cf/feature/limited_masquerade.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/limited_masquerade.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: limited_masquerade.m4,v 8.9 1999/02/07 07:26:09 gshapiro Exp $')
+VERSIONID(`$Id: limited_masquerade.m4,v 8.10 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_LIMITED_MASQUERADE_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/local_lmtp.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/local_lmtp.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2000, 2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000, 2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: local_lmtp.m4,v 8.17 2002/11/17 04:41:04 ca Exp $')
+VERSIONID(`$Id: local_lmtp.m4,v 8.18 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_MAILER_local_',
--- old/usr/src/cmd/sendmail/cf/feature/local_no_masquerade.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/local_no_masquerade.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,9 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 divert(0)
-VERSIONID(`$Id: local_no_masquerade.m4,v 1.2 2000/08/03 15:54:59 ca Exp $')
+VERSIONID(`$Id: local_no_masquerade.m4,v 1.3 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_MAILER_local_',
--- old/usr/src/cmd/sendmail/cf/feature/local_procmail.m4	Sat Feb  6 15:36:26 2016
+++ new/usr/src/cmd/sendmail/cf/feature/local_procmail.m4	Sat Feb  6 15:36:26 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1994 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: local_procmail.m4,v 8.21.42.1 2002/11/17 04:25:07 ca Exp $')
+VERSIONID(`$Id: local_procmail.m4,v 8.23 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_MAILER_local_',
--- old/usr/src/cmd/sendmail/cf/feature/lookupdotdomain.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/lookupdotdomain.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: lookupdotdomain.m4,v 1.1 2000/04/13 22:32:49 ca Exp $')
+VERSIONID(`$Id: lookupdotdomain.m4,v 1.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_ACCESS_TABLE_',
--- old/usr/src/cmd/sendmail/cf/feature/loose_relay_check.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/loose_relay_check.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: loose_relay_check.m4,v 8.6 1999/02/07 07:26:10 gshapiro Exp $')
+VERSIONID(`$Id: loose_relay_check.m4,v 8.7 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_LOOSE_RELAY_CHECK_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/mailertable.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/mailertable.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: mailertable.m4,v 8.25 2002/06/27 23:23:57 gshapiro Exp $')
+VERSIONID(`$Id: mailertable.m4,v 8.26 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_MAILER_TABLE_', `')
--- old/usr/src/cmd/sendmail/cf/feature/masquerade_entire_domain.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/masquerade_entire_domain.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.9 1999/02/07 07:26:10 gshapiro Exp $')
+VERSIONID(`$Id: masquerade_entire_domain.m4,v 8.10 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_MASQUERADE_ENTIRE_DOMAIN_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/masquerade_envelope.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/masquerade_envelope.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: masquerade_envelope.m4,v 8.9 1999/02/07 07:26:10 gshapiro Exp $')
+VERSIONID(`$Id: masquerade_envelope.m4,v 8.10 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_MASQUERADE_ENVELOPE_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/msp.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/msp.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)dnl
-VERSIONID(`$Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $')
+VERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 undefine(`ALIAS_FILE')
 define(`confDELIVERY_MODE', `i')
--- old/usr/src/cmd/sendmail/cf/feature/mtamark.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/mtamark.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2004, 2005 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2004, 2005 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,12 +7,11 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
 ifdef(`_MTAMARK_R',`dnl',`dnl
-VERSIONID(`$Id: mtamark.m4,v 1.2 2005/07/25 20:56:53 ca Exp $')
+VERSIONID(`$Id: mtamark.m4,v 1.3 2013-11-22 20:51:11 ca Exp $')
 LOCAL_CONFIG
 define(`_MTAMARK_R',`')dnl
 # map for MTA mark
--- old/usr/src/cmd/sendmail/cf/feature/no_default_msa.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/no_default_msa.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1999-2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $')
+VERSIONID(`$Id: no_default_msa.m4,v 8.3 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_NO_MSA_', `1')
--- old/usr/src/cmd/sendmail/cf/feature/nocanonify.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/nocanonify.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: nocanonify.m4,v 8.12 1999/08/28 00:42:01 ca Exp $')
+VERSIONID(`$Id: nocanonify.m4,v 8.13 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_NO_CANONIFY_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/notsticky.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/notsticky.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: notsticky.m4,v 8.11 1999/02/07 07:26:11 gshapiro Exp $')
+VERSIONID(`$Id: notsticky.m4,v 8.12 2013-11-22 20:51:11 ca Exp $')
 #
 #  This is now the default.  Use ``FEATURE(stickyhost)'' if you want
 #  the old default behaviour.
--- old/usr/src/cmd/sendmail/cf/feature/nouucp.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/nouucp.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: nouucp.m4,v 8.13 1999/11/24 18:37:07 ca Exp $')
+VERSIONID(`$Id: nouucp.m4,v 8.14 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifelse(defn(`_ARG_'), `', 
--- old/usr/src/cmd/sendmail/cf/feature/nullclient.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/nullclient.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,7 +10,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 ifelse(defn(`_ARG_'), `', `errprint(`Feature "nullclient" requires argument')',
 	`define(`_NULL_CLIENT_', _ARG_)')
@@ -23,7 +22,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: nullclient.m4,v 8.24 2000/09/17 17:30:00 gshapiro Exp $')
+VERSIONID(`$Id: nullclient.m4,v 8.25 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 undefine(`ALIAS_FILE')
--- old/usr/src/cmd/sendmail/cf/feature/preserve_local_plus_detail.m4	Sat Feb  6 15:36:27 2016
+++ new/usr/src/cmd/sendmail/cf/feature/preserve_local_plus_detail.m4	Sat Feb  6 15:36:27 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: preserve_local_plus_detail.m4,v 8.1 2000/04/10 05:48:05 gshapiro Exp $')
+VERSIONID(`$Id: preserve_local_plus_detail.m4,v 8.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_PRESERVE_LOCAL_PLUS_DETAIL_', `1')
--- old/usr/src/cmd/sendmail/cf/feature/preserve_luser_host.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/preserve_luser_host.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000, 2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000, 2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: preserve_luser_host.m4,v 1.3 2002/04/14 13:22:58 ca Exp $')
+VERSIONID(`$Id: preserve_luser_host.m4,v 1.4 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`LUSER_RELAY', `',
--- old/usr/src/cmd/sendmail/cf/feature/promiscuous_relay.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/promiscuous_relay.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-1999, 2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-1999, 2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: promiscuous_relay.m4,v 8.12 2001/02/06 17:14:35 ca Exp $')
+VERSIONID(`$Id: promiscuous_relay.m4,v 8.13 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_PROMISCUOUS_RELAY_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/queuegroup.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/queuegroup.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: queuegroup.m4,v 1.4 2001/03/28 00:39:39 ca Exp $')
+VERSIONID(`$Id: queuegroup.m4,v 1.5 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_ACCESS_TABLE_', `',
--- old/usr/src/cmd/sendmail/cf/feature/ratecontrol.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/ratecontrol.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2003, 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2003, 2004 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: ratecontrol.m4,v 1.5 2004/02/19 21:31:47 ca Exp $')
+VERSIONID(`$Id: ratecontrol.m4,v 1.6 2013-11-22 20:51:11 ca Exp $')
 
 divert(-1)
 ifdef(`_ACCESS_TABLE_', `
--- old/usr/src/cmd/sendmail/cf/feature/redirect.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/redirect.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: redirect.m4,v 8.15 1999/08/06 01:47:36 gshapiro Exp $')
+VERSIONID(`$Id: redirect.m4,v 8.16 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 LOCAL_RULE_0
--- old/usr/src/cmd/sendmail/cf/feature/relay_based_on_MX.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/relay_based_on_MX.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: relay_based_on_MX.m4,v 8.11 1999/04/02 02:25:13 gshapiro Exp $')
+VERSIONID(`$Id: relay_based_on_MX.m4,v 8.12 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_RELAY_MX_SERVED_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/relay_entire_domain.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/relay_entire_domain.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: relay_entire_domain.m4,v 8.10 1999/02/07 07:26:12 gshapiro Exp $')
+VERSIONID(`$Id: relay_entire_domain.m4,v 8.11 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_RELAY_ENTIRE_DOMAIN_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/relay_hosts_only.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/relay_hosts_only.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: relay_hosts_only.m4,v 8.10 1999/02/07 07:26:12 gshapiro Exp $')
+VERSIONID(`$Id: relay_hosts_only.m4,v 8.11 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_RELAY_HOSTS_ONLY_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/relay_local_from.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/relay_local_from.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-1999, 2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-1999, 2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: relay_local_from.m4,v 8.6 2001/02/06 15:55:21 ca Exp $')
+VERSIONID(`$Id: relay_local_from.m4,v 8.7 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_RELAY_LOCAL_FROM_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/relay_mail_from.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/relay_mail_from.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1999, 2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1999, 2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: relay_mail_from.m4,v 8.3 2001/02/06 16:07:12 ca Exp $')
+VERSIONID(`$Id: relay_mail_from.m4,v 8.4 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_ACCESS_TABLE_',
--- old/usr/src/cmd/sendmail/cf/feature/require_rdns.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/require_rdns.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)dnl
-VERSIONID(`$Id: require_rdns.m4,v 1.1 2006/06/15 22:49:30 ca Exp $')
+VERSIONID(`$Id: require_rdns.m4,v 1.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_REQUIRE_RDNS_', `')
--- old/usr/src/cmd/sendmail/cf/feature/smrsh.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/smrsh.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: smrsh.m4,v 8.14 1999/11/18 05:06:23 ca Exp $')
+VERSIONID(`$Id: smrsh.m4,v 8.15 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 ifdef(`_MAILER_local_',
--- old/usr/src/cmd/sendmail/cf/feature/stickyhost.m4	Sat Feb  6 15:36:28 2016
+++ new/usr/src/cmd/sendmail/cf/feature/stickyhost.m4	Sat Feb  6 15:36:28 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: stickyhost.m4,v 8.9 1999/02/07 07:26:13 gshapiro Exp $')
+VERSIONID(`$Id: stickyhost.m4,v 8.10 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_STICKY_LOCAL_DOMAIN_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/use_client_ptr.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/feature/use_client_ptr.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2004 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,11 +7,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: use_client_ptr.m4,v 1.1 2004/04/20 22:27:14 ca Exp $')
+VERSIONID(`$Id: use_client_ptr.m4,v 1.2 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 # if defined, check_relay will use {client_ptr} instead of whatever
--- old/usr/src/cmd/sendmail/cf/feature/use_ct_file.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/feature/use_ct_file.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: use_ct_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $')
+VERSIONID(`$Id: use_ct_file.m4,v 8.12 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 # if defined, the sendmail.cf will read the /etc/mail/trusted-users file to
--- old/usr/src/cmd/sendmail/cf/feature/use_cw_file.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/feature/use_cw_file.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: use_cw_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $')
+VERSIONID(`$Id: use_cw_file.m4,v 8.12 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 # if defined, the sendmail.cf will read the /etc/mail/local-host-names file
--- old/usr/src/cmd/sendmail/cf/feature/uucpdomain.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/feature/uucpdomain.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: uucpdomain.m4,v 8.29 2002/06/27 23:23:57 gshapiro Exp $')
+VERSIONID(`$Id: uucpdomain.m4,v 8.30 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_UUDOMAIN_TABLE_', `')
--- old/usr/src/cmd/sendmail/cf/feature/virtuser_entire_domain.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/feature/virtuser_entire_domain.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: virtuser_entire_domain.m4,v 8.2 1999/03/16 00:43:05 ca Exp $')
+VERSIONID(`$Id: virtuser_entire_domain.m4,v 8.3 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_VIRTUSER_ENTIRE_DOMAIN_', 1)
--- old/usr/src/cmd/sendmail/cf/feature/virtusertable.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/feature/virtusertable.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999, 2001-2002 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999, 2001-2002 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,11 +10,10 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 divert(0)
-VERSIONID(`$Id: virtusertable.m4,v 8.23 2002/06/27 23:23:57 gshapiro Exp $')
+VERSIONID(`$Id: virtusertable.m4,v 8.24 2013-11-22 20:51:11 ca Exp $')
 divert(-1)
 
 define(`_VIRTUSER_TABLE_', `')
--- old/usr/src/cmd/sendmail/cf/m4/cf.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/m4/cf.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983, 1995 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,7 +10,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 #
@@ -27,4 +26,4 @@
 divert(0)dnl
 ifdef(`OSTYPE', `dnl',
 `include(_CF_DIR_`'m4/cfhead.m4)dnl
-VERSIONID(`$Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $')')
+VERSIONID(`$Id: cf.m4,v 8.33 2013-11-22 20:51:13 ca Exp $')')
--- old/usr/src/cmd/sendmail/cf/m4/cfhead.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/m4/cfhead.m4	Sat Feb  6 15:36:29 2016
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2004, 2009, 2010 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983, 1995 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -193,6 +193,7 @@
 define(`LOCAL_RULE_3', `divert(2)')
 define(`LOCAL_CONFIG', `divert(6)')
 define(`MAILER_DEFINITIONS', `divert(7)')
+define(`LOCAL_DNSBL', `divert(8)')
 define(`LOCAL_NET_CONFIG', `define(`_LOCAL_RULES_', 1)divert(1)')
 define(`UUCPSMTP', `R DOL(*) < @ $1 .UUCP > DOL(*)	DOL(1) < @ $2 > DOL(2)')
 define(`CONCAT', `$1$2$3$4$5$6$7')
@@ -311,4 +312,4 @@
 
 
 divert(0)dnl
-VERSIONID(`$Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $')
+VERSIONID(`$Id: cfhead.m4,v 8.122 2013-11-22 20:51:13 ca Exp $')
--- old/usr/src/cmd/sendmail/cf/m4/proto.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/m4/proto.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2010 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983, 1995 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -16,10 +16,10 @@
 #
 divert(0)
 
-VERSIONID(`$Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $')
+VERSIONID(`$Id: proto.m4,v 8.762 2013-11-22 20:51:13 ca Exp $')
 
 # level CF_LEVEL config file format
-V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Sun')
+V`'CF_LEVEL`'ifdef(`NO_VENDOR',`', `/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Sun')')
 divert(-1)
 
 dnl if MAILER(`local') not defined: do it ourself; be nice
@@ -600,7 +600,7 @@
 _OPTION(ControlSocketName, `confCONTROL_SOCKET_NAME', `/var/spool/mqueue/.control')
 
 # Maximum MIME header length to protect MUAs
-_OPTION(MaxMimeHeaderLength, `confMAX_MIME_HEADER_LENGTH', `2048/1024')
+_OPTION(MaxMimeHeaderLength, `confMAX_MIME_HEADER_LENGTH', `0/0')
 
 # Maximum length of the sum of all headers
 _OPTION(MaxHeadersLength, `confMAX_HEADERS_LENGTH', `32768')
@@ -1535,9 +1535,10 @@
 R<?> <$*> <$+>			$@ $2',
 `dnl
 # return the original address
-R<> <> <$+> <@ $+> <$*>		$@ $1')',
-`dnl')
+R<> <> <$+> <@ $+> <$*>		$@ $1')
+')
 
+
 ifelse(substr(confDELIVERY_MODE,0,1), `d', `errprint(`WARNING: Antispam rules not available in deferred delivery mode.
 ')')
 ifdef(`_ACCESS_TABLE_', `dnl', `divert(-1)')
@@ -1798,7 +1799,7 @@
 ifdef(`_CONN_CONTROL_IMMEDIATE_',`',`dnl
 dnl workspace: ignored...
 R$*		$: $>"ConnControl" dummy')', `dnl')
-undivert(8)
+undivert(8)dnl LOCAL_DNSBL
 ifdef(`_REQUIRE_RDNS_', `dnl
 R$*			$: $&{client_addr} $| $&{client_resolve}
 R$=R $*			$@ RELAY		We relay for these
@@ -2397,6 +2398,8 @@
 R$* $| <$*> [$=w]	$#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
 dnl Pass anything else with a "." in the domain parameter
 R$* $| <$*> [$+.$+]	$: $1				qualified domain ok
+dnl Pass IPv6: address literals
+R$* $| <$*> [IPv6:$+]	$: $1				qualified domain ok
 dnl Reject if there was no "." or only an initial or final "."
 R$* $| <$*> [$*]	$#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
 dnl Clean up the workspace
--- old/usr/src/cmd/sendmail/cf/m4/version.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/m4/version.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2014 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -11,8 +11,8 @@
 # the sendmail distribution.
 #
 #
-VERSIONID(`$Id: version.m4,v 8.205 2009/12/23 04:43:09 ca Exp $')
+VERSIONID(`$Id: version.m4,v 8.236 2013-11-27 00:38:51 ca Exp $')
 #
 divert(0)
 # Configuration version number
-DZ8.14.4`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+DZ8.14.9`'ifdef(`confCF_VERSION', `/confCF_VERSION')
--- old/usr/src/cmd/sendmail/cf/mailer/local.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/mailer/local.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 PUSHDIVERT(-1)
 #
-# Copyright (c) 1998-2000, 2004 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000, 2004 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,7 +10,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 _DEFIFNOT(`_DEF_LOCAL_MAILER_FLAGS', `lsDFMAw5:/|@q')
 _DEFIFNOT(`LOCAL_MAILER_FLAGS', `Prmn9')
@@ -33,7 +32,7 @@
 ###   Local and Program Mailer specification   ###
 ##################################################
 
-VERSIONID(`$Id: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $')
+VERSIONID(`$Id: local.m4,v 8.60 2013-11-22 20:51:14 ca Exp $')
 
 #
 #  Envelope sender rewriting
--- old/usr/src/cmd/sendmail/cf/mailer/procmail.m4	Sat Feb  6 15:36:29 2016
+++ new/usr/src/cmd/sendmail/cf/mailer/procmail.m4	Sat Feb  6 15:36:29 2016
@@ -1,6 +1,6 @@
 PUSHDIVERT(-1)
 #
-# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,7 +10,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 ifdef(`PROCMAIL_MAILER_PATH',,
@@ -28,7 +27,7 @@
 ###   PROCMAIL Mailer specification   ###
 ##################*****##################
 
-VERSIONID(`$Id: procmail.m4,v 8.22 2001/11/12 23:11:34 ca Exp $')
+VERSIONID(`$Id: procmail.m4,v 8.23 2013-11-22 20:51:14 ca Exp $')
 
 Mprocmail,	P=PROCMAIL_MAILER_PATH, F=_MODMF_(CONCAT(`DFM', PROCMAIL_MAILER_FLAGS), `PROCMAIL'), S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
 		ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')T=DNS/RFC822/X-Unix,_PROCMAIL_QGRP
--- old/usr/src/cmd/sendmail/cf/mailer/smtp.m4	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/cf/mailer/smtp.m4	Sat Feb  6 15:36:30 2016
@@ -1,6 +1,6 @@
 PUSHDIVERT(-1)
 #
-# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2001, 2006 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,10 +10,11 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 _DEFIFNOT(`_DEF_SMTP_MAILER_FLAGS', `mDFMuX')
 _DEFIFNOT(`SMTP_MAILER_FLAGS',`')
+_DEFIFNOT(`SMTP_MAILER_LL',`990')
+_DEFIFNOT(`RELAY_MAILER_LL',`2040')
 _DEFIFNOT(`RELAY_MAILER_FLAGS', `SMTP_MAILER_FLAGS')
 ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `TCP $h')')
 ifdef(`ESMTP_MAILER_ARGS',, `define(`ESMTP_MAILER_ARGS', `TCP $h')')
@@ -30,7 +31,7 @@
 ###   SMTP Mailer specification   ###
 #####################################
 
-VERSIONID(`$Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $')
+VERSIONID(`$Id: smtp.m4,v 8.66 2013-11-22 20:51:14 ca Exp $')
 
 #
 #  common sender and masquerading recipient rewriting
@@ -106,18 +107,18 @@
 R$+			$: $>MasqSMTP $1
 R$+			$: $>MasqHdr $1
 
-Msmtp,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
+Msmtp,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
 		_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_SMTP_QGRP
 		A=SMTP_MAILER_ARGS
-Mesmtp,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a', SMTP_MAILER_FLAGS), `ESMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
+Mesmtp,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a', SMTP_MAILER_FLAGS), `ESMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
 		_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_ESMTP_QGRP
 		A=ESMTP_MAILER_ARGS
-Msmtp8,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `8', SMTP_MAILER_FLAGS), `SMTP8'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
+Msmtp8,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `8', SMTP_MAILER_FLAGS), `SMTP8'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
 		_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_SMTP8_QGRP
 		A=SMTP8_MAILER_ARGS
-Mdsmtp,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a%', SMTP_MAILER_FLAGS), `DSMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
+Mdsmtp,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a%', SMTP_MAILER_FLAGS), `DSMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
 		_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_DSMTP_QGRP
 		A=DSMTP_MAILER_ARGS
-Mrelay,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a8', RELAY_MAILER_FLAGS), `RELAY'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `MasqSMTP/MasqRelay', `MasqSMTP'), E=\r\n, L=2040,
+Mrelay,		P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a8', RELAY_MAILER_FLAGS), `RELAY'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `MasqSMTP/MasqRelay', `MasqSMTP'), E=\r\n, L=RELAY_MAILER_LL,
 		_OPTINS(`RELAY_MAILER_CHARSET', `C=', `, ')_OPTINS(`RELAY_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')T=DNS/RFC822/SMTP,_RELAY_QGRP
 		A=RELAY_MAILER_ARGS
--- old/usr/src/cmd/sendmail/cf/mailer/uucp.m4	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/cf/mailer/uucp.m4	Sat Feb  6 15:36:30 2016
@@ -1,6 +1,6 @@
 PUSHDIVERT(-1)
 #
-# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,7 +10,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')
@@ -25,7 +24,7 @@
 ###   UUCP Mailer specification   ###
 #####################################
 
-VERSIONID(`$Id: uucp.m4,v 8.44 2001/08/24 19:49:08 ca Exp $')
+VERSIONID(`$Id: uucp.m4,v 8.45 2013-11-22 20:51:14 ca Exp $')
 
 #
 #  envelope and header sender rewriting
--- old/usr/src/cmd/sendmail/cf/ostype/solaris2.m4	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/cf/ostype/solaris2.m4	Sat Feb  6 15:36:30 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -17,7 +17,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: solaris2.m4,v 8.22 1999/09/24 21:43:53 ca Exp $')
+VERSIONID(`$Id: solaris2.m4,v 8.23 2013-11-22 20:51:15 ca Exp $')
 divert(-1)
 
 ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/usr/lib/mail.local')')
--- old/usr/src/cmd/sendmail/cf/ostype/solaris2.ml.m4	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/cf/ostype/solaris2.ml.m4	Sat Feb  6 15:36:30 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -17,7 +17,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: solaris2.ml.m4,v 8.14 1999/04/24 05:37:44 gshapiro Exp $')
+VERSIONID(`$Id: solaris2.ml.m4,v 8.15 2013-11-22 20:51:15 ca Exp $')
 divert(-1)
 
 ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/usr/lib/mail.local')')
--- old/usr/src/cmd/sendmail/cf/ostype/solaris2.pre5.m4	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/cf/ostype/solaris2.pre5.m4	Sat Feb  6 15:36:30 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -10,7 +10,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 #	This ostype file is suitable for use on Solaris 2.x systems that
 #	use mail as local mailer which are usually version before 2.5.
@@ -18,7 +17,7 @@
 
 
 divert(0)
-VERSIONID(`$Id: solaris2.pre5.m4,v 8.1 1999/09/25 08:17:44 ca Exp $')
+VERSIONID(`$Id: solaris2.pre5.m4,v 8.2 2013-11-22 20:51:15 ca Exp $')
 divert(-1)
 
 _DEFIFNOT(`LOCAL_MAILER_FLAGS', `SnE9')
--- old/usr/src/cmd/sendmail/cf/ostype/solaris8.m4	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/cf/ostype/solaris8.m4	Sat Feb  6 15:36:30 2016
@@ -1,6 +1,6 @@
 divert(-1)
 #
-# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
 #	All rights reserved.
 #
 # By using this file, you agree to the terms and conditions set
@@ -7,7 +7,6 @@
 # forth in the LICENSE file which can be found at the top level of
 # the sendmail distribution.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 #	This ostype file is suitable for use on Solaris 8 and later systems,
 #	taking advantage of mail.local's LMTP support, the existence of
@@ -16,7 +15,7 @@
 #
 
 divert(0)
-VERSIONID(`$Id: solaris8.m4,v 8.2 2000/08/23 16:10:49 gshapiro Exp $')
+VERSIONID(`$Id: solaris8.m4,v 8.3 2013-11-22 20:51:15 ca Exp $')
 divert(-1)
 
 ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')
--- old/usr/src/cmd/sendmail/include/libmilter/mfapi.h	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/include/libmilter/mfapi.h	Sat Feb  6 15:36:30 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2004, 2006, 2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2004, 2006, 2008, 2012 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,55 +7,57 @@
  * the sendmail distribution.
  *
  *
- *	$Id: mfapi.h,v 8.80 2009/11/26 00:57:08 ca Exp $
+ *	$Id: mfapi.h,v 8.83 2013-11-22 20:51:27 ca Exp $
  */
 
 /*
- *  MFAPI.H -- Global definitions for mail filter library and mail filters.
- */
+**  MFAPI.H -- Global definitions for mail filter library and mail filters.
+*/
 
-#ifndef	_LIBMILTER_MFAPI_H
-#define	_LIBMILTER_MFAPI_H
+#ifndef _LIBMILTER_MFAPI_H
+# define _LIBMILTER_MFAPI_H	1
 
+/* Only need to export C interface if used by C++ source code */
 #ifdef __cplusplus
 extern "C" {
-#endif
+#endif /* __cplusplus */
 
 #ifndef SMFI_VERSION
-#if _FFR_MDS_NEGOTIATE
-#define	SMFI_VERSION	0x01000002	/* libmilter version number */
+# if _FFR_MDS_NEGOTIATE
+#  define SMFI_VERSION	0x01000002	/* libmilter version number */
 
-/* first libmilter version that has MDS support */
-#define	SMFI_VERSION_MDS	0x01000002
-#else /* _FFR_MDS_NEGOTIATE */
-#define	SMFI_VERSION	0x01000001	/* libmilter version number */
-#endif /* _FFR_MDS_NEGOTIATE */
+   /* first libmilter version that has MDS support */
+#  define SMFI_VERSION_MDS	0x01000002
+# else /* _FFR_MDS_NEGOTIATE */
+#  define SMFI_VERSION	0x01000001	/* libmilter version number */
+# endif /* _FFR_MDS_NEGOTIATE */
 #endif /* ! SMFI_VERSION */
 
-#define	SM_LM_VRS_MAJOR(v)	(((v) & 0x7f000000) >> 24)
-#define	SM_LM_VRS_MINOR(v)	(((v) & 0x007fff00) >> 8)
-#define	SM_LM_VRS_PLVL(v)	((v) & 0x0000007f)
+#define SM_LM_VRS_MAJOR(v)	(((v) & 0x7f000000) >> 24)
+#define SM_LM_VRS_MINOR(v)	(((v) & 0x007fff00) >> 8)
+#define SM_LM_VRS_PLVL(v)	((v) & 0x0000007f)
 
-#include <sys/types.h>
-#include <sys/socket.h>
+# include <sys/types.h>
+# include <sys/socket.h>
 
 #include <libmilter/mfdef.h>
 
-#define	LIBMILTER_API		extern
+# define LIBMILTER_API		extern
 
+
 #ifndef _SOCK_ADDR
-#define	_SOCK_ADDR	struct sockaddr
+# define _SOCK_ADDR	struct sockaddr
 #endif /* ! _SOCK_ADDR */
 
 /*
- *  libmilter functions return one of the following to indicate
- *  success/failure(/continue):
- */
+**  libmilter functions return one of the following to indicate
+**  success/failure(/continue):
+*/
 
-#define	MI_SUCCESS	0
-#define	MI_FAILURE	(-1)
+#define MI_SUCCESS	0
+#define MI_FAILURE	(-1)
 #if _FFR_WORKERS_POOL
-#define	MI_CONTINUE	1
+# define MI_CONTINUE	1
 #endif /* _FFR_WORKERS_POOL */
 
 /* "forward" declarations */
@@ -66,44 +68,45 @@
 typedef struct smfiDesc	*smfiDesc_ptr;
 
 /*
- *  Type which callbacks should return to indicate message status.
- *  This may take on one of the SMFIS_* values listed below.
- */
+**  Type which callbacks should return to indicate message status.
+**  This may take on one of the SMFIS_* values listed below.
+*/
 
 typedef int	sfsistat;
 
-#if defined(__linux__) && defined(__GNUC__) && defined(__cplusplus) && \
-	__GNUC_MINOR__ >= 8
-#define	SM__P(X)	__PMT(X)
+#if defined(__linux__) && defined(__GNUC__) && defined(__cplusplus) && __GNUC_MINOR__ >= 8
+# define SM__P(X)	__PMT(X)
 #else /* __linux__ && __GNUC__ && __cplusplus && _GNUC_MINOR__ >= 8 */
-#define	SM__P(X)	__P(X)
+# define SM__P(X)	__P(X)
 #endif /* __linux__ && __GNUC__ && __cplusplus && _GNUC_MINOR__ >= 8 */
 
 /* Some platforms don't define __P -- do it for them here: */
 #ifndef __P
-#ifdef __STDC__
-#define	__P(X) X
-#else /* __STDC__ */
-#define	__P(X) ()
-#endif /* __STDC__ */
+# ifdef __STDC__
+#  define __P(X) X
+# else /* __STDC__ */
+#  define __P(X) ()
+# endif /* __STDC__ */
 #endif /* __P */
 
 #if SM_CONF_STDBOOL_H
-#include <stdbool.h>
+# include <stdbool.h>
 #else /* SM_CONF_STDBOOL_H */
-#ifndef __cplusplus
-#ifndef bool
-#ifndef __bool_true_false_are_defined
+# ifndef __cplusplus
+#  ifndef bool
+#   ifndef __bool_true_false_are_defined
 typedef int	bool;
-#define	__bool_true_false_are_defined	1
-#endif /* ! __bool_true_false_are_defined */
-#endif /* bool */
-#endif /* ! __cplusplus */
+#    define false	0
+#    define true	1
+#    define __bool_true_false_are_defined	1
+#   endif /* ! __bool_true_false_are_defined */
+#  endif /* bool */
+# endif /* ! __cplusplus */
 #endif /* SM_CONF_STDBOOL_H */
 
 /*
- *  structure describing one milter
- */
+**  structure describing one milter
+*/
 
 struct smfiDesc
 {
@@ -112,8 +115,7 @@
 	unsigned long	xxfi_flags;	/* flags */
 
 	/* connection info filter */
-	sfsistat	(*xxfi_connect) SM__P((SMFICTX *, char *,
-						_SOCK_ADDR *));
+	sfsistat	(*xxfi_connect) SM__P((SMFICTX *, char *, _SOCK_ADDR *));
 
 	/* SMTP HELO command filter */
 	sfsistat	(*xxfi_helo) SM__P((SMFICTX *, char *));
@@ -131,8 +133,7 @@
 	sfsistat	(*xxfi_eoh) SM__P((SMFICTX *));
 
 	/* body block */
-	sfsistat	(*xxfi_body) SM__P((SMFICTX *, unsigned char *,
-						size_t));
+	sfsistat	(*xxfi_body) SM__P((SMFICTX *, unsigned char *, size_t));
 
 	/* end of message */
 	sfsistat	(*xxfi_eom) SM__P((SMFICTX *));
@@ -172,158 +173,158 @@
 LIBMILTER_API int smfi_setconn __P((char *));
 LIBMILTER_API int smfi_stop __P((void));
 LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t));
-LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *,
-    unsigned int *));
+LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *));
 
 /*
- *  What the filter might do -- values to be ORed together for
- *  smfiDesc.xxfi_flags.
- */
+**  What the filter might do -- values to be ORed together for
+**  smfiDesc.xxfi_flags.
+*/
 
-#define	SMFIF_NONE	0x00000000L	/* no flags */
-#define	SMFIF_ADDHDRS	0x00000001L	/* filter may add headers */
-#define	SMFIF_CHGBODY	0x00000002L	/* filter may replace body */
-#define	SMFIF_MODBODY	SMFIF_CHGBODY	/* backwards compatible */
-#define	SMFIF_ADDRCPT	0x00000004L	/* filter may add recipients */
-#define	SMFIF_DELRCPT	0x00000008L	/* filter may delete recipients */
-#define	SMFIF_CHGHDRS	0x00000010L	/* filter may change/delete headers */
-#define	SMFIF_QUARANTINE 0x00000020L	/* filter may quarantine envelope */
+#define SMFIF_NONE	0x00000000L	/* no flags */
+#define SMFIF_ADDHDRS	0x00000001L	/* filter may add headers */
+#define SMFIF_CHGBODY	0x00000002L	/* filter may replace body */
+#define SMFIF_MODBODY	SMFIF_CHGBODY	/* backwards compatible */
+#define SMFIF_ADDRCPT	0x00000004L	/* filter may add recipients */
+#define SMFIF_DELRCPT	0x00000008L	/* filter may delete recipients */
+#define SMFIF_CHGHDRS	0x00000010L	/* filter may change/delete headers */
+#define SMFIF_QUARANTINE 0x00000020L	/* filter may quarantine envelope */
 
 /* filter may change "from" (envelope sender) */
-#define	SMFIF_CHGFROM	0x00000040L
-#define	SMFIF_ADDRCPT_PAR	0x00000080L	/* add recipients incl. args */
+#define SMFIF_CHGFROM	0x00000040L
+#define SMFIF_ADDRCPT_PAR	0x00000080L	/* add recipients incl. args */
 
 /* filter can send set of symbols (macros) that it wants */
-#define	SMFIF_SETSYMLIST	0x00000100L
+#define SMFIF_SETSYMLIST	0x00000100L
 
 
 /*
- *  Macro "places";
- *  Notes:
- *  - must be coordinated with libmilter/engine.c and sendmail/milter.c
- *  - the order MUST NOT be changed as it would break compatibility between
- *     different versions. It's ok to append new entries however
- *     (hence the list is not sorted by the SMT protocol steps).
- */
+**  Macro "places";
+**  Notes:
+**  - must be coordinated with libmilter/engine.c and sendmail/milter.c
+**  - the order MUST NOT be changed as it would break compatibility between
+**	different versions. It's ok to append new entries however
+**	(hence the list is not sorted by the SMT protocol steps).
+*/
 
-#define	SMFIM_FIRST	0	/* Do NOT use, internal marker only */
-#define	SMFIM_CONNECT	0	/* connect */
-#define	SMFIM_HELO	1	/* HELO/EHLO */
-#define	SMFIM_ENVFROM	2	/* MAIL From */
-#define	SMFIM_ENVRCPT	3	/* RCPT To */
-#define	SMFIM_DATA	4	/* DATA */
-#define	SMFIM_EOM	5	/* end of message (final dot) */
-#define	SMFIM_EOH	6	/* end of header */
-#define	SMFIM_LAST	6	/* Do NOT use, internal marker only */
+#define SMFIM_NOMACROS	(-1)	/* Do NOT use, internal only */
+#define SMFIM_FIRST	0	/* Do NOT use, internal marker only */
+#define SMFIM_CONNECT	0	/* connect */
+#define SMFIM_HELO	1	/* HELO/EHLO */
+#define SMFIM_ENVFROM	2	/* MAIL From */
+#define SMFIM_ENVRCPT	3	/* RCPT To */
+#define SMFIM_DATA	4	/* DATA */
+#define SMFIM_EOM	5	/* end of message (final dot) */
+#define SMFIM_EOH	6	/* end of header */
+#define SMFIM_LAST	6	/* Do NOT use, internal marker only */
 
 /*
- *  Continue processing message/connection.
- */
+**  Continue processing message/connection.
+*/
 
-#define	SMFIS_CONTINUE	0
+#define SMFIS_CONTINUE	0
 
 /*
- *  Reject the message/connection.
- *  No further routines will be called for this message
- *  (or connection, if returned from a connection-oriented routine).
- */
+**  Reject the message/connection.
+**  No further routines will be called for this message
+**  (or connection, if returned from a connection-oriented routine).
+*/
 
-#define	SMFIS_REJECT	1
+#define SMFIS_REJECT	1
 
 /*
- *  Accept the message,
- *  but silently discard the message.
- *  No further routines will be called for this message.
- *  This is only meaningful from message-oriented routines.
- */
+**  Accept the message,
+**  but silently discard the message.
+**  No further routines will be called for this message.
+**  This is only meaningful from message-oriented routines.
+*/
 
-#define	SMFIS_DISCARD	2
+#define SMFIS_DISCARD	2
 
 /*
- *  Accept the message/connection.
- *  No further routines will be called for this message
- *  (or connection, if returned from a connection-oriented routine;
- *  in this case, it causes all messages on this connection
- *  to be accepted without filtering).
- */
+**  Accept the message/connection.
+**  No further routines will be called for this message
+**  (or connection, if returned from a connection-oriented routine;
+**  in this case, it causes all messages on this connection
+**  to be accepted without filtering).
+*/
 
-#define	SMFIS_ACCEPT	3
+#define SMFIS_ACCEPT	3
 
 /*
- *  Return a temporary failure, i.e.,
- *  the corresponding SMTP command will return a 4xx status code.
- *  In some cases this may prevent further routines from
- *  being called on this message or connection,
- *  although in other cases (e.g., when processing an envelope
- *  recipient) processing of the message will continue.
- */
+**  Return a temporary failure, i.e.,
+**  the corresponding SMTP command will return a 4xx status code.
+**  In some cases this may prevent further routines from
+**  being called on this message or connection,
+**  although in other cases (e.g., when processing an envelope
+**  recipient) processing of the message will continue.
+*/
 
-#define	SMFIS_TEMPFAIL	4
+#define SMFIS_TEMPFAIL	4
 
 /*
- *  Do not send a reply to the MTA
- */
+**  Do not send a reply to the MTA
+*/
 
-#define	SMFIS_NOREPLY	7
+#define SMFIS_NOREPLY	7
 
 /*
- *  Skip over rest of same callbacks, e.g., body.
- */
+**  Skip over rest of same callbacks, e.g., body.
+*/
 
-#define	SMFIS_SKIP	8
+#define SMFIS_SKIP	8
 
 /* xxfi_negotiate: use all existing protocol options/actions */
-#define	SMFIS_ALL_OPTS	10
+#define SMFIS_ALL_OPTS	10
 
 #if 0
 /*
- *  Filter Routine Details
- */
+**  Filter Routine Details
+*/
 
 /* connection info filter */
 extern sfsistat	xxfi_connect __P((SMFICTX *, char *, _SOCK_ADDR *));
 
 /*
- *  xxfi_connect(ctx, hostname, hostaddr) Invoked on each connection
- *
- *	char *hostname; Host domain name, as determined by a reverse lookup
- *		on the host address.
- *	_SOCK_ADDR *hostaddr; Host address, as determined by a getpeername
- *		call on the SMTP socket.
- */
+**  xxfi_connect(ctx, hostname, hostaddr) Invoked on each connection
+**
+**	char *hostname; Host domain name, as determined by a reverse lookup
+**		on the host address.
+**	_SOCK_ADDR *hostaddr; Host address, as determined by a getpeername
+**		call on the SMTP socket.
+*/
 
 /* SMTP HELO command filter */
 extern sfsistat	xxfi_helo __P((SMFICTX *, char *));
 
 /*
- *  xxfi_helo(ctx, helohost) Invoked on SMTP HELO/EHLO command
- *
- *	char *helohost; Value passed to HELO/EHLO command, which should be
- *		the domain name of the sending host (but is, in practice,
- *		anything the sending host wants to send).
- */
+**  xxfi_helo(ctx, helohost) Invoked on SMTP HELO/EHLO command
+**
+**	char *helohost; Value passed to HELO/EHLO command, which should be
+**		the domain name of the sending host (but is, in practice,
+**		anything the sending host wants to send).
+*/
 
 /* envelope sender filter */
 extern sfsistat	xxfi_envfrom __P((SMFICTX *, char **));
 
 /*
- *  xxfi_envfrom(ctx, argv) Invoked on envelope from
- *
- *	char **argv; Null-terminated SMTP command arguments;
- *		argv[0] is guaranteed to be the sender address.
- *		Later arguments are the ESMTP arguments.
- */
+**  xxfi_envfrom(ctx, argv) Invoked on envelope from
+**
+**	char **argv; Null-terminated SMTP command arguments;
+**		argv[0] is guaranteed to be the sender address.
+**		Later arguments are the ESMTP arguments.
+*/
 
 /* envelope recipient filter */
 extern sfsistat	xxfi_envrcpt __P((SMFICTX *, char **));
 
 /*
- *  xxfi_envrcpt(ctx, argv) Invoked on each envelope recipient
- *
- *	char **argv; Null-terminated SMTP command arguments;
- *		argv[0] is guaranteed to be the recipient address.
- *		Later arguments are the ESMTP arguments.
- */
+**  xxfi_envrcpt(ctx, argv) Invoked on each envelope recipient
+**
+**	char **argv; Null-terminated SMTP command arguments;
+**		argv[0] is guaranteed to be the recipient address.
+**		Later arguments are the ESMTP arguments.
+*/
 
 /* unknown command filter */
 
@@ -330,267 +331,266 @@
 extern sfsistat	*xxfi_unknown __P((SMFICTX *, const char *));
 
 /*
- *  xxfi_unknown(ctx, arg) Invoked when SMTP command is not recognized or not
- *  implemented.
- *	const char *arg; Null-terminated SMTP command
- */
+**  xxfi_unknown(ctx, arg) Invoked when SMTP command is not recognized or not
+**  implemented.
+**	const char *arg; Null-terminated SMTP command
+*/
 
 /* header filter */
 extern sfsistat	xxfi_header __P((SMFICTX *, char *, char *));
 
 /*
- *  xxfi_header(ctx, headerf, headerv) Invoked on each message header. The
- *  content of the header may have folded white space (that is, multiple
- *  lines with following white space) included.
- *
- *	char *headerf; Header field name
- *	char *headerv; Header field value
- */
+**  xxfi_header(ctx, headerf, headerv) Invoked on each message header. The
+**  content of the header may have folded white space (that is, multiple
+**  lines with following white space) included.
+**
+**	char *headerf; Header field name
+**	char *headerv; Header field value
+*/
 
 /* end of header */
 extern sfsistat	xxfi_eoh __P((SMFICTX *));
 
 /*
- *  xxfi_eoh(ctx) Invoked at end of header
- */
+**  xxfi_eoh(ctx) Invoked at end of header
+*/
 
 /* body block */
 extern sfsistat	xxfi_body __P((SMFICTX *, unsigned char *, size_t));
 
 /*
- *  xxfi_body(ctx, bodyp, bodylen) Invoked for each body chunk. There may
- *  be multiple body chunks passed to the filter. End-of-lines are
- *  represented as received from SMTP (normally Carriage-Return/Line-Feed).
- *
- *	unsigned char *bodyp; Pointer to body data
- *	size_t bodylen; Length of body data
- */
+**  xxfi_body(ctx, bodyp, bodylen) Invoked for each body chunk. There may
+**  be multiple body chunks passed to the filter. End-of-lines are
+**  represented as received from SMTP (normally Carriage-Return/Line-Feed).
+**
+**	unsigned char *bodyp; Pointer to body data
+**	size_t bodylen; Length of body data
+*/
 
 /* end of message */
 extern sfsistat	xxfi_eom __P((SMFICTX *));
 
 /*
- *  xxfi_eom(ctx) Invoked at end of message. This routine can perform
- *  special operations such as modifying the message header, body, or
- *  envelope.
- */
+**  xxfi_eom(ctx) Invoked at end of message. This routine can perform
+**  special operations such as modifying the message header, body, or
+**  envelope.
+*/
 
 /* message aborted */
 extern sfsistat	xxfi_abort __P((SMFICTX *));
 
 /*
- *  xxfi_abort(ctx) Invoked if message is aborted outside of the control of
- *  the filter, for example, if the SMTP sender issues an RSET command. If
- *  xxfi_abort is called, xxfi_eom will not be called and vice versa.
- */
+**  xxfi_abort(ctx) Invoked if message is aborted outside of the control of
+**  the filter, for example, if the SMTP sender issues an RSET command. If
+**  xxfi_abort is called, xxfi_eom will not be called and vice versa.
+*/
 
 /* connection cleanup */
 extern sfsistat	xxfi_close __P((SMFICTX *));
 
 /*
- *  xxfi_close(ctx) Invoked at end of the connection. This is called on
- *  close even if the previous mail transaction was aborted.
- */
+**  xxfi_close(ctx) Invoked at end of the connection. This is called on
+**  close even if the previous mail transaction was aborted.
+*/
 #endif /* 0 */
 
 /*
- *  Additional information is passed in to the vendor filter routines using
- *  symbols. Symbols correspond closely to sendmail macros. The symbols
- *  defined depend on the context. The value of a symbol is accessed using:
- */
+**  Additional information is passed in to the vendor filter routines using
+**  symbols. Symbols correspond closely to sendmail macros. The symbols
+**  defined depend on the context. The value of a symbol is accessed using:
+*/
 
 /* Return the value of a symbol. */
-LIBMILTER_API char *smfi_getsymval __P((SMFICTX *, char *));
+LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, char *));
 
 /*
- *  Return the value of a symbol.
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *symname; The name of the symbol to access.
- */
+**  Return the value of a symbol.
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *symname; The name of the symbol to access.
+*/
 
 /*
- *  Vendor filter routines that want to pass additional information back to
- *  the MTA for use in SMTP replies may call smfi_setreply before returning.
- */
+**  Vendor filter routines that want to pass additional information back to
+**  the MTA for use in SMTP replies may call smfi_setreply before returning.
+*/
 
 LIBMILTER_API int smfi_setreply __P((SMFICTX *, char *, char *, char *));
 
 /*
- *  Alternatively, smfi_setmlreply can be called if a multi-line SMTP reply
- *  is needed.
- */
+**  Alternatively, smfi_setmlreply can be called if a multi-line SMTP reply
+**  is needed.
+*/
 
-LIBMILTER_API int smfi_setmlreply __P((SMFICTX *, const char *, const char *,
-					...));
+LIBMILTER_API int smfi_setmlreply __P((SMFICTX *, const char *, const char *, ...));
 
 /*
- *  Set the specific reply code to be used in response to the active
- *  command. If not specified, a generic reply code is used.
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *rcode; The three-digit (RFC 821) SMTP reply code to be
- *		returned, e.g., ``551''.
- *	char *xcode; The extended (RFC 2034) reply code, e.g., ``5.7.6''.
- *	char *message; The text part of the SMTP reply.
- */
+**  Set the specific reply code to be used in response to the active
+**  command. If not specified, a generic reply code is used.
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *rcode; The three-digit (RFC 821) SMTP reply code to be
+**		returned, e.g., ``551''.
+**	char *xcode; The extended (RFC 2034) reply code, e.g., ``5.7.6''.
+**	char *message; The text part of the SMTP reply.
+*/
 
 /*
- *  The xxfi_eom routine is called at the end of a message (essentially,
- *  after the final DATA dot). This routine can call some special routines
- *  to modify the envelope, header, or body of the message before the
- *  message is enqueued. These routines must not be called from any vendor
- *  routine other than xxfi_eom.
- */
+**  The xxfi_eom routine is called at the end of a message (essentially,
+**  after the final DATA dot). This routine can call some special routines
+**  to modify the envelope, header, or body of the message before the
+**  message is enqueued. These routines must not be called from any vendor
+**  routine other than xxfi_eom.
+*/
 
 LIBMILTER_API int smfi_addheader __P((SMFICTX *, char *, char *));
 
 /*
- *  Add a header to the message. It is not checked for standards
- *  compliance; the mail filter must ensure that no protocols are violated
- *  as a result of adding this header.
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *headerf; Header field name
- *	char *headerv; Header field value
- */
+**  Add a header to the message. It is not checked for standards
+**  compliance; the mail filter must ensure that no protocols are violated
+**  as a result of adding this header.
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *headerf; Header field name
+**	char *headerv; Header field value
+*/
 
 LIBMILTER_API int smfi_chgheader __P((SMFICTX *, char *, int, char *));
 
 /*
- *  Change/delete a header in the message.  It is not checked for standards
- *  compliance; the mail filter must ensure that no protocols are violated
- *  as a result of adding this header.
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *headerf; Header field name
- *	int index; The Nth occurence of header field name
- *	char *headerv; New header field value (empty for delete header)
- */
+**  Change/delete a header in the message.  It is not checked for standards
+**  compliance; the mail filter must ensure that no protocols are violated
+**  as a result of adding this header.
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *headerf; Header field name
+**	int index; The Nth occurence of header field name
+**	char *headerv; New header field value (empty for delete header)
+*/
 
 LIBMILTER_API int smfi_insheader __P((SMFICTX *, int, char *, char *));
 
 /*
- *  Insert a header into the message.  It is not checked for standards
- *  compliance; the mail filter must ensure that no protocols are violated
- *  as a result of adding this header.
- *
- *	SMFICTX *ctx; Opaque context structure
- *  	int idx; index into the header list where the insertion should happen
- *	char *headerh; Header field name
- *	char *headerv; Header field value
- */
+**  Insert a header into the message.  It is not checked for standards
+**  compliance; the mail filter must ensure that no protocols are violated
+**  as a result of adding this header.
+**
+**	SMFICTX *ctx; Opaque context structure
+**  	int idx; index into the header list where the insertion should happen
+**	char *headerh; Header field name
+**	char *headerv; Header field value
+*/
 
 LIBMILTER_API int smfi_chgfrom __P((SMFICTX *, char *, char *));
 
 /*
- *  Modify envelope sender address
- *
- *     SMFICTX *ctx; Opaque context structure
- *     char *mail; New envelope sender address
- *     char *args; ESMTP arguments
- */
+**  Modify envelope sender address
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *mail; New envelope sender address
+**	char *args; ESMTP arguments
+*/
 
 
 LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
 
 /*
- *  Add a recipient to the envelope
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *rcpt; Recipient to be added
- */
+**  Add a recipient to the envelope
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *rcpt; Recipient to be added
+*/
 
 LIBMILTER_API int smfi_addrcpt_par __P((SMFICTX *, char *, char *));
 
 /*
- *  Add a recipient to the envelope
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *rcpt; Recipient to be added
- *	char *args; ESMTP arguments
- */
+**  Add a recipient to the envelope
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *rcpt; Recipient to be added
+**	char *args; ESMTP arguments
+*/
 
 
 LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
 
 /*
- *  Send a "no-op" up to the MTA to tell it we're still alive, so long
- *  milter-side operations don't time out.
- *
- *	SMFICTX *ctx; Opaque context structure
- */
+**  Send a "no-op" up to the MTA to tell it we're still alive, so long
+**  milter-side operations don't time out.
+**
+**	SMFICTX *ctx; Opaque context structure
+*/
 
 LIBMILTER_API int smfi_progress __P((SMFICTX *));
 
 /*
- *  Delete a recipient from the envelope
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *rcpt; Envelope recipient to be deleted. This should be in
- *		exactly the form passed to xxfi_envrcpt or the address may
- *		not be deleted.
- */
+**  Delete a recipient from the envelope
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *rcpt; Envelope recipient to be deleted. This should be in
+**		exactly the form passed to xxfi_envrcpt or the address may
+**		not be deleted.
+*/
 
 LIBMILTER_API int smfi_replacebody __P((SMFICTX *, unsigned char *, int));
 
 /*
- *  Replace the body of the message. This routine may be called multiple
- *  times if the body is longer than convenient to send in one call. End of
- *  line should be represented as Carriage-Return/Line Feed.
- *
- *	char *bodyp; Pointer to block of body information to insert
- *	int bodylen; Length of data pointed at by bodyp
- */
+**  Replace the body of the message. This routine may be called multiple
+**  times if the body is longer than convenient to send in one call. End of
+**  line should be represented as Carriage-Return/Line Feed.
+**
+**	char *bodyp; Pointer to block of body information to insert
+**	int bodylen; Length of data pointed at by bodyp
+*/
 
 /*
- *  If the message is aborted (for example, if the SMTP sender sends the
- *  envelope but then does a QUIT or RSET before the data is sent),
- *  xxfi_abort is called. This can be used to reset state.
- */
+**  If the message is aborted (for example, if the SMTP sender sends the
+**  envelope but then does a QUIT or RSET before the data is sent),
+**  xxfi_abort is called. This can be used to reset state.
+*/
 
 /*
- *  Quarantine an envelope
- *
- *	SMFICTX *ctx; Opaque context structure
- *	char *reason: explanation
- */
+**  Quarantine an envelope
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *reason: explanation
+*/
 
 LIBMILTER_API int smfi_quarantine __P((SMFICTX *ctx, char *reason));
 
 /*
- *  Connection-private data (specific to an SMTP connection) can be
- *  allocated using the smfi_setpriv routine; routines can access private
- *  data using smfi_getpriv.
- */
+**  Connection-private data (specific to an SMTP connection) can be
+**  allocated using the smfi_setpriv routine; routines can access private
+**  data using smfi_getpriv.
+*/
 
 LIBMILTER_API int smfi_setpriv __P((SMFICTX *, void *));
 
 /*
- *  Set the private data pointer
- *
- *	SMFICTX *ctx; Opaque context structure
- *	void *privatedata; Pointer to private data area
- */
+**  Set the private data pointer
+**
+**	SMFICTX *ctx; Opaque context structure
+**	void *privatedata; Pointer to private data area
+*/
 
 LIBMILTER_API void *smfi_getpriv __P((SMFICTX *));
 
 /*
- *  Get the private data pointer
- *
- *	SMFICTX *ctx; Opaque context structure
- *	void *privatedata; Pointer to private data area
- */
+**  Get the private data pointer
+**
+**	SMFICTX *ctx; Opaque context structure
+**	void *privatedata; Pointer to private data area
+*/
 
 LIBMILTER_API int smfi_setsymlist __P((SMFICTX *, int, char *));
 
 /*
- *  Set list of symbols (macros) to receive
- *
- *	SMFICTX *ctx; Opaque context structure
- *	int where; where in the SMTP dialogue should the macros be sent
- *	char *macros; list of macros (space separated)
- */
+**  Set list of symbols (macros) to receive
+**
+**	SMFICTX *ctx; Opaque context structure
+**	int where; where in the SMTP dialogue should the macros be sent
+**	char *macros; list of macros (space separated)
+*/
 
 #if _FFR_THREAD_MONITOR
 LIBMILTER_API int smfi_set_max_exec_time __P((unsigned int));
@@ -598,6 +598,6 @@
 
 #ifdef __cplusplus
 }
-#endif
+#endif /* __cplusplus */
 
-#endif /* !_LIBMILTER_MFAPI_H */
+#endif /* ! _LIBMILTER_MFAPI_H */
--- old/usr/src/cmd/sendmail/include/libmilter/mfdef.h	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/include/libmilter/mfdef.h	Sat Feb  6 15:36:30 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,15 +7,15 @@
  * the sendmail distribution.
  *
  *
- *	$Id: mfdef.h,v 8.39 2009/11/06 00:57:08 ca Exp $
+ *	$Id: mfdef.h,v 8.40 2013-11-22 20:51:27 ca Exp $
  */
 
 /*
- *  mfdef.h -- Global definitions for mail filter and MTA.
- */
+**  mfdef.h -- Global definitions for mail filter and MTA.
+*/
 
 #ifndef _LIBMILTER_MFDEF_H
-#define	_LIBMILTER_MFDEF_H
+# define _LIBMILTER_MFDEF_H	1
 
 #ifdef __cplusplus
 extern "C" {
@@ -22,109 +22,109 @@
 #endif
 
 #ifndef SMFI_PROT_VERSION
-#define	SMFI_PROT_VERSION	6	/* MTA - libmilter protocol version */
+# define SMFI_PROT_VERSION	6	/* MTA - libmilter protocol version */
 #endif /* SMFI_PROT_VERSION */
 
 /* Shared protocol constants */
-#define	MILTER_LEN_BYTES	4	/* length of 32 bit integer in bytes */
-#define	MILTER_OPTLEN	(MILTER_LEN_BYTES * 3) /* length of options */
-#define	MILTER_CHUNK_SIZE	65535	/* body chunk size */
-#define	MILTER_MAX_DATA_SIZE	65535	/* default milter command data limit */
+#define MILTER_LEN_BYTES	4	/* length of 32 bit integer in bytes */
+#define MILTER_OPTLEN	(MILTER_LEN_BYTES * 3) /* length of options */
+#define MILTER_CHUNK_SIZE	65535	/* body chunk size */
+#define MILTER_MAX_DATA_SIZE	65535	/* default milter command data limit */
 
 #if _FFR_MDS_NEGOTIATE
-#define	MILTER_MDS_64K	((64 * 1024) - 1)
-#define	MILTER_MDS_256K	((256 * 1024) - 1)
-#define	MILTER_MDS_1M	((1024 * 1024) - 1)
+# define MILTER_MDS_64K	((64 * 1024) - 1)
+# define MILTER_MDS_256K ((256 * 1024) - 1)
+# define MILTER_MDS_1M	((1024 * 1024) - 1)
 #endif /* _FFR_MDS_NEGOTIATE */
 
 /* These apply to SMFIF_* flags */
-#define	SMFI_V1_ACTS	0x0000000FL	/* The actions of V1 filter */
-#define	SMFI_V2_ACTS	0x0000003FL	/* The actions of V2 filter */
-#define	SMFI_CURR_ACTS	0x000001FFL	/* actions of current version */
+#define SMFI_V1_ACTS	0x0000000FL	/* The actions of V1 filter */
+#define SMFI_V2_ACTS	0x0000003FL	/* The actions of V2 filter */
+#define SMFI_CURR_ACTS	0x000001FFL	/* actions of current version */
 
 /* address families */
-#define	SMFIA_UNKNOWN		'U'	/* unknown */
-#define	SMFIA_UNIX		'L'	/* unix/local */
-#define	SMFIA_INET		'4'	/* inet */
-#define	SMFIA_INET6		'6'	/* inet6 */
+#define SMFIA_UNKNOWN		'U'	/* unknown */
+#define SMFIA_UNIX		'L'	/* unix/local */
+#define SMFIA_INET		'4'	/* inet */
+#define SMFIA_INET6		'6'	/* inet6 */
 
 /* commands: don't use anything smaller than ' ' */
-#define	SMFIC_ABORT		'A'	/* Abort */
-#define	SMFIC_BODY		'B'	/* Body chunk */
-#define	SMFIC_CONNECT		'C'	/* Connection information */
-#define	SMFIC_MACRO		'D'	/* Define macro */
-#define	SMFIC_BODYEOB		'E'	/* final body chunk (End) */
-#define	SMFIC_HELO		'H'	/* HELO/EHLO */
-#define	SMFIC_QUIT_NC		'K'	/* QUIT but new connection follows */
-#define	SMFIC_HEADER		'L'	/* Header */
-#define	SMFIC_MAIL		'M'	/* MAIL from */
-#define	SMFIC_EOH		'N'	/* EOH */
-#define	SMFIC_OPTNEG		'O'	/* Option negotiation */
-#define	SMFIC_QUIT		'Q'	/* QUIT */
-#define	SMFIC_RCPT		'R'	/* RCPT to */
-#define	SMFIC_DATA		'T'	/* DATA */
-#define	SMFIC_UNKNOWN		'U'	/* Any unknown command */
+#define SMFIC_ABORT		'A'	/* Abort */
+#define SMFIC_BODY		'B'	/* Body chunk */
+#define SMFIC_CONNECT		'C'	/* Connection information */
+#define SMFIC_MACRO		'D'	/* Define macro */
+#define SMFIC_BODYEOB		'E'	/* final body chunk (End) */
+#define SMFIC_HELO		'H'	/* HELO/EHLO */
+#define SMFIC_QUIT_NC		'K'	/* QUIT but new connection follows */
+#define SMFIC_HEADER		'L'	/* Header */
+#define SMFIC_MAIL		'M'	/* MAIL from */
+#define SMFIC_EOH		'N'	/* EOH */
+#define SMFIC_OPTNEG		'O'	/* Option negotiation */
+#define SMFIC_QUIT		'Q'	/* QUIT */
+#define SMFIC_RCPT		'R'	/* RCPT to */
+#define SMFIC_DATA		'T'	/* DATA */
+#define SMFIC_UNKNOWN		'U'	/* Any unknown command */
 
 /* actions (replies) */
-#define	SMFIR_ADDRCPT		'+'	/* add recipient */
-#define	SMFIR_DELRCPT		'-'	/* remove recipient */
-#define	SMFIR_ADDRCPT_PAR	'2'	/* add recipient (incl. ESMTP args) */
-#define	SMFIR_SHUTDOWN		'4'	/* 421: shutdown (internal to MTA) */
-#define	SMFIR_ACCEPT		'a'	/* accept */
-#define	SMFIR_REPLBODY		'b'	/* replace body (chunk) */
-#define	SMFIR_CONTINUE		'c'	/* continue */
-#define	SMFIR_DISCARD		'd'	/* discard */
-#define	SMFIR_CHGFROM		'e'	/* change envelope sender (from) */
-#define	SMFIR_CONN_FAIL		'f'	/* cause a connection failure */
-#define	SMFIR_ADDHEADER		'h'	/* add header */
-#define	SMFIR_INSHEADER		'i'	/* insert header */
-#define	SMFIR_SETSYMLIST	'l'	/* set list of symbols (macros) */
-#define	SMFIR_CHGHEADER		'm'	/* change header */
-#define	SMFIR_PROGRESS		'p'	/* progress */
-#define	SMFIR_QUARANTINE	'q'	/* quarantine */
-#define	SMFIR_REJECT		'r'	/* reject */
-#define	SMFIR_SKIP		's'	/* skip */
-#define	SMFIR_TEMPFAIL		't'	/* tempfail */
-#define	SMFIR_REPLYCODE		'y'	/* reply code etc */
+#define SMFIR_ADDRCPT		'+'	/* add recipient */
+#define SMFIR_DELRCPT		'-'	/* remove recipient */
+#define SMFIR_ADDRCPT_PAR	'2'	/* add recipient (incl. ESMTP args) */
+#define SMFIR_SHUTDOWN		'4'	/* 421: shutdown (internal to MTA) */
+#define SMFIR_ACCEPT		'a'	/* accept */
+#define SMFIR_REPLBODY		'b'	/* replace body (chunk) */
+#define SMFIR_CONTINUE		'c'	/* continue */
+#define SMFIR_DISCARD		'd'	/* discard */
+#define SMFIR_CHGFROM		'e'	/* change envelope sender (from) */
+#define SMFIR_CONN_FAIL		'f'	/* cause a connection failure */
+#define SMFIR_ADDHEADER		'h'	/* add header */
+#define SMFIR_INSHEADER		'i'	/* insert header */
+#define SMFIR_SETSYMLIST	'l'	/* set list of symbols (macros) */
+#define SMFIR_CHGHEADER		'm'	/* change header */
+#define SMFIR_PROGRESS		'p'	/* progress */
+#define SMFIR_QUARANTINE	'q'	/* quarantine */
+#define SMFIR_REJECT		'r'	/* reject */
+#define SMFIR_SKIP		's'	/* skip */
+#define SMFIR_TEMPFAIL		't'	/* tempfail */
+#define SMFIR_REPLYCODE		'y'	/* reply code etc */
 
 /* What the MTA can send/filter wants in protocol */
-#define	SMFIP_NOCONNECT 0x00000001L	/* MTA should not send connect info */
-#define	SMFIP_NOHELO	0x00000002L	/* MTA should not send HELO info */
-#define	SMFIP_NOMAIL	0x00000004L	/* MTA should not send MAIL info */
-#define	SMFIP_NORCPT	0x00000008L	/* MTA should not send RCPT info */
-#define	SMFIP_NOBODY	0x00000010L	/* MTA should not send body */
-#define	SMFIP_NOHDRS	0x00000020L	/* MTA should not send headers */
-#define	SMFIP_NOEOH	0x00000040L	/* MTA should not send EOH */
-#define	SMFIP_NR_HDR	0x00000080L	/* No reply for headers */
-#define	SMFIP_NOHREPL	SMFIP_NR_HDR	/* No reply for headers */
-#define	SMFIP_NOUNKNOWN 0x00000100L /* MTA should not send unknown commands */
-#define	SMFIP_NODATA    0x00000200L	/* MTA should not send DATA */
-#define	SMFIP_SKIP	0x00000400L	/* MTA understands SMFIS_SKIP */
-#define	SMFIP_RCPT_REJ	0x00000800L /* MTA should also send rejected RCPTs */
-#define	SMFIP_NR_CONN	0x00001000L	/* No reply for connect */
-#define	SMFIP_NR_HELO	0x00002000L	/* No reply for HELO */
-#define	SMFIP_NR_MAIL	0x00004000L	/* No reply for MAIL */
-#define	SMFIP_NR_RCPT	0x00008000L	/* No reply for RCPT */
-#define	SMFIP_NR_DATA	0x00010000L	/* No reply for DATA */
-#define	SMFIP_NR_UNKN	0x00020000L	/* No reply for UNKN */
-#define	SMFIP_NR_EOH	0x00040000L	/* No reply for eoh */
-#define	SMFIP_NR_BODY	0x00080000L	/* No reply for body chunk */
-#define	SMFIP_HDR_LEADSPC	0x00100000L /* header value leading space */
-#define	SMFIP_MDS_256K	0x10000000L	/* MILTER_MAX_DATA_SIZE=256K */
-#define	SMFIP_MDS_1M	0x20000000L	/* MILTER_MAX_DATA_SIZE=1M */
-/* #define SMFIP_	0x40000000L	reserved: see SMFI_INTERNAL */
+#define SMFIP_NOCONNECT 0x00000001L	/* MTA should not send connect info */
+#define SMFIP_NOHELO	0x00000002L	/* MTA should not send HELO info */
+#define SMFIP_NOMAIL	0x00000004L	/* MTA should not send MAIL info */
+#define SMFIP_NORCPT	0x00000008L	/* MTA should not send RCPT info */
+#define SMFIP_NOBODY	0x00000010L	/* MTA should not send body */
+#define SMFIP_NOHDRS	0x00000020L	/* MTA should not send headers */
+#define SMFIP_NOEOH	0x00000040L	/* MTA should not send EOH */
+#define SMFIP_NR_HDR	0x00000080L	/* No reply for headers */
+#define SMFIP_NOHREPL	SMFIP_NR_HDR	/* No reply for headers */
+#define SMFIP_NOUNKNOWN 0x00000100L /* MTA should not send unknown commands */
+#define SMFIP_NODATA    0x00000200L	/* MTA should not send DATA */
+#define SMFIP_SKIP	0x00000400L	/* MTA understands SMFIS_SKIP */
+#define SMFIP_RCPT_REJ	0x00000800L /* MTA should also send rejected RCPTs */
+#define SMFIP_NR_CONN	0x00001000L	/* No reply for connect */
+#define SMFIP_NR_HELO	0x00002000L	/* No reply for HELO */
+#define SMFIP_NR_MAIL	0x00004000L	/* No reply for MAIL */
+#define SMFIP_NR_RCPT	0x00008000L	/* No reply for RCPT */
+#define SMFIP_NR_DATA	0x00010000L	/* No reply for DATA */
+#define SMFIP_NR_UNKN	0x00020000L	/* No reply for UNKN */
+#define SMFIP_NR_EOH	0x00040000L	/* No reply for eoh */
+#define SMFIP_NR_BODY	0x00080000L	/* No reply for body chunk */
+#define SMFIP_HDR_LEADSPC 0x00100000L	/* header value leading space */
+#define SMFIP_MDS_256K	0x10000000L	/* MILTER_MAX_DATA_SIZE=256K */
+#define SMFIP_MDS_1M	0x20000000L	/* MILTER_MAX_DATA_SIZE=1M */
+/* #define SMFIP_	0x40000000L	reserved: see SMFI_INTERNAL*/
 
-#define	SMFI_V1_PROT	0x0000003FL	/* The protocol of V1 filter */
-#define	SMFI_V2_PROT	0x0000007FL	/* The protocol of V2 filter */
+#define SMFI_V1_PROT	0x0000003FL	/* The protocol of V1 filter */
+#define SMFI_V2_PROT	0x0000007FL	/* The protocol of V2 filter */
 
 /* all defined protocol bits */
-#define	SMFI_CURR_PROT	0x001FFFFFL
+#define SMFI_CURR_PROT	0x001FFFFFL
 
 /* internal flags: only used between MTA and libmilter */
-#define	SMFI_INTERNAL	0x70000000L
+#define SMFI_INTERNAL	0x70000000L
 
 #if _FFR_MILTER_CHECK
-#define	SMFIP_TEST	0x80000000L
+# define SMFIP_TEST	0x80000000L
 #endif /* _FFR_MILTER_CHECK */
 
 #ifdef __cplusplus
--- old/usr/src/cmd/sendmail/include/libmilter/milter.h	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/include/libmilter/milter.h	Sat Feb  6 15:36:30 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2003, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,11 +7,9 @@
  * the sendmail distribution.
  *
  *
- *	$Id: milter.h,v 8.41 2006/05/22 23:23:55 ca Exp $
+ *	$Id: milter.h,v 8.42 2013-11-22 20:51:27 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  MILTER.H -- Global definitions for mail filter.
 */
--- old/usr/src/cmd/sendmail/include/libsmdb/smdb.h	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/include/libsmdb/smdb.h	Sat Feb  6 15:36:30 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,12 +6,10 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: smdb.h,v 8.40.2.1 2002/10/05 17:04:51 ca Exp $
+ *	$Id: smdb.h,v 8.42 2013-11-22 20:51:28 ca Exp $
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef _SMDB_H_
 # define _SMDB_H_
 
--- old/usr/src/cmd/sendmail/include/sendmail/mailstats.h	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/include/sendmail/mailstats.h	Sat Feb  6 15:36:30 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998, 1999 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,11 +10,9 @@
  * the sendmail distribution.
  *
  *
- *	$Id: mailstats.h,v 8.19 2002/06/27 22:47:22 gshapiro Exp $
+ *	$Id: mailstats.h,v 8.20 2013-11-22 20:51:30 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #define STAT_VERSION	4
 #define STAT_MAGIC	0x1B1DE
 
--- old/usr/src/cmd/sendmail/include/sendmail/pathnames.h	Sat Feb  6 15:36:30 2016
+++ new/usr/src/cmd/sendmail/include/sendmail/pathnames.h	Sat Feb  6 15:36:30 2016
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -9,11 +9,9 @@
  * the sendmail distribution.
  *
  *
- *	$Id: pathnames.h,v 8.35 2001/03/23 22:09:44 ca Exp $
+ *	$Id: pathnames.h,v 8.37 2013-11-22 20:51:30 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_PATHNAMES_H
 # define SM_PATHNAMES_H
 
@@ -39,7 +37,7 @@
 #  endif /* ! _PATH_SENDMAIL */
 
 #  ifndef _PATH_MAILDIR
-#   define _PATH_MAILDIR		"/var/spool/mail"
+#   define _PATH_MAILDIR	"/var/spool/mail"
 #  endif /* ! _PATH_MAILDIR */
 
 #  ifndef _PATH_LOCTMP
--- old/usr/src/cmd/sendmail/include/sendmail/sendmail.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sendmail/sendmail.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,11 +10,9 @@
  * the sendmail distribution.
  *
  *
- *	$Id: sendmail.h,v 8.68 2002/07/01 22:18:53 gshapiro Exp $
+ *	$Id: sendmail.h,v 8.69 2013-11-22 20:51:30 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  SENDMAIL.H -- Global definitions for sendmail.
 */
--- old/usr/src/cmd/sendmail/include/sm/assert.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/assert.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: assert.h,v 1.10 2001/06/07 20:04:53 ca Exp $
+ *	$Id: assert.h,v 1.11 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm abnormal program termination and assertion checking
 **  See libsm/assert.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/bdb.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/bdb.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2002, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,11 +7,9 @@
  * the sendmail distribution.
  *
  *
- *	$Id: bdb.h,v 1.1.2.4 2003/03/06 16:27:38 ca Exp $
+ *	$Id: bdb.h,v 1.5 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef	SM_BDB_H
 #define SM_BDB_H
 
--- old/usr/src/cmd/sendmail/include/sm/bitops.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/bitops.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,11 +10,9 @@
  * the sendmail distribution.
  *
  *
- *	$Id: bitops.h,v 1.2 2001/09/22 22:05:42 ca Exp $
+ *	$Id: bitops.h,v 1.3 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef	SM_BITOPS_H
 # define SM_BITOPS_H
 
--- old/usr/src/cmd/sendmail/include/sm/cdefs.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/cdefs.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: cdefs.h,v 1.15.2.1 2003/12/05 22:44:17 ca Exp $
+ *	$Id: cdefs.h,v 1.17 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm C language portability macros
 **  See libsm/cdefs.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/cf.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/cf.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: cf.h,v 1.2 2001/03/08 03:23:07 ca Exp $
+ *	$Id: cf.h,v 1.3 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_CF_H
 # define SM_CF_H
 
--- old/usr/src/cmd/sendmail/include/sm/clock.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/clock.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001, 2004 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -9,11 +9,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: clock.h,v 1.12 2004/08/03 19:57:21 ca Exp $
+ *	$Id: clock.h,v 1.14 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  CLOCK.H -- for co-ordinating timed events
 */
@@ -61,7 +59,7 @@
 /*
 **  SM_SETEVENT -- set an event to happen at a specific time in seconds.
 **
-**	Translates the seconds into millseconds and calls sm_seteventm()
+**	Translates the seconds into milliseconds and calls sm_seteventm()
 **	to get a specific event to happen in the future at a specific time.
 **
 **	Parameters:
--- old/usr/src/cmd/sendmail/include/sm/conf.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/conf.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2011 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,15 +10,10 @@
  * the sendmail distribution.
  *
  *
- *	$Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $
+ *	$Id: conf.h,v 1.147 2013-11-22 20:51:31 ca Exp $
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
 **  CONF.H -- All user-configurable parameters for sendmail
 **
 **	Send updates to Sendmail.ORG so they will be
@@ -386,6 +381,12 @@
 #   ifndef __svr4__
 #    define __svr4__		/* use all System V Release 4 defines below */
 #   endif /* ! __svr4__ */
+#   if SOLARIS >= 21100
+#    include <paths.h>
+#   endif /* SOLARIS >= 21100 */
+#   ifndef _PATH_VARRUN
+#    define _PATH_VARRUN	"/var/run/"
+#   endif /* _PATH_VARRUN */
 #   define GIDSET_T	gid_t
 #   define USE_SA_SIGACTION	1	/* use sa_sigaction field */
 #   define BROKEN_PTHREAD_SLEEP	1	/* sleep after pthread_create() fails */
@@ -448,7 +449,7 @@
 #   endif /* SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) */
 #   if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208)
 #    undef _PATH_SENDMAILPID	/* tmpfs /var/run added in 2.8 */
-#    define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
+#    define _PATH_SENDMAILPID	_PATH_VARRUN "sendmail.pid"
 #    ifndef SMRSH_CMDDIR
 #     define SMRSH_CMDDIR	"/var/adm/sm.bin"
 #    endif /* ! SMRSH_CMDDIR */
@@ -466,6 +467,8 @@
 #   if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211)
 #    define GETLDAPALIASBYNAME_VERSION 2	/* changed in S11 */
 #    define HAVE_NANOSLEEP	1	/* moved from librt to libc in S11 */
+#    define SOCKADDR_LEN_T	socklen_t	/* arg#3 to accept, getsockname */
+#    define SOCKOPT_LEN_T	socklen_t	/* arg#5 to getsockopt */
 #   endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */
 #   ifndef HASGETUSERSHELL
 #    define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps pre-2.7 */
@@ -1019,6 +1022,9 @@
 #    if __FreeBSD_version >= 222000	/* 2.2.2-release and later */
 #     define HASSETUSERCONTEXT	1	/* BSDI-style login classes */
 #    endif /* __FreeBSD_version >= 222000 */
+#    if __FreeBSD_version >= 300000	/* 3.0.0-release and later */
+#     define HAVE_NANOSLEEP	1	/* has nanosleep(2) */
+#    endif /* __FreeBSD_version >= 300000 */
 #    if __FreeBSD_version >= 330000	/* 3.3.0-release and later */
 #     ifndef SMRSH_CMDDIR
 #      define SMRSH_CMDDIR	"/usr/libexec/sm.bin"
@@ -1060,6 +1066,9 @@
 #   if OpenBSD >= 200505
 #    undef NETISO	/* iso.h removed in 3.7 */
 #   endif /* OpenBSD >= 200505 */
+#   if OpenBSD >= 200800
+#    define HAVE_NANOSLEEP	1	/* has nanosleep(2) */
+#   endif /* OpenBSD >= 200800 */
 #  endif /* defined(__OpenBSD__) */
 # endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
 
@@ -1523,6 +1532,8 @@
 #   if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
 #    define GLIBC_VERSION ((__GLIBC__ << 8) + __GLIBC_MINOR__)
 #    if (GLIBC_VERSION >= 0x201)
+#     define SOCKADDR_LEN_T     socklen_t
+#     define SOCKOPT_LEN_T      socklen_t
 #     undef IPPROTO_ICMPV6	/* linux #defines, glibc enums */
 #    else /* (GLIBC_VERSION >= 0x201) */
 #     include <linux/in6.h>	/* IPv6 support */
@@ -2813,7 +2824,7 @@
 
 # if _FFR_LINUX_MHNL && defined(__linux__) && MAXHOSTNAMELEN < 255
    /*
-   **  override Linux wierdness: a FQHN can be 255 chars long
+   **  override Linux weirdness: a FQHN can be 255 chars long
    **  SUSv3 requires HOST_NAME_MAX ("Maximum length of a host
    **  name (not including the terminating null) as returned from the
    **  gethostname() function.") to be at least 255.  c.f.:
@@ -2954,6 +2965,11 @@
 #  define SM_INT32	int32_t
 # endif /* ! SM_INT32 */
 
+/* XXX  16 bit type */
+# ifndef SM_UINT16
+#  define SM_UINT16	uint16_t
+# endif /* ! SM_UINT16 */
+
 /*
 **  SVr4 and similar systems use different routines for setjmp/longjmp
 **  with signal support
@@ -3036,4 +3052,6 @@
 # endif /* ! SM_ALIGN_SIZE */
 # define SM_ALIGN_BITS (SM_ALIGN_SIZE - 1)
 
+char *sm_inet6_ntop __P((const void *, char *, size_t));
+
 #endif /* ! SM_CONF_H */
--- old/usr/src/cmd/sendmail/include/sm/config.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/config.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
+ *	$Id: config.h,v 1.49 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm configuration macros.
 **  The values of these macros are platform dependent.
@@ -26,14 +24,16 @@
 
 /*
 **  SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists
+**
+**  Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions.
 */
 
 # ifndef SM_CONF_STDBOOL_H
-#  if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#  if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #   define SM_CONF_STDBOOL_H		1
-#  else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
+#  else /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
 #   define SM_CONF_STDBOOL_H		0
-#  endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
+#  endif /* !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
 # endif /* ! SM_CONF_STDBOOL_H */
 
 /*
--- old/usr/src/cmd/sendmail/include/sm/debug.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/debug.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000, 2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: debug.h,v 1.16 2003/01/10 00:26:06 ca Exp $
+ *	$Id: debug.h,v 1.17 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm debugging and tracing
 **  See libsm/debug.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/errstring.h	Sat Feb  6 15:36:31 2016
+++ new/usr/src/cmd/sendmail/include/sm/errstring.h	Sat Feb  6 15:36:31 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: errstring.h,v 1.10 2007/03/21 23:56:19 ca Exp $
+ *	$Id: errstring.h,v 1.11 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  Error codes.
 */
--- old/usr/src/cmd/sendmail/include/sm/exc.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/exc.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: exc.h,v 1.23 2001/06/07 20:04:53 ca Exp $
+ *	$Id: exc.h,v 1.24 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm exception handling
 **  See libsm/exc.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/fdset.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/fdset.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001, 2002 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: fdset.h,v 1.3.10.2 2002/12/10 04:02:25 ca Exp $
+ *	$Id: fdset.h,v 1.6 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef	SM_FDSET_H
 # define SM_FDSET_H
 
--- old/usr/src/cmd/sendmail/include/sm/gen.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/gen.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: gen.h,v 1.23 2003/11/04 18:51:54 ca Exp $
+ *	$Id: gen.h,v 1.24 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm general definitions
 **  See libsm/gen.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/heap.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/heap.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: heap.h,v 1.23 2006/08/15 00:53:46 ca Exp $
+ *	$Id: heap.h,v 1.24 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  Sendmail debugging memory allocation package.
 **  See libsm/heap.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/io.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/io.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004, 2013 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990
  * 	 The Regents of the University of California.  All rights reserved.
@@ -11,11 +11,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: io.h,v 1.24 2004/03/03 19:14:49 ca Exp $
+ *	$Id: io.h,v 1.26 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*-
  *	@(#)stdio.h	5.17 (Berkeley) 6/3/91
  */
@@ -271,7 +269,7 @@
 SM_FILE_T *sm_io_dup __P((SM_FILE_T *));
 int	 sm_io_eof __P((SM_FILE_T *));
 int	 sm_io_error __P((SM_FILE_T *));
-char	*sm_io_fgets __P((SM_FILE_T *, int, char *, int));
+int	 sm_io_fgets __P((SM_FILE_T *, int, char *, int));
 int	 sm_io_flush __P((SM_FILE_T *, int SM_NONVOLATILE));
 
 int PRINTFLIKE(3, 4)
--- old/usr/src/cmd/sendmail/include/sm/ldap.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/ldap.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2003, 2005-2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2003, 2005-2007 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,7 +6,7 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: ldap.h,v 1.34 2008/11/17 21:02:54 ca Exp $
+ *	$Id: ldap.h,v 1.35 2013-11-22 20:51:31 ca Exp $
  */
 
 #ifndef	SM_LDAP_H
--- old/usr/src/cmd/sendmail/include/sm/limits.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/limits.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: limits.h,v 1.6 2001/03/08 03:23:08 ca Exp $
+ *	$Id: limits.h,v 1.7 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  <sm/limits.h>
 **  This header file is a portability wrapper for <limits.h>.
--- old/usr/src/cmd/sendmail/include/sm/mbdb.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/mbdb.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2002 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: mbdb.h,v 1.6 2002/05/24 20:50:14 gshapiro Exp $
+ *	$Id: mbdb.h,v 1.7 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_MBDB_H
 # define SM_MBDB_H
 
--- old/usr/src/cmd/sendmail/include/sm/misc.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/misc.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: misc.h,v 1.1 2006/06/28 23:57:59 ca Exp $
+ *	$Id: misc.h,v 1.2 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_MISC_H
 # define SM_MISC_H 1
 
--- old/usr/src/cmd/sendmail/include/sm/os/sm_os_sunos.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/os/sm_os_sunos.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: sm_os_sunos.h,v 1.14 2001/08/14 18:09:42 ca Exp $
+ *	$Id: sm_os_sunos.h,v 1.15 2013-11-22 20:51:34 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  platform definitions for SunOS 4.0.3, SunOS 4.1.x and Solaris 2.x
 */
--- old/usr/src/cmd/sendmail/include/sm/path.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/path.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: path.h,v 1.6 2001/04/03 01:53:00 gshapiro Exp $
+ *	$Id: path.h,v 1.7 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  Portable names for standard filesystem paths
 **  and macros for directories.
--- old/usr/src/cmd/sendmail/include/sm/rpool.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/rpool.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: rpool.h,v 1.16 2003/09/05 23:07:49 ca Exp $
+ *	$Id: rpool.h,v 1.17 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm resource pools
 **  See libsm/rpool.html for documentation.
--- old/usr/src/cmd/sendmail/include/sm/sem.h	Sat Feb  6 15:36:32 2016
+++ new/usr/src/cmd/sendmail/include/sm/sem.h	Sat Feb  6 15:36:32 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2005, 2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2005, 2008 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,7 +6,7 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: sem.h,v 1.10 2008/05/30 16:26:39 ca Exp $
+ *	$Id: sem.h,v 1.11 2013-11-22 20:51:31 ca Exp $
  */
 
 #ifndef SM_SEM_H
--- old/usr/src/cmd/sendmail/include/sm/sendmail.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/sendmail.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,8 +7,6 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  SENDMAIL.H -- MTA-specific definitions for sendmail.
 */
--- old/usr/src/cmd/sendmail/include/sm/setjmp.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/setjmp.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: setjmp.h,v 1.3 2001/03/08 03:23:08 ca Exp $
+ *	$Id: setjmp.h,v 1.4 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_SETJMP_H
 # define SM_SETJMP_H
 
--- old/usr/src/cmd/sendmail/include/sm/shm.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/shm.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003, 2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003, 2005 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: shm.h,v 1.11 2005/01/13 22:57:04 ca Exp $
+ *	$Id: shm.h,v 1.12 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_SHM_H
 # define SM_SHM_H
 
--- old/usr/src/cmd/sendmail/include/sm/signal.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/signal.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -9,11 +9,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: signal.h,v 1.16 2001/07/20 19:48:21 gshapiro Exp $
+ *	$Id: signal.h,v 1.17 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  SIGNAL.H -- libsm (and sendmail) signal facilities
 **		Extracted from sendmail/conf.h and focusing
--- old/usr/src/cmd/sendmail/include/sm/string.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/string.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: string.h,v 1.38 2003/10/10 17:56:57 ca Exp $
+ *	$Id: string.h,v 1.39 2013-11-22 20:51:31 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm string manipulation
 */
--- old/usr/src/cmd/sendmail/include/sm/sysexits.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/sysexits.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1987, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -8,12 +8,10 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: sysexits.h,v 1.5 2001/03/10 17:30:01 ca Exp $
+ *	$Id: sysexits.h,v 1.6 2013-11-22 20:51:31 ca Exp $
  *	@(#)sysexits.h	8.1 (Berkeley) 6/2/93
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_SYSEXITS_H
 # define SM_SYSEXITS_H
 
--- old/usr/src/cmd/sendmail/include/sm/tailq.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/tailq.h	Sat Feb  6 15:36:33 2016
@@ -35,10 +35,8 @@
 #ifndef	SM_TAILQ_H_
 #define	SM_TAILQ_H_
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
- * $Id: tailq.h,v 1.2 2007/06/29 23:09:57 ca Exp $
+ * $Id: tailq.h,v 1.3 2012-01-21 00:12:14 ashish Exp $
  *
  * This file is a modified copy of queue.h from a BSD system:
  * we only need tail queues here.
@@ -71,8 +69,8 @@
 	struct type **tqe_prev;	/* address of previous next element */	\
 }
 
-/* 
- * tail queue access methods 
+/*
+ * tail queue access methods
  */
 #define	SM_TAILQ_FIRST(head)		((head)->tqh_first)
 #define	SM_TAILQ_END(head)		NULL
--- old/usr/src/cmd/sendmail/include/sm/test.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/test.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: test.h,v 1.6 2001/04/03 01:53:01 gshapiro Exp $
+ *	$Id: test.h,v 1.7 2013-11-22 20:51:32 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  Abstractions for writing a libsm test program.
 */
--- old/usr/src/cmd/sendmail/include/sm/time.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/time.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2005 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: time.h,v 1.1 2005/06/14 23:07:19 ca Exp $
+ *	$Id: time.h,v 1.2 2013-11-22 20:51:32 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SM_TIME_H
 # define SM_TIME_H 1
 
--- old/usr/src/cmd/sendmail/include/sm/types.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/types.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: types.h,v 1.13 2001/04/03 01:53:01 gshapiro Exp $
+ *	$Id: types.h,v 1.14 2013-11-22 20:51:32 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  This header file defines standard integral types.
 **  - It includes <sys/types.h>, and fixes portability problems that
--- old/usr/src/cmd/sendmail/include/sm/varargs.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/varargs.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: varargs.h,v 1.7.2.1 2002/07/29 21:43:20 gshapiro Exp $
+ *	$Id: varargs.h,v 1.9 2013-11-22 20:51:32 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  libsm variable argument lists
 */
--- old/usr/src/cmd/sendmail/include/sm/xtrap.h	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/include/sm/xtrap.h	Sat Feb  6 15:36:33 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: xtrap.h,v 1.7 2001/04/03 01:53:01 gshapiro Exp $
+ *	$Id: xtrap.h,v 1.8 2013-11-22 20:51:32 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  scaffolding for testing exception handler code
 */
--- old/usr/src/cmd/sendmail/libmilter/README	Sat Feb  6 15:36:33 2016
+++ new/usr/src/cmd/sendmail/libmilter/README	Sat Feb  6 15:36:33 2016
@@ -2,8 +2,6 @@
 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 
 The sendmail Mail Filter API (Milter) is designed to allow third-party
 programs access to mail messages as they are being processed in order to
@@ -14,7 +12,8 @@
 file.
 
 Note: if you want to write a milter in Java, then see
-http://sendmail-jilter.sourceforge.net/
+http://sendmail-jilter.sourceforge.net/ or
+http://iws.cs.uni-magdeburg.de/~elkner/milter4j.tgz
 
 +----------------+
 | SECURITY HINTS |
--- old/usr/src/cmd/sendmail/libmilter/comm.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/comm.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2004, 2009 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2004, 2009 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: comm.c,v 8.70 2009/12/16 16:33:48 ca Exp $")
+SM_RCSID("@(#)$Id: comm.c,v 8.71 2013-11-22 20:51:36 ca Exp $")
 
 #include "libmilter.h"
 #include <sm/errstring.h>
--- old/usr/src/cmd/sendmail/libmilter/engine.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/engine.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2004, 2006-2008 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2004, 2006-2008 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: engine.c,v 8.166 2009/11/06 00:57:07 ca Exp $")
+SM_RCSID("@(#)$Id: engine.c,v 8.168 2013-11-22 20:51:36 ca Exp $")
 
 #include "libmilter.h"
 
@@ -284,7 +284,7 @@
 		if (mi_stop() == MILTER_ABRT)
 		{
 			if (ctx->ctx_dbg > 3)
-				sm_dprintf("[%ld] milter_abort\n",
+				sm_dprintf("[%lu] milter_abort\n",
 					(long) ctx->ctx_id);
 			ret = MI_FAILURE;
 			break;
@@ -315,7 +315,7 @@
 		    cmd < SMFIC_VALIDCMD)
 		{
 			if (ctx->ctx_dbg > 5)
-				sm_dprintf("[%ld] mi_engine: mi_rd_cmd error (%x)\n",
+				sm_dprintf("[%lu] mi_engine: mi_rd_cmd error (%x)\n",
 					(long) ctx->ctx_id, (int) cmd);
 
 			/*
@@ -328,7 +328,7 @@
 			break;
 		}
 		if (ctx->ctx_dbg > 4)
-			sm_dprintf("[%ld] got cmd '%c' len %d\n",
+			sm_dprintf("[%lu] got cmd '%c' len %d\n",
 				(long) ctx->ctx_id, cmd, (int) len);
 		for (i = 0; i < ncmds; i++)
 		{
@@ -339,7 +339,7 @@
 		{
 			/* unknown command */
 			if (ctx->ctx_dbg > 1)
-				sm_dprintf("[%ld] cmd '%c' unknown\n",
+				sm_dprintf("[%lu] cmd '%c' unknown\n",
 					(long) ctx->ctx_id, cmd);
 			ret = MI_FAILURE;
 			break;
@@ -348,7 +348,7 @@
 		{
 			/* stop for now */
 			if (ctx->ctx_dbg > 1)
-				sm_dprintf("[%ld] cmd '%c' not impl\n",
+				sm_dprintf("[%lu] cmd '%c' not impl\n",
 					(long) ctx->ctx_id, cmd);
 			ret = MI_FAILURE;
 			break;
@@ -357,7 +357,7 @@
 		/* is new state ok? */
 		newstate = cmds[i].cm_next;
 		if (ctx->ctx_dbg > 5)
-			sm_dprintf("[%ld] cur %x new %x nextmask %x\n",
+			sm_dprintf("[%lu] cur %x new %x nextmask %x\n",
 				(long) ctx->ctx_id,
 				curstate, newstate, next_states[curstate]);
 
@@ -364,7 +364,7 @@
 		if (newstate != ST_NONE && !trans_ok(curstate, newstate))
 		{
 			if (ctx->ctx_dbg > 1)
-				sm_dprintf("[%ld] abort: cur %d (%x) new %d (%x) next %x\n",
+				sm_dprintf("[%lu] abort: cur %d (%x) new %d (%x) next %x\n",
 					(long) ctx->ctx_id,
 					curstate, MI_MASK(curstate),
 					newstate, MI_MASK(newstate),
@@ -434,7 +434,7 @@
 		else if (r == _SMFIS_ABORT)
 		{
 			if (ctx->ctx_dbg > 5)
-				sm_dprintf("[%ld] function returned abort\n",
+				sm_dprintf("[%lu] function returned abort\n",
 					(long) ctx->ctx_id);
 			ret = MI_FAILURE;
 			break;
@@ -1122,7 +1122,7 @@
 	fix_stm(ctx);
 
 	if (ctx->ctx_dbg > 3)
-		sm_dprintf("[%ld] milter_negotiate:"
+		sm_dprintf("[%lu] milter_negotiate:"
 			" mta_actions=0x%lx, mta_flags=0x%lx"
 			" actions=0x%lx, flags=0x%lx\n"
 			, (long) ctx->ctx_id
@@ -1131,7 +1131,7 @@
 
 #if _FFR_MILTER_CHECK
 	if (ctx->ctx_dbg > 3)
-		sm_dprintf("[%ld] milter_negotiate:"
+		sm_dprintf("[%lu] milter_negotiate:"
 			" testmode=%d, pflags2mta=%X, internal_pflags=%X\n"
 			, (long) ctx->ctx_id, testmode
 			, ctx->ctx_pflags2mta, internal_pflags);
--- old/usr/src/cmd/sendmail/libmilter/example.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/example.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,7 +6,7 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- * $Id: example.c,v 8.4 2008/07/22 15:12:47 ca Exp $
+ * $Id: example.c,v 8.5 2013-11-22 20:51:36 ca Exp $
  */
 
 /*
--- old/usr/src/cmd/sendmail/libmilter/handler.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/handler.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2003, 2006 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2003, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: handler.c,v 8.39 2008/11/25 01:14:16 ca Exp $")
+SM_RCSID("@(#)$Id: handler.c,v 8.40 2013-11-22 20:51:36 ca Exp $")
 
 #include "libmilter.h"
 
--- old/usr/src/cmd/sendmail/libmilter/libmilter.h	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/libmilter.h	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2003, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -19,7 +19,7 @@
 #ifdef _DEFINE
 # define EXTERN
 # define INIT(x)	= x
-SM_IDSTR(MilterlId, "@(#)$Id: libmilter.h,v 8.77 2008/11/25 18:28:18 ca Exp $")
+SM_IDSTR(MilterlId, "@(#)$Id: libmilter.h,v 8.78 2013-11-22 20:51:36 ca Exp $")
 #else /* _DEFINE */
 # define EXTERN extern
 # define INIT(x)
--- old/usr/src/cmd/sendmail/libmilter/listener.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/listener.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2007 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: listener.c,v 8.126 2009/12/16 16:40:23 ca Exp $")
+SM_RCSID("@(#)$Id: listener.c,v 8.127 2013-11-22 20:51:36 ca Exp $")
 
 /*
 **  listener.c -- threaded network listener
--- old/usr/src/cmd/sendmail/libmilter/main.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/main.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2003, 2006, 2007 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2003, 2006, 2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: main.c,v 8.84 2008/09/02 05:37:06 ca Exp $")
+SM_RCSID("@(#)$Id: main.c,v 8.85 2013-11-22 20:51:36 ca Exp $")
 
 #define _DEFINE	1
 #include "libmilter.h"
--- old/usr/src/cmd/sendmail/libmilter/monitor.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/monitor.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: monitor.c,v 8.7 2007/04/23 16:26:28 ca Exp $")
+SM_RCSID("@(#)$Id: monitor.c,v 8.8 2013-11-22 20:51:36 ca Exp $")
 #include "libmilter.h"
 
 #if _FFR_THREAD_MONITOR
--- old/usr/src/cmd/sendmail/libmilter/signal.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/signal.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2004, 2006 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2004, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: signal.c,v 8.44 2006/03/03 03:42:04 ca Exp $")
+SM_RCSID("@(#)$Id: signal.c,v 8.45 2013-11-22 20:51:36 ca Exp $")
 
 #include "libmilter.h"
 
--- old/usr/src/cmd/sendmail/libmilter/sm_gethost.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/sm_gethost.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2001, 2004 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2001, 2004, 2010, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: sm_gethost.c,v 8.27 2004/08/20 21:12:37 ca Exp $")
+SM_RCSID("@(#)$Id: sm_gethost.c,v 8.32 2013-11-22 20:51:36 ca Exp $")
 
 #include <sendmail.h>
 #if NETINET || NETINET6
@@ -32,7 +30,7 @@
 
 #if NETINET6 && NEEDSGETIPNODE
 
-static struct hostent *getipnodebyname __P((char *, int, int, int *));
+static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
 
 # ifndef AI_ADDRCONFIG
 #  define AI_ADDRCONFIG	0	/* dummy */
@@ -45,8 +43,8 @@
 # endif /* ! AI_DEFAULT */
 
 static struct hostent *
-getipnodebyname(name, family, flags, err)
-	char *name;
+sm_getipnodebyname(name, family, flags, err)
+	const char *name;
 	int family;
 	int flags;
 	int *err;
@@ -64,7 +62,18 @@
 	h = gethostbyname(name);
 	if (family == AF_INET6 && !resv6)
 		_res.options &= ~RES_USE_INET6;
-	*err = h_errno;
+
+	/* the function is supposed to return only the requested family */
+	if (h != NULL && h->h_addrtype != family)
+	{
+# if NETINET6
+		freehostent(h);
+# endif /* NETINET6 */
+		h = NULL;
+		*err = NO_DATA;
+	}
+	else
+		*err = h_errno;
 	return h;
 }
 
@@ -79,6 +88,8 @@
 
 	return;
 }
+#else /* NEEDSGETIPNODE && NETINET6 */
+#define sm_getipnodebyname getipnodebyname 
 #endif /* NEEDSGETIPNODE && NETINET6 */
 
 struct hostent *
@@ -101,7 +112,12 @@
 # endif /* SOLARIS == 20300 || SOLARIS == 203 */
 #else /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */
 # if NETINET6
-	int flags = AI_DEFAULT|AI_ALL;
+#  ifndef SM_IPNODEBYNAME_FLAGS
+    /* For IPv4-mapped addresses, use: AI_DEFAULT|AI_ALL */
+#   define SM_IPNODEBYNAME_FLAGS	AI_ADDRCONFIG
+#  endif /* SM_IPNODEBYNAME_FLAGS */
+
+	int flags = SM_IPNODEBYNAME_FLAGS;
 	int err;
 # endif /* NETINET6 */
 
@@ -109,7 +125,7 @@
 #  if ADDRCONFIG_IS_BROKEN
 	flags &= ~AI_ADDRCONFIG;
 #  endif /* ADDRCONFIG_IS_BROKEN */
-	h = getipnodebyname(name, family, flags, &err);
+	h = sm_getipnodebyname(name, family, flags, &err);
 	SM_SET_H_ERRNO(err);
 # else /* NETINET6 */
 	h = gethostbyname(name);
@@ -116,6 +132,16 @@
 # endif /* NETINET6 */
 
 #endif /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */
+
+	/* the function is supposed to return only the requested family */
+	if (h != NULL && h->h_addrtype != family)
+	{
+# if NETINET6
+		freehostent(h);
+# endif /* NETINET6 */
+		h = NULL;
+		SM_SET_H_ERRNO(NO_DATA);
+	}
 	return h;
 }
 
--- old/usr/src/cmd/sendmail/libmilter/smfi.c	Sat Feb  6 15:36:34 2016
+++ new/usr/src/cmd/sendmail/libmilter/smfi.c	Sat Feb  6 15:36:34 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 1999-2007 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 1999-2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: smfi.c,v 8.83 2007/04/23 16:44:39 ca Exp $")
+SM_RCSID("@(#)$Id: smfi.c,v 8.84 2013-11-22 20:51:36 ca Exp $")
 #include <sm/varargs.h>
 #include "libmilter.h"
 
--- old/usr/src/cmd/sendmail/libmilter/worker.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libmilter/worker.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2003-2004, 2007, 2009 Sendmail, Inc. and its suppliers.
+ *  Copyright (c) 2003-2004, 2007, 2009-2012 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -11,7 +11,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: worker.c,v 8.17 2009/06/15 15:34:54 ca Exp $")
+SM_RCSID("@(#)$Id: worker.c,v 8.25 2013-11-22 20:51:37 ca Exp $")
 
 #include "libmilter.h"
 
@@ -141,7 +141,8 @@
 
 #if POOL_DEBUG
 # define POOL_LEV_DPRINTF(lev, x)					\
-	do {								\
+	do								\
+	{								\
 		if ((lev) < ctx->ctx_dbg)				\
 			sm_dprintf x;					\
 	} while (0)
@@ -165,7 +166,9 @@
 {
 	static long id = 0;
 
-	SM_ASSERT(Tskmgr.tm_signature == TM_SIGNATURE);
+	/* this can happen if the milter is shutting down */
+	if (Tskmgr.tm_signature != TM_SIGNATURE)
+		return MI_FAILURE;
 	SM_ASSERT(ctx != NULL);
 	POOL_LEV_DPRINTF(4, ("PIPE r=[%d] w=[%d]", RD_PIPE, WR_PIPE));
 	TASKMGR_LOCK();
@@ -216,6 +219,41 @@
 }
 
 /*
+**  NONBLOCKING -- set nonblocking mode for a file descriptor.
+**
+**	Parameters:
+**		fd -- file descriptor
+**		name -- name for (error) logging
+**
+**	Returns:
+**		MI_SUCCESS/MI_FAILURE
+*/
+
+static int
+nonblocking(int fd, const char *name)
+{
+	int r;
+
+	errno = 0;
+	r = fcntl(fd, F_GETFL, 0);
+	if (r == -1)
+	{
+		smi_log(SMI_LOG_ERR, "fcntl(%s, F_GETFL)=%s",
+			name, sm_errstring(errno));
+		return MI_FAILURE;
+	}
+	errno = 0;
+	r = fcntl(fd, F_SETFL, r | O_NONBLOCK);
+	if (r == -1)
+	{
+		smi_log(SMI_LOG_ERR, "fcntl(%s, F_SETFL, O_NONBLOCK)=%s",
+			name, sm_errstring(errno));
+		return MI_FAILURE;
+	}
+	return MI_SUCCESS;
+}
+
+/*
 **  MI_POOL_CONTROLER_INIT -- Launch the worker pool controller
 **		Must be called before starting sessions.
 **
@@ -246,6 +284,12 @@
 			sm_errstring(errno));
 		return MI_FAILURE;
 	}
+	r = nonblocking(WR_PIPE, "WR_PIPE");
+	if (r != MI_SUCCESS)
+		return r;
+	r = nonblocking(RD_PIPE, "RD_PIPE");
+	if (r != MI_SUCCESS)
+		return r;
 
 	(void) smutex_init(&Tskmgr.tm_w_mutex);
 	(void) scond_init(&Tskmgr.tm_w_cond);
@@ -334,7 +378,7 @@
 	for (;;)
 	{
 		SMFICTX_PTR ctx;
-		int nfd, rfd, i;
+		int nfd, r, i;
 		time_t now;
 
 		POOL_LEV_DPRINTF(4, ("Let's %s again...", WAITFN));
@@ -455,19 +499,19 @@
 		TASKMGR_UNLOCK();
 
 		/* Everything is ready, let's wait for an event */
-		rfd = poll(pfd, nfd, POLL_TIMEOUT);
+		r = poll(pfd, nfd, POLL_TIMEOUT);
 
 		POOL_LEV_DPRINTF(4, ("%s returned: at epoch %d value %d",
 			WAITFN, now, nfd));
 
 		/* timeout */
-		if (rfd == 0)
+		if (r == 0)
 			continue;
 
 		rebuild_set = true;
 
 		/* error */
-		if (rfd < 0)
+		if (r < 0)
 		{
 			if (errno == EINTR)
 				continue;
@@ -479,6 +523,7 @@
 
 			if (pcnt >= MAX_FAILS_S)
 				goto err;
+			continue;
 		}
 		pcnt = 0;
 
@@ -492,28 +537,26 @@
 				WAITFN, i, nfd,
 			WAIT_FD(i)));
 
-			/* has a worker signaled an end of task ? */
+			/* has a worker signaled an end of task? */
 			if (WAIT_FD(i) == RD_PIPE)
 			{
-				char evt = 0;
-				int r = 0;
+				char evts[256];
+				ssize_t r;
 
 				POOL_LEV_DPRINTF(4,
 					("PIPE WILL READ evt = %08X %08X",
 					pfd[i].events, pfd[i].revents));
 
-				if ((pfd[i].revents & MI_POLL_RD_FLAGS) != 0)
+				r = 1;
+				while ((pfd[i].revents & MI_POLL_RD_FLAGS) != 0
+					&& r != -1)
 				{
-					r = read(RD_PIPE, &evt, sizeof(evt));
-					if (r == sizeof(evt))
-					{
-						/* Do nothing */
-					}
+					r = read(RD_PIPE, evts, sizeof(evts));
 				}
 
 				POOL_LEV_DPRINTF(4,
 					("PIPE DONE READ i=[%d] fd=[%d] r=[%d] evt=[%d]",
-					i, RD_PIPE, r, evt));
+					i, RD_PIPE, (int) r, evts[0]));
 
 				if ((pfd[i].revents & ~MI_POLL_RD_FLAGS) != 0)
 				{
@@ -522,7 +565,12 @@
 				continue;
 			}
 
-			/* no ! sendmail wants to send a command */
+			/*
+			**  Not the pipe for workers waking us,
+			**  so must be something on an MTA connection.
+			*/
+
+			TASKMGR_LOCK();
 			SM_TAILQ_FOREACH(ctx, &WRK_CTX_HEAD, ctx_link)
 			{
 				if (ctx->ctx_wstate != WKST_WAITING)
@@ -534,7 +582,6 @@
 
 				if (ctx->ctx_sd == pfd[i].fd)
 				{
-					TASKMGR_LOCK();
 
 					POOL_LEV_DPRINTF(4,
 						("TASK: found %d for fd[%d]=%d",
@@ -550,10 +597,10 @@
 						ctx->ctx_wstate = WKST_RUNNING;
 						LAUNCH_WORKER(ctx);
 					}
-					TASKMGR_UNLOCK();
 					break;
 				}
 			}
+			TASKMGR_UNLOCK();
 
 			POOL_LEV_DPRINTF(4,
 				("TASK %s FOUND - Checking PIPE for fd[%d]",
@@ -566,6 +613,14 @@
 		free(pfd);
 
 	Tskmgr.tm_signature = 0;
+#if 0
+	/*
+	**  Do not clean up ctx -- it can cause double-free()s.
+	**  The program is shutting down anyway, so it's not worth the trouble.
+	**  There is a more complex solution that prevents race conditions
+	**  while accessing ctx, but that's maybe for a later version.
+	*/
+
 	for (;;)
 	{
 		SMFICTX_PTR ctx;
@@ -575,6 +630,7 @@
 			break;
 		mi_close_session(ctx);
 	}
+#endif
 
 	(void) smutex_destroy(&Tskmgr.tm_w_mutex);
 	(void) scond_destroy(&Tskmgr.tm_w_cond);
--- old/usr/src/cmd/sendmail/libsm/assert.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/assert.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: assert.c,v 1.25.2.1 2003/12/05 22:44:17 ca Exp $")
+SM_RCSID("@(#)$Id: assert.c,v 1.27 2013-11-22 20:51:42 ca Exp $")
 
 /*
 **  Abnormal program termination and assertion checking.
--- old/usr/src/cmd/sendmail/libsm/cf.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/cf.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: cf.c,v 1.4 2001/02/01 02:40:21 dmoen Exp $")
+SM_RCSID("@(#)$Id: cf.c,v 1.8 2013-11-22 20:51:42 ca Exp $")
 
 #include <ctype.h>
 #include <errno.h>
@@ -56,7 +54,7 @@
 	if (cfp == NULL)
 		return errno;
 
-	while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+	while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 	{
 		p = strchr(buf, '\n');
 		if (p != NULL)
--- old/usr/src/cmd/sendmail/libsm/clock.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/clock.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,10 +11,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: clock.c,v 1.47 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: clock.c,v 1.48 2013-11-22 20:51:42 ca Exp $")
 #include <unistd.h>
 #include <time.h>
 #include <errno.h>
--- old/usr/src/cmd/sendmail/libsm/clrerr.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/clrerr.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: clrerr.c,v 1.11 2001/01/28 00:29:34 ca Exp $")
+SM_RCSID("@(#)$Id: clrerr.c,v 1.14 2013-11-22 20:51:42 ca Exp $")
 #include <sm/io.h>
 #include <sm/assert.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/config.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/config.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003, 2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003, 2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: config.c,v 1.31 2007/03/14 21:21:49 ca Exp $")
+SM_RCSID("@(#)$Id: config.c,v 1.32 2013-11-22 20:51:42 ca Exp $")
 
 #include <stdlib.h>
 #include <sm/heap.h>
--- old/usr/src/cmd/sendmail/libsm/debug.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/debug.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, 2003, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000, 2001, 2003, 2004 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: debug.c,v 1.32 2009/09/20 05:38:46 ca Exp $")
+SM_RCSID("@(#)$Id: debug.c,v 1.33 2013-11-22 20:51:42 ca Exp $")
 
 /*
 **  libsm debugging and tracing
--- old/usr/src/cmd/sendmail/libsm/errstring.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/errstring.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,10 +10,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: errstring.c,v 1.19 2003/12/10 03:53:05 gshapiro Exp $")
+SM_RCSID("@(#)$Id: errstring.c,v 1.20 2013-11-22 20:51:42 ca Exp $")
 
 #include <errno.h>
 #include <stdio.h>	/* sys_errlist, on some platforms */
--- old/usr/src/cmd/sendmail/libsm/exc.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/exc.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: exc.c,v 1.49 2006/12/19 19:28:09 ca Exp $")
+SM_RCSID("@(#)$Id: exc.c,v 1.50 2013-11-22 20:51:42 ca Exp $")
 
 /*
 **  exception handling
--- old/usr/src/cmd/sendmail/libsm/fclose.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/fclose.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fclose.c,v 1.44 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: fclose.c,v 1.45 2013-11-22 20:51:42 ca Exp $")
 #include <errno.h>
 #include <stdlib.h>
 #include <sm/time.h>
--- old/usr/src/cmd/sendmail/libsm/feof.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/feof.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: feof.c,v 1.11 2001/04/03 01:46:40 ca Exp $")
+SM_RCSID("@(#)$Id: feof.c,v 1.14 2013-11-22 20:51:42 ca Exp $")
 #include <sm/io.h>
 #include <sm/assert.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/ferror.c	Sat Feb  6 15:36:35 2016
+++ new/usr/src/cmd/sendmail/libsm/ferror.c	Sat Feb  6 15:36:35 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: ferror.c,v 1.11 2001/04/03 01:46:40 ca Exp $")
+SM_RCSID("@(#)$Id: ferror.c,v 1.14 2013-11-22 20:51:42 ca Exp $")
 #include <sm/io.h>
 #include <sm/assert.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/fflush.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fflush.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2005, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2005, 2006 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fflush.c,v 1.45 2006/03/03 22:25:00 ca Exp $")
+SM_RCSID("@(#)$Id: fflush.c,v 1.46 2013-11-22 20:51:42 ca Exp $")
 #include <unistd.h>
 #include <errno.h>
 #include <sm/time.h>
--- old/usr/src/cmd/sendmail/libsm/fget.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fget.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2013 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fget.c,v 1.22 2001/08/27 18:54:14 gshapiro Exp $")
+SM_RCSID("@(#)$Id: fget.c,v 1.26 2013-11-22 20:51:42 ca Exp $")
 #include <stdlib.h>
 #include <string.h>
 #include <sm/io.h>
@@ -35,15 +33,15 @@
 **		n -- size of 'buf'
 **
 **	Returns:
-**		success: returns value of 'buf'
-**		failure: NULL (no characters were read)
-**		timeout: NULL and errno set to EAGAIN
+**		success: number of characters
+**		failure: -1
+**		timeout: -1 and errno set to EAGAIN
 **
 **	Side Effects:
 **		may move the file pointer
 */
 
-char *
+int
 sm_io_fgets(fp, timeout, buf, n)
 	register SM_FILE_T *fp;
 	int timeout;
@@ -50,16 +48,17 @@
 	char *buf;
 	register int n;
 {
-	register int len;
-	register char *s;
-	register unsigned char *p, *t;
+	int len, r;
+	char *s;
+	unsigned char *p, *t;
 
 	SM_REQUIRE_ISA(fp, SmFileMagic);
 	if (n <= 0)		/* sanity check */
-		return NULL;
+		return -1;
 
 	s = buf;
 	n--;			/* leave space for NUL */
+	r = 0;
 	while (n > 0)
 	{
 		/* If the buffer is empty, refill it. */
@@ -75,7 +74,7 @@
 			{
 				/* EOF/error: stop with partial or no line */
 				if (s == buf)
-					return NULL;
+					return -1;
 				break;
 			}
 			len = fp->f_r;
@@ -95,18 +94,20 @@
 		if (t != NULL)
 		{
 			len = ++t - p;
+			r += len;
 			fp->f_r -= len;
 			fp->f_p = t;
 			(void) memcpy((void *) s, (void *) p, len);
 			s[len] = 0;
-			return buf;
+			return r;
 		}
 		fp->f_r -= len;
 		fp->f_p += len;
 		(void) memcpy((void *) s, (void *) p, len);
 		s += len;
+		r += len;
 		n -= len;
 	}
 	*s = 0;
-	return buf;
+	return r;
 }
--- old/usr/src/cmd/sendmail/libsm/findfp.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/findfp.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2006 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: findfp.c,v 1.67 2006/08/28 21:24:46 ca Exp $")
+SM_RCSID("@(#)$Id: findfp.c,v 1.68 2013-11-22 20:51:42 ca Exp $")
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/param.h>
--- old/usr/src/cmd/sendmail/libsm/flags.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/flags.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004, 2006 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: flags.c,v 1.23 2006/12/19 19:44:23 ca Exp $")
+SM_RCSID("@(#)$Id: flags.c,v 1.24 2013-11-22 20:51:42 ca Exp $")
 #include <sys/types.h>
 #include <sys/file.h>
 #include <errno.h>
--- old/usr/src/cmd/sendmail/libsm/fopen.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fopen.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fopen.c,v 1.62 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: fopen.c,v 1.63 2013-11-22 20:51:42 ca Exp $")
 #include <errno.h>
 #include <setjmp.h>
 #include <sm/time.h>
--- old/usr/src/cmd/sendmail/libsm/fpos.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fpos.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fpos.c,v 1.39 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: fpos.c,v 1.40 2013-11-22 20:51:42 ca Exp $")
 #include <errno.h>
 #include <setjmp.h>
 #include <sm/time.h>
--- old/usr/src/cmd/sendmail/libsm/fprintf.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fprintf.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fprintf.c,v 1.15 2001/03/02 23:53:41 ca Exp $")
+SM_RCSID("@(#)$Id: fprintf.c,v 1.18 2013-11-22 20:51:42 ca Exp $")
 #include <sm/varargs.h>
 #include <sm/io.h>
 #include <sm/assert.h>
--- old/usr/src/cmd/sendmail/libsm/fpurge.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fpurge.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fpurge.c,v 1.18 2001/01/28 00:29:35 ca Exp $")
+SM_RCSID("@(#)$Id: fpurge.c,v 1.21 2013-11-22 20:51:42 ca Exp $")
 #include <stdlib.h>
 #include <errno.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/fput.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fput.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fput.c,v 1.18 2001/01/28 00:29:35 ca Exp $")
+SM_RCSID("@(#)$Id: fput.c,v 1.21 2013-11-22 20:51:42 ca Exp $")
 #include <string.h>
 #include <errno.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/fread.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fread.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fread.c,v 1.26 2001/02/28 20:54:03 ca Exp $")
+SM_RCSID("@(#)$Id: fread.c,v 1.29 2013-11-22 20:51:42 ca Exp $")
 #include <string.h>
 #include <errno.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/fscanf.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fscanf.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fscanf.c,v 1.15 2001/03/02 23:53:41 ca Exp $")
+SM_RCSID("@(#)$Id: fscanf.c,v 1.18 2013-11-22 20:51:42 ca Exp $")
 #include <sm/varargs.h>
 #include <sm/assert.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/fseek.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fseek.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fseek.c,v 1.47 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: fseek.c,v 1.48 2013-11-22 20:51:42 ca Exp $")
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
--- old/usr/src/cmd/sendmail/libsm/fvwrite.c	Sat Feb  6 15:36:36 2016
+++ new/usr/src/cmd/sendmail/libsm/fvwrite.c	Sat Feb  6 15:36:36 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fvwrite.c,v 1.47 2001/08/27 13:02:20 ca Exp $")
+SM_RCSID("@(#)$Id: fvwrite.c,v 1.50 2013-11-22 20:51:42 ca Exp $")
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
--- old/usr/src/cmd/sendmail/libsm/fvwrite.h	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/fvwrite.h	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -11,11 +11,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- * $Id: fvwrite.h,v 1.7 2001/03/02 00:18:19 ca Exp $
+ * $Id: fvwrite.h,v 1.8 2013-11-22 20:51:43 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /* I/O descriptors for sm_fvwrite() */
 struct sm_iov
 {
--- old/usr/src/cmd/sendmail/libsm/fwalk.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/fwalk.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fwalk.c,v 1.19 2001/03/02 03:22:18 ca Exp $")
+SM_RCSID("@(#)$Id: fwalk.c,v 1.22 2013-11-22 20:51:43 ca Exp $")
 #include <errno.h>
 #include <sm/io.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/fwrite.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/fwrite.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: fwrite.c,v 1.22 2001/04/03 01:46:40 ca Exp $")
+SM_RCSID("@(#)$Id: fwrite.c,v 1.25 2013-11-22 20:51:43 ca Exp $")
 #include <errno.h>
 #include <sm/io.h>
 #include <sm/assert.h>
--- old/usr/src/cmd/sendmail/libsm/get.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/get.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: get.c,v 1.16 2001/01/28 00:29:35 ca Exp $")
+SM_RCSID("@(#)$Id: get.c,v 1.19 2013-11-22 20:51:43 ca Exp $")
 #include <sm/io.h>
 #include <sm/assert.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/glue.h	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/glue.h	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -11,11 +11,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- * $Id: glue.h,v 1.6 2001/01/22 23:09:49 ca Exp $
+ * $Id: glue.h,v 1.7 2013-11-22 20:51:43 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  The first few FILEs are statically allocated; others are dynamically
 **  allocated and linked in via this glue structure.
--- old/usr/src/cmd/sendmail/libsm/heap.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/heap.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: heap.c,v 1.51 2004/08/03 20:32:00 ca Exp $")
+SM_RCSID("@(#)$Id: heap.c,v 1.52 2013-11-22 20:51:43 ca Exp $")
 
 /*
 **  debugging memory allocation package
--- old/usr/src/cmd/sendmail/libsm/ldap.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/ldap.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2009 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -11,7 +11,7 @@
 #define LDAP_DEPRECATED	1
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: ldap.c,v 1.83 2009/06/19 22:02:26 guenther Exp $")
+SM_RCSID("@(#)$Id: ldap.c,v 1.86 2013-11-22 20:51:43 ca Exp $")
 
 #if LDAPMAP
 # include <sys/types.h>
@@ -1098,10 +1098,8 @@
 
 	if (ret == 0)
 		save_errno = ETIMEDOUT;
-	else
+	else if (ret == LDAP_RES_SEARCH_RESULT)
 	{
-		int rc;
-
 		/*
 		**  We may have gotten an LDAP_RES_SEARCH_RESULT response
 		**  with an error inside it, so we have to extract that
@@ -1109,11 +1107,21 @@
 		**  to an LDAP proxy whose backend has gone down.
 		*/
 
-		save_errno = ldap_parse_result(lmap->ldap_ld, lmap->ldap_res,
-				       &rc, NULL, NULL, NULL, NULL, 0);
-		if (save_errno == LDAP_SUCCESS)
-			save_errno = rc;
+		if (lmap->ldap_res == NULL)
+			save_errno = LDAP_UNAVAILABLE;
+		else
+		{
+			int rc;
+
+			save_errno = ldap_parse_result(lmap->ldap_ld,
+					lmap->ldap_res, &rc, NULL, NULL,
+					NULL, NULL, 0);
+			if (save_errno == LDAP_SUCCESS)
+				save_errno = rc;
+		}
 	}
+	else
+		save_errno = sm_ldap_geterrno(lmap->ldap_ld);
 	if (save_errno != LDAP_SUCCESS)
 	{
 		statp = EX_TEMPFAIL;
--- old/usr/src/cmd/sendmail/libsm/local.h	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/local.h	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004-2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004-2006 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -11,11 +11,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: local.h,v 1.58 2006/12/19 19:44:23 ca Exp $
+ *	$Id: local.h,v 1.59 2013-11-22 20:51:43 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  Information local to this implementation of stdio,
 **  in particular, macros and private variables.
--- old/usr/src/cmd/sendmail/libsm/makebuf.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/makebuf.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: makebuf.c,v 1.26 2001/10/31 16:04:08 ca Exp $")
+SM_RCSID("@(#)$Id: makebuf.c,v 1.27 2013-11-22 20:51:43 ca Exp $")
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
--- old/usr/src/cmd/sendmail/libsm/match.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/match.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: match.c,v 1.8 2001/03/02 19:57:08 ca Exp $")
+SM_RCSID("@(#)$Id: match.c,v 1.11 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/string.h>
 
--- old/usr/src/cmd/sendmail/libsm/mbdb.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/mbdb.c	Sat Feb  6 15:36:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2003,2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2003,2009 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: mbdb.c,v 1.41 2009/06/19 22:02:26 guenther Exp $")
+SM_RCSID("@(#)$Id: mbdb.c,v 1.43 2014-01-08 17:03:15 ca Exp $")
 
 #include <sys/param.h>
 
@@ -332,23 +332,16 @@
 	pw = getpwnam(name);
 	if (pw == NULL)
 	{
-#if 0
+#if _FFR_USE_GETPWNAM_ERRNO
 		/*
-		**  getpwnam() isn't advertised as setting errno.
-		**  In fact, under FreeBSD, non-root getpwnam() on
-		**  non-existant users returns NULL with errno = EPERM.
-		**  This test won't work.
+		**  Only enable this code iff
+		**  user unknown <-> getpwnam() == NULL && errno == 0
+		**  (i.e., errno unchanged); see the POSIX spec.
 		*/
-		switch (errno)
-		{
-		  case 0:
-			return EX_NOUSER;
-		  case EIO:
-			return EX_OSERR;
-		  default:
+
+		if (errno != 0)
 			return EX_TEMPFAIL;
-		}
-#endif /* 0 */
+#endif /* _FFR_USE_GETPWNAM_ERRNO */
 		return EX_NOUSER;
 	}
 
--- old/usr/src/cmd/sendmail/libsm/memstat.c	Sat Feb  6 15:36:37 2016
+++ new/usr/src/cmd/sendmail/libsm/memstat.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005-2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2005-2007 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: memstat.c,v 1.6 2007/03/20 23:26:12 ca Exp $")
+SM_RCSID("@(#)$Id: memstat.c,v 1.7 2013-11-22 20:51:43 ca Exp $")
 
 #include <errno.h>
 #include <sm/misc.h>
--- old/usr/src/cmd/sendmail/libsm/niprop.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/niprop.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: niprop.c,v 1.6 2001/09/04 22:41:27 ca Exp $")
+SM_RCSID("@(#)$Id: niprop.c,v 1.9 2013-11-22 20:51:43 ca Exp $")
 
 #if NETINFO
 #include <ctype.h>
--- old/usr/src/cmd/sendmail/libsm/path.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/path.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: path.c,v 1.7 2001/08/28 16:06:59 gshapiro Exp $")
+SM_RCSID("@(#)$Id: path.c,v 1.10 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/path.h>
 #include <sm/string.h>
--- old/usr/src/cmd/sendmail/libsm/put.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/put.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: put.c,v 1.27 2001/12/19 05:19:35 ca Exp $")
+SM_RCSID("@(#)$Id: put.c,v 1.28 2013-11-22 20:51:43 ca Exp $")
 #include <string.h>
 #include <errno.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/refill.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/refill.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2005-2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2005-2006 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: refill.c,v 1.53 2006/02/28 18:48:25 ca Exp $")
+SM_RCSID("@(#)$Id: refill.c,v 1.54 2013-11-22 20:51:43 ca Exp $")
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
--- old/usr/src/cmd/sendmail/libsm/rewind.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/rewind.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: rewind.c,v 1.16 2001/04/03 01:46:40 ca Exp $")
+SM_RCSID("@(#)$Id: rewind.c,v 1.19 2013-11-22 20:51:43 ca Exp $")
 #include <errno.h>
 #include <sm/io.h>
 #include <sm/assert.h>
--- old/usr/src/cmd/sendmail/libsm/rpool.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/rpool.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2004 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: rpool.c,v 1.28 2004/08/03 20:44:04 ca Exp $")
+SM_RCSID("@(#)$Id: rpool.c,v 1.29 2013-11-22 20:51:43 ca Exp $")
 
 /*
 **  resource pools
--- old/usr/src/cmd/sendmail/libsm/sem.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/sem.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2005, 2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2005, 2008 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: sem.c,v 1.14 2008/05/30 16:26:38 ca Exp $")
+SM_RCSID("@(#)$Id: sem.c,v 1.15 2013-11-22 20:51:43 ca Exp $")
 
 #if SM_CONF_SEM
 # include <stdlib.h>
--- old/usr/src/cmd/sendmail/libsm/setvbuf.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/setvbuf.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: setvbuf.c,v 1.30 2001/02/28 20:25:18 rodney Exp $")
+SM_RCSID("@(#)$Id: setvbuf.c,v 1.33 2013-11-22 20:51:43 ca Exp $")
 #include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
--- old/usr/src/cmd/sendmail/libsm/shm.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/shm.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2003, 2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003, 2005 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: shm.c,v 1.19 2005/07/14 22:34:28 ca Exp $")
+SM_RCSID("@(#)$Id: shm.c,v 1.20 2013-11-22 20:51:43 ca Exp $")
 
 #if SM_CONF_SHM
 # include <stdlib.h>
--- old/usr/src/cmd/sendmail/libsm/signal.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/signal.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: signal.c,v 1.17 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: signal.c,v 1.18 2013-11-22 20:51:43 ca Exp $")
 
 #if SM_CONF_SETITIMER
 # include <sm/time.h>
--- old/usr/src/cmd/sendmail/libsm/smstdio.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/smstdio.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: smstdio.c,v 1.34 2004/08/03 20:46:34 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: smstdio.c,v 1.35 2013-11-22 20:51:43 ca Exp $")
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
--- old/usr/src/cmd/sendmail/libsm/snprintf.c	Sat Feb  6 15:36:38 2016
+++ new/usr/src/cmd/sendmail/libsm/snprintf.c	Sat Feb  6 15:36:38 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: snprintf.c,v 1.24 2006/10/12 21:50:10 ca Exp $")
+SM_RCSID("@(#)$Id: snprintf.c,v 1.25 2013-11-22 20:51:43 ca Exp $")
 #include <limits.h>
 #include <sm/varargs.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/sscanf.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/sscanf.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: sscanf.c,v 1.25 2002/02/01 02:28:00 ca Exp $")
+SM_RCSID("@(#)$Id: sscanf.c,v 1.26 2013-11-22 20:51:43 ca Exp $")
 #include <string.h>
 #include <sm/varargs.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/stdio.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/stdio.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2005 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: stdio.c,v 1.71 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: stdio.c,v 1.72 2013-11-22 20:51:43 ca Exp $")
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
--- old/usr/src/cmd/sendmail/libsm/strcasecmp.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strcasecmp.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1987, 1988, 1993
@@ -11,16 +11,14 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: strcasecmp.c,v 1.12 2001/08/27 22:09:15 gshapiro Exp $")
+SM_RCSID("@(#)$Id: strcasecmp.c,v 1.16 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/config.h>
 #include <sm/string.h>
 #include <string.h>
 
-/*
+/*
 **  SM_STRCASECMP -- 8-bit clean version of strcasecmp
 **
 **	Thank you, vendors, for making this all necessary.
--- old/usr/src/cmd/sendmail/libsm/strdup.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strdup.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: strdup.c,v 1.15 2003/10/10 17:56:57 ca Exp $")
+SM_RCSID("@(#)$Id: strdup.c,v 1.16 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/heap.h>
 #include <sm/string.h>
--- old/usr/src/cmd/sendmail/libsm/strerror.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strerror.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,10 +11,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: strerror.c,v 1.21 2001/06/17 21:31:41 ca Exp $")
+SM_RCSID("@(#)$Id: strerror.c,v 1.24 2013-11-22 20:51:43 ca Exp $")
 
 /*
 **  define strerror for platforms that lack it.
--- old/usr/src/cmd/sendmail/libsm/strexit.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strexit.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: strexit.c,v 1.3 2001/01/15 18:39:11 ca Exp $")
+SM_RCSID("@(#)$Id: strexit.c,v 1.6 2013-11-22 20:51:43 ca Exp $")
 #include <sm/string.h>
 #include <sm/sysexits.h>
 
--- old/usr/src/cmd/sendmail/libsm/string.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/string.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: string.c,v 1.1 2001/02/15 21:04:50 ca Exp $")
+SM_RCSID("@(#)$Id: string.c,v 1.4 2013-11-22 20:51:43 ca Exp $")
 
 #include <ctype.h>
 #include <errno.h>
--- old/usr/src/cmd/sendmail/libsm/stringf.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/stringf.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: stringf.c,v 1.13 2001/03/03 03:40:43 ca Exp $")
+SM_RCSID("@(#)$Id: stringf.c,v 1.16 2013-11-22 20:51:43 ca Exp $")
 #include <errno.h>
 #include <stdio.h>
 #include <sm/exc.h>
--- old/usr/src/cmd/sendmail/libsm/strio.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strio.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004, 2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004, 2005 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: strio.c,v 1.44 2005/06/09 21:40:19 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: strio.c,v 1.45 2013-11-22 20:51:43 ca Exp $")
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
--- old/usr/src/cmd/sendmail/libsm/strl.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strl.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: strl.c,v 1.31 2002/01/20 01:41:25 gshapiro Exp $")
+SM_RCSID("@(#)$Id: strl.c,v 1.32 2013-11-22 20:51:43 ca Exp $")
 #include <sm/config.h>
 #include <sm/string.h>
 
--- old/usr/src/cmd/sendmail/libsm/strrevcmp.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strrevcmp.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: strrevcmp.c,v 1.2 2001/08/27 22:21:51 gshapiro Exp $")
+SM_RCSID("@(#)$Id: strrevcmp.c,v 1.6 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/config.h>
 #include <sm/string.h>
@@ -62,7 +60,7 @@
 				charmap[(unsigned char) s2[i2]]);
 	}
 }
-/*
+/*
 **  SM_STRREVCMP -- compare two strings starting at the end
 **
 **	Parameters:
--- old/usr/src/cmd/sendmail/libsm/strto.c	Sat Feb  6 15:36:39 2016
+++ new/usr/src/cmd/sendmail/libsm/strto.c	Sat Feb  6 15:36:39 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1992
  *	The Regents of the University of California.  All rights reserved.
@@ -9,10 +9,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: strto.c,v 1.18 2001/12/30 04:59:37 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Id: strto.c,v 1.19 2013-11-22 20:51:43 ca Exp $")
 
 #include <sys/param.h>
 #include <sys/types.h>
--- old/usr/src/cmd/sendmail/libsm/t-event.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-event.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2002, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2002, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: t-event.c,v 1.13 2005/06/14 23:07:20 ca Exp $")
+SM_RCSID("@(#)$Id: t-event.c,v 1.14 2013-11-22 20:51:43 ca Exp $")
 
 #include <stdio.h>
 
--- old/usr/src/cmd/sendmail/libsm/t-exc.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-exc.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-exc.c,v 1.18 2001/07/05 22:46:35 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Id: t-exc.c,v 1.21 2013-11-22 20:51:43 ca Exp $")
 
 #include <string.h>
 #include <sm/heap.h>
--- /dev/null	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-fget.c	Sat Feb  6 15:36:40 2016
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013 Proofpoint, 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
+ * the sendmail distribution.
+ */
+
+#include <sm/gen.h>
+SM_IDSTR(id, "@(#)$Id: t-fget.c,v 1.2 2013-11-22 20:51:43 ca Exp $")
+
+#include <sm/io.h>
+#include <sm/string.h>
+#include <sm/test.h>
+#include <errno.h>
+
+void
+check(char *msg, int l)
+{
+	SM_FILE_T *wfp, *rfp;
+	char buf[256];
+	size_t n;
+	int r, i;
+	static char fn[] = "tfget";
+
+	wfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn,
+			   SM_IO_WRONLY_B, NULL);
+	SM_TEST(wfp != NULL);
+	for (i = 0; i < l; i++)
+	{
+		r = sm_io_putc(wfp, SM_TIME_DEFAULT, msg[i]);
+		SM_TEST(r >= 0);
+	}
+	r = sm_io_close(wfp, SM_TIME_DEFAULT);
+	SM_TEST(r == 0);
+
+	rfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, fn,
+			   SM_IO_RDONLY_B, NULL);
+	SM_TEST(rfp != NULL);
+	n = sizeof(buf);
+	r = sm_io_fgets(rfp, SM_TIME_DEFAULT, buf, n);
+	if (l == 0)
+	{
+		SM_TEST(r == -1);
+		SM_TEST(errno == 0);
+	}
+	else
+	{
+		SM_TEST(r == l);
+		if (r != l)
+			fprintf(stderr, "buf='%s', in='%s', r=%d, l=%d\n",
+				buf, msg, r, l);
+	}
+	SM_TEST(memcmp(buf, msg, l) == 0);
+	r = sm_io_close(rfp, SM_TIME_DEFAULT);
+	SM_TEST(r == 0);
+}
+
+
+int
+main(argc, argv)
+	int argc;
+	char **argv;
+{
+	char res[256];
+	int l;
+
+	sm_test_begin(argc, argv, "test fget");
+
+	check("", strlen(""));
+	check("\n", strlen("\n"));
+	check("test\n", strlen("test\n"));
+
+	l = snprintf(res, sizeof(res), "%c%s\n", '\0', "test ing");
+	check(res, l);
+
+	l = snprintf(res, sizeof(res), "%c%s%c\n", '\0', "test ing", '\0');
+	check(res, l);
+
+	l = snprintf(res, sizeof(res), "%c%s%c%s\n",
+		'\0', "test ing", '\0', "eol");
+	check(res, l);
+
+	return sm_test_end();
+}
--- old/usr/src/cmd/sendmail/libsm/t-float.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-float.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-float.c,v 1.16 2001/02/02 23:11:46 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-float.c,v 1.19 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/limits.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/t-fopen.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-fopen.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-fopen.c,v 1.9 2002/02/06 23:57:45 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-fopen.c,v 1.10 2013-11-22 20:51:43 ca Exp $")
 
 #include <fcntl.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/t-heap.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-heap.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-heap.c,v 1.8 2001/03/06 17:27:36 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-heap.c,v 1.11 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/debug.h>
 #include <sm/heap.h>
--- old/usr/src/cmd/sendmail/libsm/t-match.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-match.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-match.c,v 1.7 2000/12/18 18:12:12 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-match.c,v 1.10 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/string.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/t-memstat.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-memstat.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005-2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2005-2007 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.9 2007/03/14 21:41:09 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.11 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/misc.h>
 
@@ -65,6 +63,12 @@
 
 		  case 'r':
 			resource = strdup(optarg);
+			if (resource == NULL)
+			{
+				fprintf(stderr, "strdup(%s) failed\n",
+					optarg);
+				exit(1);
+			}
 			break;
 
 		  case 's':
--- old/usr/src/cmd/sendmail/libsm/t-path.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-path.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-path.c,v 1.6 2001/07/05 22:47:29 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Id: t-path.c,v 1.9 2013-11-22 20:51:43 ca Exp $")
 
 #include <string.h>
 #include <sm/path.h>
--- old/usr/src/cmd/sendmail/libsm/t-qic.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-qic.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-qic.c,v 1.9 2006/08/24 21:26:13 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-qic.c,v 1.10 2013-11-22 20:51:43 ca Exp $")
 
 #include <stdio.h>
 #include <sm/sendmail.h>
--- old/usr/src/cmd/sendmail/libsm/t-rpool.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-rpool.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-rpool.c,v 1.16 2001/03/04 18:38:47 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-rpool.c,v 1.19 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/debug.h>
 #include <sm/heap.h>
--- old/usr/src/cmd/sendmail/libsm/t-scanf.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-scanf.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-scanf.c,v 1.5 2001/11/13 00:51:28 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-scanf.c,v 1.6 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/limits.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/t-sem.c	Sat Feb  6 15:36:40 2016
+++ new/usr/src/cmd/sendmail/libsm/t-sem.c	Sat Feb  6 15:36:40 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2005-2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2005-2008 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: t-sem.c,v 1.17 2008/05/30 16:26:38 ca Exp $")
+SM_RCSID("@(#)$Id: t-sem.c,v 1.18 2013-11-22 20:51:43 ca Exp $")
 
 #include <stdio.h>
 
--- old/usr/src/cmd/sendmail/libsm/t-shm.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/t-shm.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002, 2004, 2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004, 2005 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: t-shm.c,v 1.22 2005/01/14 02:14:10 ca Exp $")
+SM_RCSID("@(#)$Id: t-shm.c,v 1.23 2013-11-22 20:51:43 ca Exp $")
 
 #include <stdio.h>
 
--- old/usr/src/cmd/sendmail/libsm/t-smstdio.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/t-smstdio.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-smstdio.c,v 1.9 2001/03/21 18:30:41 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-smstdio.c,v 1.12 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/io.h>
 #include <sm/string.h>
--- old/usr/src/cmd/sendmail/libsm/t-string.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/t-string.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-string.c,v 1.9 2001/01/26 03:28:43 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-string.c,v 1.12 2013-11-22 20:51:43 ca Exp $")
 
 #include <sm/exc.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/t-strio.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/t-strio.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-strio.c,v 1.9 2001/03/03 04:00:53 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-strio.c,v 1.12 2013-11-22 20:51:44 ca Exp $")
 #include <sm/string.h>
 #include <sm/io.h>
 #include <sm/test.h>
--- old/usr/src/cmd/sendmail/libsm/t-strl.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/t-strl.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-strl.c,v 1.13 2001/08/27 23:00:05 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Id: t-strl.c,v 1.16 2013-11-22 20:51:44 ca Exp $")
 
 #include <stdlib.h>
 #include <stdio.h>
--- old/usr/src/cmd/sendmail/libsm/t-strrevcmp.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/t-strrevcmp.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: t-strrevcmp.c,v 1.1 2001/07/16 21:35:28 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: t-strrevcmp.c,v 1.4 2013-11-22 20:51:44 ca Exp $")
 
 #include <sm/exc.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/test.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/test.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(Id, "@(#)$Id: test.c,v 1.16 2002/01/08 17:54:40 ca Exp $")
+SM_IDSTR(Id, "@(#)$Id: test.c,v 1.17 2013-11-22 20:51:44 ca Exp $")
 
 /*
 **  Abstractions for writing libsm test programs.
--- old/usr/src/cmd/sendmail/libsm/ungetc.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/ungetc.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: ungetc.c,v 1.30 2005/06/14 23:07:20 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: ungetc.c,v 1.31 2013-11-22 20:51:44 ca Exp $")
 
 #include <stdlib.h>
 #include <string.h>
--- old/usr/src/cmd/sendmail/libsm/util.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/util.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,11 +8,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
 
-SM_RCSID("@(#)$Id: util.c,v 1.9 2006/08/30 18:35:51 ca Exp $")
+SM_RCSID("@(#)$Id: util.c,v 1.10 2013-11-22 20:51:44 ca Exp $")
 #include <sm/setjmp.h>
 #include <sm/conf.h>
 #include <sm/assert.h>
--- old/usr/src/cmd/sendmail/libsm/vasprintf.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/vasprintf.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -23,10 +23,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: vasprintf.c,v 1.26.2.1 2003/06/03 02:14:09 ca Exp $")
+SM_RCSID("@(#)$Id: vasprintf.c,v 1.28 2013-11-22 20:51:44 ca Exp $")
 #include <stdlib.h>
 #include <errno.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/vfprintf.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/vfprintf.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: vfprintf.c,v 1.54 2005/05/16 03:52:00 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: vfprintf.c,v 1.55 2013-11-22 20:51:44 ca Exp $")
 
 /*
 **  Overall:
--- old/usr/src/cmd/sendmail/libsm/vfscanf.c	Sat Feb  6 15:36:41 2016
+++ new/usr/src/cmd/sendmail/libsm/vfscanf.c	Sat Feb  6 15:36:41 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Id: vfscanf.c,v 1.54 2006/10/12 22:03:52 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: vfscanf.c,v 1.55 2013-11-22 20:51:44 ca Exp $")
 
 #include <ctype.h>
 #include <stdlib.h>
--- old/usr/src/cmd/sendmail/libsm/vprintf.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsm/vprintf.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: vprintf.c,v 1.12 2001/01/24 01:27:26 gshapiro Exp $")
+SM_RCSID("@(#)$Id: vprintf.c,v 1.15 2013-11-22 20:51:44 ca Exp $")
 #include <sm/io.h>
 #include "local.h"
 
--- old/usr/src/cmd/sendmail/libsm/vsnprintf.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsm/vsnprintf.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: vsnprintf.c,v 1.21 2001/03/04 23:28:41 ca Exp $")
+SM_RCSID("@(#)$Id: vsnprintf.c,v 1.24 2013-11-22 20:51:44 ca Exp $")
 #include <limits.h>
 #include <sm/io.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/wbuf.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsm/wbuf.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: wbuf.c,v 1.19 2001/03/05 03:22:41 ca Exp $")
+SM_RCSID("@(#)$Id: wbuf.c,v 1.22 2013-11-22 20:51:44 ca Exp $")
 #include <errno.h>
 #include <sm/io.h>
 #include "local.h"
--- old/usr/src/cmd/sendmail/libsm/wsetup.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsm/wsetup.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *      All rights reserved.
  * Copyright (c) 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -12,10 +12,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: wsetup.c,v 1.20 2002/02/07 18:02:45 ca Exp $")
+SM_RCSID("@(#)$Id: wsetup.c,v 1.21 2013-11-22 20:51:44 ca Exp $")
 #include <stdlib.h>
 #include <errno.h>
 #include <sm/io.h>
--- old/usr/src/cmd/sendmail/libsm/xtrap.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsm/xtrap.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
  * the sendmail distribution.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: xtrap.c,v 1.3 2000/12/08 08:03:09 rodney Exp $")
+SM_RCSID("@(#)$Id: xtrap.c,v 1.6 2013-11-22 20:51:44 ca Exp $")
 
 #include <sm/xtrap.h>
 
--- old/usr/src/cmd/sendmail/libsmdb/smdb.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmdb/smdb.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
-** Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
+** Copyright (c) 1999-2002 Proofpoint, Inc. and its suppliers.
 **	All rights reserved.
 **
 ** By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
 ** the sendmail distribution.
 */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: smdb.c,v 8.58 2004/08/03 20:58:38 ca Exp $")
+SM_RCSID("@(#)$Id: smdb.c,v 8.59 2013-11-22 20:51:49 ca Exp $")
 
 #include <fcntl.h>
 #include <stdlib.h>
--- old/usr/src/cmd/sendmail/libsmdb/smdb1.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmdb/smdb1.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
-** Copyright (c) 1999-2002, 2004, 2009 Sendmail, Inc. and its suppliers.
+** Copyright (c) 1999-2002, 2004, 2009 Proofpoint, Inc. and its suppliers.
 **	All rights reserved.
 **
 ** By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
 */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: smdb1.c,v 8.62 2009/11/12 23:04:18 ca Exp $")
+SM_RCSID("@(#)$Id: smdb1.c,v 8.63 2013-11-22 20:51:49 ca Exp $")
 
 #include <unistd.h>
 #include <stdlib.h>
--- old/usr/src/cmd/sendmail/libsmdb/smdb2.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmdb/smdb2.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
-** Copyright (c) 1999-2003, 2009 Sendmail, Inc. and its suppliers.
+** Copyright (c) 1999-2003, 2009 Proofpoint, Inc. and its suppliers.
 **	All rights reserved.
 **
 ** By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
 */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: smdb2.c,v 8.80 2009/11/12 23:07:49 ca Exp $")
+SM_RCSID("@(#)$Id: smdb2.c,v 8.83 2013-11-22 20:51:49 ca Exp $")
 
 #include <fcntl.h>
 #include <stdlib.h>
@@ -625,6 +625,8 @@
 	{
 		smdb_unlock_file(lock_fd);
 		smdb_free_database(smdb_db);	/* ok to be NULL */
+		if (db2 != NULL)
+			free(db2);
 		return SMDBE_MALLOC;
 	}
 
--- old/usr/src/cmd/sendmail/libsmdb/smndbm.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmdb/smndbm.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
-** Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
+** Copyright (c) 1999-2002 Proofpoint, Inc. and its suppliers.
 **	All rights reserved.
 **
 ** By using this file, you agree to the terms and conditions set
@@ -7,10 +7,8 @@
 ** the sendmail distribution.
 */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: smndbm.c,v 8.52 2002/05/21 22:30:30 gshapiro Exp $")
+SM_RCSID("@(#)$Id: smndbm.c,v 8.55 2013-11-22 20:51:49 ca Exp $")
 
 #include <fcntl.h>
 #include <stdlib.h>
@@ -440,6 +438,8 @@
 
 	db->smndbm_cursor_in_use = true;
 	dbm_cursor = (SMDB_DBM_CURSOR *) malloc(sizeof(SMDB_DBM_CURSOR));
+	if (dbm_cursor == NULL)
+		return SMDBE_MALLOC;
 	dbm_cursor->smndbmc_db = db;
 	dbm_cursor->smndbmc_current_key.dptr = NULL;
 	dbm_cursor->smndbmc_current_key.dsize = 0;
@@ -446,7 +446,10 @@
 
 	cur = (SMDB_CURSOR*) malloc(sizeof(SMDB_CURSOR));
 	if (cur == NULL)
+	{
+		free(dbm_cursor);
 		return SMDBE_MALLOC;
+	}
 
 	cur->smdbc_impl = dbm_cursor;
 	cur->smdbc_close = smdbm_cursor_close;
--- old/usr/src/cmd/sendmail/libsmutil/cf.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmutil/cf.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
-SM_RCSID("@(#)$Id: cf.c,v 8.18.2.1 2002/09/24 21:48:23 ca Exp $")
+SM_RCSID("@(#)$Id: cf.c,v 8.20 2013-11-22 20:51:50 ca Exp $")
 #include <sendmail/pathnames.h>
 
 /*
--- old/usr/src/cmd/sendmail/libsmutil/debug.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmutil/debug.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,10 +8,8 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: debug.c,v 8.7 2001/06/27 21:46:54 gshapiro Exp $")
+SM_RCSID("@(#)$Id: debug.c,v 8.10 2013-11-22 20:51:50 ca Exp $")
 
 unsigned char	tTdvect[100];	/* trace vector */
--- old/usr/src/cmd/sendmail/libsmutil/err.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmutil/err.c	Sat Feb  6 15:36:42 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,11 +8,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: err.c,v 8.3 2001/01/24 01:27:30 gshapiro Exp $")
+SM_RCSID("@(#)$Id: err.c,v 8.6 2013-11-22 20:51:50 ca Exp $")
 
 #include <ctype.h>
 
--- old/usr/src/cmd/sendmail/libsmutil/lockfile.c	Sat Feb  6 15:36:42 2016
+++ new/usr/src/cmd/sendmail/libsmutil/lockfile.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: lockfile.c,v 8.21 2003/11/10 22:57:38 ca Exp $")
+SM_RCSID("@(#)$Id: lockfile.c,v 8.22 2013-11-22 20:51:50 ca Exp $")
 
 
 /*
--- old/usr/src/cmd/sendmail/libsmutil/safefile.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/libsmutil/safefile.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -15,7 +15,7 @@
 #include <sm/io.h>
 #include <sm/errstring.h>
 
-SM_RCSID("@(#)$Id: safefile.c,v 8.129 2008/08/04 18:07:04 gshapiro Exp $")
+SM_RCSID("@(#)$Id: safefile.c,v 8.130 2013-11-22 20:51:50 ca Exp $")
 
 
 /*
--- old/usr/src/cmd/sendmail/libsmutil/snprintf.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/libsmutil/snprintf.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,13 +11,11 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: snprintf.c,v 8.41 2001/08/28 23:07:01 gshapiro Exp $")
+SM_RCSID("@(#)$Id: snprintf.c,v 8.45 2013-11-22 20:51:50 ca Exp $")
 
-/*
+/*
 **  SHORTENSTRING -- return short version of a string
 **
 **	If the string is already short, just return it.  If it is too
--- old/usr/src/cmd/sendmail/src/alias.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/alias.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: alias.c,v 8.219 2006/10/24 18:04:09 ca Exp $")
+SM_RCSID("@(#)$Id: alias.c,v 8.221 2013-11-22 20:51:54 ca Exp $")
 
 #define SEPARATOR ':'
 # define ALIAS_SPEC_SEPARATORS	" ,/:"
@@ -659,7 +657,7 @@
 	LineNumber = 0;
 	naliases = bytes = longest = 0;
 	skipping = false;
-	while (sm_io_fgets(af, SM_TIME_DEFAULT, line, sizeof(line)) != NULL)
+	while (sm_io_fgets(af, SM_TIME_DEFAULT, line, sizeof(line)) >= 0)
 	{
 		int lhssize, rhssize;
 		int c;
@@ -672,7 +670,7 @@
 		{
 			p--;
 			if (sm_io_fgets(af, SM_TIME_DEFAULT, p,
-					SPACELEFT(line, p)) == NULL)
+					SPACELEFT(line, p)) < 0)
 				break;
 			LineNumber++;
 			p = strchr(p, '\n');
@@ -782,7 +780,7 @@
 
 			/* read continuation line */
 			if (sm_io_fgets(af, SM_TIME_DEFAULT, p,
-					sizeof(line) - (p-line)) == NULL)
+					sizeof(line) - (p-line)) < 0)
 				break;
 			LineNumber++;
 
--- old/usr/src/cmd/sendmail/src/arpadate.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/arpadate.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: arpadate.c,v 8.31 2006/08/15 23:24:55 ca Exp $")
+SM_RCSID("@(#)$Id: arpadate.c,v 8.32 2013-11-22 20:51:55 ca Exp $")
 
 /*
 **  ARPADATE -- Create date in ARPANET format
--- old/usr/src/cmd/sendmail/src/bf.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/bf.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2002, 2004, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2002, 2004, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -10,8 +10,6 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  This is in transition. Changed from the original bf_torek.c code
 **  to use sm_io function calls directly rather than through stdio
@@ -20,7 +18,7 @@
 */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: bf.c,v 8.62 2006/03/31 18:45:56 ca Exp $")
+SM_RCSID("@(#)$Id: bf.c,v 8.63 2013-11-22 20:51:55 ca Exp $")
 
 #include <sys/types.h>
 #include <sys/stat.h>
--- old/usr/src/cmd/sendmail/src/bf.h	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/bf.h	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,14 +6,12 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: bf.h,v 8.16 2002/04/15 02:37:09 ca Exp $
+ *	$Id: bf.h,v 8.17 2013-11-22 20:51:55 ca Exp $
  *
  * Contributed by Exactis.com, Inc.
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef BF_H
 # define BF_H 1
 
--- old/usr/src/cmd/sendmail/src/collect.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/collect.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2006, 2008 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: collect.c,v 8.284 2008/08/06 05:26:24 ca Exp $")
+SM_RCSID("@(#)$Id: collect.c,v 8.287 2013-11-22 20:51:55 ca Exp $")
 
 static void	eatfrom __P((char *volatile, ENVELOPE *));
 static void	collect_doheader __P((ENVELOPE *));
@@ -300,6 +300,9 @@
 	unsigned char *pbp;
 	unsigned char peekbuf[8];
 	char bufbuf[MAXLINE];
+#if _FFR_REJECT_NUL_BYTE
+	bool hasNUL;		/* has at least one NUL input byte */
+#endif /* _FFR_REJECT_NUL_BYTE */
 
 	df = NULL;
 	ignrdot = smtpmode ? false : IgnrDot;
@@ -315,6 +318,9 @@
 	hdrslen = 0;
 	numhdrs = 0;
 	HasEightBits = false;
+#if _FFR_REJECT_NUL_BYTE
+	hasNUL = false;
+#endif /* _FFR_REJECT_NUL_BYTE */
 	buf = bp = bufbuf;
 	buflen = sizeof(bufbuf);
 	pbp = peekbuf;
@@ -403,6 +409,10 @@
 							SM_TIME_DEFAULT,
 							c);
 				}
+#if _FFR_REJECT_NUL_BYTE
+				if (c == '\0')
+					hasNUL = true;
+#endif /* _FFR_REJECT_NUL_BYTE */
 				if (c == SM_IO_EOF)
 					goto readerr;
 				if (SevenBitInput)
@@ -869,7 +879,8 @@
 			if (LogLevel > 6)
 				sm_syslog(LOG_NOTICE, e->e_id,
 					"message size (%ld) exceeds maximum (%ld)",
-					e->e_msgsize, MaxMessageSize);
+					PRT_NONNEGL(e->e_msgsize),
+					MaxMessageSize);
 		}
 	}
 
@@ -892,6 +903,14 @@
 			e->e_bodytype = "7BIT";
 	}
 
+#if _FFR_REJECT_NUL_BYTE
+	if (hasNUL && RejectNUL)
+	{
+		e->e_status = "5.6.1";
+		usrerrenh(e->e_status, "554 NUL byte not allowed");
+	}
+#endif /* _FFR_REJECT_NUL_BYTE */
+
 	if (SuperSafe == SAFE_REALLY && !bitset(EF_FATALERRS, e->e_flags))
 	{
 		char *dfname = queuename(e, DATAFL_LETTER);
--- old/usr/src/cmd/sendmail/src/conf.c	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/conf.c	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,14 +11,9 @@
  *
  */
 
-/*
- * Copyright 1999-2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: conf.c,v 8.1153 2009/12/18 17:25:12 ca Exp $")
+SM_RCSID("@(#)$Id: conf.c,v 8.1191 2014-01-08 17:03:14 ca Exp $")
 
 #include <sm/sendmail.h>
 #include <sendmail/pathnames.h>
@@ -55,8 +50,11 @@
 static int	add_hostnames __P((SOCKADDR *));
 
 #if NETINET6 && NEEDSGETIPNODE
-static struct hostent *getipnodebyname __P((char *, int, int, int *));
-static struct hostent *getipnodebyaddr __P((char *, int, int, int *));
+static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
+static struct hostent *sm_getipnodebyaddr __P((const void *, size_t, int, int *));
+#else /* NETINET6 && NEEDSGETIPNODE */
+#define sm_getipnodebyname getipnodebyname
+#define sm_getipnodebyaddr getipnodebyaddr
 #endif /* NETINET6 && NEEDSGETIPNODE */
 
 
@@ -667,6 +665,13 @@
 		dequote_init, null_map_open, null_map_close,
 		arith_map_lookup, null_map_store);
 
+#if _FFR_ARPA_MAP
+	/* "arpa" map -- IP -> arpa */
+	MAPDEF("arpa", NULL, 0,
+		dequote_init, null_map_open, null_map_close,
+		arpa_map_lookup, null_map_store);
+#endif /* _FFR_ARPA_MAP */
+
 #if SOCKETMAP
 	/* arbitrary daemons */
 	MAPDEF("socket", NULL, MCF_ALIASOK,
@@ -969,7 +974,7 @@
 			char buf[MAXLINE];
 
 			while (sm_io_fgets(fp, SM_TIME_DEFAULT, buf,
-					   sizeof(buf)) != NULL)
+					   sizeof(buf)) >= 0)
 			{
 				register char *p;
 
@@ -2605,7 +2610,7 @@
 **		none.
 */
 
-/*VARARGS2*/
+/*VARARGS3*/
 void
 #ifdef __STDC__
 sm_setproctitle(bool status, ENVELOPE *e, const char *fmt, ...)
@@ -2850,7 +2855,7 @@
 		char buf[MAXLINE];
 
 		while (sm_io_fgets(file, SM_TIME_DEFAULT,
-				   buf, sizeof(buf)) != NULL)
+				   buf, sizeof(buf)) >= 0)
 		{
 			if (sm_io_sscanf(buf, "#define sysname \"%*[^\"]\"",
 					NODE_LENGTH, name->nodename) > 0)
@@ -3224,7 +3229,7 @@
 		return false;
 	}
 
-	while (sm_io_fgets(shellf, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+	while (sm_io_fgets(shellf, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 	{
 		register char *p, *q;
 
@@ -4193,7 +4198,7 @@
 /*
 **  SM_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
 **
-**	Some operating systems have wierd problems with the gethostbyXXX
+**	Some operating systems have weird problems with the gethostbyXXX
 **	routines.  For example, Solaris versions at least through 2.3
 **	don't properly deliver a canonical h_name field.  This tries to
 **	work around these problems.
@@ -4217,15 +4222,23 @@
 # endif /* ! AI_ALL */
 
 static struct hostent *
-getipnodebyname(name, family, flags, err)
-	char *name;
+sm_getipnodebyname(name, family, flags, err)
+	const char *name;
 	int family;
 	int flags;
 	int *err;
 {
-	bool resv6 = true;
 	struct hostent *h;
+# if HAS_GETHOSTBYNAME2
 
+	h = gethostbyname2(name, family);
+	if (h == NULL)
+		*err = h_errno;
+	return h;
+
+# else /* HAS_GETHOSTBYNAME2 */
+	bool resv6 = true;
+
 	if (family == AF_INET6)
 	{
 		/* From RFC2133, section 6.1 */
@@ -4236,14 +4249,26 @@
 	h = gethostbyname(name);
 	if (!resv6)
 		_res.options &= ~RES_USE_INET6;
-	*err = h_errno;
+
+	/* the function is supposed to return only the requested family */
+	if (h != NULL && h->h_addrtype != family)
+	{
+#  if NETINET6
+		freehostent(h);
+#  endif /* NETINET6 */
+		h = NULL;
+		*err = NO_DATA;
+	}
+	else
+		*err = h_errno;
 	return h;
+# endif /* HAS_GETHOSTBYNAME2 */
 }
 
 static struct hostent *
-getipnodebyaddr(addr, len, family, err)
-	char *addr;
-	int len;
+sm_getipnodebyaddr(addr, len, family, err)
+	const void *addr;
+	size_t len;
 	int family;
 	int *err;
 {
@@ -4296,7 +4321,12 @@
 #else /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */
 	int nmaps;
 # if NETINET6
-	int flags = AI_DEFAULT|AI_ALL;
+#  ifndef SM_IPNODEBYNAME_FLAGS
+    /* For IPv4-mapped addresses, use: AI_DEFAULT|AI_ALL */
+#   define SM_IPNODEBYNAME_FLAGS	AI_ADDRCONFIG
+#  endif /* SM_IPNODEBYNAME_FLAGS */
+
+	int flags = SM_IPNODEBYNAME_FLAGS;
 	int err;
 # endif /* NETINET6 */
 	char *maptype[MAXMAPSTACK];
@@ -4310,7 +4340,7 @@
 #  if ADDRCONFIG_IS_BROKEN
 	flags &= ~AI_ADDRCONFIG;
 #  endif /* ADDRCONFIG_IS_BROKEN */
-	h = getipnodebyname(name, family, flags, &err);
+	h = sm_getipnodebyname(name, family, flags, &err);
 	SM_SET_H_ERRNO(err);
 # else /* NETINET6 */
 	h = gethostbyname(name);
@@ -4349,7 +4379,7 @@
 					       hbuf, family);
 
 # if NETINET6
-				h = getipnodebyname(hbuf, family, flags, &err);
+				h = sm_getipnodebyname(hbuf, family, flags, &err);
 				SM_SET_H_ERRNO(err);
 				save_errno = errno;
 # else /* NETINET6 */
@@ -4360,6 +4390,17 @@
 		}
 	}
 #endif /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */
+
+	/* the function is supposed to return only the requested family */
+	if (h != NULL && h->h_addrtype != family)
+	{
+# if NETINET6
+		freehostent(h);
+# endif /* NETINET6 */
+		h = NULL;
+		SM_SET_H_ERRNO(NO_DATA);
+	}
+
 	if (tTd(61, 10))
 	{
 		if (h == NULL)
@@ -4369,13 +4410,12 @@
 			sm_dprintf("%s\n", h->h_name);
 			if (tTd(61, 11))
 			{
+				struct in_addr ia;
+				size_t i;
 #if NETINET6
 				struct in6_addr ia6;
 				char buf6[INET6_ADDRSTRLEN];
-#else /* NETINET6 */
-				struct in_addr ia;
 #endif /* NETINET6 */
-				size_t i;
 
 				if (h->h_aliases != NULL)
 					for (i = 0; h->h_aliases[i] != NULL;
@@ -4386,16 +4426,23 @@
 				{
 					char *addr;
 
+					addr = NULL;
 #if NETINET6
-					memmove(&ia6, h->h_addr_list[i],
-						IN6ADDRSZ);
-					addr = anynet_ntop(&ia6,
-							   buf6, sizeof(buf6));
-#else /* NETINET6 */
-					memmove(&ia, h->h_addr_list[i],
-						INADDRSZ);
-					addr = (char *) inet_ntoa(ia);
+					if (h->h_addrtype == AF_INET6)
+					{
+						memmove(&ia6, h->h_addr_list[i],
+							IN6ADDRSZ);
+						addr = anynet_ntop(&ia6,
+							buf6, sizeof(buf6));
+					}
+					else
 #endif /* NETINET6 */
+					/* "else" in #if code above */
+					{
+						memmove(&ia, h->h_addr_list[i],
+							INADDRSZ);
+						addr = (char *) inet_ntoa(ia);
+					}
 					if (addr != NULL)
 						sm_dprintf("\taddr: %s\n", addr);
 				}
@@ -4446,7 +4493,7 @@
 	{
 		int err;
 
-		hp = getipnodebyaddr(addr, len, type, &err);
+		hp = sm_getipnodebyaddr(addr, len, type, &err);
 		SM_SET_H_ERRNO(err);
 	}
 # else /* NETINET6 */
@@ -4604,6 +4651,10 @@
 		int save_errno = errno;
 
 		if (LogLevel > 3 &&
+#if NETINET && defined(IN_LINKLOCAL)
+		    !(sa->sa.sa_family == AF_INET &&
+		      IN_LINKLOCAL(ntohl(sa->sin.sin_addr.s_addr))) &&
+#endif /* NETINET && defined(IN_LINKLOCAL) */
 #if NETINET6
 		    !(sa->sa.sa_family == AF_INET6 &&
 		      IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr)) &&
@@ -4869,6 +4920,7 @@
 		switch (af)
 		{
 		  case AF_INET6:
+			SETV6LOOPBACKADDRFOUND(*sa);
 #  ifdef __KAME__
 			/* convert into proper scoped address */
 			if ((IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr) ||
@@ -5068,6 +5120,7 @@
 
 #   if NETINET6
 		  case AF_INET6:
+			SETV6LOOPBACKADDRFOUND(*sa);
 #    ifdef __KAME__
 			/* convert into proper scoped address */
 			if ((IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr) ||
@@ -5256,8 +5309,8 @@
 */
 
 void
-sm_close_on_exec(highest, lowest)
-	int highest, lowest;
+sm_close_on_exec(lowest, highest)
+	int lowest, highest;
 {
 #if HASFDWALK
 	(void) fdwalk(closefd_walk, &lowest);
@@ -5374,7 +5427,15 @@
 #if LOG
 		if (*id == '\0')
 		{
-			if (tTd(89, 8))
+			if (tTd(89, 10))
+			{
+				struct timeval tv;
+
+				gettimeofday(&tv, NULL);
+				sm_dprintf("%ld.%06ld %s\n", (long) tv.tv_sec,
+					(long) tv.tv_usec, newstring);
+			}
+			else if (tTd(89, 8))
 				sm_dprintf("%s\n", newstring);
 			else
 				syslog(level, "%s", newstring);
@@ -5381,7 +5442,15 @@
 		}
 		else
 		{
-			if (tTd(89, 8))
+			if (tTd(89, 10))
+			{
+				struct timeval tv;
+
+				gettimeofday(&tv, NULL);
+				sm_dprintf("%ld.%06ld %s: %s\n", (long) tv.tv_sec,
+					(long) tv.tv_usec, id, newstring);
+			}
+			else if (tTd(89, 8))
 				sm_dprintf("%s: %s\n", id, newstring);
 			else
 				syslog(level, "%s: %s", id, newstring);
@@ -5933,6 +6002,9 @@
 #if HASWAITPID
 	"HASWAITPID",
 #endif /* HASWAITPID */
+#if HAVE_NANOSLEEP
+	"HAVE_NANOSLEEP",
+#endif /* HAVE_NANOSLEEP */
 #if IDENTPROTO
 	"IDENTPROTO",
 #endif /* IDENTPROTO */
@@ -5981,6 +6053,23 @@
 #if SECUREWARE
 	"SECUREWARE",
 #endif /* SECUREWARE */
+#if SFS_TYPE == SFS_4ARGS
+	"SFS_4ARGS",
+#elif SFS_TYPE == SFS_MOUNT
+	"SFS_MOUNT",
+#elif SFS_TYPE == SFS_NONE
+	"SFS_NONE",
+#elif SFS_TYPE == SFS_NT
+	"SFS_NT",
+#elif SFS_TYPE == SFS_STATFS
+	"SFS_STATFS",
+#elif SFS_TYPE == SFS_STATVFS
+	"SFS_STATVFS",
+#elif SFS_TYPE == SFS_USTAT
+	"SFS_USTAT",
+#elif SFS_TYPE == SFS_VFS
+	"SFS_VFS",
+#endif
 #if SHARE_V1
 	"SHARE_V1",
 #endif /* SHARE_V1 */
@@ -6023,6 +6112,9 @@
 #ifdef USESYSCTL
 	"USESYSCTL",
 #endif /* USESYSCTL */
+#if USE_OPENSSL_ENGINE
+	"USE_OPENSSL_ENGINE",
+#endif /* USE_OPENSSL_ENGINE */
 #if USING_NETSCAPE_LDAP
 	"USING_NETSCAPE_LDAP",
 #endif /* USING_NETSCAPE_LDAP */
@@ -6047,6 +6139,10 @@
 	/* DefaultAuthInfo doesn't really work in 8.13 anymore. */
 	"_FFR_ALLOW_SASLINFO",
 #endif /* _FFR_ALLOW_SASLINFO */
+#if _FFR_ARPA_MAP
+	/* arpa map to reverse an IPv(4,6) address */
+	"_FFR_ARPA_MAP",
+#endif /* _FFR_ARPA_MAP */
 #if _FFR_BADRCPT_SHUTDOWN
 	/* shut down connection (421) if there are too many bad RCPTs */
 	"_FFR_BADRCPT_SHUTDOWN",
@@ -6158,6 +6254,10 @@
 
 	"_FFR_GETHBN_ExFILE",
 #endif /* _FFR_GETHBN_ExFILE */
+#if _FFR_FIPSMODE
+	/* FIPSMode (if supported by OpenSSL library) */
+	"_FFR_FIPSMODE",
+#endif /* _FFR_FIPSMODE */
 #if _FFR_FIX_DASHT
 	/*
 	**  If using -t, force not sending to argv recipients, even
@@ -6199,6 +6299,10 @@
 	/* Ignore extensions offered in response to HELO */
 	"_FFR_IGNORE_EXT_ON_HELO",
 #endif /* _FFR_IGNORE_EXT_ON_HELO */
+#if _FFR_IPV6_FULL
+	/* Use uncompressed IPv6 address format (no "::") */
+	"_FFR_IPV6_FULL",
+#endif /* _FFR_IPV6_FULL */
 #if _FFR_LINUX_MHNL
 	/* Set MAXHOSTNAMELEN to 256 (Linux) */
 	"_FFR_LINUX_MHNL",
@@ -6326,7 +6430,7 @@
 #endif /* _FFR_QUEUE_SCHED_DBG */
 #if _FFR_RCPTTHROTDELAY
 	/* configurable delay for BadRcptThrottle */
-	"_FFR_RCPTTHROTDELAY"
+	"_FFR_RCPTTHROTDELAY",
 #endif /* _FFR_RCPTTHROTDELAY */
 #if _FFR_REDIRECTEMPTY
 	/*
@@ -6337,6 +6441,10 @@
 
 	"_FFR_REDIRECTEMPTY",
 #endif /* _FFR_REDIRECTEMPTY */
+#if _FFR_REJECT_NUL_BYTE
+	/* reject NUL bytes in body */
+	"_FFR_REJECT_NUL_BYTE",
+#endif /* _FFR_REJECT_NUL_BYTE */
 #if _FFR_RESET_MACRO_GLOBALS
 	/* Allow macro 'j' to be set dynamically via rulesets. */
 	"_FFR_RESET_MACRO_GLOBALS",
@@ -6416,6 +6524,9 @@
 	/* More STARTTLS options, e.g., secondary certs. */
 	"_FFR_TLS_1",
 #endif /* _FFR_TLS_1 */
+#if _FFR_TLS_EC
+	"_FFR_TLS_EC",
+#endif /* _FFR_TLS_EC */
 #if _FFR_TRUSTED_QF
 	/*
 	**  If we don't own the file mark it as unsafe.
@@ -6425,6 +6536,16 @@
 
 	"_FFR_TRUSTED_QF",
 #endif /* _FFR_TRUSTED_QF */
+#if _FFR_USE_GETPWNAM_ERRNO
+	/*
+	**  See libsm/mbdb.c: only enable this on OSs
+	**  that implement the correct (POSIX) semantics.
+	**  This will need to become an OS-specific #if enabled
+	**  in one of the headers files under include/sm/os/ .
+	*/
+
+	"_FFR_USE_GETPWNAM_ERRNO",
+#endif /* _FFR_USE_GETPWNAM_ERRNO */
 #if _FFR_USE_SEM_LOCKING
 	"_FFR_USE_SEM_LOCKING",
 #endif /* _FFR_USE_SEM_LOCKING */
--- old/usr/src/cmd/sendmail/src/conf.h	Sat Feb  6 15:36:43 2016
+++ new/usr/src/cmd/sendmail/src/conf.h	Sat Feb  6 15:36:43 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,7 +10,7 @@
  * the sendmail distribution.
  *
  *
- *	$Id: conf.h,v 8.575 2009/03/25 20:04:00 ca Exp $
+ *	$Id: conf.h,v 8.577 2013-11-22 20:51:55 ca Exp $
  */
 
 /*
@@ -112,7 +112,9 @@
 #ifndef MAXHDRSLEN
 # define MAXHDRSLEN	(32 * 1024)	/* max size of message headers */
 #endif /* ! MAXHDRSLEN */
-#define MAXDAEMONS	10		/* max number of ports to listen to */
+#ifndef MAXDAEMONS
+# define MAXDAEMONS	10		/* max number of ports to listen to */
+#endif /* MAXDAEMONS */
 #ifndef MAXINTERFACES
 # define MAXINTERFACES	512		/* number of interfaces to probe */
 #endif /* MAXINTERFACES */
--- old/usr/src/cmd/sendmail/src/control.c	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/control.c	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2004, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,11 +8,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: control.c,v 8.128 2006/08/15 23:24:56 ca Exp $")
+SM_RCSID("@(#)$Id: control.c,v 8.130 2013-11-22 20:51:55 ca Exp $")
 
 #include <sm/fdset.h>
 
@@ -303,7 +301,7 @@
 	(void) sm_io_setvbuf(s, SM_TIME_DEFAULT, NULL,
 			     SM_IO_NBF, SM_IO_BUFSIZ);
 
-	if (sm_io_fgets(s, SM_TIME_DEFAULT, inp, sizeof(inp)) == NULL)
+	if (sm_io_fgets(s, SM_TIME_DEFAULT, inp, sizeof(inp)) < 0)
 	{
 		(void) sm_io_close(s, SM_TIME_DEFAULT);
 		exit(EX_IOERR);
--- old/usr/src/cmd/sendmail/src/convtime.c	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/convtime.c	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: convtime.c,v 8.36 2001/02/13 22:32:08 ca Exp $")
+SM_RCSID("@(#)$Id: convtime.c,v 8.40 2013-11-22 20:51:55 ca Exp $")
 
 /*
 **  CONVTIME -- convert time
@@ -100,7 +98,7 @@
 
 	return pos ? r : -r;
 }
-/*
+/*
 **  PINTVL -- produce printable version of a time interval
 **
 **	Parameters:
--- old/usr/src/cmd/sendmail/src/daemon.c	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/daemon.c	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2007, 2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2007, 2009, 2010 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -14,7 +14,7 @@
 #include <sendmail.h>
 #include "map.h"
 
-SM_RCSID("@(#)$Id: daemon.c,v 8.683 2009/12/18 01:12:40 ca Exp $")
+SM_RCSID("@(#)$Id: daemon.c,v 8.698 2013-11-22 20:51:55 ca Exp $")
 
 #if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__)
 # define USE_SOCK_STREAM	1
@@ -827,6 +827,7 @@
 			OutChannel = outchannel;
 			DisConnected = false;
 
+
 #if XLA
 			if (!xla_host_ok(RealHostName))
 			{
@@ -1267,7 +1268,8 @@
 	  case AF_INET6:
 		if (IN6_IS_ADDR_UNSPECIFIED(&daemonaddr->sin6.sin6_addr))
 			daemonaddr->sin6.sin6_addr =
-			    LocalDaemon ? in6addr_loopback : in6addr_any;
+			    (LocalDaemon && V6LoopbackAddrFound) ?
+			    in6addr_loopback : in6addr_any;
 		port = daemonaddr->sin6.sin6_port;
 		break;
 #endif /* NETINET6 */
@@ -2219,7 +2221,8 @@
 #if NETINET6
 		  case AF_INET6:
 			if (IN6_IS_ADDR_UNSPECIFIED(&clt_addr.sin6.sin6_addr))
-				clt_addr.sin6.sin6_addr = LocalDaemon ?
+				clt_addr.sin6.sin6_addr =
+					(LocalDaemon && V6LoopbackAddrFound) ?
 					in6addr_loopback : in6addr_any;
 			else
 				clt_bind = true;
@@ -2349,11 +2352,11 @@
 			/* check for name server timeouts */
 # if NETINET6
 			if (WorkAroundBrokenAAAA && family == AF_INET6 &&
-			    errno == ETIMEDOUT)
+			    (h_errno == TRY_AGAIN || errno == ETIMEDOUT))
 			{
 				/*
 				**  An attempt with family AF_INET may
-				**  succeed By skipping the next section
+				**  succeed. By skipping the next section
 				**  of code, we will try AF_INET before
 				**  failing.
 				*/
@@ -2665,6 +2668,7 @@
 #if NETINET
 			  case AF_INET:
 				addr.sin.sin_addr.s_addr = ConnectOnlyTo.sin.sin_addr.s_addr;
+				addr.sa.sa_family = ConnectOnlyTo.sa.sa_family;
 				break;
 #endif /* NETINET */
 
@@ -2872,7 +2876,10 @@
 
 	/* Use the configured HeloName as appropriate */
 	if (HeloName != NULL && HeloName[0] != '\0')
+	{
+		SM_FREE_CLR(mci->mci_heloname);
 		mci->mci_heloname = newstr(HeloName);
+	}
 
 	mci_setstat(mci, EX_OK, NULL, NULL);
 	return EX_OK;
@@ -4252,7 +4259,11 @@
 			return NULL;
 		dst += sz;
 		dst_len -= sz;
+# if _FFR_IPV6_FULL
+		ap = sm_inet6_ntop(s6a, dst, dst_len);
+# else /* _FFR_IPV6_FULL */
 		ap = (char *) inet_ntop(AF_INET6, s6a, dst, dst_len);
+# endif /* _FFR_IPV6_FULL */
 
 		/* Restore pointer to beginning of string */
 		if (ap != NULL)
@@ -4399,6 +4410,8 @@
 	saveretry = _res.retry;
 	if (_res.retry * _res.retrans > 20)
 		_res.retry = 20 / _res.retrans;
+	if (_res.retry == 0)
+		_res.retry = 1;
 # endif /* NAMED_BIND */
 
 	switch (sap->sa.sa_family)
--- old/usr/src/cmd/sendmail/src/daemon.h	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/daemon.h	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: daemon.h,v 8.3 2006/07/13 22:57:03 ca Exp $
+ *	$Id: daemon.h,v 8.4 2013-11-22 20:51:55 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef DAEMON_H
 #define DAEMON_H 1
 
--- old/usr/src/cmd/sendmail/src/deliver.c	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/deliver.c	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2010, 2012 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -14,7 +14,7 @@
 #include <sendmail.h>
 #include <sm/time.h>
 
-SM_RCSID("@(#)$Id: deliver.c,v 8.1020 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: deliver.c,v 8.1030 2013-11-22 20:51:55 ca Exp $")
 
 #if HASSETUSERCONTEXT
 # include <login_cap.h>
@@ -37,6 +37,7 @@
 static int	coloncmp __P((const char *, const char *));
 
 #if STARTTLS
+#  include <openssl/err.h>
 static int	starttls __P((MAILER *, MCI *, ENVELOPE *));
 static int	endtlsclt __P((MCI *));
 #endif /* STARTTLS */
@@ -1850,7 +1851,7 @@
 	**	If we are running SMTP, we just need to clean up.
 	*/
 
-	/* XXX this seems a bit wierd */
+	/* XXX this seems a bit weird */
 	if (ctladdr == NULL && m != ProgMailer && m != FileMailer &&
 	    bitset(QGOODUID, e->e_from.q_flags))
 		ctladdr = &e->e_from;
@@ -2144,6 +2145,7 @@
 			mci->mci_lastuse = curtime();
 			mci->mci_deliveries = 0;
 			mci->mci_exitstat = i;
+			mci_clr_extensions(mci);
 # if NAMED_BIND
 			mci->mci_herrno = h_errno;
 # endif /* NAMED_BIND */
@@ -2415,6 +2417,12 @@
 				else
 					pwd = sm_getpwnam(contextaddr->q_user);
 				sucflags = LOGIN_SETRESOURCES|LOGIN_SETPRIORITY;
+#ifdef LOGIN_SETCPUMASK
+				sucflags |= LOGIN_SETCPUMASK;
+#endif /* LOGIN_SETCPUMASK */
+#ifdef LOGIN_SETLOGINCLASS
+				sucflags |= LOGIN_SETLOGINCLASS;
+#endif /* LOGIN_SETLOGINCLASS */
 #ifdef LOGIN_SETMAC
 				sucflags |= LOGIN_SETMAC;
 #endif /* LOGIN_SETMAC */
@@ -3104,7 +3112,7 @@
 			    mci->mci_state != MCIS_CLOSED)
 			{
 				SET_HELO(mci->mci_flags);
-				mci->mci_flags &= ~MCIF_EXTENS;
+				mci_clr_extensions(mci);
 				goto reconnect;
 			}
 		}
@@ -3157,7 +3165,7 @@
 						     &mci->mci_out,
 						     mci->mci_conn, tmo) == 0)
 					{
-						mci->mci_flags &= ~MCIF_EXTENS;
+						mci_clr_extensions(mci);
 						mci->mci_flags |= MCIF_AUTHACT|
 								  MCIF_ONLY_EHLO;
 						goto reconnect;
@@ -4270,7 +4278,7 @@
 
 	/* pri: changes with each delivery attempt */
 	(void) sm_snprintf(bp, SPACELEFT(buf, bp), ", pri=%ld",
-		e->e_msgpriority);
+		PRT_NONNEGL(e->e_msgpriority));
 	bp += strlen(bp);
 
 	/* relay: max 66 bytes for IPv4 addresses */
@@ -6111,12 +6119,13 @@
 		return EX_TEMPFAIL;
 
 # if USE_OPENSSL_ENGINE
-	if (!SSL_set_engine(NULL))
+	if (!SSLEngineInitialized && !SSL_set_engine(NULL))
 	{
 		sm_syslog(LOG_ERR, NOQID,
 			  "STARTTLS=client, SSL_set_engine=failed");
 		return EX_TEMPFAIL;
 	}
+	SSLEngineInitialized = true;
 # endif /* USE_OPENSSL_ENGINE */
 
 	smtpmessage("STARTTLS", m, mci);
@@ -6150,7 +6159,7 @@
 			sm_syslog(LOG_ERR, NOQID,
 				  "STARTTLS=client, error: SSL_new failed");
 			if (LogLevel > 9)
-				tlslogerr("client");
+				tlslogerr(LOG_WARNING, "client");
 		}
 		return EX_SOFTWARE;
 	}
@@ -6169,7 +6178,7 @@
 				  "STARTTLS=client, error: SSL_set_xfd failed=%d",
 				  result);
 			if (LogLevel > 9)
-				tlslogerr("client");
+				tlslogerr(LOG_WARNING, "client");
 		}
 		return EX_SOFTWARE;
 	}
@@ -6189,11 +6198,17 @@
 
 		if (LogLevel > 5)
 		{
+			unsigned long l;
+			const char *sr;
+
+			l = ERR_peek_error();
+			sr = ERR_reason_error_string(l);
 			sm_syslog(LOG_WARNING, NOQID,
-				  "STARTTLS=client, error: connect failed=%d, SSL_error=%d, errno=%d, retry=%d",
-				  result, ssl_err, errno, i);
-			if (LogLevel > 8)
-				tlslogerr("client");
+				  "STARTTLS=client, error: connect failed=%d, reason=%s, SSL_error=%d, errno=%d, retry=%d",
+				  result, sr == NULL ? "unknown" : sr, ssl_err,
+				  errno, i);
+			if (LogLevel > 9)
+				tlslogerr(LOG_WARNING, "client");
 		}
 
 		SSL_free(clt_ssl);
--- old/usr/src/cmd/sendmail/src/domain.c	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/domain.c	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2004, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004, 2006, 2010 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1986, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,15 +11,13 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 #include "map.h"
 
 #if NAMED_BIND
-SM_RCSID("@(#)$Id: domain.c,v 8.202 2006/12/19 01:15:07 ca Exp $ (with name server)")
+SM_RCSID("@(#)$Id: domain.c,v 8.205 2013-11-22 20:51:55 ca Exp $ (with name server)")
 #else /* NAMED_BIND */
-SM_RCSID("@(#)$Id: domain.c,v 8.202 2006/12/19 01:15:07 ca Exp $ (without name server)")
+SM_RCSID("@(#)$Id: domain.c,v 8.205 2013-11-22 20:51:55 ca Exp $ (without name server)")
 #endif /* NAMED_BIND */
 
 #if NAMED_BIND
@@ -27,25 +25,6 @@
 # include <arpa/inet.h>
 
 
-/*
-**  The standard udp packet size PACKETSZ (512) is not sufficient for some
-**  nameserver answers containing very many resource records. The resolver
-**  may switch to tcp and retry if it detects udp packet overflow.
-**  Also note that the resolver routines res_query and res_search return
-**  the size of the *un*truncated answer in case the supplied answer buffer
-**  it not big enough to accommodate the entire answer.
-*/
-
-# ifndef MAXPACKET
-#  define MAXPACKET 8192	/* max packet size used internally by BIND */
-# endif /* ! MAXPACKET */
-
-typedef union
-{
-	HEADER		qb1;
-	unsigned char	qb2[MAXPACKET];
-} querybuf;
-
 # ifndef MXHOSTBUFSIZE
 #  define MXHOSTBUFSIZE	(128 * MAXMXHOSTS)
 # endif /* ! MXHOSTBUFSIZE */
--- old/usr/src/cmd/sendmail/src/envelope.c	Sat Feb  6 15:36:44 2016
+++ new/usr/src/cmd/sendmail/src/envelope.c	Sat Feb  6 15:36:44 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: envelope.c,v 8.310 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: envelope.c,v 8.313 2013-11-22 20:51:55 ca Exp $")
 
 /*
 **  CLRSESSENVELOPE -- clear session oriented data in an envelope
@@ -246,6 +246,7 @@
 		e->e_flags |= EF_FATALERRS|EF_CLRQUEUE;
 	}
 
+
 	e->e_flags &= ~EF_QUEUERUN;
 	for (q = e->e_sendqueue; q != NULL; q = q->q_next)
 	{
@@ -252,6 +253,7 @@
 		if (QS_IS_UNDELIVERED(q->q_state))
 			queueit = true;
 
+
 		/* see if a notification is needed */
 		if (bitset(QPINGONFAILURE, q->q_flags) &&
 		    ((IS_MSG_ERR(msg_timeout) &&
--- old/usr/src/cmd/sendmail/src/err.c	Sat Feb  6 15:36:45 2016
+++ new/usr/src/cmd/sendmail/src/err.c	Sat Feb  6 15:36:45 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003, 2010 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: err.c,v 8.196 2006/11/10 23:14:08 ca Exp $")
+SM_RCSID("@(#)$Id: err.c,v 8.206 2013-11-22 20:51:55 ca Exp $")
 
 #if LDAPMAP
 # include <lber.h>
@@ -361,7 +359,7 @@
 **		increments Errors.
 */
 
-/*VARARGS1*/
+/*VARARGS2*/
 void
 #ifdef __STDC__
 usrerrenh(char *enhsc, const char *fmt, ...)
@@ -429,6 +427,7 @@
 	if (QuickAbort)
 		sm_exc_raisenew_x(&EtypeQuickAbort, 1);
 }
+
 /*
 **  MESSAGE -- print message (not necessarily an error)
 **
@@ -475,11 +474,12 @@
 	  case '5':
 		if (CurEnv->e_rpool == NULL && CurEnv->e_message != NULL)
 			sm_free(CurEnv->e_message);
-		CurEnv->e_message =
-			sm_rpool_strdup_x(CurEnv->e_rpool, errtxt);
+		CurEnv->e_message = sm_rpool_strdup_x(CurEnv->e_rpool, errtxt);
 		break;
 	}
 }
+
+
 /*
 **  NMESSAGE -- print message (not necessarily an error)
 **
--- old/usr/src/cmd/sendmail/src/headers.c	Sat Feb  6 15:36:45 2016
+++ new/usr/src/cmd/sendmail/src/headers.c	Sat Feb  6 15:36:45 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2004, 2006, 2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004, 2006, 2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -14,7 +14,7 @@
 #include <sendmail.h>
 #include <sm/sendmail.h>
 
-SM_RCSID("@(#)$Id: headers.c,v 8.317 2008/08/27 20:11:55 gshapiro Exp $")
+SM_RCSID("@(#)$Id: headers.c,v 8.320 2013-11-22 20:51:55 ca Exp $")
 
 static HDR	*allocheader __P((char *, char *, int, SM_RPOOL_T *, bool));
 static size_t	fix_mime_header __P((HDR *, ENVELOPE *));
@@ -377,11 +377,6 @@
 	if (!bitset(pflag, CHHDR_DEF) && !headeronly &&
 	    !bitset(EF_QUEUERUN, e->e_flags) && sm_strcasecmp(fname, p) == 0)
 	{
-		if (tTd(31, 2))
-		{
-			sm_dprintf("comparing header from (%s) against default (%s or %s)\n",
-				fvalue, e->e_from.q_paddr, e->e_from.q_user);
-		}
 		if (e->e_from.q_paddr != NULL &&
 		    e->e_from.q_mailer != NULL &&
 		    bitnset(M_LOCALMAILER, e->e_from.q_mailer->m_flags) &&
@@ -388,6 +383,12 @@
 		    (strcmp(fvalue, e->e_from.q_paddr) == 0 ||
 		     strcmp(fvalue, e->e_from.q_user) == 0))
 			dropfrom = true;
+		if (tTd(31, 2))
+		{
+			sm_dprintf("comparing header from (%s) against default (%s or %s), drop=%d\n",
+				fvalue, e->e_from.q_paddr, e->e_from.q_user,
+				dropfrom);
+		}
 	}
 
 	/* delete default value for this header */
@@ -406,6 +407,19 @@
 			{
 				/* make this look like the user entered it */
 				h->h_flags |= H_USER;
+
+				/*
+				**  If the MH hack is selected, allow to turn
+				**  it off via a mailer flag to avoid problems
+				**  with setups that remove the F flag from
+				**  the RCPT mailer.
+				*/
+
+		    		if (bitnset(M_NOMHHACK,
+					    e->e_from.q_mailer->m_flags))
+				{
+					h->h_flags &= ~H_CHECK;
+				}
 				return hi->hi_flags;
 			}
 			h->h_value = NULL;
@@ -1152,7 +1166,7 @@
 	(void) sm_snprintf(sbp, SPACELEFT(sbuf, sbp),
 		"from=%.200s, size=%ld, class=%d, nrcpts=%d",
 		e->e_from.q_paddr == NULL ? "<NONE>" : e->e_from.q_paddr,
-		e->e_msgsize, e->e_class, e->e_nrcpts);
+		PRT_NONNEGL(e->e_msgsize), e->e_class, e->e_nrcpts);
 	sbp += strlen(sbp);
 	if (msgid != NULL)
 	{
@@ -1191,7 +1205,7 @@
 							    83));
 	sm_syslog(LOG_INFO, e->e_id,
 		  "size=%ld, class=%ld, nrcpts=%d",
-		  e->e_msgsize, e->e_class, e->e_nrcpts);
+		  PRT_NONNEGL(e->e_msgsize), e->e_class, e->e_nrcpts);
 	if (msgid != NULL)
 		sm_syslog(LOG_INFO, e->e_id,
 			  "msgid=%s",
--- old/usr/src/cmd/sendmail/src/macro.c	Sat Feb  6 15:36:45 2016
+++ new/usr/src/cmd/sendmail/src/macro.c	Sat Feb  6 15:36:45 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001, 2003, 2006, 2007 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001, 2003, 2006, 2007 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: macro.c,v 8.107 2007/08/06 22:29:02 ca Exp $")
+SM_RCSID("@(#)$Id: macro.c,v 8.108 2013-11-22 20:51:55 ca Exp $")
 
 #include <sm/sendmail.h>
 #if MAXMACROID != (BITMAPBITS - 1)
--- old/usr/src/cmd/sendmail/src/main.c	Sat Feb  6 15:36:45 2016
+++ new/usr/src/cmd/sendmail/src/main.c	Sat Feb  6 15:36:45 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2006, 2008, 2009, 2011 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,6 @@
  *
  */
 
-/*
- * Copyright 1996-2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
 #define _DEFINE
 #include <sendmail.h>
 #include <sm/sendmail.h>
@@ -24,17 +19,16 @@
 
 #ifndef lint
 SM_UNUSED(static char copyright[]) =
-"@(#) Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.\n\
-@(#)	All rights reserved.\n\
-@(#) Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.\n\
-@(#) Copyright (c) 1988, 1993\n\
-@(#)	The Regents of the University of California.  All rights reserved.\n\
-@(#) Copyright 1996-2006 Sun Microsystems, Inc.  All rights reserved.\n\
-@(#) Use is subject to license terms.\n";
+"@(#) Copyright (c) 1998-2013 Proofpoint, Inc. and its suppliers.\n\
+	All rights reserved.\n\
+     Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.\n\
+     Copyright (c) 1988, 1993\n\
+	The Regents of the University of California.  All rights reserved.\n";
 #endif /* ! lint */
 
-SM_RCSID("@(#)$Id: main.c,v 8.971 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: main.c,v 8.988 2013-11-23 02:52:37 gshapiro Exp $")
 
+
 #if NETINET || NETINET6
 # include <arpa/inet.h>
 #endif /* NETINET || NETINET6 */
@@ -83,7 +77,7 @@
 **				(11/88 - 9/89).
 **			     UCB/Mammoth Project (10/89 - 7/95).
 **			     InReference, Inc. (8/95 - 1/97).
-**			     Sendmail, Inc. (1/98 - present).
+**			     Sendmail, Inc. (1/98 - 9/13).
 **		The support of my employers is gratefully acknowledged.
 **			Few of them (Britton-Lee in particular) have had
 **			anything to gain from my involvement in this project.
@@ -90,10 +84,12 @@
 **
 **		Gregory Neil Shapiro,
 **			Worcester Polytechnic Institute	(until 3/98).
-**			Sendmail, Inc. (3/98 - present).
+**			Sendmail, Inc. (3/98 - 10/13).
+**			Proofpoint, Inc. (10/13 - present).
 **
 **		Claus Assmann,
-**			Sendmail, Inc. (12/98 - present).
+**			Sendmail, Inc. (12/98 - 10/13).
+**			Proofpoint, Inc. (10/13 - present).
 */
 
 char		*FullName;	/* sender's full name */
@@ -115,8 +111,8 @@
 #if SASL
 static sasl_callback_t srvcallbacks[] =
 {
-	{	SASL_CB_VERIFYFILE,	&safesaslfile,	NULL	},
-	{	SASL_CB_PROXY_POLICY,	&proxy_policy,	NULL	},
+	{	SASL_CB_VERIFYFILE,	(sasl_callback_ft)&safesaslfile,	NULL	},
+	{	SASL_CB_PROXY_POLICY,	(sasl_callback_ft)&proxy_policy,	NULL	},
 	{	SASL_CB_LIST_END,	NULL,		NULL	}
 };
 #endif /* SASL */
@@ -310,6 +306,9 @@
 	SubmitMode = SUBMIT_UNKNOWN;
 #if _FFR_LOCAL_DAEMON
 	LocalDaemon = false;
+# if NETINET6
+	V6LoopbackAddrFound = false;
+# endif /* NETINET6 */
 #endif /* _FFR_LOCAL_DAEMON */
 #if XDEBUG
 	checkfd012("after openlog");
@@ -1314,7 +1313,7 @@
 		(void) getfallbackmxrr(FallbackMX);
 #endif /* NAMED_BIND */
 
-	if (SuperSafe == SAFE_INTERACTIVE && CurEnv->e_sendmode != SM_DELIVER)
+	if (SuperSafe == SAFE_INTERACTIVE && !SM_IS_INTERACTIVE(CurEnv->e_sendmode))
 	{
 		(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
 				     "WARNING: SuperSafe=interactive should only be used with\n         DeliveryMode=interactive\n");
@@ -2106,7 +2105,7 @@
 							     "> ");
 				(void) sm_io_flush(smioout, SM_TIME_DEFAULT);
 				if (sm_io_fgets(smioin, SM_TIME_DEFAULT, buf,
-						sizeof(buf)) == NULL)
+						sizeof(buf)) < 0)
 					testmodeline("/quit", &MainEnvelope);
 				p = strchr(buf, '\n');
 				if (p != NULL)
@@ -2156,7 +2155,13 @@
 	if (tls_ok)
 	{
 		/* basic TLS initialization */
-		tls_ok = init_tls_library();
+		tls_ok = init_tls_library(FipsMode);
+		if (!tls_ok && FipsMode)
+		{
+			(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
+				     "ERROR: FIPSMode failed to initialize\n");
+			exit(EX_USAGE);
+		}
 	}
 
 	if (!tls_ok && (OpMode == MD_QUEUERUN || OpMode == MD_DELIVER))
@@ -2564,6 +2569,10 @@
 		authinfo = getauthinfo(sm_io_getinfo(InChannel, SM_IO_WHAT_FD,
 						     NULL), &forged);
 		macdefine(&BlankEnvelope.e_macro, A_TEMP, '_', authinfo);
+		if (tTd(75, 9))
+			sm_syslog(LOG_INFO, NOQID,
+				"main: where=after_getauthinfo, RealHostAddr=%s",
+				anynet_ntoa(&RealHostAddr));
 
 		/* at this point we are in a child: reset state */
 		sm_rpool_free(MainEnvelope.e_rpool);
@@ -2830,7 +2839,7 @@
 
 		/* set message size */
 		(void) sm_snprintf(buf, sizeof(buf), "%ld",
-				   MainEnvelope.e_msgsize);
+				   PRT_NONNEGL(MainEnvelope.e_msgsize));
 		macdefine(&MainEnvelope.e_macro, A_TEMP,
 			  macid("{msg_size}"), buf);
 
@@ -3196,7 +3205,7 @@
 **	may resend a message.
 **
 **	Parameters:
-**		none.
+**		sig -- incoming signal.
 **
 **	Returns:
 **		none.
@@ -3207,8 +3216,6 @@
 **	NOTE:	THIS CAN BE CALLED FROM A SIGNAL HANDLER.  DO NOT ADD
 **		ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE
 **		DOING.
-**
-**		XXX: More work is needed for this signal handler.
 */
 
 /* ARGSUSED */
@@ -3223,38 +3230,34 @@
 	errno = save_errno;
 	CHECK_CRITICAL(sig);
 	sm_allsignals(true);
+	IntSig = true;
 
-	if (sig != 0 && LogLevel > 79)
-		sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt");
 	FileName = NULL;
 
 	/* Clean-up on aborted stdin message submission */
-	if (CurEnv->e_id != NULL &&
-	    (OpMode == MD_SMTP ||
+	if  (OpMode == MD_SMTP ||
 	     OpMode == MD_DELIVER ||
-	     OpMode == MD_ARPAFTP))
+	     OpMode == MD_ARPAFTP)
 	{
-		register ADDRESS *q;
+		if (CurEnv->e_id != NULL)
+		{
+			char *fn;
 
-		/* don't return an error indication */
-		CurEnv->e_to = NULL;
-		CurEnv->e_flags &= ~EF_FATALERRS;
-		CurEnv->e_flags |= EF_CLRQUEUE;
-
-		/*
-		**  Spin through the addresses and
-		**  mark them dead to prevent bounces
-		*/
-
-		for (q = CurEnv->e_sendqueue; q != NULL; q = q->q_next)
-			q->q_state = QS_DONTSEND;
-
-		drop = true;
+			fn = queuename(CurEnv, DATAFL_LETTER);
+			if (fn != NULL)
+				(void) unlink(fn);
+			fn = queuename(CurEnv, ANYQFL_LETTER);
+			if (fn != NULL)
+				(void) unlink(fn);
+		}
+		_exit(EX_OK);
+		/* NOTREACHED */
 	}
-	else if (OpMode != MD_TEST)
-	{
+
+	if (sig != 0 && LogLevel > 79)
+		sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt");
+	if (OpMode != MD_TEST)
 		unlockqueue(CurEnv);
-	}
 
 	finis(drop, false, EX_OK);
 	/* NOTREACHED */
@@ -4483,6 +4486,25 @@
 			(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
 					     "ul = %lu\n", ul);
 		}
+#if NETINET || NETINET6
+		else if (sm_strcasecmp(&line[1], "gethostbyname") == 0)
+		{
+			int family = AF_INET;
+
+			q = strpbrk(p, " \t");
+			if (q != NULL)
+			{
+				while (isascii(*q) && isspace(*q))
+					*q++ = '\0';
+# if NETINET6
+				if (*q != '\0' && (strcmp(q, "inet6") == 0 ||
+						   strcmp(q, "AAAA") == 0))
+					family = AF_INET6;
+# endif /* NETINET6 */
+			}
+			(void) sm_gethostbyname(p, family);
+		}
+#endif /* NETINET || NETINET6 */
 		else
 		{
 			(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
--- old/usr/src/cmd/sendmail/src/map.c	Sat Feb  6 15:36:45 2016
+++ new/usr/src/cmd/sendmail/src/map.c	Sat Feb  6 15:36:45 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2008 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1992, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1992, 1993
@@ -11,14 +11,9 @@
  *
  */
 
-/*
- * Copyright 1996-2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: map.c,v 8.705 2009/08/11 22:22:40 ca Exp $")
+SM_RCSID("@(#)$Id: map.c,v 8.713 2013-11-22 20:51:55 ca Exp $")
 
 #if LDAPMAP
 # include <sm/ldap.h>
@@ -2888,6 +2883,9 @@
 # undef T_UNSPEC	/* symbol conflict in nis.h -> ... -> sys/tiuser.h */
 # include <rpcsvc/nis.h>
 # include <rpcsvc/nislib.h>
+# ifndef NIS_TABLE_OBJ
+#  define NIS_TABLE_OBJ TABLE_OBJ
+# endif /* NIS_TABLE_OBJ */
 
 # define EN_col(col)	zo_data.objdata_u.en_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val
 # define COL_NAME(res,i)	((res->objects.objects_val)->TA_data.ta_cols.ta_cols_val)[i].tc_name
@@ -2975,7 +2973,7 @@
 	}
 
 	if (NIS_RES_NUMOBJ(res) != 1 ||
-	    (NIS_RES_OBJECT(res)->zo_data.zo_type != TABLE_OBJ))
+	    (NIS_RES_OBJECT(res)->zo_data.zo_type != NIS_TABLE_OBJ))
 	{
 		if (tTd(38, 10))
 			sm_dprintf("nisplus_map_open: %s is not a table\n", qbuf);
@@ -3439,7 +3437,7 @@
 		{
 			if (LogLevel > 1)
 				sm_syslog(LOG_NOTICE, CurEnv->e_id,
-					  "timeout conning to LDAP server %.100s",
+					  "timeout connecting to LDAP server %.100s",
 					  id);
 		}
 
@@ -3768,11 +3766,11 @@
 		if (!bitset(MF_OPTIONAL, map->map_mflags))
 		{
 			if (bitset(MF_NODEFER, map->map_mflags))
-				syserr("Error getting LDAP results in map %s",
-				       map->map_mname);
+				syserr("Error getting LDAP results, map=%s, name=%s",
+				       map->map_mname, name);
 			else
-				syserr("451 4.3.5 Error getting LDAP results in map %s",
-				       map->map_mname);
+				syserr("451 4.3.5 Error getting LDAP results, map=%s, name=%s",
+				       map->map_mname, name);
 		}
 		errno = save_errno;
 		return NULL;
@@ -3786,7 +3784,7 @@
 	{
 		if (LogLevel > 9)
 			sm_syslog(LOG_INFO, CurEnv->e_id,
-				  "ldap %.100s => %s", name,
+				  "ldap=%s, %.100s=>%s", map->map_mname, name,
 				  vp == NULL ? "<NULL>" : vp);
 		if (bitset(MF_MATCHONLY, map->map_mflags))
 			result = map_rewrite(map, name, strlen(name), NULL);
@@ -5839,7 +5837,7 @@
 	key_idx = map->map_keycolno;
 	delim = map->map_coldelim;
 	while (sm_io_fgets(f, SM_TIME_DEFAULT,
-			   linebuf, sizeof(linebuf)) != NULL)
+			   linebuf, sizeof(linebuf)) >= 0)
 	{
 		char *p;
 
@@ -5913,7 +5911,7 @@
 	found = false;
 	while (!found &&
 		sm_io_fgets(f, SM_TIME_DEFAULT,
-			    linebuf, sizeof(linebuf)) != NULL)
+			    linebuf, sizeof(linebuf)) >= 0)
 	{
 		char *p = strpbrk(linebuf, "#\n");
 
@@ -5990,7 +5988,7 @@
 /*
 **  STAB_MAP_OPEN -- initialize (reads data file)
 **
-**	This is a wierd case -- it is only intended as a fallback for
+**	This is a weird case -- it is only intended as a fallback for
 **	aliases.  For this reason, opens for write (only during a
 **	"newaliases") always fails, and opens for read open the
 **	actual underlying text file instead of the database.
@@ -7368,6 +7366,87 @@
 	return NULL;
 }
 
+#if _FFR_ARPA_MAP
+char *
+arpa_map_lookup(map, name, av, statp)
+	MAP *map;
+	char *name;
+	char **av;
+	int *statp;
+{
+	int r;
+	char *rval;
+	char result[128];	/* IPv6: 64 + 10 + 1 would be enough */
+
+	if (tTd(38, 2))
+		sm_dprintf("arpa_map_lookup: key '%s'\n", name);
+	*statp = EX_DATAERR;
+	r = 1;
+	memset(result, '\0', sizeof(result));
+	rval = NULL;
+
+# if NETINET6
+	if (sm_strncasecmp(name, "IPv6:", 5) == 0)
+	{
+		struct in6_addr in6_addr;
+
+		r = anynet_pton(AF_INET6, name, &in6_addr);
+		if (r == 1)
+		{
+			static char hex_digits[] =
+				{ '0', '1', '2', '3', '4', '5', '6', '7', '8',
+				  '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
+			unsigned char *src;
+			char *dst;
+			int i;
+
+			src = (unsigned char *) &in6_addr;
+			dst = result;
+			for (i = 15; i >= 0; i--) {
+				*dst++ = hex_digits[src[i] & 0x0f];
+				*dst++ = '.';
+				*dst++ = hex_digits[(src[i] >> 4) & 0x0f];
+				if (i > 0)
+					*dst++ = '.';
+			}
+			*statp = EX_OK;
+		}
+	}
+	else
+# endif /* NETINET6 */
+# if NETINET
+	{
+		struct in_addr in_addr;
+
+		r = anynet_pton(AF_INET, name, &in_addr);
+		if (r == 1)
+		{
+			unsigned char *src;
+
+			src = (unsigned char *) &in_addr;
+			(void) snprintf(result, sizeof(result),
+				"%u.%u.%u.%u",
+				src[3], src[2], src[1], src[0]);
+			*statp = EX_OK;
+		}
+	}
+# endif /* NETINET */
+	if (r < 0)
+		*statp = EX_UNAVAILABLE;
+	if (tTd(38, 2))
+		sm_dprintf("arpa_map_lookup: r=%d, result='%s'\n", r, result);
+	if (*statp == EX_OK)
+	{
+		if (bitset(MF_MATCHONLY, map->map_mflags))
+			rval = map_rewrite(map, name, strlen(name), NULL);
+		else
+			rval = map_rewrite(map, result, strlen(result), av);
+	}
+	return rval;
+}
+#endif /* _FFR_ARPA_MAP */
+
 #if SOCKETMAP
 
 # if NETINET || NETINET6
--- old/usr/src/cmd/sendmail/src/map.h	Sat Feb  6 15:36:45 2016
+++ new/usr/src/cmd/sendmail/src/map.h	Sat Feb  6 15:36:46 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: map.h,v 8.3 2006/12/19 19:49:51 ca Exp $
+ *	$Id: map.h,v 8.4 2013-11-22 20:51:56 ca Exp $
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef _MAP_H
 # define _MAP_H 1
 
--- old/usr/src/cmd/sendmail/src/mci.c	Sat Feb  6 15:36:46 2016
+++ new/usr/src/cmd/sendmail/src/mci.c	Sat Feb  6 15:36:46 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2005, 2010 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: mci.c,v 8.221 2007/11/13 23:44:25 gshapiro Exp $")
+SM_RCSID("@(#)$Id: mci.c,v 8.225 2013-11-22 20:51:56 ca Exp $")
 
 #if NETINET || NETINET6
 # include <arpa/inet.h>
@@ -290,7 +288,33 @@
 			mci_uncache(&MciCache[i], doquit);
 	}
 }
+
 /*
+**  MCI_CLR_EXTENSIONS -- clear knowledge about SMTP extensions
+**
+**	Parameters:
+**		mci -- the connection to clear.
+**
+**	Returns:
+**		none.
+*/
+
+void
+mci_clr_extensions(mci)
+	MCI *mci;
+{
+	if (mci == NULL)
+		return;
+
+	mci->mci_flags &= ~MCIF_EXTENS;
+	mci->mci_maxsize = 0;
+	mci->mci_min_by = 0;
+#if SASL
+	mci->mci_saslcap = NULL;
+#endif /* SASL */
+}
+
+/*
 **  MCI_GET -- get information about a particular host
 **
 **	Parameters:
@@ -569,6 +593,7 @@
 	{ MCIF_CVT7TO8,		"CVT7TO8"	},
 	{ MCIF_INMIME,		"INMIME"	},
 	{ MCIF_AUTH,		"AUTH"		},
+	{ MCIF_AUTH2,		"AUTH2"		},
 	{ MCIF_AUTHACT,		"AUTHACT"	},
 	{ MCIF_ENHSTAT,		"ENHSTAT"	},
 	{ MCIF_PIPELINED,	"PIPELINED"	},
@@ -947,7 +972,7 @@
 	sm_io_rewind(fp, SM_TIME_DEFAULT);
 	ver = -1;
 	LineNumber = 0;
-	while (sm_io_fgets(fp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+	while (sm_io_fgets(fp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 	{
 		LineNumber++;
 		p = strchr(buf, '\n');
--- old/usr/src/cmd/sendmail/src/milter.c	Sat Feb  6 15:36:46 2016
+++ new/usr/src/cmd/sendmail/src/milter.c	Sat Feb  6 15:36:46 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2009, 2012, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: milter.c,v 8.277 2009/11/06 00:57:06 ca Exp $")
+SM_RCSID("@(#)$Id: milter.c,v 8.281 2013-11-22 20:51:56 ca Exp $")
 
 #if MILTER
 # include <sm/sendmail.h>
@@ -42,7 +42,7 @@
 			time_t, ENVELOPE *, const char *));
 static char	*milter_send_command __P((struct milter *, int, void *,
 			ssize_t, ENVELOPE *, char *, const char *));
-static char	*milter_command __P((int, void *, ssize_t, char **,
+static char	*milter_command __P((int, void *, ssize_t, int,
 			ENVELOPE *, char *, const char *, bool));
 static char	*milter_body __P((struct milter *, ENVELOPE *, char *));
 static int	milter_reopen_df __P((ENVELOPE *));
@@ -79,13 +79,13 @@
 # define SMFS_READY		'R'	/* ready for action */
 # define SMFS_SKIP		'S'	/* skip body */
 
-static char *MilterConnectMacros[MAXFILTERMACROS + 1];
-static char *MilterHeloMacros[MAXFILTERMACROS + 1];
-static char *MilterEnvFromMacros[MAXFILTERMACROS + 1];
-static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1];
-static char *MilterDataMacros[MAXFILTERMACROS + 1];
-static char *MilterEOMMacros[MAXFILTERMACROS + 1];
-static char *MilterEOHMacros[MAXFILTERMACROS + 1];
+/*
+**  MilterMacros contains the milter macros for each milter and each stage.
+**  indices are (in order): stages, milter-index, macro
+**  milter-index == 0: "global" macros (not for a specific milter).
+*/
+
+static char *MilterMacros[SMFIM_LAST + 1][MAXFILTERS + 1][MAXFILTERMACROS + 1];
 static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE;
 
 # define MILTER_CHECK_DONE_MSG() \
@@ -98,6 +98,16 @@
 		milter_abort(e); \
 	}
 
+/* set state in case of an error */
+# define MILTER_SET_STATE	\
+	if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
+		*state = SMFIR_TEMPFAIL; \
+	else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \
+		*state = SMFIR_SHUTDOWN; \
+	else if (bitnset(SMF_REJECT, m->mf_flags)) \
+		*state = SMFIR_REJECT
+
+/* flow through code maybe using continue; don't wrap in do {} while */
 # define MILTER_CHECK_ERROR(initial, action) \
 	if (!initial && tTd(71, 100)) \
 	{ \
@@ -119,12 +129,7 @@
 				  e->e_quarmsg); \
 		} \
 	} \
-	else if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
-		*state = SMFIR_TEMPFAIL; \
-	else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \
-		*state = SMFIR_SHUTDOWN; \
-	else if (bitnset(SMF_REJECT, m->mf_flags)) \
-		*state = SMFIR_REJECT; \
+	else MILTER_SET_STATE;	\
 	else \
 		action;
 
@@ -1221,6 +1226,7 @@
 	char *p;
 	struct milter *m;
 	STAB *s;
+	static int idx = 0;
 
 	/* collect the filter name */
 	for (p = line;
@@ -1323,7 +1329,10 @@
 	if (s->s_milter != NULL)
 		syserr("X%s: duplicate filter definition", m->mf_name);
 	else
+	{
 		s->s_milter = m;
+		m->mf_idx = ++idx;
+	}
 }
 
 /*
@@ -1555,20 +1564,13 @@
 	unsigned char	mo_code;	/* code for option */
 } MilterOptTab[] =
 {
-# define MO_MACROS_CONNECT		SMFIM_CONNECT
-	{ "macros.connect",		MO_MACROS_CONNECT		},
-# define MO_MACROS_HELO			SMFIM_HELO
-	{ "macros.helo",		MO_MACROS_HELO			},
-# define MO_MACROS_ENVFROM		SMFIM_ENVFROM
-	{ "macros.envfrom",		MO_MACROS_ENVFROM		},
-# define MO_MACROS_ENVRCPT		SMFIM_ENVRCPT
-	{ "macros.envrcpt",		MO_MACROS_ENVRCPT		},
-# define MO_MACROS_DATA			SMFIM_DATA
-	{ "macros.data",		MO_MACROS_DATA			},
-# define MO_MACROS_EOM			SMFIM_EOM
-	{ "macros.eom",			MO_MACROS_EOM			},
-# define MO_MACROS_EOH			SMFIM_EOH
-	{ "macros.eoh",			MO_MACROS_EOH			},
+	{ "macros.connect",		SMFIM_CONNECT			},
+	{ "macros.helo",		SMFIM_HELO			},
+	{ "macros.envfrom",		SMFIM_ENVFROM			},
+	{ "macros.envrcpt",		SMFIM_ENVRCPT			},
+	{ "macros.data",		SMFIM_DATA			},
+	{ "macros.eom",			SMFIM_EOM			},
+	{ "macros.eoh",			SMFIM_EOH			},
 
 # define MO_LOGLEVEL			0x07
 	{ "loglevel",			MO_LOGLEVEL			},
@@ -1655,40 +1657,15 @@
 		break;
 # endif /* _FFR_MAXDATASIZE || _FFR_MDS_NEGOTIATE */
 
-	  case MO_MACROS_CONNECT:
-		if (macros == NULL)
-			macros = MilterConnectMacros;
-		/* FALLTHROUGH */
+	  case SMFIM_CONNECT:
+	  case SMFIM_HELO:
+	  case SMFIM_ENVFROM:
+	  case SMFIM_ENVRCPT:
+	  case SMFIM_EOH:
+	  case SMFIM_EOM:
+	  case SMFIM_DATA:
+		macros = MilterMacros[mo->mo_code][0];
 
-	  case MO_MACROS_HELO:
-		if (macros == NULL)
-			macros = MilterHeloMacros;
-		/* FALLTHROUGH */
-
-	  case MO_MACROS_ENVFROM:
-		if (macros == NULL)
-			macros = MilterEnvFromMacros;
-		/* FALLTHROUGH */
-
-	  case MO_MACROS_ENVRCPT:
-		if (macros == NULL)
-			macros = MilterEnvRcptMacros;
-		/* FALLTHROUGH */
-
-	  case MO_MACROS_EOH:
-		if (macros == NULL)
-			macros = MilterEOHMacros;
-		/* FALLTHROUGH */
-
-	  case MO_MACROS_EOM:
-		if (macros == NULL)
-			macros = MilterEOMMacros;
-		/* FALLTHROUGH */
-
-	  case MO_MACROS_DATA:
-		if (macros == NULL)
-			macros = MilterDataMacros;
-
 		r = milter_set_macros(name, macros, val, nummac);
 		if (r >= 0)
 			nummac = r;
@@ -2188,7 +2165,7 @@
 			sm_syslog(LOG_ERR, e->e_id,
 				  "milter_send_command(%s): action=%s returned bogus response %c",
 				  m->mf_name, action, rcmd);
-		milter_error(m, e);
+		milter_error(m, e); /* NO ERROR CHECK? */
 		break;
 	}
 
@@ -2207,7 +2184,7 @@
 **		cmd -- command to send.
 **		data -- optional command data.
 **		sz -- length of buf.
-**		macros -- macros to send for filter smfi_getsymval().
+**		stage -- index of macros to send for filter smfi_getsymval().
 **		e -- current envelope (for macro access).
 **		state -- return state word.
 **		where -- description of calling function (logging).
@@ -2218,11 +2195,11 @@
 */
 
 static char *
-milter_command(cmd, data, sz, macros, e, state, where, cmd_error)
+milter_command(cmd, data, sz, stage, e, state, where, cmd_error)
 	int cmd;
 	void *data;
 	ssize_t sz;
-	char **macros;
+	int stage;
 	ENVELOPE *e;
 	char *state;
 	const char *where;
@@ -2254,14 +2231,27 @@
 		    (m->mf_state != SMFS_OPEN && m->mf_state != SMFS_INMSG))
 			continue;
 
-		/* send macros (regardless of whether we send command) */
-		if (macros != NULL && macros[0] != NULL)
+		if (stage >= SMFIM_FIRST && stage <= SMFIM_LAST)
 		{
-			milter_send_macros(m, macros, command, e);
-			if (m->mf_state == SMFS_ERROR)
+			int idx;
+			char **macros;
+
+			if ((m->mf_lflags & MI_LFLAGS_SYM(stage)) != 0)
+				idx = m->mf_idx;
+			else
+				idx = 0;
+			SM_ASSERT(idx >= 0 && idx <= MAXFILTERS);
+			macros = MilterMacros[stage][idx];
+
+			/* send macros (regardless of whether we send cmd) */
+			if (macros != NULL && macros[0] != NULL)
 			{
-				MILTER_CHECK_ERROR(false, continue);
-				break;
+				milter_send_macros(m, macros, command, e);
+				if (m->mf_state == SMFS_ERROR)
+				{
+					MILTER_CHECK_ERROR(false, continue);
+					break;
+				}
 			}
 		}
 
@@ -2329,40 +2319,16 @@
 
 		switch (i)
 		{
-		  case MO_MACROS_CONNECT:
-			if (macros == NULL)
-				macros = MilterConnectMacros;
-			/* FALLTHROUGH */
-
-		  case MO_MACROS_HELO:
-			if (macros == NULL)
-				macros = MilterHeloMacros;
-			/* FALLTHROUGH */
-
-		  case MO_MACROS_ENVFROM:
-			if (macros == NULL)
-				macros = MilterEnvFromMacros;
-			/* FALLTHROUGH */
-
-		  case MO_MACROS_ENVRCPT:
-			if (macros == NULL)
-				macros = MilterEnvRcptMacros;
-			/* FALLTHROUGH */
-
-		  case MO_MACROS_EOM:
-			if (macros == NULL)
-				macros = MilterEOMMacros;
-			/* FALLTHROUGH */
-
-		  case MO_MACROS_EOH:
-			if (macros == NULL)
-				macros = MilterEOHMacros;
-			/* FALLTHROUGH */
-
-		  case MO_MACROS_DATA:
-			if (macros == NULL)
-				macros = MilterDataMacros;
-
+		  case SMFIM_CONNECT:
+		  case SMFIM_HELO:
+		  case SMFIM_ENVFROM:
+		  case SMFIM_ENVRCPT:
+		  case SMFIM_EOH:
+		  case SMFIM_EOM:
+		  case SMFIM_DATA:
+			SM_ASSERT(m->mf_idx > 0 && m->mf_idx < MAXFILTERS);
+			macros = MilterMacros[i][m->mf_idx];
+			m->mf_lflags |= MI_LFLAGS_SYM(i);
 			len = strlen(buf + offset);
 			if (len > 0)
 			{
@@ -2370,6 +2336,9 @@
 						buf + offset, nummac);
 				if (r >= 0)
 					nummac = r;
+				if (tTd(64, 5))
+					sm_dprintf("milter_getsymlist(%s, %s)=%d\n",
+						m->mf_name, buf + offset, r);
 			}
 			break;
 
@@ -3989,7 +3958,7 @@
 		(void) memcpy(bp, sockinfo, strlen(sockinfo) + 1);
 	}
 
-	response = milter_command(SMFIC_CONNECT, buf, s, MilterConnectMacros,
+	response = milter_command(SMFIC_CONNECT, buf, s, SMFIM_CONNECT,
 				e, state, "connect", false);
 	sm_free(buf); /* XXX */
 
@@ -4078,7 +4047,7 @@
 	}
 
 	response = milter_command(SMFIC_HELO, helo, strlen(helo) + 1,
-				  MilterHeloMacros, e, state, "helo", false);
+				  SMFIM_HELO, e, state, "helo", false);
 	milter_per_connection_check(e);
 	return response;
 }
@@ -4166,7 +4135,7 @@
 		sm_syslog(LOG_INFO, e->e_id, "Milter: sender: %s", buf);
 
 	/* send it over */
-	response = milter_command(SMFIC_MAIL, buf, s, MilterEnvFromMacros,
+	response = milter_command(SMFIC_MAIL, buf, s, SMFIM_ENVFROM,
 				e, state, "mail", false);
 	sm_free(buf); /* XXX */
 
@@ -4247,7 +4216,7 @@
 		sm_syslog(LOG_INFO, e->e_id, "Milter: rcpts: %s", buf);
 
 	/* send it over */
-	response = milter_command(SMFIC_RCPT, buf, s, MilterEnvRcptMacros,
+	response = milter_command(SMFIC_RCPT, buf, s, SMFIM_ENVRCPT,
 				e, state, "rcpt", rcpt_error);
 	sm_free(buf); /* XXX */
 	return response;
@@ -4273,8 +4242,8 @@
 		sm_dprintf("milter_data_cmd\n");
 
 	/* send it over */
-	return milter_command(SMFIC_DATA, NULL, 0, MilterDataMacros, e, state,
-				"data", false);
+	return milter_command(SMFIC_DATA, NULL, 0, SMFIM_DATA,
+				e, state, "data", false);
 }
 
 /*
@@ -4293,7 +4262,12 @@
 **		  modify the envelope or message.
 */
 
+/* flow through code using continue; don't wrap in do {} while */
 # define MILTER_CHECK_RESULTS() \
+	if (m->mf_state == SMFS_ERROR && *state == SMFIR_CONTINUE) \
+	{ \
+			MILTER_SET_STATE;	\
+	} \
 	if (*state == SMFIR_ACCEPT || \
 	    m->mf_state == SMFS_DONE || \
 	    m->mf_state == SMFS_ERROR) \
@@ -4339,6 +4313,8 @@
 
 	for (i = 0; InputFilters[i] != NULL; i++)
 	{
+		int idx;
+		char **macros;
 		struct milter *m = InputFilters[i];
 
 		if (*state != SMFIR_CONTINUE &&
@@ -4383,10 +4359,16 @@
 			if (tTd(64, 10))
 				sm_dprintf("milter_data: eoh\n");
 
-			if (MilterEOHMacros[0] != NULL)
+			if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0)
+				idx = m->mf_idx;
+			else
+				idx = 0;
+			SM_ASSERT(idx >= 0 && idx <= MAXFILTERS);
+			macros = MilterMacros[SMFIM_EOH][idx];
+
+			if (macros != NULL)
 			{
-				milter_send_macros(m, MilterEOHMacros,
-					   SMFIC_EOH, e);
+				milter_send_macros(m, macros, SMFIC_EOH, e);
 				MILTER_CHECK_RESULTS();
 			}
 
@@ -4405,10 +4387,15 @@
 			MILTER_CHECK_RESULTS();
 		}
 
-		if (MilterEOMMacros[0] != NULL)
+		if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0)
+			idx = m->mf_idx;
+		else
+			idx = 0;
+		SM_ASSERT(idx >= 0 && idx <= MAXFILTERS);
+		macros = MilterMacros[SMFIM_EOM][idx];
+		if (macros != NULL)
 		{
-			milter_send_macros(m, MilterEOMMacros,
-					   SMFIC_BODYEOB, e);
+			milter_send_macros(m, macros, SMFIC_BODYEOB, e);
 			MILTER_CHECK_RESULTS();
 		}
 
@@ -4734,7 +4721,7 @@
 		sm_dprintf("milter_unknown(%s)\n", smtpcmd);
 
 	return milter_command(SMFIC_UNKNOWN, smtpcmd, strlen(smtpcmd) + 1,
-				NULL, e, state, "unknown", false);
+				SMFIM_NOMACROS, e, state, "unknown", false);
 }
 
 /*
--- old/usr/src/cmd/sendmail/src/mime.c	Sat Feb  6 15:36:46 2016
+++ new/usr/src/cmd/sendmail/src/mime.c	Sat Feb  6 15:36:46 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003, 2006, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1994, 1996-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1994
@@ -11,12 +11,10 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 #include <string.h>
 
-SM_RCSID("@(#)$Id: mime.c,v 8.147 2007/09/26 23:29:11 ca Exp $")
+SM_RCSID("@(#)$Id: mime.c,v 8.149 2013-11-22 20:51:56 ca Exp $")
 
 /*
 **  MIME support.
@@ -109,6 +107,7 @@
 {
 	register char *p;
 	int linelen;
+	int blen;
 	int bt;
 	off_t offset;
 	size_t sectionsize, sectionhighbits;
@@ -324,13 +323,13 @@
 			goto writeerr;
 		mci->mci_flags &= ~MCIF_INHEADER;
 		bt = MBT_FINAL;
-		while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf))
-			!= NULL)
+		while ((blen = sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
+					sizeof(buf))) >= 0)
 		{
 			bt = mimeboundary(buf, boundaries);
 			if (bt != MBT_NOTSEP)
 				break;
-			if (!putxline(buf, strlen(buf), mci,
+			if (!putxline(buf, blen, mci,
 					PXLF_MAPFROM|PXLF_STRIP8BIT))
 				goto writeerr;
 			if (tTd(43, 99))
@@ -368,13 +367,13 @@
 		mci->mci_flags &= ~MCIF_INMIME;
 
 		/* skip the late "comment" epilogue */
-		while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf))
-			!= NULL)
+		while ((blen = sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
+					sizeof(buf))) >= 0)
 		{
 			bt = mimeboundary(buf, boundaries);
 			if (bt != MBT_NOTSEP)
 				break;
-			if (!putxline(buf, strlen(buf), mci,
+			if (!putxline(buf, blen, mci,
 					PXLF_MAPFROM|PXLF_STRIP8BIT))
 				goto writeerr;
 			if (tTd(43, 99))
@@ -445,16 +444,16 @@
 			       DATAFL_LETTER, e->e_id);
 
 		/* do a scan of this body type to count character types */
-		while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf))
-			!= NULL)
+		while ((blen = sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
+					sizeof(buf))) >= 0)
 		{
 			if (mimeboundary(buf, boundaries) != MBT_NOTSEP)
 				break;
-			for (p = buf; *p != '\0'; p++)
+			for (i = 0; i < blen; i++)
 			{
 				/* count bytes with the high bit set */
 				sectionsize++;
-				if (bitset(0200, *p))
+				if (bitset(0200, buf[i]))
 					sectionhighbits++;
 			}
 
@@ -524,8 +523,8 @@
 		if (!putline("", mci))
 			goto writeerr;
 		mci->mci_flags &= ~MCIF_INHEADER;
-		while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf))
-			!= NULL)
+		while ((blen = sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
+					sizeof(buf))) >= 0)
 		{
 			if (!bitset(MCIF_INLONGLINE, mci->mci_flags))
 			{
@@ -533,7 +532,7 @@
 				if (bt != MBT_NOTSEP)
 					break;
 			}
-			if (!putxline(buf, strlen(buf), mci,
+			if (!putxline(buf, blen, mci,
 				      PXLF_MAPFROM|PXLF_NOADDEOL))
 				goto writeerr;
 		}
@@ -1035,7 +1034,7 @@
 	HDR *header;
 	register ENVELOPE *e;
 {
-	int pxflags;
+	int pxflags, blen;
 	register char *p;
 	char *cte;
 	char **pvp;
@@ -1068,10 +1067,10 @@
 		if (!putline("", mci))
 			goto writeerr;
 		mci->mci_flags &= ~MCIF_INHEADER;
-		while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf, sizeof(buf))
-			!= NULL)
+		while ((blen = sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
+					sizeof(buf))) >= 0)
 		{
-			if (!putline(buf, mci))
+			if (!putxline(buf, blen, mci, PXLF_MAPFROM))
 				goto writeerr;
 		}
 		return true;
@@ -1179,7 +1178,7 @@
 		pxflags |= PXLF_NOADDEOL;
 		fbufp = fbuf;
 		while (sm_io_fgets(e->e_dfp, SM_TIME_DEFAULT, buf,
-				   sizeof(buf)) != NULL)
+				   sizeof(buf)) >= 0)
 		{
 			off = mime_fromqp((unsigned char *) buf, &fbufp,
 					  &fbuf[MAXLINE] - fbufp);
--- old/usr/src/cmd/sendmail/src/parseaddr.c	Sat Feb  6 15:36:46 2016
+++ new/usr/src/cmd/sendmail/src/parseaddr.c	Sat Feb  6 15:36:46 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: parseaddr.c,v 8.403 2008/02/08 02:27:35 ca Exp $")
+SM_RCSID("@(#)$Id: parseaddr.c,v 8.407 2013-11-22 20:51:56 ca Exp $")
 
 #include <sm/sendmail.h>
 #include "map.h"
@@ -244,6 +242,7 @@
 **
 **	Parameters:
 **		addr -- the address to check.
+**		  note: this is the complete address (including display part)
 **		delimptr -- if non-NULL: end of address to check, i.e.,
 **			a pointer in the address string.
 **		isrcpt -- true iff the address is for a recipient.
@@ -321,7 +320,7 @@
 **			is invalid and should be "repaired".
 **
 **	Returns:
-**		true -- if the address has any "wierd" characters or
+**		true -- if the address has any "weird" characters or
 **			non-printable characters or if a quote is unbalanced.
 **		false -- otherwise.
 */
@@ -2351,6 +2350,14 @@
 	if (a->q_mailer != b->q_mailer)
 		return false;
 
+	/*
+	**  Addresses resolving to error mailer
+	**  should not be considered identical
+	*/
+
+	if (a->q_mailer == &errormailer)
+		return false;
+
 	/* if the user isn't the same, we can drop out */
 	if (strcmp(a->q_user, b->q_user) != 0)
 		return false;
--- old/usr/src/cmd/sendmail/src/queue.c	Sat Feb  6 15:36:46 2016
+++ new/usr/src/cmd/sendmail/src/queue.c	Sat Feb  6 15:36:46 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2009, 2011, 2012 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -14,7 +14,7 @@
 #include <sendmail.h>
 #include <sm/sem.h>
 
-SM_RCSID("@(#)$Id: queue.c,v 8.987 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: queue.c,v 8.1000 2013-11-22 20:51:56 ca Exp $")
 
 #include <dirent.h>
 
@@ -203,7 +203,7 @@
 **	tag -- should be a unique id to avoid misinterpretations by others.
 **		idea: hash over configuration data that will be stored here.
 **	NumFileSys -- number of file systems.
-**	FileSys -- (arrary of) structure for used file systems.
+**	FileSys -- (array of) structure for used file systems.
 **	RSATmpCnt -- counter for number of uses of ephemeral RSA key.
 **	QShm -- (array of) structure for information about queue directories.
 */
@@ -633,7 +633,6 @@
 	}
 
 	/* output inode number of data file */
-	/* XXX should probably include device major/minor too */
 	if (e->e_dfino != -1)
 	{
 		(void) sm_io_fprintf(tfp, SM_TIME_DEFAULT, "I%ld/%ld/%llu\n",
@@ -1494,6 +1493,7 @@
 	for (i = 0; i < NumWorkGroups && !NoMoreRunners; i++)
 	{
 		int rwgflags = RWG_NONE;
+		int wasblocked;
 
 		/*
 		**  If MaxQueueChildren active then test whether the start
@@ -1530,7 +1530,11 @@
 		**  increase if some queue runners "hang" for a long time.
 		*/
 
+		/* don't let proc_list_drop() change CurRunners */
+		wasblocked = sm_blocksignal(SIGCHLD);
 		CurRunners += WorkGrp[curnum].wg_maxact;
+		if (wasblocked == 0)
+			(void) sm_releasesignal(SIGCHLD);
 		if (forkflag)
 			rwgflags |= RWG_FORK;
 		if (verbose)
@@ -1550,7 +1554,13 @@
 
 		if (!ret)
 		{
+			/* don't let proc_list_drop() change CurRunners */
+			wasblocked = sm_blocksignal(SIGCHLD);
 			CurRunners -= WorkGrp[curnum].wg_maxact;
+			CHK_CUR_RUNNERS("runqueue", curnum,
+					WorkGrp[curnum].wg_maxact);
+			if (wasblocked == 0)
+				(void) sm_releasesignal(SIGCHLD);
 			break;
 		}
 
@@ -2032,6 +2042,9 @@
 	{
 		IgnoreHostStatus = true;
 		MinQueueAge = 0;
+#if _FFR_EXPDELAY
+		MaxQueueAge = 0;
+#endif /* _FFR_EXPDELAY */
 	}
 
 	/*
@@ -2301,7 +2314,7 @@
 	if (bitset(RWG_PERSISTENT, flags))
 	{
 		sequenceno = 1;
-		sm_setproctitle(true, CurEnv, "running queue: %s",
+		sm_setproctitle(true, NULL, "running queue: %s",
 				qid_printqueue(qgrp, qdir));
 
 		/*
@@ -2733,7 +2746,7 @@
 			i |= NEED_QUARANTINE;
 		while (cf != NULL && i != 0 &&
 		       sm_io_fgets(cf, SM_TIME_DEFAULT, lbuf,
-				   sizeof(lbuf)) != NULL)
+				   sizeof(lbuf)) >= 0)
 		{
 			int c;
 			time_t age;
@@ -2861,7 +2874,7 @@
 #if _FFR_EXPDELAY
 				if (MaxQueueAge > 0)
 				{
-					time_t lasttry, delay;    
+					time_t lasttry, delay;
 
 					lasttry = (time_t) atol(&lbuf[1]);
 					delay = MIN(lasttry - w->w_ctime,
@@ -2927,7 +2940,7 @@
 **
 **	First the old WorkQ is cleared away. Then the WorkList is sorted
 **	for all items so that important (higher sorting value) items are not
-**	trunctated off. Then the most important items are moved from
+**	truncated off. Then the most important items are moved from
 **	WorkList to WorkQ. The lower count of 'max' or MaxListCount items
 **	are moved.
 **
@@ -3705,6 +3718,7 @@
 			(void) dropenvelope(e, true, false);
 			sm_rpool_free(rpool);
 			e->e_rpool = NULL;
+			e->e_message = NULL;
 		}
 	}
 	e->e_id = NULL;
@@ -4578,7 +4592,7 @@
 			e->e_dfdev = st.st_dev;
 			e->e_dfino = ST_INODE(st);
 			(void) sm_snprintf(buf, sizeof(buf), "%ld",
-					   e->e_msgsize);
+					   PRT_NONNEGL(e->e_msgsize));
 			macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"),
 				  buf);
 		}
@@ -4967,7 +4981,7 @@
 		quarmsg[0] = '\0';
 		statmsg[0] = bodytype[0] = '\0';
 		qfver = 0;
-		while (sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+		while (sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 		{
 			register int i;
 			register char *p;
@@ -5195,7 +5209,11 @@
 
 	/* Assign an ID if needed */
 	if (e->e_id == NULL)
+	{
+		if (IntSig)
+			return NULL;
 		assign_queueid(e);
+	}
 	type = queue_letter(e, type);
 
 	/* begin of filename */
@@ -5239,7 +5257,11 @@
 	else
 	{
 		if (e->e_qgrp == NOQGRP || e->e_qdir == NOQDIR)
+		{
+			if (IntSig)
+				return NULL;
 			(void) setnewqueue(e);
+		}
 		if (type ==  DATAFL_LETTER)
 		{
 			qd = e->e_dfqdir;
@@ -5279,6 +5301,8 @@
 			break;
 
 		  default:
+			if (IntSig)
+				return NULL;
 			sm_abort("queuename: bad queue file type %d", type);
 		}
 
--- old/usr/src/cmd/sendmail/src/ratectrl.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/ratectrl.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -45,7 +45,7 @@
  */
 
 #include <sendmail.h>
-SM_RCSID("@(#)$Id: ratectrl.c,v 8.13 2009/05/05 23:19:34 ca Exp $")
+SM_RCSID("@(#)$Id: ratectrl.c,v 8.14 2013-11-22 20:51:56 ca Exp $")
 
 /*
 **  stuff included - given some warnings (inet_ntoa)
--- old/usr/src/cmd/sendmail/src/readcf.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/readcf.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2006, 2008-2010, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -14,12 +14,13 @@
 #include <sendmail.h>
 #include <sm/sendmail.h>
 
-SM_RCSID("@(#)$Id: readcf.c,v 8.674 2009/10/26 17:47:00 ca Exp $")
+SM_RCSID("@(#)$Id: readcf.c,v 8.692 2013-11-22 20:51:56 ca Exp $")
 
 #if NETINET || NETINET6
 # include <arpa/inet.h>
 #endif /* NETINET || NETINET6 */
 
+
 #define SECONDS
 #define MINUTES	* 60
 #define HOUR	* 3600
@@ -114,7 +115,15 @@
 	LineNumber = 0;
 
 #if STARTTLS
-	Srv_SSL_Options = Clt_SSL_Options = SSL_OP_ALL;
+	Srv_SSL_Options = SSL_OP_ALL;
+	Clt_SSL_Options = SSL_OP_ALL
+#ifdef SSL_OP_NO_SSLv2
+		| SSL_OP_NO_SSLv2
+#endif
+#ifdef SSL_OP_NO_TICKET
+		| SSL_OP_NO_TICKET
+#endif
+		;
 #endif /* STARTTLS */
 	if (DontLockReadFiles)
 		sff |= SFF_NOLOCK;
@@ -1132,7 +1141,7 @@
 		return;
 	}
 
-	while (sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+	while (sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 	{
 #if SCANF
 		char wordbuf[MAXLINE + 1];
@@ -2271,6 +2280,18 @@
 # define O_RCPTTHROTDELAY	0xe6
 	{ "BadRcptThrottleDelay",	O_RCPTTHROTDELAY,	OI_SAFE	},
 #endif /* _FFR_RCPTTHROTDELAY */
+#if 0 && _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
+# define O_INETQOS	0xe7	/* reserved for FFR_QOS */
+	{ "InetQoS",			O_INETQOS,	OI_NONE },
+#endif
+#if STARTTLS && _FFR_FIPSMODE
+# define O_FIPSMODE	0xe8
+	{ "FIPSMode",		O_FIPSMODE,	OI_NONE	},
+#endif /* STARTTLS && _FFR_FIPSMODE  */
+#if _FFR_REJECT_NUL_BYTE
+# define O_REJECTNUL	0xe9
+	{ "RejectNUL",	O_REJECTNUL,	OI_SAFE	},
+#endif /* _FFR_REJECT_NUL_BYTE */
 
 	{ NULL,				'\0',		OI_NONE	}
 };
@@ -2282,71 +2303,109 @@
 	long		sslopt_bits;	/* bits to set/clear */
 } SSL_Option[] =
 {
-/* these are turned on by default */
+/* Workaround for bugs are turned on by default (as well as some others) */
 #ifdef SSL_OP_MICROSOFT_SESS_ID_BUG
 	{ "SSL_OP_MICROSOFT_SESS_ID_BUG",	SSL_OP_MICROSOFT_SESS_ID_BUG	},
-#endif /* SSL_OP_MICROSOFT_SESS_ID_BUG */
+#endif
 #ifdef SSL_OP_NETSCAPE_CHALLENGE_BUG
 	{ "SSL_OP_NETSCAPE_CHALLENGE_BUG",	SSL_OP_NETSCAPE_CHALLENGE_BUG	},
-#endif /* SSL_OP_NETSCAPE_CHALLENGE_BUG */
+#endif
+#ifdef SSL_OP_LEGACY_SERVER_CONNECT
+	{ "SSL_OP_LEGACY_SERVER_CONNECT",	SSL_OP_LEGACY_SERVER_CONNECT	},
+#endif
 #ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
 	{ "SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG",	SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG	},
-#endif /* SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG */
+#endif
 #ifdef SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
 	{ "SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG",	SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG	},
-#endif /* SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG */
+#endif
 #ifdef SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
 	{ "SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER",	SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER	},
-#endif /* SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER */
+#endif
 #ifdef SSL_OP_MSIE_SSLV2_RSA_PADDING
 	{ "SSL_OP_MSIE_SSLV2_RSA_PADDING",	SSL_OP_MSIE_SSLV2_RSA_PADDING	},
-#endif /* SSL_OP_MSIE_SSLV2_RSA_PADDING */
+#endif
 #ifdef SSL_OP_SSLEAY_080_CLIENT_DH_BUG
 	{ "SSL_OP_SSLEAY_080_CLIENT_DH_BUG",	SSL_OP_SSLEAY_080_CLIENT_DH_BUG	},
-#endif /* SSL_OP_SSLEAY_080_CLIENT_DH_BUG */
+#endif
 #ifdef SSL_OP_TLS_D5_BUG
 	{ "SSL_OP_TLS_D5_BUG",	SSL_OP_TLS_D5_BUG	},
-#endif /* SSL_OP_TLS_D5_BUG */
+#endif
 #ifdef SSL_OP_TLS_BLOCK_PADDING_BUG
 	{ "SSL_OP_TLS_BLOCK_PADDING_BUG",	SSL_OP_TLS_BLOCK_PADDING_BUG	},
-#endif /* SSL_OP_TLS_BLOCK_PADDING_BUG */
+#endif
 #ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
 	{ "SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS",	SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS	},
-#endif /* SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS */
+#endif
+#ifdef SSL_OP_ALL
 	{ "SSL_OP_ALL",	SSL_OP_ALL	},
+#endif
+#ifdef SSL_OP_NO_QUERY_MTU
+	{ "SSL_OP_NO_QUERY_MTU",	SSL_OP_NO_QUERY_MTU	},
+#endif
+#ifdef SSL_OP_COOKIE_EXCHANGE
+	{ "SSL_OP_COOKIE_EXCHANGE",	SSL_OP_COOKIE_EXCHANGE	},
+#endif
+#ifdef SSL_OP_NO_TICKET
+	{ "SSL_OP_NO_TICKET",	SSL_OP_NO_TICKET	},
+#endif
+#ifdef SSL_OP_CISCO_ANYCONNECT
+	{ "SSL_OP_CISCO_ANYCONNECT",	SSL_OP_CISCO_ANYCONNECT	},
+#endif
 #ifdef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
 	{ "SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION",	SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION	},
-#endif /* SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION */
+#endif
+#ifdef SSL_OP_NO_COMPRESSION
+	{ "SSL_OP_NO_COMPRESSION",	SSL_OP_NO_COMPRESSION	},
+#endif
+#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
+	{ "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION",	SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION	},
+#endif
+#ifdef SSL_OP_SINGLE_ECDH_USE
+	{ "SSL_OP_SINGLE_ECDH_USE",	SSL_OP_SINGLE_ECDH_USE	},
+#endif
+#ifdef SSL_OP_SINGLE_DH_USE
+	{ "SSL_OP_SINGLE_DH_USE",	SSL_OP_SINGLE_DH_USE	},
+#endif
 #ifdef SSL_OP_EPHEMERAL_RSA
 	{ "SSL_OP_EPHEMERAL_RSA",	SSL_OP_EPHEMERAL_RSA	},
-#endif /* SSL_OP_EPHEMERAL_RSA */
+#endif
 #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
 	{ "SSL_OP_CIPHER_SERVER_PREFERENCE",	SSL_OP_CIPHER_SERVER_PREFERENCE	},
-#endif /* SSL_OP_CIPHER_SERVER_PREFERENCE */
+#endif
 #ifdef SSL_OP_TLS_ROLLBACK_BUG
 	{ "SSL_OP_TLS_ROLLBACK_BUG",	SSL_OP_TLS_ROLLBACK_BUG	},
-#endif /* SSL_OP_TLS_ROLLBACK_BUG */
+#endif
 #ifdef SSL_OP_NO_SSLv2
 	{ "SSL_OP_NO_SSLv2",	SSL_OP_NO_SSLv2	},
-#endif /* SSL_OP_NO_SSLv2 */
+#endif
 #ifdef SSL_OP_NO_SSLv3
 	{ "SSL_OP_NO_SSLv3",	SSL_OP_NO_SSLv3	},
-#endif /* SSL_OP_NO_SSLv3 */
+#endif
 #ifdef SSL_OP_NO_TLSv1
 	{ "SSL_OP_NO_TLSv1",	SSL_OP_NO_TLSv1	},
-#endif /* SSL_OP_NO_TLSv1 */
+#endif
+#ifdef SSL_OP_NO_TLSv1_2
+	{ "SSL_OP_NO_TLSv1_2",	SSL_OP_NO_TLSv1_2	},
+#endif
+#ifdef SSL_OP_NO_TLSv1_1
+	{ "SSL_OP_NO_TLSv1_1",	SSL_OP_NO_TLSv1_1	},
+#endif
 #ifdef SSL_OP_PKCS1_CHECK_1
 	{ "SSL_OP_PKCS1_CHECK_1",	SSL_OP_PKCS1_CHECK_1	},
-#endif /* SSL_OP_PKCS1_CHECK_1 */
+#endif
 #ifdef SSL_OP_PKCS1_CHECK_2
 	{ "SSL_OP_PKCS1_CHECK_2",	SSL_OP_PKCS1_CHECK_2	},
-#endif /* SSL_OP_PKCS1_CHECK_2 */
+#endif
 #ifdef SSL_OP_NETSCAPE_CA_DN_BUG
 	{ "SSL_OP_NETSCAPE_CA_DN_BUG",	SSL_OP_NETSCAPE_CA_DN_BUG	},
-#endif /* SSL_OP_NETSCAPE_CA_DN_BUG */
+#endif
 #ifdef SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
 	{ "SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG",	SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG	},
-#endif /* SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG */
+#endif
+#ifdef SSL_OP_CRYPTOPRO_TLSEXT_BUG
+	{ "SSL_OP_CRYPTOPRO_TLSEXT_BUG",	SSL_OP_CRYPTOPRO_TLSEXT_BUG	},
+#endif
 	{ NULL,		0		}
 };
 #endif /* STARTTLS && _FFR_TLS_1 */
@@ -2639,6 +2698,7 @@
 			set_delivery_mode(*val, e);
 			break;
 
+
 		  default:
 			syserr("Unknown delivery mode %c", *val);
 			finis(false, true, EX_USAGE);
@@ -3446,7 +3506,7 @@
 		ConnectOnlyTo.sa.sa_family = AF_UNSPEC;
 # if NETINET6
 		if (anynet_pton(AF_INET6, val,
-				&ConnectOnlyTo.sin6.sin6_addr) != 1)
+				&ConnectOnlyTo.sin6.sin6_addr) == 1)
 			ConnectOnlyTo.sa.sa_family = AF_INET6;
 		else
 # endif /* NETINET6 */
@@ -3831,6 +3891,11 @@
 		break;
 
 #endif /* STARTTLS */
+#if STARTTLS && _FFR_FIPSMODE
+	  case O_FIPSMODE:
+		FipsMode = atobool(val);
+		break;
+#endif /* STARTTLS && _FFR_FIPSMODE  */
 
 	  case O_CLIENTPORT:
 		setclientoptions(val);
@@ -3985,6 +4050,12 @@
 		break;
 #endif /* _FFR_BADRCPT_SHUTDOWN */
 
+#if _FFR_REJECT_NUL_BYTE
+	  case O_REJECTNUL:
+		RejectNUL = atobool(val);
+		break;
+#endif /* _FFR_REJECT_NUL_BYTE */
+
 	  default:
 		if (tTd(37, 1))
 		{
--- old/usr/src/cmd/sendmail/src/recipient.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/recipient.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: recipient.c,v 8.349 2007/07/10 17:01:22 ca Exp $")
+SM_RCSID("@(#)$Id: recipient.c,v 8.351 2013-11-22 20:51:56 ca Exp $")
 
 static void	includetimeout __P((int));
 static ADDRESS	*self_reference __P((ADDRESS *));
@@ -1826,7 +1824,7 @@
 	LineNumber = 0;
 	ctladdr->q_flags &= ~QSELFREF;
 	nincludes = 0;
-	while (sm_io_fgets(fp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL &&
+	while (sm_io_fgets(fp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0 &&
 	       !maxreached)
 	{
 		fixcrlf(buf, true);
--- old/usr/src/cmd/sendmail/src/sasl.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/sasl.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08/15 23:24:57 ca Exp $")
+SM_RCSID("@(#)$Id: sasl.c,v 8.24 2013-11-22 20:51:56 ca Exp $")
 
 #if SASL
 # include <stdlib.h>
@@ -20,13 +20,19 @@
 **  In order to ensure that storage leaks are tracked, and to prevent
 **  conflicts between the sm_heap package and sasl, we tell sasl to
 **  use the following heap allocation functions.  Unfortunately,
-**  the sasl package incorrectly specifies the size of a block
+**  older sasl packages incorrectly specifies the size of a block
 **  using unsigned long: for portability, it should be size_t.
 */
 
-void *sm_sasl_malloc __P((unsigned long));
-static void *sm_sasl_calloc __P((unsigned long, unsigned long));
-static void *sm_sasl_realloc __P((void *, unsigned long));
+# if defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a
+#  define SM_SASL_SIZE_T	size_t
+# else /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
+#  define SM_SASL_SIZE_T	unsigned long
+# endif /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */
+
+void *sm_sasl_malloc __P((SM_SASL_SIZE_T));
+static void *sm_sasl_calloc __P((SM_SASL_SIZE_T, SM_SASL_SIZE_T));
+static void *sm_sasl_realloc __P((void *, SM_SASL_SIZE_T));
 void sm_sasl_free __P((void *));
 
 /*
@@ -50,7 +56,7 @@
 
 void *
 sm_sasl_malloc(size)
-	unsigned long size;
+	SM_SASL_SIZE_T size;
 {
 	return sm_malloc((size_t) size);
 }
@@ -71,8 +77,8 @@
 
 static void *
 sm_sasl_calloc(nelem, elemsize)
-	unsigned long nelem;
-	unsigned long elemsize;
+	SM_SASL_SIZE_T nelem;
+	SM_SASL_SIZE_T elemsize;
 {
 	size_t size;
 	void *p;
@@ -99,7 +105,7 @@
 static void *
 sm_sasl_realloc(o, size)
 	void *o;
-	unsigned long size;
+	SM_SASL_SIZE_T size;
 {
 	return sm_realloc(o, (size_t) size);
 }
--- old/usr/src/cmd/sendmail/src/savemail.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/savemail.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003, 2006, 2012, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: savemail.c,v 8.314 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: savemail.c,v 8.319 2013-11-22 20:51:56 ca Exp $")
 
 static bool	errbody __P((MCI *, ENVELOPE *, char *));
 static bool	pruneroute __P((char *));
@@ -204,7 +204,7 @@
 				(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
 						     "Transcript follows:\r\n");
 				while (sm_io_fgets(e->e_xfp, SM_TIME_DEFAULT,
-						   buf, sizeof(buf)) != NULL &&
+						   buf, sizeof(buf)) >= 0 &&
 				       !sm_io_error(smioout))
 					(void) sm_io_fputs(smioout,
 							   SM_TIME_DEFAULT,
@@ -506,6 +506,7 @@
 	int flags;
 	register ENVELOPE *e;
 {
+	int ret;
 	register ENVELOPE *ee;
 	ENVELOPE *oldcur = CurEnv;
 	ENVELOPE errenvelope;
@@ -703,24 +704,35 @@
 
 	/* actually deliver the error message */
 	sendall(ee, SM_DELIVER);
-
-	/* restore state */
 	(void) dropenvelope(ee, true, false);
-	sm_rpool_free(ee->e_rpool);
-	CurEnv = oldcur;
-	returndepth--;
 
 	/* check for delivery errors */
+	ret = -1;
 	if (ee->e_parent == NULL ||
 	    !bitset(EF_RESPONSE, ee->e_parent->e_flags))
-		return 0;
-	for (q = ee->e_sendqueue; q != NULL; q = q->q_next)
 	{
-		if (QS_IS_ATTEMPTED(q->q_state))
-			return 0;
+		ret = 0;
 	}
-	return -1;
+	else
+	{
+		for (q = ee->e_sendqueue; q != NULL; q = q->q_next)
+		{
+			if (QS_IS_ATTEMPTED(q->q_state))
+			{
+				ret = 0;
+				break;
+			}
+		}
+	}
+
+	/* restore state */
+	sm_rpool_free(ee->e_rpool);
+	CurEnv = oldcur;
+	returndepth--;
+
+	return ret;
 }
+
 /*
 **  ERRBODY -- output the body of an error message.
 **
@@ -854,7 +866,7 @@
 			if (xfile != NULL)
 			{
 				while (sm_io_fgets(xfile, SM_TIME_DEFAULT, buf,
-						   sizeof(buf)) != NULL)
+						   sizeof(buf)) >= 0)
 				{
 					int lbs;
 					bool putok;
@@ -1030,18 +1042,20 @@
 	}
 	else
 	{
+		int blen;
+
 		printheader = true;
 		(void) bfrewind(e->e_parent->e_xfp);
 		if (e->e_xfp != NULL)
 			(void) sm_io_flush(e->e_xfp, SM_TIME_DEFAULT);
-		while (sm_io_fgets(e->e_parent->e_xfp, SM_TIME_DEFAULT, buf,
-				   sizeof(buf)) != NULL)
+		while ((blen = sm_io_fgets(e->e_parent->e_xfp, SM_TIME_DEFAULT,
+					buf, sizeof(buf))) >= 0)
 		{
 			if (printheader && !putline("   ----- Transcript of session follows -----\n",
 						mci))
 				goto writeerr;
 			printheader = false;
-			if (!putline(buf, mci))
+			if (!putxline(buf, blen, mci, PXLF_MAPFROM))
 				goto writeerr;
 		}
 	}
@@ -1162,11 +1176,24 @@
 			/* Original-Recipient: -- passed from on high */
 			if (q->q_orcpt != NULL)
 			{
-				(void) sm_snprintf(buf, sizeof(buf),
-						"Original-Recipient: %.800s",
-						q->q_orcpt);
-				if (!putline(buf, mci))
-					goto writeerr;
+				p = strchr(q->q_orcpt, ';');
+
+				/*
+				**  p == NULL shouldn't happen due to
+				**  check in srvrsmtp.c
+				**  we could log an error in this case.
+				*/
+
+				if (p != NULL)
+				{
+					*p = '\0';
+					(void) sm_snprintf(buf, sizeof(buf),
+						"Original-Recipient: %.100s;%.700s",
+						q->q_orcpt, xuntextify(p + 1));
+					*p = ';';
+					if (!putline(buf, mci))
+						goto writeerr;
+				}
 			}
 
 			/* Figure out actual recipient */
@@ -1668,6 +1695,34 @@
 		else if (c < '!' || c > '~' || c == '=')
 			return false;
 	}
+	return true;
+}
+
+/*
+**  ISATOM -- check if a string is an "atom"
+**
+**	Parameters:
+**		s -- the string to check.
+**
+**	Returns:
+**		true -- iff s is an atom
+*/
+
+bool
+isatom(s)
+	const char *s;
+{
+	int c;
+
+	if (s == NULL || *s == '\0')
+		return false;
+	while ((c = *s++) != '\0')
+	{
+		if (strchr("()<>@,;:\\.[]\"", c) != NULL)
+			return false;
+		if (c < '!' || c > '~')
+			return false;
+	}
 	return true;
 }
 /*
--- old/usr/src/cmd/sendmail/src/sendmail.h	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/sendmail.h	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -52,7 +52,7 @@
 
 #ifdef _DEFINE
 # ifndef lint
-SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1068 2009/12/18 17:08:01 ca Exp $";
+SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1104 2013-11-22 20:51:56 ca Exp $";
 # endif /* ! lint */
 #endif /* _DEFINE */
 
@@ -124,7 +124,11 @@
 #if STARTTLS
 #  include <openssl/ssl.h>
 # if !TLS_NO_RSA
-#  define RSA_KEYLENGTH	512
+#  if _FFR_FIPSMODE
+#   define RSA_KEYLENGTH	1024
+#  else /* _FFR_FIPSMODE  */
+#   define RSA_KEYLENGTH	512
+#  endif /* _FFR_FIPSMODE  */
 # endif /* !TLS_NO_RSA */
 #endif /* STARTTLS */
 
@@ -133,10 +137,15 @@
 
 # if SASL == 2 || SASL >= 20000
 #  include <sasl/sasl.h>
+#  include <sasl/saslplug.h>
 #  include <sasl/saslutil.h>
+#  if SASL_VERSION_FULL < 0x020119
+typedef int (*sasl_callback_ft)(void);
+#  endif /* SASL_VERSION_FULL < 0x020119 */
 # else /* SASL == 2 || SASL >= 20000 */
 #  include <sasl.h>
 #  include <saslutil.h>
+typedef int (*sasl_callback_ft)(void);
 # endif /* SASL == 2 || SASL >= 20000 */
 # if defined(SASL_VERSION_MAJOR) && defined(SASL_VERSION_MINOR) && defined(SASL_VERSION_STEP)
 #  define SASL_VERSION (SASL_VERSION_MAJOR * 10000)  + (SASL_VERSION_MINOR * 100) + SASL_VERSION_STEP
@@ -327,8 +336,8 @@
 				 (s) == QS_SENT || \
 				 (s) == QS_DISCARDED)
 #define QS_IS_DEAD(s)		((s) >= QS_DONTSEND)
+#define QS_IS_TEMPFAIL(s)	((s) == QS_QUEUEUP || (s) == QS_RETRY)
 
-
 #define NULLADDR	((ADDRESS *) NULL)
 
 extern ADDRESS	NullAddress;	/* a null (template) address [main.c] */
@@ -474,6 +483,7 @@
 #define M_HOLD		'%'	/* Hold delivery until ETRN/-qI/-qR/-qS */
 #define M_PLUS		'+'	/* Reserved: Used in mc for adding new flags */
 #define M_MINUS		'-'	/* Reserved: Used in mc for removing flags */
+#define M_NOMHHACK	'!'	/* Don't perform HM hack dropping explicit from */
 
 /* functions */
 extern void	initerrmailers __P((void));
@@ -721,9 +731,9 @@
 #if STARTTLS
 #define MCIF_TLS	0x00100000	/* STARTTLS supported */
 #define MCIF_TLSACT	0x00200000	/* STARTTLS active */
-#define MCIF_EXTENS	(MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT | MCIF_TLS)
 #else /* STARTTLS */
-#define MCIF_EXTENS	(MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT)
+#define MCIF_TLS	0
+#define MCIF_TLSACT	0
 #endif /* STARTTLS */
 #define MCIF_DLVR_BY	0x00400000	/* DELIVERBY */
 #if _FFR_IGNORE_EXT_ON_HELO
@@ -730,8 +740,11 @@
 # define MCIF_HELO	0x00800000	/* we used HELO: ignore extensions */
 #endif /* _FFR_IGNORE_EXT_ON_HELO */
 #define MCIF_INLONGLINE 0x01000000	/* in the middle of a long line */
+#define MCIF_AUTH2	0x02000000	/* got 2 AUTH lines */
 #define MCIF_ONLY_EHLO	0x10000000	/* use only EHLO in smtpinit */
 
+#define MCIF_EXTENS	(MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT | MCIF_TLS | MCIF_AUTH2)
+
 /* states */
 #define MCIS_CLOSED	0		/* no traffic on this connection */
 #define MCIS_OPENING	1		/* sending initial protocol */
@@ -749,6 +762,7 @@
 extern void	mci_dump __P((SM_FILE_T *, MCI *, bool));
 extern void	mci_dump_all __P((SM_FILE_T *, bool));
 extern void	mci_flush __P((bool, MCI *));
+extern void	mci_clr_extensions __P((MCI *));
 extern MCI	*mci_get __P((char *, MAILER *));
 extern int	mci_lock_host __P((MCI *));
 extern bool	mci_match __P((char *, MAILER *));
@@ -937,6 +951,8 @@
 #endif /* _FFR_MILTER_ENHSC */
 };
 
+#define PRT_NONNEGL(v)	((v) < 0 ? LONG_MAX : (v))
+
 /* values for e_flags */
 #define EF_OLDSTYLE	0x00000001L	/* use spaces (not commas) in hdrs */
 #define EF_INQUEUE	0x00000002L	/* this message is fully queued */
@@ -1167,6 +1183,33 @@
 
 typedef struct hostsig_t HOSTSIG_T;
 
+/*
+**  The standard udp packet size PACKETSZ (512) is not sufficient for some
+**  nameserver answers containing very many resource records. The resolver
+**  may switch to tcp and retry if it detects udp packet overflow.
+**  Also note that the resolver routines res_query and res_search return
+**  the size of the *un*truncated answer in case the supplied answer buffer
+**  it not big enough to accommodate the entire answer.
+*/
+
+# ifndef MAXPACKET
+#  define MAXPACKET 8192	/* max packet size used internally by BIND */
+# endif /* ! MAXPACKET */
+
+/*
+**  The resolver functions res_{send,query,querydomain} expect the
+**  answer buffer to be aligned, but some versions of gcc4 reverse
+**  25 years of history and no longer align char buffers on the
+**  stack, resulting in crashes on strict-alignment platforms.  Use
+**  this union when putting the buffer on the stack to force the
+**  alignment, then cast to (HEADER *) or (unsigned char *) as needed.
+*/
+typedef union
+{
+	HEADER		qb1;
+	unsigned char	qb2[MAXPACKET];
+} querybuf;
+
 /* functions */
 extern bool	getcanonname __P((char *, int, bool, int *));
 extern int	getmxrr __P((char *, char **, unsigned short *, bool, int *, bool, int *));
@@ -1246,11 +1289,15 @@
 #define MF_OPENBOGUS	0x00800000	/* open failed, don't call map_close */
 #define MF_CLOSING	0x01000000	/* map is being closed */
 
-#define DYNOPENMAP(map) if (!bitset(MF_OPEN, (map)->map_mflags)) \
-	{	\
-		if (!openmap(map))	\
-			return NULL;	\
-	}
+#define DYNOPENMAP(map) \
+	do		\
+	{		\
+		if (!bitset(MF_OPEN, (map)->map_mflags)) \
+		{	\
+			if (!openmap(map))	\
+				return NULL;	\
+		}	\
+	} while (0)
 
 
 /* indices for map_actions */
@@ -1446,7 +1493,6 @@
 	union
 	{
 		BITMAP256	sv_class;	/* bit-map of word classes */
-		ADDRESS		*sv_addr;	/* pointer to address header */
 		MAILER		*sv_mailer;	/* pointer to mailer */
 		char		*sv_alias;	/* alias */
 		MAPCLASS	sv_mapclass;	/* mapping function class */
@@ -1476,7 +1522,7 @@
 /* symbol types */
 #define ST_UNDEF	0	/* undefined type */
 #define ST_CLASS	1	/* class map */
-#define ST_ADDRESS	2	/* an address in parsed format */
+/* #define ST_unused	2	UNUSED */
 #define ST_MAILER	3	/* a mailer header */
 #define ST_ALIAS	4	/* an alias */
 #define ST_MAPCLASS	5	/* mapping function class */
@@ -1503,7 +1549,6 @@
 #define ST_MCI		17	/* mailer connection info (offset) */
 
 #define s_class		s_value.sv_class
-#define s_address	s_value.sv_addr
 #define s_mailer	s_value.sv_mailer
 #define s_alias		s_value.sv_alias
 #define s_mci		s_value.sv_mci
@@ -1569,8 +1614,19 @@
 
 #if _FFR_LOCAL_DAEMON
 EXTERN bool	LocalDaemon;
+# if NETINET6
+EXTERN bool	V6LoopbackAddrFound;	/* found an IPv6 loopback address */
+#  define SETV6LOOPBACKADDRFOUND(sa)	\
+	do	\
+	{	\
+		if (isloopback(sa))	\
+			V6LoopbackAddrFound = true;	\
+	} while (0)
+# endif /* NETINET6 */
 #else /* _FFR_LOCAL_DAEMON */
 # define LocalDaemon	false
+# define V6LoopbackAddrFound	false
+# define SETV6LOOPBACKADDRFOUND(sa)
 #endif /* _FFR_LOCAL_DAEMON */
 
 /* Note: see also include/sendmail/pathnames.h: GET_CLIENT_CF */
@@ -1585,6 +1641,7 @@
 #define SM_DEFER	'd'		/* defer map lookups as well as queue */
 #define SM_VERIFY	'v'		/* verify only (used internally) */
 #define DM_NOTSET	(-1)	/* DeliveryMode (per daemon) option not set */
+# define SM_IS_INTERACTIVE(m)	((m) == SM_DELIVER)
 
 #define WILL_BE_QUEUED(m)	((m) == SM_QUEUE || (m) == SM_DEFER)
 
@@ -1733,6 +1790,8 @@
 	char		*mf_conn;	/* connection info */
 	int		mf_sock;	/* connected socket */
 	char		mf_state;	/* state of filter */
+	char		mf_lflags;	/* "local" flags */
+	int		mf_idx;		/* milter number (index) */
 	time_t		mf_timeout[SMFTO_NUM_TO]; /* timeouts */
 #if _FFR_MILTER_CHECK
 	/* for testing only */
@@ -1742,6 +1801,9 @@
 #endif /* _FFR_MILTER_CHECK */
 };
 
+#define MI_LFL_NONE	0x00000000
+#define MI_LFLAGS_SYM(st) (1 << (st))	/* has its own symlist for stage st */
+
 struct milters
 {
 	mi_int32	mis_flags;	/* filter flags */
@@ -1785,7 +1847,7 @@
 #define VENDOR_SUN	2	/* Sun-native configuration file */
 #define VENDOR_HP	3	/* Hewlett-Packard specific config syntax */
 #define VENDOR_IBM	4	/* IBM specific config syntax */
-#define VENDOR_SENDMAIL	5	/* Sendmail, Inc. specific config syntax */
+#define VENDOR_SENDMAIL	5	/* Proofpoint, Inc. specific config syntax */
 #define VENDOR_DEC	6	/* Compaq, DEC, Digital */
 
 /* prototypes for vendor-specific hook routines */
@@ -1884,7 +1946,7 @@
 #define TLS_AUTH_FAIL	(-1)
 
 /* functions */
-extern bool	init_tls_library __P((void));
+extern bool	init_tls_library __P((bool _fipsmode));
 extern bool	inittls __P((SSL_CTX **, unsigned long, long, bool, char *, char *, char *, char *, char *));
 extern bool	initclttls __P((bool));
 extern void	setclttls __P((bool));
@@ -1891,7 +1953,7 @@
 extern bool	initsrvtls __P((bool));
 extern int	tls_get_info __P((SSL *, bool, char *, MACROS_T *, bool));
 extern int	endtls __P((SSL *, char *));
-extern void	tlslogerr __P((const char *));
+extern void	tlslogerr __P((int, const char *));
 
 
 EXTERN char	*CACertPath;	/* path to CA certificates (dir. with hashes) */
@@ -2100,7 +2162,11 @@
 */
 
 /* macros for debugging flags */
-#define tTd(flag, level)	(tTdvect[flag] >= (unsigned char)level)
+#if NOT_SENDMAIL
+# define tTd(flag, level)	(tTdvect[flag] >= (unsigned char)level)
+#else
+# define tTd(flag, level)	(tTdvect[flag] >= (unsigned char)level && !IntSig)
+#endif
 #define tTdlevel(flag)		(tTdvect[flag])
 
 /* variables */
@@ -2123,10 +2189,12 @@
 */
 
 /* set exit status */
-#define setstat(s)	{ \
-				if (ExitStat == EX_OK || ExitStat == EX_TEMPFAIL) \
-					ExitStat = s; \
-			}
+#define setstat(s)	\
+	do		\
+	{		\
+		if (ExitStat == EX_OK || ExitStat == EX_TEMPFAIL) \
+			ExitStat = s; \
+	} while (0)
 
 
 #define STRUCTCOPY(s, d)	d = s
@@ -2133,12 +2201,14 @@
 
 /* free a pointer if it isn't NULL and set it to NULL */
 #define SM_FREE_CLR(p)	\
-			if ((p) != NULL) \
-			{ \
-				sm_free(p); \
-				(p) = NULL; \
-			} \
-			else
+	do		\
+	{		\
+		if ((p) != NULL) \
+		{ \
+			sm_free(p); \
+			(p) = NULL; \
+		} \
+	} while (0)
 
 /*
 **  Update a permanent string variable with a new value.
@@ -2181,10 +2251,32 @@
 
 # define CHECK_RESTART _CHECK_RESTART
 
+#define CHK_CUR_RUNNERS(fct, idx, count)	\
+	do	\
+	{	\
+		if (CurRunners < 0)	\
+		{	\
+			if (LogLevel > 3)	\
+				sm_syslog(LOG_ERR, NOQID,	\
+					"%s: CurRunners=%d, i=%d, count=%d, status=should not happen",	\
+					fct, CurRunners, idx, count);	\
+			CurRunners = 0;	\
+		}	\
+	} while (0)
+
 /* reply types (text in SmtpMsgBuffer) */
 #define XS_DEFAULT	0
 #define XS_STARTTLS	1
 #define XS_AUTH		2
+#define XS_GREET	3
+#define XS_EHLO		4
+#define XS_MAIL		5
+#define XS_RCPT		6
+#define XS_DATA		7
+#define XS_EOM		8
+#define XS_DATA2	9
+#define XS_RCPT2	10
+#define XS_QUIT		15
 
 /*
 **  Global variables.
@@ -2209,6 +2301,7 @@
 EXTERN bool	DontPruneRoutes;	/* don't prune source routes */
 EXTERN bool	ForkQueueRuns;	/* fork for each job when running the queue */
 EXTERN bool	FromFlag;	/* if set, "From" person is explicit */
+EXTERN bool	FipsMode;
 EXTERN bool	GrabTo;		/* if set, get recipients from msg */
 EXTERN bool	EightBitAddrOK;	/* we'll let 8-bit addresses through */
 EXTERN bool	HasEightBits;	/* has at least one eight bit input byte */
@@ -2223,6 +2316,9 @@
 EXTERN bool	NoConnect;	/* don't connect to non-local mailers */
 EXTERN bool	OnlyOneError;	/*  .... or only want to give one SMTP reply */
 EXTERN bool	QuickAbort;	/*  .... but only if we want a quick abort */
+#if _FFR_REJECT_NUL_BYTE
+EXTERN bool	RejectNUL;	/* reject NUL input byte? */
+#endif /* _FFR_REJECT_NUL_BYTE */
 #if REQUIRES_DIR_FSYNC
 EXTERN bool	RequiresDirfsync;	/* requires fsync() for directory */
 #endif /* REQUIRES_DIR_FSYNC */
@@ -2363,6 +2459,7 @@
 EXTERN char	*SafeFileEnv;	/* chroot location for file delivery */
 EXTERN char	*ServiceSwitchFile;	/* backup service switch */
 EXTERN char	*volatile ShutdownRequest;/* a sendmail shutdown has been requested */
+EXTERN bool	volatile IntSig;
 EXTERN char	*SmtpGreeting;	/* SMTP greeting message (old $e macro) */
 EXTERN char	*SmtpPhase;	/* current phase in SMTP processing */
 EXTERN char	SmtpError[MAXLINE];	/* save failure error messages */
@@ -2390,6 +2487,9 @@
 
 
 EXTERN int ConnectionRateWindowSize;
+#if STARTTLS && USE_OPENSSL_ENGINE
+EXTERN bool	SSLEngineInitialized;
+#endif /* STARTTLS && USE_OPENSSL_ENGINE */
 
 /*
 **  Declarations of useful functions
@@ -2442,6 +2542,8 @@
 extern void	smtprset __P((MAILER *, MCI *, ENVELOPE *));
 
 #define REPLYTYPE(r)	((r) / 100)		/* first digit of reply code */
+#define REPLYCLASS(r)	(((r) / 10) % 10)	/* second digit of reply code */
+#define REPLYMINOR(r)	((r) % 10)	/* last digit of reply code */
 #define ISSMTPCODE(c)	(isascii(c[0]) && isdigit(c[0]) && \
 		    isascii(c[1]) && isdigit(c[1]) && \
 		    isascii(c[2]) && isdigit(c[2]))
@@ -2562,6 +2664,7 @@
 extern void	initsetproctitle __P((int, char **, char **));
 extern void	init_vendor_macros __P((ENVELOPE *));
 extern SIGFUNC_DECL	intsig __P((int));
+extern bool	isatom __P((const char *));
 extern bool	isloopback __P((SOCKADDR sa));
 extern void	load_if_names __P((void));
 extern bool	lockfile __P((int, char *, char *, int));
--- old/usr/src/cmd/sendmail/src/sfsasl.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/sfsasl.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2006, 2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2006, 2008 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
  */
 
 #include <sm/gen.h>
-SM_RCSID("@(#)$Id: sfsasl.c,v 8.118 2008/07/22 15:12:48 ca Exp $")
+SM_RCSID("@(#)$Id: sfsasl.c,v 8.121 2013-11-22 20:51:56 ca Exp $")
 #include <stdlib.h>
 #include <sendmail.h>
 #include <sm/time.h>
@@ -628,7 +628,7 @@
 				  "STARTTLS=%s, error: fd %d/%d too large",
 				  where, rfd, wfd);
 		if (LogLevel > 8)
-			tlslogerr(where);
+			tlslogerr(LOG_WARNING, where);
 		}
 		errno = EINVAL;
 	}
@@ -635,6 +635,7 @@
 	else if (err == SSL_ERROR_WANT_READ)
 	{
 		fd_set ssl_maskr, ssl_maskx;
+		int save_errno = errno;
 
 		FD_ZERO(&ssl_maskr);
 		FD_SET(rfd, &ssl_maskr);
@@ -647,10 +648,12 @@
 		} while (ret < 0 && errno == EINTR);
 		if (ret < 0 && errno > 0)
 			ret = -errno;
+		errno = save_errno;
 	}
 	else if (err == SSL_ERROR_WANT_WRITE)
 	{
 		fd_set ssl_maskw, ssl_maskx;
+		int save_errno = errno;
 
 		FD_ZERO(&ssl_maskw);
 		FD_SET(wfd, &ssl_maskw);
@@ -663,6 +666,7 @@
 		} while (ret < 0 && errno == EINTR);
 		if (ret < 0 && errno > 0)
 			ret = -errno;
+		errno = save_errno;
 	}
 	return ret;
 }
@@ -770,9 +774,18 @@
 			break;
 #endif /* DEAL_WITH_ERROR_SSL */
 		err = "generic SSL error";
+
 		if (LogLevel > 9)
-			tlslogerr("read");
+		{
+			int pri;
 
+			if (errno == EAGAIN && try > 0)
+				pri = LOG_DEBUG;
+			else
+				pri = LOG_WARNING;
+			tlslogerr(pri, "read");
+		}
+
 #if DEAL_WITH_ERROR_SSL
 		/* avoid repeated calls? */
 		if (r == 0)
@@ -792,11 +805,19 @@
 					  "STARTTLS: read error=timeout");
 		}
 		else if (LogLevel > 8)
-			sm_syslog(LOG_WARNING, NOQID,
+		{
+			int pri;
+
+			if (save_errno == EAGAIN && try > 0)
+				pri = LOG_DEBUG;
+			else
+				pri = LOG_WARNING;
+			sm_syslog(pri, NOQID,
 				  "STARTTLS: read error=%s (%d), errno=%d, get_error=%s, retry=%d, ssl_err=%d",
 				  err, r, errno,
 				  ERR_error_string(ERR_get_error(), NULL), try,
 				  ssl_err);
+		}
 		else if (LogLevel > 7)
 			sm_syslog(LOG_WARNING, NOQID,
 				  "STARTTLS: read error=%s (%d), retry=%d, ssl_err=%d",
@@ -878,7 +899,7 @@
 		ERR_GET_REASON(ERR_peek_error()));
 */
 		if (LogLevel > 9)
-			tlslogerr("write");
+			tlslogerr(LOG_WARNING, "write");
 
 #if DEAL_WITH_ERROR_SSL
 		/* avoid repeated calls? */
--- old/usr/src/cmd/sendmail/src/sfsasl.h	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/sfsasl.h	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2000, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999, 2000, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,11 +6,9 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: sfsasl.h,v 8.20 2006/03/27 21:31:00 ca Exp $"
+ *	$Id: sfsasl.h,v 8.21 2013-11-22 20:51:56 ca Exp $"
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef SFSASL_H
 # define SFSASL_H
 
--- old/usr/src/cmd/sendmail/src/sm_resolve.c	Sat Feb  6 15:36:47 2016
+++ new/usr/src/cmd/sendmail/src/sm_resolve.c	Sat Feb  6 15:36:47 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2004 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2004, 2010 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -41,14 +41,16 @@
  * SUCH DAMAGE.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 #if DNSMAP
 # if NAMED_BIND
+#  if NETINET
+#   include <netinet/in_systm.h>
+#   include <netinet/ip.h>
+#  endif /* NETINET */
 #  include "sm_resolve.h"
 
-SM_RCSID("$Id: sm_resolve.c,v 8.36 2008/02/11 23:04:16 ca Exp $")
+SM_RCSID("$Id: sm_resolve.c,v 8.40 2013-11-22 20:51:56 ca Exp $")
 
 static struct stot
 {
@@ -396,8 +398,14 @@
 	time_t save_retrans = 0;
 	int save_retry = 0;
 	DNS_REPLY_T *r = NULL;
-	unsigned char reply[1024];
+	querybuf reply_buf;
+	unsigned char *reply;
 
+#define SMRBSIZE sizeof(reply_buf)
+#ifndef IP_MAXPACKET
+# define IP_MAXPACKET	65535
+#endif
+
 	if (tTd(8, 16))
 	{
 		old_options = _res.options;
@@ -417,7 +425,31 @@
 	}
 	errno = 0;
 	SM_SET_H_ERRNO(0);
-	len = res_search(domain, rr_class, rr_type, reply, sizeof(reply));
+	reply = (unsigned char *)&reply_buf;
+	len = res_search(domain, rr_class, rr_type, reply, SMRBSIZE);
+	if (len >= SMRBSIZE)
+	{
+		if (len >= IP_MAXPACKET)
+		{
+			if (tTd(8, 4))
+				sm_dprintf("dns_lookup: domain=%s, length=%d, default_size=%d, max=%d, status=response too long\n",
+					   domain, len, (int) SMRBSIZE,
+					   IP_MAXPACKET);
+		}
+		else
+		{
+			if (tTd(8, 6))
+				sm_dprintf("dns_lookup: domain=%s, length=%d, default_size=%d, max=%d, status=response longer than default size, resizing\n",
+					   domain, len, (int) SMRBSIZE,
+					   IP_MAXPACKET);
+			reply = (unsigned char *)sm_malloc(IP_MAXPACKET);
+			if (reply == NULL)
+				SM_SET_H_ERRNO(TRY_AGAIN);
+			else
+				len = res_search(domain, rr_class, rr_type,
+						 reply, IP_MAXPACKET);
+		}
+	}
 	if (tTd(8, 16))
 	{
 		_res.options = old_options;
@@ -424,8 +456,13 @@
 		sm_dprintf("dns_lookup(%s, %d, %s) --> %d\n",
 			   domain, rr_class, dns_type_to_string(rr_type), len);
 	}
-	if (len >= 0)
+	if (len >= 0 && len < IP_MAXPACKET && reply != NULL)
 		r = parse_dns_reply(reply, len);
+	if (reply != (unsigned char *)&reply_buf && reply != NULL)
+	{
+		sm_free(reply);
+		reply = NULL;
+	}
 	if (retrans > 0)
 		_res.retrans = save_retrans;
 	if (retry > 0)
--- old/usr/src/cmd/sendmail/src/sm_resolve.h	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/sm_resolve.h	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -8,8 +8,6 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
@@ -43,7 +41,7 @@
  * SUCH DAMAGE.
  */
 
-/* $Id: sm_resolve.h,v 8.8 2001/09/01 00:06:02 gshapiro Exp $ */
+/* $Id: sm_resolve.h,v 8.9 2013-11-22 20:51:56 ca Exp $ */
 
 #if DNSMAP
 # ifndef __ROKEN_RESOLVE_H__
--- old/usr/src/cmd/sendmail/src/srvrsmtp.c	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/srvrsmtp.c	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2010, 2012, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -17,7 +17,7 @@
 # include <libmilter/mfdef.h>
 #endif /* MILTER */
 
-SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.989 2009/12/18 17:08:01 ca Exp $")
+SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1016 2013-11-22 20:51:56 ca Exp $")
 
 #include <sm/time.h>
 #include <sm/fdset.h>
@@ -30,6 +30,7 @@
 static int saslmechs __P((sasl_conn_t *, char **));
 #endif /* SASL */
 #if STARTTLS
+#  include <openssl/err.h>
 # include <sysexits.h>
 
 static SSL_CTX	*srv_ctx = NULL;	/* TLS server context */
@@ -875,10 +876,8 @@
 
 		/* XXX should these be options settable via .cf ? */
 		/* ssp.min_ssf = 0; is default due to memset() */
-		{
-			ssp.max_ssf = MaxSLBits;
-			ssp.maxbufsize = MAXOUTLEN;
-		}
+		ssp.max_ssf = MaxSLBits;
+		ssp.maxbufsize = MAXOUTLEN;
 		ssp.security_flags = SASLOpts & SASL_SEC_MASK;
 		sasl_ok = sasl_setprop(conn, SASL_SEC_PROPS, &ssp) == SASL_OK;
 
@@ -909,15 +908,6 @@
 #endif /* SASL */
 
 #if STARTTLS
-# if USE_OPENSSL_ENGINE
-	if (tls_ok_srv && bitset(SRV_OFFER_TLS, features) &&
-	    !SSL_set_engine(NULL))
-	{
-		sm_syslog(LOG_ERR, NOQID,
-			  "STARTTLS=server, SSL_set_engine=failed");
-		tls_ok_srv = false;
-	}
-# endif /* USE_OPENSSL_ENGINE */
 
 
 	set_tls_rd_tmo(TimeOuts.to_nextcommand);
@@ -1836,6 +1826,21 @@
 				break;
 			}
   starttls:
+# if USE_OPENSSL_ENGINE
+			if (!SSLEngineInitialized)
+			{
+				if (!SSL_set_engine(NULL))
+				{
+					sm_syslog(LOG_ERR, NOQID,
+						  "STARTTLS=server, SSL_set_engine=failed");
+					tls_ok_srv = false;
+					message("454 4.3.3 TLS not available right now");
+					break;
+				}
+				else
+					SSLEngineInitialized = true;
+			}
+# endif /* USE_OPENSSL_ENGINE */
 # if TLS_NO_RSA
 			/*
 			**  XXX do we need a temp key ?
@@ -1859,7 +1864,7 @@
 			{
 				message("454 4.3.3 TLS not available: error generating SSL handle");
 				if (LogLevel > 8)
-					tlslogerr("server");
+					tlslogerr(LOG_WARNING, "server");
 				goto tls_done;
 			}
 
@@ -1910,12 +1915,19 @@
 
 				if (LogLevel > 5)
 				{
+					unsigned long l;
+					const char *sr;
+
+					l = ERR_peek_error();
+					sr = ERR_reason_error_string(l);
 					sm_syslog(LOG_WARNING, NOQID,
-						  "STARTTLS=server, error: accept failed=%d, SSL_error=%d, errno=%d, retry=%d, relay=%.100s",
-						  r, ssl_err, errno, i,
+						  "STARTTLS=server, error: accept failed=%d, reason=%s, SSL_error=%d, errno=%d, retry=%d, relay=%.100s",
+						  r, sr == NULL ? "unknown"
+								: sr,
+						  ssl_err, errno, i,
 						  CurSmtpClient);
-					if (LogLevel > 8)
-						tlslogerr("server");
+					if (LogLevel > 9)
+						tlslogerr(LOG_WARNING, "server");
 				}
 				tls_ok_srv = false;
 				SSL_free(srv_ssl);
@@ -2260,8 +2272,7 @@
 				message("250-AUTH %s", mechlist);
 #endif /* SASL */
 #if STARTTLS
-			if (tls_ok_srv &&
-			    bitset(SRV_OFFER_TLS, features))
+			if (tls_ok_srv && bitset(SRV_OFFER_TLS, features))
 				message("250-STARTTLS");
 #endif /* STARTTLS */
 			if (DeliverByMin > 0)
@@ -2622,7 +2633,7 @@
 				goto rcpt_done;
 			}
 
-			if (e->e_sendmode != SM_DELIVER
+			if (!SM_IS_INTERACTIVE(e->e_sendmode)
 #if _FFR_DM_ONE
 			    && (NotFirstDelivery || SM_DM_ONE != e->e_sendmode)
 #endif /* _FFR_DM_ONE */
@@ -3478,7 +3489,7 @@
 	collect(InChannel, true, NULL, e, true);
 
 	/* redefine message size */
-	(void) sm_snprintf(buf, sizeof(buf), "%ld", e->e_msgsize);
+	(void) sm_snprintf(buf, sizeof(buf), "%ld", PRT_NONNEGL(e->e_msgsize));
 	macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf);
 
 	/* rscheck() will set Errors or EF_DISCARD if it trips */
@@ -3556,7 +3567,7 @@
 	}
 
 	/* Milter may have changed message size */
-	(void) sm_snprintf(buf, sizeof(buf), "%ld", e->e_msgsize);
+	(void) sm_snprintf(buf, sizeof(buf), "%ld", PRT_NONNEGL(e->e_msgsize));
 	macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf);
 
 	/* abort message filters that didn't get the body & log msg is OK */
@@ -3724,6 +3735,7 @@
 	_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
 #endif /* NAMED_BIND */
 
+
 	for (ee = e; ee != NULL; ee = ee->e_sibling)
 	{
 		/* make sure we actually do delivery */
@@ -3767,18 +3779,18 @@
 	oldid = CurEnv->e_id;
 	CurEnv->e_id = id;
 
-	/* issue success message */
+		/* issue success message */
 #if _FFR_MSG_ACCEPT
-	if (MessageAccept != NULL && *MessageAccept != '\0')
-	{
-		char msg[MAXLINE];
+		if (MessageAccept != NULL && *MessageAccept != '\0')
+		{
+			char msg[MAXLINE];
 
-		expand(MessageAccept, msg, sizeof(msg), e);
-		message("250 2.0.0 %s", msg);
-	}
-	else
+			expand(MessageAccept, msg, sizeof(msg), e);
+			message("250 2.0.0 %s", msg);
+		}
+		else
 #endif /* _FFR_MSG_ACCEPT */
-	message("250 2.0.0 %s Message accepted for delivery", id);
+		message("250 2.0.0 %s Message accepted for delivery", id);
 	CurEnv->e_id = oldid;
 
 	/* if we just queued, poke it */
@@ -4506,6 +4518,8 @@
 	}
 	else if (sm_strcasecmp(kp, "orcpt") == 0)
 	{
+		char *p;
+
 		if (!bitset(SRV_OFFER_DSN, e->e_features))
 		{
 			usrerr("504 5.7.0 Sorry, ORCPT not supported, we do not allow DSN");
@@ -4516,16 +4530,25 @@
 			usrerr("501 5.5.2 ORCPT requires a value");
 			/* NOTREACHED */
 		}
-		if (strchr(vp, ';') == NULL || !xtextok(vp))
+		if (a->q_orcpt != NULL)
 		{
+			usrerr("501 5.5.0 Duplicate ORCPT parameter");
+			/* NOTREACHED */
+		}
+		p = strchr(vp, ';');
+		if (p == NULL)
+		{
 			usrerr("501 5.5.4 Syntax error in ORCPT parameter value");
 			/* NOTREACHED */
 		}
-		if (a->q_orcpt != NULL)
+		*p = '\0';
+		if (!isatom(vp) || !xtextok(p + 1))
 		{
-			usrerr("501 5.5.0 Duplicate ORCPT parameter");
+			*p = ';';
+			usrerr("501 5.5.4 Syntax error in ORCPT parameter value");
 			/* NOTREACHED */
 		}
+		*p = ';';
 		a->q_orcpt = sm_rpool_strdup_x(e->e_rpool, vp);
 	}
 	else
@@ -4687,7 +4710,8 @@
 		return SASL_FAIL;
 
 	macdefine(&BlankEnvelope.e_macro, A_TEMP,
-		  macid("{auth_authen}"), (char *) auth_identity);
+		  macid("{auth_authen}"),
+		  xtextify((char *) auth_identity, "=<>\")"));
 
 	return SASL_OK;
 }
@@ -4910,7 +4934,7 @@
 
 	len = strlen(topic);
 
-	while (sm_io_fgets(hf, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+	while (sm_io_fgets(hf, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 	{
 		if (buf[0] == '#')
 		{
--- old/usr/src/cmd/sendmail/src/stab.c	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/stab.c	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001, 2003 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: stab.c,v 8.89 2006/08/15 23:24:58 ca Exp $")
+SM_RCSID("@(#)$Id: stab.c,v 8.92 2013-11-22 20:51:56 ca Exp $")
 
 /*
 **  STAB -- manage the symbol table
@@ -67,7 +65,7 @@
 		sm_dprintf("(hfunc=%d) ", hfunc);
 
 	ps = &SymTab[hfunc];
-	if (type == ST_MACRO || type == ST_RULESET)
+	if (type == ST_MACRO || type == ST_RULESET || type == ST_NAMECANON)
 	{
 		while ((s = *ps) != NULL &&
 		       (s->s_symtype != type || strcmp(name, s->s_name)))
@@ -115,10 +113,6 @@
 		len = sizeof(s->s_class);
 		break;
 
-	  case ST_ADDRESS:
-		len = sizeof(s->s_address);
-		break;
-
 	  case ST_MAILER:
 		len = sizeof(s->s_mailer);
 		break;
--- old/usr/src/cmd/sendmail/src/stats.c	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/stats.c	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2002 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: stats.c,v 8.57 2006/08/15 23:24:58 ca Exp $")
+SM_RCSID("@(#)$Id: stats.c,v 8.58 2013-11-22 20:51:56 ca Exp $")
 
 #include <sendmail/mailstats.h>
 
--- old/usr/src/cmd/sendmail/src/statusd_shm.h	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/statusd_shm.h	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2000 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,14 +6,12 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: statusd_shm.h,v 8.7 2000/09/17 17:30:06 gshapiro Exp $
+ *	$Id: statusd_shm.h,v 8.8 2013-11-22 20:51:57 ca Exp $
  *
  * Contributed by Exactis.com, Inc.
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
 **  The shared memory part of statusd.
 **
--- old/usr/src/cmd/sendmail/src/sysexits.c	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/sysexits.c	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,11 +11,9 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: sysexits.c,v 8.33.4.1 2002/09/09 02:42:37 gshapiro Exp $")
+SM_RCSID("@(#)$Id: sysexits.c,v 8.35 2013-11-22 20:51:57 ca Exp $")
 
 /*
 **  DSNTOEXITSTAT -- convert DSN-style error code to EX_ style.
--- old/usr/src/cmd/sendmail/src/sysexits.h	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/sysexits.h	Sat Feb  6 15:36:48 2016
@@ -6,12 +6,10 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: sysexits.h,v 8.5 2000/11/26 02:13:20 ca Exp $
+ *	$Id: sysexits.h,v 8.5 2000-11-26 02:13:20 ca Exp $
  *	@(#)sysexits.h	8.1 (Berkeley) 6/2/93
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef _SYSEXITS_H_
 # define _SYSEXITS_H_
 
--- old/usr/src/cmd/sendmail/src/timers.h	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/timers.h	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2000 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  *
  * By using this file, you agree to the terms and conditions set
@@ -6,14 +6,12 @@
  * forth in the LICENSE file which can be found at the top level of
  * the sendmail distribution.
  *
- *	$Id: timers.h,v 8.6 2001/04/03 01:53:18 gshapiro Exp $
+ *	$Id: timers.h,v 8.7 2013-11-22 20:51:57 ca Exp $
  *
  * Contributed by Exactis.com, Inc.
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef TIMERS_H
 #define TIMERS_H 1
 
--- old/usr/src/cmd/sendmail/src/tls.c	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/tls.c	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2006, 2008, 2009, 2011, 2013 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved.
  *
@@ -11,7 +11,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: tls.c,v 8.114 2009/08/10 15:11:09 ca Exp $")
+SM_RCSID("@(#)$Id: tls.c,v 8.127 2013-11-27 02:51:11 gshapiro Exp $")
 
 #if STARTTLS
 #  include <openssl/err.h>
@@ -268,7 +268,7 @@
 **  INIT_TLS_LIBRARY -- Calls functions which setup TLS library for global use.
 **
 **	Parameters:
-**		none.
+**		fipsmode -- use FIPS?
 **
 **	Returns:
 **		succeeded?
@@ -275,17 +275,44 @@
 */
 
 bool
-init_tls_library()
+init_tls_library(fipsmode)
+	bool fipsmode;
 {
+	bool bv;
+
 	/* basic TLS initialization, ignore result for now */
 	SSL_library_init();
 	SSL_load_error_strings();
+	OpenSSL_add_all_algorithms();
 # if 0
 	/* this is currently a macro for SSL_library_init */
 	SSLeay_add_ssl_algorithms();
 # endif /* 0 */
 
-	return tls_rand_init(RandFile, 7);
+	bv = tls_rand_init(RandFile, 7);
+# if _FFR_FIPSMODE
+	if (bv && fipsmode)
+	{
+		if (!FIPS_mode_set(1))
+		{
+			unsigned long err;
+
+			err = ERR_get_error();
+			if (LogLevel > 0)
+				sm_syslog(LOG_ERR, NOQID,
+					"STARTTLS=init, FIPSMode=%s",
+					ERR_error_string(err, NULL));
+			return false;
+		}
+		else
+		{
+			if (LogLevel > 9)
+				sm_syslog(LOG_INFO, NOQID,
+					"STARTTLS=init, FIPSMode=ok");
+		}
+	}
+#endif /* _FFR_FIPSMODE  */
+	return bv;
 }
 /*
 **  TLS_SET_VERIFY -- request client certificate?
@@ -620,8 +647,9 @@
 	/*
 	**  valid values for dhparam are (only the first char is checked)
 	**  none	no parameters: don't use DH
-	**  512		generate 512 bit parameters (fixed)
+	**  512		use precomputed 512 bit parameters
 	**  1024	generate 1024 bit parameters
+	**  2048	generate 2048 bit parameters
 	**  /file/name	read parameters from /file/name
 	**  default is: 1024 for server, 512 for client (OK? XXX)
 	*/
@@ -634,6 +662,8 @@
 
 			if (c == '1')
 				req |= TLS_I_DH1024;
+			else if (c == '2')
+				req |= TLS_I_DH2048;
 			else if (c == '5')
 				req |= TLS_I_DH512;
 			else if (c != 'n' && c != 'N' && c != '/')
@@ -710,7 +740,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_new(SSLv23_%s_method()) failed",
 				  who, who);
 		if (LogLevel > 9)
-			tlslogerr(who);
+			tlslogerr(LOG_WARNING, who);
 		return false;
 	}
 
@@ -809,7 +839,7 @@
 				  "STARTTLS=%s, error: RSA_generate_key failed",
 				  who);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 		return false;
 	}
@@ -830,7 +860,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_use_PrivateKey_file(%s) failed",
 				  who, keyfile);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 		if (bitset(TLS_I_USE_KEY, req))
 			return false;
@@ -847,7 +877,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_use_certificate_file(%s) failed",
 				  who, certfile);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 		if (bitset(TLS_I_USE_CERT, req))
 			return false;
@@ -864,7 +894,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_check_private_key failed(%s): %d",
 				  who, keyfile, r);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 		if (bitset(TLS_I_USE_KEY, req))
 			return false;
@@ -883,7 +913,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_use_PrivateKey_file(%s) failed",
 				  who, kf2);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 	}
 
@@ -897,7 +927,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_use_certificate_file(%s) failed",
 				  who, cf2);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 	}
 
@@ -912,7 +942,7 @@
 				  "STARTTLS=%s, error: SSL_CTX_check_private_key 2 failed: %d",
 				  who, r);
 			if (LogLevel > 9)
-				tlslogerr(who);
+				tlslogerr(LOG_WARNING, who);
 		}
 	}
 # endif /* _FFR_TLS_1 */
@@ -945,6 +975,9 @@
 	/* Diffie-Hellman initialization */
 	if (bitset(TLS_I_TRY_DH, req))
 	{
+#if _FFR_TLS_EC
+		EC_KEY *ecdh;
+#endif /* _FFR_TLS_EC */
 		if (bitset(TLS_S_DHPAR_OK, status))
 		{
 			BIO *bio;
@@ -963,7 +996,7 @@
 						  who, dhparam,
 						  ERR_error_string(err, NULL));
 					if (LogLevel > 9)
-						tlslogerr(who);
+						tlslogerr(LOG_WARNING, who);
 				}
 			}
 			else
@@ -974,16 +1007,21 @@
 						  "STARTTLS=%s, error: BIO_new_file(%s) failed",
 						  who, dhparam);
 					if (LogLevel > 9)
-						tlslogerr(who);
+						tlslogerr(LOG_WARNING, who);
 				}
 			}
 		}
-		if (dh == NULL && bitset(TLS_I_DH1024, req))
+		if (dh == NULL && bitset(TLS_I_DH1024|TLS_I_DH2048, req))
 		{
+			int bits;
 			DSA *dsa;
 
-			/* this takes a while! (7-130s on a 450MHz AMD K6-2) */
-			dsa = DSA_generate_parameters(1024, NULL, 0, NULL,
+			bits = bitset(TLS_I_DH2048, req) ? 2048 : 1024;
+			if (tTd(96, 2))
+				sm_dprintf("inittls: Generating %d bit DH parameters\n", bits);
+
+			/* this takes a while! */
+			dsa = DSA_generate_parameters(bits, NULL, 0, NULL,
 						      NULL, 0, NULL);
 			dh = DSA_dup_DH(dsa);
 			DSA_free(dsa);
@@ -990,7 +1028,11 @@
 		}
 		else
 		if (dh == NULL && bitset(TLS_I_DH512, req))
+		{
+			if (tTd(96, 2))
+				sm_dprintf("inittls: Using precomputed 512 bit DH parameters\n");
 			dh = get_dh512();
+		}
 
 		if (dh == NULL)
 		{
@@ -1009,10 +1051,10 @@
 		}
 		else
 		{
-			SSL_CTX_set_tmp_dh(*ctx, dh);
-
 			/* important to avoid small subgroup attacks */
 			SSL_CTX_set_options(*ctx, SSL_OP_SINGLE_DH_USE);
+
+			SSL_CTX_set_tmp_dh(*ctx, dh);
 			if (LogLevel > 13)
 				sm_syslog(LOG_INFO, NOQID,
 					  "STARTTLS=%s, Diffie-Hellman init, key=%d bit (%c)",
@@ -1019,6 +1061,17 @@
 					  who, 8 * DH_size(dh), *dhparam);
 			DH_free(dh);
 		}
+
+#if _FFR_TLS_EC
+		ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+		if (ecdh != NULL)
+		{
+			SSL_CTX_set_options(*ctx, SSL_OP_SINGLE_ECDH_USE);
+			SSL_CTX_set_tmp_ecdh(*ctx, ecdh);
+			EC_KEY_free(ecdh);
+		}
+#endif /* _FFR_TLS_EC */
+
 	}
 # endif /* !NO_DH */
 
@@ -1090,7 +1143,7 @@
 					  "STARTTLS=%s, error: load verify locs %s, %s failed: %d",
 					  who, cacertpath, cacertfile, r);
 				if (LogLevel > 9)
-					tlslogerr(who);
+					tlslogerr(LOG_WARNING, who);
 			}
 			if (bitset(TLS_I_VRFY_LOC, req))
 				return false;
@@ -1114,7 +1167,7 @@
 					  who, CipherList);
 
 				if (LogLevel > 9)
-					tlslogerr(who);
+					tlslogerr(LOG_WARNING, who);
 			}
 			/* failure if setting to this list is required? */
 		}
@@ -1214,12 +1267,14 @@
 		macdefine(mac, A_TEMP, macid("{cert_issuer}"),
 			 xtextify(buf, "<>\")"));
 
+# define LL_BADCERT	8
+
 #define CHECK_X509_NAME(which)	\
 	do {	\
 		if (r == -1)	\
 		{		\
 			sm_strlcpy(buf, "BadCertificateUnknown", sizeof(buf)); \
-			if (LogLevel > 7)	\
+			if (LogLevel > LL_BADCERT)	\
 				sm_syslog(LOG_INFO, NOQID,	\
 					"STARTTLS=%s, relay=%.100s, field=%s, status=failed to extract CN",	\
 					who,	\
@@ -1376,7 +1431,7 @@
 				sm_syslog(LOG_WARNING, NOQID,
 					  "STARTTLS=%s, SSL_shutdown failed: %d",
 					  side, r);
-				tlslogerr(side);
+				tlslogerr(LOG_WARNING, side);
 			}
 			ret = EX_SOFTWARE;
 		}
@@ -1425,7 +1480,7 @@
 				sm_syslog(LOG_WARNING, NOQID,
 					  "STARTTLS=%s, SSL_shutdown not done",
 					  side);
-				tlslogerr(side);
+				tlslogerr(LOG_WARNING, side);
 			}
 			ret = EX_SOFTWARE;
 		}
@@ -1658,6 +1713,7 @@
 **  TLSLOGERR -- log the errors from the TLS error stack
 **
 **	Parameters:
+**		level -- syslog level
 **		who -- server/client (for logging).
 **
 **	Returns:
@@ -1665,7 +1721,8 @@
 */
 
 void
-tlslogerr(who)
+tlslogerr(level, who)
+	int level;
 	const char *who;
 {
 	unsigned long l;
@@ -1679,7 +1736,7 @@
 	while ((l = ERR_get_error_line_data(CP &file, &line, CP &data, &flags))
 		!= 0)
 	{
-		sm_syslog(LOG_WARNING, NOQID,
+		sm_syslog(level, NOQID,
 			  "STARTTLS=%s: %lu:%s:%s:%d:%s", who, es,
 			  ERR_error_string(l, buf),
 			  file, line,
--- old/usr/src/cmd/sendmail/src/trace.c	Sat Feb  6 15:36:48 2016
+++ new/usr/src/cmd/sendmail/src/trace.c	Sat Feb  6 15:36:48 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,13 +11,11 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 #include <sm/debug.h>
 #include <sm/string.h>
 
-SM_RCSID("@(#)$Id: trace.c,v 8.37.4.1 2002/12/05 17:28:05 ca Exp $")
+SM_RCSID("@(#)$Id: trace.c,v 8.39 2013-11-22 20:51:57 ca Exp $")
 
 static char	*tTnewflag __P((char *));
 static char	*tToldflag __P((char *));
--- old/usr/src/cmd/sendmail/src/udb.c	Sat Feb  6 15:36:49 2016
+++ new/usr/src/cmd/sendmail/src/udb.c	Sat Feb  6 15:36:49 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003, 2006 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -11,15 +11,13 @@
  *
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sendmail.h>
 #include "map.h"
 
 #if USERDB
-SM_RCSID("@(#)$Id: udb.c,v 8.164 2006/12/19 19:49:51 ca Exp $ (with USERDB)")
+SM_RCSID("@(#)$Id: udb.c,v 8.166 2013-11-22 20:51:57 ca Exp $ (with USERDB)")
 #else /* USERDB */
-SM_RCSID("@(#)$Id: udb.c,v 8.164 2006/12/19 19:49:51 ca Exp $ (without USERDB)")
+SM_RCSID("@(#)$Id: udb.c,v 8.166 2013-11-22 20:51:57 ca Exp $ (without USERDB)")
 #endif /* USERDB */
 
 #if USERDB
@@ -1221,7 +1219,7 @@
 #  endif /* DB_VERSION_MAJOR < 2 */
 		}
 		if (tTd(28, 1))
-			sm_dprintf("_udbx_init: db->close(%s)\n",
+			sm_dprintf("_udbx_close: db->close(%s)\n",
 				up->udb_dbname);
 # endif /* NEWDB */
 	}
--- old/usr/src/cmd/sendmail/src/usersmtp.c	Sat Feb  6 15:36:49 2016
+++ new/usr/src/cmd/sendmail/src/usersmtp.c	Sat Feb  6 15:36:49 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2006, 2008-2010 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: usersmtp.c,v 8.473 2009/06/17 17:26:51 ca Exp $")
+SM_RCSID("@(#)$Id: usersmtp.c,v 8.488 2013-11-22 20:51:57 ca Exp $")
 
 #include <sysexits.h>
 
@@ -33,7 +33,6 @@
 **	This protocol is described in RFC821.
 */
 
-#define REPLYCLASS(r)	(((r) / 10) % 10)	/* second digit of reply code */
 #define SMTPCLOSING	421			/* "Service Shutting Down" */
 
 #define ENHSCN(e, d)	((e) == NULL ? (d) : (e))
@@ -136,8 +135,7 @@
 	SmtpPhase = mci->mci_phase = "client greeting";
 	sm_setproctitle(true, e, "%s %s: %s",
 			qid_printname(e), CurHostName, mci->mci_phase);
-	r = reply(m, mci, e, TimeOuts.to_initial, esmtp_check, NULL,
-		XS_DEFAULT);
+	r = reply(m, mci, e, TimeOuts.to_initial, esmtp_check, NULL, XS_GREET);
 	if (r < 0)
 		goto tempfail1;
 	if (REPLYTYPE(r) == 4)
@@ -183,7 +181,7 @@
 	r = reply(m, mci, e,
 		  bitnset(M_LMTP, m->m_flags) ? TimeOuts.to_lhlo
 					      : TimeOuts.to_helo,
-		  helo_options, NULL, XS_DEFAULT);
+		  helo_options, NULL, XS_EHLO);
 	if (r < 0)
 		goto tempfail1;
 	else if (REPLYTYPE(r) == 5)
@@ -336,7 +334,15 @@
 	l1 = strlen(s1);
 	l2 = strlen(s2);
 	rl = l1 + l2;
-	res = (char *) sm_rpool_malloc(rpool, rl + 2);
+	if (rl <= 0)
+	{
+		sm_syslog(LOG_WARNING, NOQID,
+			  "str_union: stringlen1=%d, stringlen2=%d, sum=%d, status=overflow",
+			  l1, l2, rl);
+		res = NULL;
+	}
+	else
+		res = (char *) sm_rpool_malloc(rpool, rl + 2);
 	if (res == NULL)
 	{
 		if (l1 > l2)
@@ -409,9 +415,7 @@
 
 	if (firstline)
 	{
-#if SASL
-		mci->mci_saslcap = NULL;
-#endif /* SASL */
+		mci_clr_extensions(mci);
 #if _FFR_IGNORE_EXT_ON_HELO
 		logged = false;
 #endif /* _FFR_IGNORE_EXT_ON_HELO */
@@ -472,7 +476,8 @@
 #if SASL
 	else if (sm_strcasecmp(line, "auth") == 0)
 	{
-		if (p != NULL && *p != '\0')
+		if (p != NULL && *p != '\0' &&
+		    !bitset(MCIF_AUTH2, mci->mci_flags))
 		{
 			if (mci->mci_saslcap != NULL)
 			{
@@ -484,7 +489,7 @@
 
 				mci->mci_saslcap = str_union(mci->mci_saslcap,
 							     p, mci->mci_rpool);
-				mci->mci_flags |= MCIF_AUTH;
+				mci->mci_flags |= MCIF_AUTH2;
 			}
 			else
 			{
@@ -501,6 +506,9 @@
 				}
 			}
 		}
+		if (tTd(95, 5))
+			sm_syslog(LOG_DEBUG, NOQID, "AUTH flags=%lx, mechs=%s",
+				mci->mci_flags, mci->mci_saslcap);
 	}
 #endif /* SASL */
 }
@@ -516,15 +524,15 @@
 
 static sasl_callback_t callbacks[] =
 {
-	{	SASL_CB_GETREALM,	&saslgetrealm,	NULL	},
+	{	SASL_CB_GETREALM,	(sasl_callback_ft)&saslgetrealm,	NULL	},
 #define CB_GETREALM_IDX	0
-	{	SASL_CB_PASS,		&getsecret,	NULL	},
+	{	SASL_CB_PASS,		(sasl_callback_ft)&getsecret,	NULL	},
 #define CB_PASS_IDX	1
-	{	SASL_CB_USER,		&getsimple,	NULL	},
+	{	SASL_CB_USER,		(sasl_callback_ft)&getsimple,	NULL	},
 #define CB_USER_IDX	2
-	{	SASL_CB_AUTHNAME,	&getsimple,	NULL	},
+	{	SASL_CB_AUTHNAME,	(sasl_callback_ft)&getsimple,	NULL	},
 #define CB_AUTHNAME_IDX	3
-	{	SASL_CB_VERIFYFILE,	&safesaslfile,	NULL	},
+	{	SASL_CB_VERIFYFILE,	(sasl_callback_ft)&safesaslfile,	NULL	},
 #define CB_SAFESASL_IDX	4
 	{	SASL_CB_LIST_END,	NULL,		NULL	}
 };
@@ -793,7 +801,7 @@
 
 	lc = 0;
 	while (lc <= SASL_MECHLIST &&
-		sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL)
+		sm_io_fgets(f, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0)
 	{
 		if (buf[0] != '#')
 		{
@@ -1606,13 +1614,11 @@
 	(void) memset(&ssp, '\0', sizeof(ssp));
 
 	/* XXX should these be options settable via .cf ? */
-	{
-		ssp.max_ssf = MaxSLBits;
-		ssp.maxbufsize = MAXOUTLEN;
+	ssp.max_ssf = MaxSLBits;
+	ssp.maxbufsize = MAXOUTLEN;
 #  if 0
-		ssp.security_flags = SASL_SEC_NOPLAINTEXT;
+	ssp.security_flags = SASL_SEC_NOPLAINTEXT;
 #  endif /* 0 */
-	}
 	saslresult = sasl_setprop(mci->mci_conn, SASL_SEC_PROPS, &ssp);
 	if (saslresult != SASL_OK)
 		return EX_TEMPFAIL;
@@ -2175,7 +2181,7 @@
 	SmtpPhase = mci->mci_phase = "client MAIL";
 	sm_setproctitle(true, e, "%s %s: %s", qid_printname(e),
 			CurHostName, mci->mci_phase);
-	r = reply(m, mci, e, TimeOuts.to_mail, NULL, &enhsc, XS_DEFAULT);
+	r = reply(m, mci, e, TimeOuts.to_mail, NULL, &enhsc, XS_MAIL);
 	if (r < 0)
 	{
 		/* communications failure */
@@ -2427,7 +2433,7 @@
 	}
 
 	enhsc = NULL;
-	r = reply(m, mci, e, TimeOuts.to_rcpt, NULL, &enhsc, XS_DEFAULT);
+	r = reply(m, mci, e, TimeOuts.to_rcpt, NULL, &enhsc, XS_RCPT);
 	save_errno = errno;
 	to->q_rstatus = sm_rpool_strdup_x(e->e_rpool, SmtpReplyBuffer);
 	to->q_status = ENHSCN_RPOOL(enhsc, smtptodsn(r), e->e_rpool);
@@ -2588,7 +2594,7 @@
 	mci->mci_state = MCIS_DATA;
 	sm_setproctitle(true, e, "%s %s: %s",
 			qid_printname(e), CurHostName, mci->mci_phase);
-	r = reply(m, mci, e, TimeOuts.to_datainit, NULL, &enhsc, XS_DEFAULT);
+	r = reply(m, mci, e, TimeOuts.to_datainit, NULL, &enhsc, XS_DATA);
 	if (r < 0 || REPLYTYPE(r) == 4)
 	{
 		if (r >= 0)
@@ -2722,7 +2728,7 @@
 			CurHostName, mci->mci_phase);
 	if (bitnset(M_LMTP, m->m_flags))
 		return EX_OK;
-	r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DEFAULT);
+	r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_EOM);
 	if (r < 0)
 		return EX_TEMPFAIL;
 	if (mci->mci_state == MCIS_DATA)
@@ -2807,7 +2813,7 @@
 	enhsc = NULL;
 
 	/* check for the results of the transaction */
-	r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DEFAULT);
+	r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DATA2);
 	if (r < 0)
 		return EX_TEMPFAIL;
 	xstat = EX_NOTSTICKY;
@@ -2893,8 +2899,7 @@
 		SmtpPhase = "client QUIT";
 		mci->mci_state = MCIS_QUITING;
 		smtpmessage("QUIT", m, mci);
-		(void) reply(m, mci, e, TimeOuts.to_quit, NULL, NULL,
-				XS_DEFAULT);
+		(void) reply(m, mci, e, TimeOuts.to_quit, NULL, NULL, XS_QUIT);
 		SuprErrs = oldSuprErrs;
 		if (mci->mci_state == MCIS_CLOSED)
 			goto end;
@@ -3233,15 +3238,18 @@
 		if (pfunc != NULL)
 			(*pfunc)(bufp, firstline, m, mci, e);
 
-		firstline = false;
-
 		/* decode the reply code */
 		r = atoi(bufp);
 
 		/* extra semantics: 0xx codes are "informational" */
 		if (r < 100)
+		{
+			firstline = false;
 			continue;
+		}
 
+		firstline = false;
+
 		/* if no continuation lines, return this line */
 		if (bufp[3] != '-')
 			break;
--- old/usr/src/cmd/sendmail/src/util.c	Sat Feb  6 15:36:49 2016
+++ new/usr/src/cmd/sendmail/src/util.c	Sat Feb  6 15:36:49 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2007, 2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2007, 2009 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
 
 #include <sendmail.h>
 
-SM_RCSID("@(#)$Id: util.c,v 8.416 2009/12/18 17:05:26 ca Exp $")
+SM_RCSID("@(#)$Id: util.c,v 8.427 2013-11-22 20:51:57 ca Exp $")
 
 #include <sm/sendmail.h>
 #include <sysexits.h>
@@ -1285,8 +1285,7 @@
 	char *during;
 {
 	register char *p;
-	int save_errno;
-	int io_timeout;
+	int save_errno, io_timeout, l;
 
 	SM_REQUIRE(siz > 0);
 	SM_REQUIRE(buf != NULL);
@@ -1299,7 +1298,7 @@
 	}
 
 	/* try to read */
-	p = NULL;
+	l = -1;
 	errno = 0;
 
 	/* convert the timeout to sm_io notation */
@@ -1307,8 +1306,8 @@
 	while (!sm_io_eof(fp) && !sm_io_error(fp))
 	{
 		errno = 0;
-		p = sm_io_fgets(fp, io_timeout, buf, siz);
-		if (p == NULL && errno == EAGAIN)
+		l = sm_io_fgets(fp, io_timeout, buf, siz);
+		if (l < 0 && errno == EAGAIN)
 		{
 			/* The sm_io_fgets() call timedout */
 			if (LogLevel > 1)
@@ -1328,7 +1327,7 @@
 			errno = ETIMEDOUT;
 			return NULL;
 		}
-		if (p != NULL || errno != EINTR)
+		if (l >= 0 || errno != EINTR)
 			break;
 		(void) sm_io_clearerr(fp);
 	}
@@ -1336,7 +1335,7 @@
 
 	/* clean up the books and exit */
 	LineNumber++;
-	if (p == NULL)
+	if (l < 0)
 	{
 		buf[0] = '\0';
 		if (TrafficLogFile != NULL)
@@ -2638,7 +2637,13 @@
 		mark_work_group_restart(ProcListVec[i].proc_other, st);
 	}
 	else if (type == PROC_QUEUE)
+	{
 		CurRunners -= ProcListVec[i].proc_count;
+
+		/* CHK_CUR_RUNNERS() can't be used here: uses syslog() */
+		if (CurRunners < 0)
+			CurRunners = 0;
+	}
 }
 
 /*
@@ -2702,6 +2707,14 @@
 					  (int) ProcListVec[i].proc_pid);
 			ProcListVec[i].proc_pid = NO_PID;
 			SM_FREE_CLR(ProcListVec[i].proc_task);
+
+			if (ProcListVec[i].proc_type == PROC_QUEUE)
+			{
+				CurRunners -= ProcListVec[i].proc_count;
+				CHK_CUR_RUNNERS("proc_list_probe", i,
+						ProcListVec[i].proc_count);
+			}
+
 			CurChildren--;
 		}
 		else
@@ -2852,3 +2865,4 @@
 	}
 	return n;
 }
+
--- old/usr/src/cmd/sendmail/src/version.c	Sat Feb  6 15:36:49 2016
+++ new/usr/src/cmd/sendmail/src/version.c	Sat Feb  6 15:36:49 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2014 Proofpoint, Inc. and its suppliers.
  *	All rights reserved.
  * Copyright (c) 1983 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -13,6 +13,6 @@
 
 #include <sm/gen.h>
 
-SM_RCSID("@(#)$Id: version.c,v 8.218 2009/12/23 04:43:09 ca Exp $")
+SM_RCSID("@(#)$Id: version.c,v 8.249 2013-11-27 00:38:50 ca Exp $")
 
-char	Version[] = "8.14.4+Sun";
+char	Version[] = "8.14.9+Sun";
