<file name="Makefile">

ROOT         = @l_prefix@
USR          = @l_musr@
GRP          = @l_mgrp@

NEWALIASES   = $(ROOT)/bin/newaliases
MAKEMAP      = $(ROOT)/sbin/makemap
M4           = $(ROOT)/bin/m4
GZIP         = $(ROOT)/lib/openpkg/gzip

TARGETS      = t.aliases.db \
               t.mailertable.db \
               t.domaintable.db \
               t.virtusertable.db \
               t.user.db \
               t.access.db

DIST_TARGETS = sendmail.cf submit.cf \
               $(TARGETS)

all: $(DIST_TARGETS)

sendmail.cf: sendmail.m4
	@echo "generating $@"; \
	$(GZIP) -d <cf.tar.gz | tar xf -; \
	cp sendmail.m4 cf/cf; \
	(cd cf/cf && umask 022 && $(M4) <sendmail.m4 >../../sendmail.cf); \
	rm -rf cf; \
	chown $(USR):$(GRP) $@ 2>/dev/null

submit.cf: submit.m4
	@echo "generating $@"; \
	$(GZIP) -d <cf.tar.gz | tar xf -; \
	cp submit.m4 cf/cf; \
	(cd cf/cf && umask 022 && $(M4) <submit.m4 >../../submit.cf); \
	rm -rf cf; \
	chown $(USR):$(GRP) $@ 2>/dev/null

t.aliases.db: t.aliases
	@echo "generating $@"; \
	rm -f $@ && umask 022 && \
	$(ROOT)/bin/newaliases && \
	chown $(USR):$(GRP) $@ 2>/dev/null

t.mailertable.db: t.mailertable
	@echo "generating $@"; \
	rm -f $@ && umask 022 && \
	$(ROOT)/sbin/makemap hash t.mailertable.db <t.mailertable && \
	chown $(USR):$(GRP) $@ 2>/dev/null

t.domaintable.db: t.domaintable
	@echo "generating $@"; \
	rm -f $@ && umask 022 && \
	$(ROOT)/sbin/makemap hash t.domaintable.db <t.domaintable && \
	chown $(USR):$(GRP) $@ 2>/dev/null

t.virtusertable.db: t.virtusertable
	@echo "generating $@"; \
	rm -f $@ && umask 022 && \
	$(ROOT)/sbin/makemap hash t.virtusertable.db <t.virtusertable && \
	chown $(USR):$(GRP) $@ 2>/dev/null

t.user.db: t.user
	@echo "generating $@"; \
	rm -f $@ && umask 022 && \
	$(ROOT)/sbin/makemap btree t.user.db <t.user && \
	chown $(USR):$(GRP) $@ 2>/dev/null

t.access.db: t.access
	@echo "generating $@"; \
	rm -f $@ && umask 022 && \
	$(ROOT)/sbin/makemap hash t.access.db <t.access && \
	chown $(USR):$(GRP) $@ 2>/dev/null

clean:
	-rm -f $(TARGETS)

distclean:
	-rm -f $(DIST_TARGETS)

</file>
<file name="sendmail.m4">
divert(-1)
##
##  sendmail.m4 -- Sendmail 8 M4 Configuration
##

dnl #  M4 bootstrapping.
include(`../m4/cf.m4')
VERSIONID(`@(#)sendmail.m4 OpenPKG')
OSTYPE(@l_ostype@)

dnl #  Local Parameters.
define(`confMYHOSTNAME',   `@l_hostname@')
define(`confMYDOMAINNAME', `@l_domainname@')
define(`confMYIPADDRESS',  `127.0.0.1')
define(`confMYUSR',        `@l_musr@')
define(`confMYGRP',        `@l_mgrp@')
define(`confMYPREFIX',     `@l_prefix@')
define(`confMYBINDIR',     `confMYPREFIX/bin')
define(`confMYLIBEXECDIR', `confMYPREFIX/libexec/sendmail')
define(`confMYETCDIR',     `confMYPREFIX/etc/sendmail')
define(`confMYVARDIR',     `confMYPREFIX/var/sendmail')

dnl #  Server details.
define(`confDOMAIN_NAME', `confMYHOSTNAME.confMYDOMAINNAME')
FEATURE(custom_listen)
define(`confDONT_PROBE_INTERFACES', `True')
define(`confDEF_USER_ID', `confMYUSR:confMYGRP')
define(`confLOG_LEVEL', `9')

dnl #  Security.
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy,noverb')

dnl #  Performance tuning.
FEATURE(performance)

dnl #  Cosmetical customization.
FEATURE(custom_texts)

dnl #  Denial Of Service (DoS) prevention.
FEATURE(dos)

dnl #  External files.
define(`QUEUE_DIR',    `confMYVARDIR/mqueue')
define(`STATUS_FILE',  `confMYVARDIR/sendmail.stat')
define(`HELP_FILE',    `confMYETCDIR/sendmail.help')
define(`confHOST_STATUS_DIRECTORY', `.hoststat')
dnl #  User trusted for file ownership
define(`confTRUSTED_USER', `@l_musr@')

dnl #  Trusted Users.
dnl #  Those can use "sendmail -f<address>"
define(`confCT_FILE', `confMYETCDIR/l.user.trusted')
FEATURE(use_ct_file)

dnl #  Aliasing.
define(`confCW_FILE', `confMYETCDIR/l.ournames')
FEATURE(use_cw_file)
define(`ALIAS_FILE', `-f confMYETCDIR/t.aliases')
define(`confUSERDB_SPEC', `confMYETCDIR/t.user')

dnl #  Default Routing.
dnl #  LOCAL_RELAY applies to unqualifed user names
dnl #  MAIL_HUB    applies to user names qualified with the name of the local host 
dnl #  SMART_HOST  applies to user names qualified with other hosts.
dnl define(`LOCAL_RELAY', local:localhost)dnl
dnl define(`MAIL_HUB',    local:localhost)dnl
dnl define(`SMART_HOST',  smtpfeed:LMTP)dnl

dnl #  Manual Routing.
FEATURE(mailertable,   `hash -o confMYETCDIR/t.mailertable')
FEATURE(domaintable,   `hash -o confMYETCDIR/t.domaintable')
FEATURE(virtusertable, `hash -o confMYETCDIR/t.virtusertable')

dnl #  Relaying.
FEATURE(access_db, `hash -T<TMPF> confMYETCDIR/t.access')
FEATURE(blacklist_recipients)
undefine(`confCR_FILE')
dnl RELAY_DOMAIN(confMYDOMAINNAME)
dnl FEATURE(relay_entire_domain)
FL`'confMYETCDIR/l.user.local

dnl #  Forwarding.
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')
FEATURE(redirect)

dnl #  DNS black lists
dnl # enhdnsbl, zone, msg, msg-tmp, match, r1, r2, r3, r4, r5
dnl FEATURE(enhdnsbl, `dnsbl.example.com', `', `t', `127.0.0.2')

dnl #  Masquerading.
dnl #  Users where the internal site name will be displayed 
dnl #  instead of the masqueraded site name.
FE`'confMYETCDIR/l.user.exposed
dnl MASQUERADE_AS(confMYDOMAINNAME)dnl

dnl #  Domain Name Service (DNS).
dnl FEATURE(nodns)
FEATURE(nocanonify)
define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')
FEATURE(accept_unresolvable_domains)

dnl #  Mailer: SMTP (standard delivery)
define(`confCON_EXPENSIVE', `true')
define(`SMTP_MAILER_FLAGS', `e')

dnl #  Mailer: SMTPfeed (mass delivery)
dnl define(`SMTPFEED_MAILER_ARGS', `-o confMYIPADDRESS')
dnl define(`SMTPFEED_MAILER_PATH', `confMYLIBEXECDIR/smtpfeed')

dnl #  Mailer: UUCP
dnl define(`UUCP_MAILER_PATH', `confMYBINDIR/uux')
dnl FEATURE(nouucp, nospecial)dnl # KEEP DNL!

dnl #  Mailer: Local & Procmail
define(`PROCMAIL_MAILER_PATH', `confMYBINDIR/procmail')
FEATURE(local_procmail)dnl # KEEP DNL!
define(`LOCAL_MAILER_FLAGS', `rmn9')
define(`confME_TOO', `true')

dnl #  STARTTLS support
dnl FEATURE(tls)

dnl #  SASL support
dnl define(`confAUTH_MECHANISMS', `CRAM-MD5 DIGEST-MD5 LOGIN PLAIN')
dnl TRUST_AUTH_MECH(`CRAM-MD5 DIGEST-MD5 LOGIN PLAIN')

MAILER(smtp)
dnl MAILER(smtpfeed)
dnl MAILER(uucp)
MAILER(local)
MAILER(procmail)

</file>
<file name="submit.m4">
divert(-1)
##
##  submit.m4 -- Sendmail 8 M4 Configuration (submit-only)
##

dnl #  M4 bootstrapping.
include(`../m4/cf.m4')
VERSIONID(`@(#)submit.m4 OpenPKG')
OSTYPE(@l_ostype@)

dnl #  Local Parameters.
define(`confMYHOSTNAME',   `@l_hostname@')
define(`confMYDOMAINNAME', `@l_domainname@')
define(`confMYIPADDRESS',  `0.0.0.0')
define(`confMYUSR',        `@l_musr@')
define(`confMYGRP',        `@l_mgrp@')
define(`confMYPREFIX',     `@l_prefix@')
define(`confMYBINDIR',     `confMYPREFIX/bin')
define(`confMYLIBEXECDIR', `confMYPREFIX/libexec/sendmail')
define(`confMYETCDIR',     `confMYPREFIX/etc/sendmail')
define(`confMYVARDIR',     `confMYPREFIX/var/sendmail')

dnl #  Server details.
define(`confDOMAIN_NAME', `confMYHOSTNAME.confMYDOMAINNAME')
FEATURE(custom_listen)
define(`confDONT_PROBE_INTERFACES', `True')
define(`confDEF_USER_ID', `confMYUSR:confMYGRP')
define(`confLOG_LEVEL', `9')

dnl #  External files.
define(`QUEUE_DIR',    `confMYVARDIR/mqueue')
define(`MSP_QUEUE_DIR',    `confMYVARDIR/clientmqueue')
define(`STATUS_FILE',  `confMYVARDIR/sendmail.stat')
define(`HELP_FILE',    `confMYETCDIR/sendmail.help')
define(`confHOST_STATUS_DIRECTORY', `.hoststat')
dnl #  User trusted for file ownership
define(`confTRUSTED_USER', `@l_rusr@')
define(`confRUN_AS_USER', `@l_rusr@')

dnl #  Trusted Users.
dnl #  Those can use "sendmail -f<address>"
define(`confCT_FILE', `confMYETCDIR/l.user.trusted')
FEATURE(use_ct_file)

dnl #  Aliasing.
define(`confCW_FILE', `confMYETCDIR/l.ournames')
FEATURE(use_cw_file)
define(`ALIAS_FILE', `-f confMYETCDIR/t.aliases')
define(`confUSERDB_SPEC', `confMYETCDIR/t.user')

divert(0)dnl
VERSIONID(`$Id: sendmail.etc.txt,v 1.1 2006/10/22 18:01:29 rse Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl
</file>
<file name="l.ournames">
@l_hostname@.@l_domainname@
@l_hostname@
</file>
<file name="l.user.exposed">
root
</file>
<file name="l.user.local">
root
</file>
<file name="l.user.trusted">
root
</file>
</file>
<file name="t.access">
##
##  t.access -- Sendmail Access Control
##  (access/relaying control for incoming mails)
##

#   Sample Entries:
#   foo.dom     RELAY
#   bar.foo.dom RELAY
#   192.168.0.0 RELAY

@l_domainname@ RELAY
127.0.0.1 RELAY

</file>
<file name="t.aliases">
##
##  t.aliases -- Sendmail User Aliases
##  (mail address aliasing for local users)
##

#   standard targets
nobody:                /dev/null
hostmaster:            root
postmaster:            root

#   system target redirection
MAILER-DAEMON:         postmaster
daemon:                hostmaster
uucp:                  hostmaster
cron:                  hostmaster

</file>
<file name="t.domaintable">
##
##  t.domaintable -- Sendmail Domain Table
##  (expand unqualified hostnames to fully qualified domain names)
##

#   Sample Entries:
#   bar   bar.foo.dom
#   baz   baz.foo.dom

@l_hostname@ @l_hostname@.@l_domainname@

</file>
<file name="t.mailertable">
##
##  t.mailertable -- Sendmail Mailer Table
##  (host/domain-based mail routing)
##

#   Sample Entries:
#   foo.dom           local:localhost
#   .foo.dom          local:localhost
#   .                 uucp-uudom:foo

</file>
<file name="t.user">
##
##  t.user -- Sendmail User Database
##  (address rewriting for outgoing mails from local users)
##

#   Sample Entries:
#   :default:mailname   foo.dom.
#   bar:maildrop        bar@bar.dom.
#   baz:maildrop        baz@baz.dom.

</file>
<file name="t.virtusertable">
##
##  t.virtusertable -- Sendmail Virtual Users
##  (virtual user address routing) 
##

#   Sample Entries:
#   info@foo.dom    foo-info
#   info@bar.dom    bar-info
#   joe@bar.dom     error:nouser No such user here
#   jax@bar.dom     error:D.S.N:unavailable Address invalid
#   @baz.org        jane@example.dom
#   @foo.org        %1@example.dom
#   old+*@foo.org   new+%2@example.dom
#   gen+*@foo.org   %2@example.dom
#   +*@foo.org      %1+%2@example.dom

</file>
<file name="ca.crt">
-----BEGIN CERTIFICATE-----
MIIDOTCCAqKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBqTELMAkGA1UEBhMCWFkx
FTATBgNVBAgTDFNuYWtlIERlc2VydDETMBEGA1UEBxMKU25ha2UgVG93bjEXMBUG
A1UEChMOU25ha2UgT2lsLCBMdGQxHjAcBgNVBAsTFUNlcnRpZmljYXRlIEF1dGhv
cml0eTEVMBMGA1UEAxMMU25ha2UgT2lsIENBMR4wHAYJKoZIhvcNAQkBFg9jYUBz
bmFrZW9pbC5kb20wHhcNMDEwMTI2MTEzMDA2WhcNMDIwMTI2MTEzMDA2WjCBq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