Browse Source

Sample files for /etc/mail, installed at 'make distribution' time.

OPENBSD_3_5
millert 21 years ago
parent
commit
28a2e1ca96
10 changed files with 199 additions and 7 deletions
  1. +2
    -6
      src/etc/Makefile
  2. +66
    -0
      src/etc/mail/Makefile
  3. +58
    -0
      src/etc/mail/README
  4. +8
    -0
      src/etc/mail/access
  5. +1
    -1
      src/etc/mail/aliases
  6. +9
    -0
      src/etc/mail/local-host-names
  7. +14
    -0
      src/etc/mail/mailertable
  8. +10
    -0
      src/etc/mail/relay-domains
  9. +11
    -0
      src/etc/mail/trusted-users
  10. +20
    -0
      src/etc/mail/virtusertable

+ 2
- 6
src/etc/Makefile View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.184 2003/08/21 19:10:19 frantzen Exp $
# $OpenBSD: Makefile,v 1.185 2003/09/23 21:37:11 millert Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@ -230,11 +230,7 @@ distribution-etc-root-var: distrib-dirs
cd ../lib/libssl && exec ${MAKE} distribution
cd ../gnu/usr.bin/lynx && exec ${MAKE} -f Makefile.bsd-wrapper distribution
cd ../usr.bin/mail && exec ${MAKE} distribution
${INSTALL} -c -o root -g ${BINGRP} -m 644 aliases \
${DESTDIR}/etc/mail/aliases
/usr/libexec/sendmail/sendmail -C${DESTDIR}/etc/mail/sendmail.cf \
-bi -O AliasFile=${DESTDIR}/etc/mail/aliases \
-O DontBlameSendmail=mapinunsafedirpath
cd mail && exec ${MAKE} distribution
${INSTALL} -c -o root -g wheel -m 600 root/root.mail \
${DESTDIR}/var/mail/root
${INSTALL} -c -o root -g wheel -m 440 ../usr.bin/sudo/sudoers \


+ 66
- 0
src/etc/mail/Makefile View File

@ -0,0 +1,66 @@
# $OpenBSD: Makefile,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# Generate the various .db versions from their source files.
# The sendmail .mc files are not built here. They live in
# /usr/share/sendmail/cf and have their own Makefile.
#
.for DB in access aliases mailertable virtusertable userdb
. if exists(${DB})
DB_FILES+= ${DB}.db
. endif
.endfor
all: ${DB_FILES}
clean:
rm -f ${DB_FILES}
distribution:
${INSTALL} -c -o root -g ${BINGRP} -m 644 Makefile \
${DESTDIR}/etc/mail/Makefile
${INSTALL} -c -o root -g ${BINGRP} -m 644 README \
${DESTDIR}/etc/mail/README
${INSTALL} -c -o root -g ${BINGRP} -m 644 access \
${DESTDIR}/etc/mail/access
makemap hash ${DESTDIR}/etc/mail/access < access
${INSTALL} -c -o root -g ${BINGRP} -m 644 aliases \
${DESTDIR}/etc/mail/aliases
/usr/libexec/sendmail/sendmail -C${DESTDIR}/etc/mail/sendmail.cf \
-bi -O AliasFile=${DESTDIR}/etc/mail/aliases \
-O DontBlameSendmail=mapinunsafedirpath
${INSTALL} -c -o root -g ${BINGRP} -m 644 local-host-names \
${DESTDIR}/etc/mail/local-host-names
${INSTALL} -c -o root -g ${BINGRP} -m 644 mailertable \
${DESTDIR}/etc/mail/mailertable
makemap hash ${DESTDIR}/etc/mail/mailertable < mailertable
${INSTALL} -c -o root -g ${BINGRP} -m 644 relay-domains \
${DESTDIR}/etc/mail/relay-domains
${INSTALL} -c -o root -g ${BINGRP} -m 644 trusted-users \
${DESTDIR}/etc/mail/trusted-users
${INSTALL} -c -o root -g ${BINGRP} -m 644 virtusertable \
${DESTDIR}/etc/mail/virtusertable
makemap hash ${DESTDIR}/etc/mail/virtusertable < virtusertable
@for db in access.db aliases.db mailertable.db virtusertable.db; do \
chown root:${BINGRP} ${DESTDIR}/etc/mail/$$db; \
chmod 644 ${DESTDIR}/etc/mail/$$db; \
done
access.db: access
makemap hash ${.ALLSRC} < ${.ALLSRC}
aliases.db: aliases
sendmail -bi
mailertable.db: mailertable
makemap hash ${.ALLSRC} < ${.ALLSRC}
virtusertable.db: virtusertable
makemap hash ${.ALLSRC} < ${.ALLSRC}
userdb.db: userdb
makemap btree ${.ALLSRC} < ${.ALLSRC}
.PHONY: distribution
.include <bsd.own.mk>
.include <bsd.sys.mk>

+ 58
- 0
src/etc/mail/README View File

@ -0,0 +1,58 @@
$OpenBSD: README,v 1.1 2003/09/23 21:37:11 millert Exp $
This directory contains the configuration files for sendmail(8).
The source for the .cf files lives in /usr/share/sendmail/cf.
You should make changes in the corresponding .mc file and not edit
the .cf files directly. Useful information may be found in
/usr/share/sendmail/README, /usr/share/sendmail/TUNING, and
/usr/share/doc/smm/08.sendmailop/op.me.
Sendmail configuration files:
submit.cf Built from /usr/share/sendmail/cf/submit.mc.
Used when sendmail is invoked directly from
the command line to send mail (for instance,
when called by mail(1)).
localhost.cf Built from /usr/share/sendmail/cf/openbsd-localhost.mc.
Only allows connections from the local host, not
the network at large. This is the default
configuration file used on OpenBSD. See afterboot(8)
for more information.
sendmail.cf Built from /usr/share/sendmail/cf/openbsd-proto.mc.
A more full-featured configuration file that
allows SMTP connections from the internet.
Other files used by sendmail(8) in this directory include:
access Access database (blacklist, whitelist, etc).
aliases System aliases database.
helpfile Help file for sendmail(8).
local-host-names List of other hostnames to treat as local.
You do not need to list the system hostname,
the name(s) associated with any active network
interface or a CNAME that points to one of
those names. This file is read only at startup
or when sendmail(8) is sent SIGHUP.
mailertable Used to override routing for particular (non-local)
domains.
relay-domains List of other domains to relay mail for.
By default, sendmail(8) will not relay for
foriegn domains--if the mail is not destined
for (or sent by) a user in the local domain it
will be rejected. This file is read only at
startup or when sendmail(8) is sent SIGHUP.
virtusertable Virtual user table; maps incoming mail addresses
to alternate local usernames or aliases.
Note that by default, only sendmail.cf will use the access, local-host-names,
mailertable, relay-domains, userdb, and virtusertable files.
These files are not used by the default localhost.cf or submit.cf
since they are generally not needed for localhost-only configs.

+ 8
- 0
src/etc/mail/access View File

@ -0,0 +1,8 @@
# $OpenBSD: access,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# sendmail(8) access database. Rebuild by running as root:
# makemap hash /etc/mail/access < /etc/mail/access
#
# See /usr/share/sendmail/README for a description of this file
# under the "access_db" feature.
#

src/etc/aliases → src/etc/mail/aliases View File

@ -1,5 +1,5 @@
#
# $OpenBSD: aliases,v 1.15 2003/07/27 20:58:22 david Exp $
# $OpenBSD: aliases,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /bin/mail.

+ 9
- 0
src/etc/mail/local-host-names View File

@ -0,0 +1,9 @@
# $OpenBSD: local-host-names,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# List additional hostnames that should be considered local (one per line).
# I.e., any hostname for which you wish mail to be accepted (and delivered).
# You do not need to include the system hostname, localhost, the name(s)
# associated with any active network interface or a CNAME that points to one
# of those names.
# This file is read only at startup or when sendmail(8) is sent SIGHUP.
#

+ 14
- 0
src/etc/mail/mailertable View File

@ -0,0 +1,14 @@
# $OpenBSD: mailertable,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# The sendmail(8) mailer table is used to override routing for particular
# non-local hostnames and domains (i.e., names other the local hostname
# or names listed in local-host-names).
#
# Rebuild by running as root:
# makemap hash /etc/mail/mailertable < /etc/mail/mailertable
#
# Each line is of the form "mailer:domain" (without the quotes)
# where "mailer" is the internal mailer name, and "domain" is
# where to send the message. See /usr/share/sendmail/README for
# more information.
#

+ 10
- 0
src/etc/mail/relay-domains View File

@ -0,0 +1,10 @@
# $OpenBSD: relay-domains,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# List of other domains to relay mail for here (one per line).
# By default, sendmail(8) will not relay for foriegn domains. If the mail
# is not destined for (or sent by) a user in the local domain the message
# will be rejected. Alternately, domains may be listed in /etc/mail/access
# with the RELAY attribute instead of being enumerated here.
#
# This file is read only at startup or when sendmail(8) is sent SIGHUP.
#

+ 11
- 0
src/etc/mail/trusted-users View File

@ -0,0 +1,11 @@
# $OpenBSD: trusted-users,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# This file contains a list of users (one per line) that may set their
# envelope # "from" address to a different user via "sendmail -f".
# Common values include "majordomo", "mailman" and "www".
# In other words, if a daemon (or mailing list manager) sends mail purporting
# to be from a different user, the user it runs as should be listed here.
# The users "root" and "daemon" are implicitly included in this list.
#
# This file is read only at startup or when sendmail(8) is sent SIGHUP.
#

+ 20
- 0
src/etc/mail/virtusertable View File

@ -0,0 +1,20 @@
# $OpenBSD: virtusertable,v 1.1 2003/09/23 21:37:11 millert Exp $
#
# sendmail(8) virtual user table. Rebuild by running as root:
# makemap hash /etc/mail/access < /etc/mail/access
#
# This file contains the mapping of virtual to local addresses.
# Each line denotes a transform of:
# virtual_address local_address
#
# E.g.
# info@foo.com foo-info
# info@bar.com bar-info
# @baz.org jane@example.net
#
# It is also possible to map all users from one domain to another, e.g.
# @foo.org %1@example.com
#
# See the "virtusertable" section of /usr/share/sendmail/README for
# more information.
#

Loading…
Cancel
Save