diff options
-rw-r--r-- | etc/Makefile | 8 | ||||
-rw-r--r-- | etc/mail/Makefile | 66 | ||||
-rw-r--r-- | etc/mail/README | 58 | ||||
-rw-r--r-- | etc/mail/access | 8 | ||||
-rw-r--r-- | etc/mail/aliases (renamed from etc/aliases) | 2 | ||||
-rw-r--r-- | etc/mail/local-host-names | 9 | ||||
-rw-r--r-- | etc/mail/mailertable | 14 | ||||
-rw-r--r-- | etc/mail/relay-domains | 10 | ||||
-rw-r--r-- | etc/mail/trusted-users | 11 | ||||
-rw-r--r-- | etc/mail/virtusertable | 20 |
10 files changed, 199 insertions, 7 deletions
diff --git a/etc/Makefile b/etc/Makefile index 37947dd2d5e..98f845c3dce 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -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 \ diff --git a/etc/mail/Makefile b/etc/mail/Makefile new file mode 100644 index 00000000000..b65804eca10 --- /dev/null +++ b/etc/mail/Makefile @@ -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> diff --git a/etc/mail/README b/etc/mail/README new file mode 100644 index 00000000000..a4710d29328 --- /dev/null +++ b/etc/mail/README @@ -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. diff --git a/etc/mail/access b/etc/mail/access new file mode 100644 index 00000000000..d1f45ede8f3 --- /dev/null +++ b/etc/mail/access @@ -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. +# diff --git a/etc/aliases b/etc/mail/aliases index d1cecb26984..e053a779d25 100644 --- a/etc/aliases +++ b/etc/mail/aliases @@ -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. diff --git a/etc/mail/local-host-names b/etc/mail/local-host-names new file mode 100644 index 00000000000..0718cab3aea --- /dev/null +++ b/etc/mail/local-host-names @@ -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. +# diff --git a/etc/mail/mailertable b/etc/mail/mailertable new file mode 100644 index 00000000000..ac5aa686779 --- /dev/null +++ b/etc/mail/mailertable @@ -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. +# diff --git a/etc/mail/relay-domains b/etc/mail/relay-domains new file mode 100644 index 00000000000..0e5466e075b --- /dev/null +++ b/etc/mail/relay-domains @@ -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. +# diff --git a/etc/mail/trusted-users b/etc/mail/trusted-users new file mode 100644 index 00000000000..2953b30185e --- /dev/null +++ b/etc/mail/trusted-users @@ -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. +# diff --git a/etc/mail/virtusertable b/etc/mail/virtusertable new file mode 100644 index 00000000000..85c253ae90c --- /dev/null +++ b/etc/mail/virtusertable @@ -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. +# |