diff options
Diffstat (limited to 'contrib/sendmail/cf')
135 files changed, 7496 insertions, 0 deletions
diff --git a/contrib/sendmail/cf/README b/contrib/sendmail/cf/README new file mode 100644 index 000000000000..df50c9da1d03 --- /dev/null +++ b/contrib/sendmail/cf/README @@ -0,0 +1,2206 @@ + + + NEW SENDMAIL CONFIGURATION FILES + + Eric Allman <eric@Sendmail.ORG> + + @(#)README 8.174 (Berkeley) 6/30/98 + + +This document describes the sendmail configuration files being used +at Berkeley. These use features in the new (R8) sendmail; they will +not work on other versions. + +These configuration files are probably not as general as previous +versions, and don't handle as many of the weird cases automagically. +I was able to simplify them for two reasons. First, the network +has become more consistent -- for example, at this point, everyone +on the internet is supposed to be running a name server, so hacks to +handle NIC-registered hosts can go away. Second, I assumed that a +subdomain would be running SMTP internally -- UUCP is presumed to be +a long-haul protocol. I realize that this is not universal, but it +does describe the vast majority of sites with which I am familiar, +including those outside the US. + +Of course, the downside of this is that if you do live in a weird +world, things are going to get weirder for you. I'm sorry about that, +but at the time we at Berkeley had a problem, and it seemed like the +right thing to do. + +This package requires a post-V7 version of m4; if you are running the +4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with +a newer version. You can m4-expand on their system, then run locally. +SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 +or later also works. Unfortunately, I'm told that the M4 on BSDI 1.0 +doesn't work -- you'll have to use a Net/2 or GNU version. GNU m4 is +available from ftp://ftp.gnu.org/pub/gnu/m4-1.4.tar.gz (check for +the latest version). EXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken +(3.x is fine). Use GNU m4 on this platform. + +IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run +"m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need. +There is also a fairly crude (but functional) Makefile.dist that works +on the old version of make. + +To get started, you may want to look at tcpproto.mc (for TCP-only +sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for +clusters of clients using a single mail host). Others are versions +that we use at Berkeley, although not all are in current use. For +example, ucbvax has gone away, but I've left ucbvax.mc in because +it demonstrates some interesting techniques. + +I'm not pretending that this README describes everything that these +configuration files can do; clever people can probably tweak them +to great effect. But it should get you started. + +******************************************************************* +*** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** +*** Berkeley-specific assumptions built in, such as the name *** +*** of our UUCP-relay. You'll want to create your own domain *** +*** description, and use that in place of *** +*** domain/Berkeley.EDU.m4. *** +******************************************************************* + + ++--------------------------+ +| INTRODUCTION AND EXAMPLE | ++--------------------------+ + +Configuration files are contained in the subdirectory "cf", with a +suffix ".mc". They must be run through "m4" to produce a ".cf" file. +You must pre-load "cf.m4": + + m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf + +where ${CFDIR} is the root of the cf directory and config.mc is the +name of your configuration file. If you are running a version of M4 +that understands the __file__ builtin (versions of GNU m4 >= 0.75 do +this, but the versions distributed with 4.4BSD and derivatives do not) +or the -I flag (ditto), then ${CFDIR} can be in an arbitrary directory. +For "traditional" versions, ${CFDIR} ***MUST*** be "..", or you MUST +use -D_CF_DIR_=/path/to/cf/dir/ -- note the trailing slash! For example: + + m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf + +Let's examine a typical .mc file: + + divert(-1) + # + # Copyright (c) 1998 Sendmail, Inc. All rights reserved. + # Copyright (c) 1983 Eric P. Allman. All rights reserved. + # Copyright (c) 1988, 1993 + # The Regents of the University of California. 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. + # + + # + # This is a Berkeley-specific configuration file for HP-UX 9.x. + # It applies only to the Computer Science Division at Berkeley, + # and should not be used elsewhere. It is provided on the sendmail + # distribution as a sample only. To create your own configuration + # file, create an appropriate domain file in ../domain, change the + # `DOMAIN' macro below to reference that file, and copy the result + # to a name of your own choosing. + # + divert(0) + +The divert(-1) will delete the crud in the resulting output file. +The copyright notice can be replaced by whatever your lawyers require; +our lawyers require the one that I've included in my files. A copyleft +is a copyright by another name. The divert(0) restores regular output. + + VERSIONID(`<SCCS or RCS version id>') + +VERSIONID is a macro that stuffs the version information into the +resulting file. We use SCCS; you could use RCS, something else, or +omit it completely. This is not the same as the version id included +in SMTP greeting messages -- this is defined in m4/version.m4. + + OSTYPE(hpux9)dnl + +You must specify an OSTYPE to properly configure things such as the +pathname of the help and status files, the flags needed for the local +mailer, and other important things. If you omit it, you will get an +error when you try to build the configuration. Look at the ostype +directory for the list of known operating system types. + + DOMAIN(CS.Berkeley.EDU)dnl + +This example is specific to the Computer Science Division at Berkeley. +You can use "DOMAIN(generic)" to get a sufficiently bland definition +that may well work for you, or you can create a customized domain +definition appropriate for your environment. + + MAILER(local) + MAILER(smtp) + +These describe the mailers used at the default CS site site. The +local mailer is always included automatically. Beware: MAILER +declarations should always be at the end of the configuration file, +and MAILER(smtp) should always precede MAILER(uucp). The general +rules are that the order should be: + + VERSIONID + OSTYPE + DOMAIN + FEATURE + local macro definitions + MAILER + LOCAL_RULESET_* + + ++----------------------------+ +| A BRIEF INTRODUCTION TO M4 | ++----------------------------+ + +Sendmail uses the M4 macro processor to ``compile'' the configuration +files. The most important thing to know is that M4 is stream-based, +that is, it doesn't understand about lines. For this reason, in some +places you may see the word ``dnl'', which stands for ``delete +through newline''; essentially, it deletes all characters starting +at the ``dnl'' up to and including the next newline character. In +most cases sendmail uses this only to avoid lots of unnecessary +blank lines in the output. + +Other important directives are define(A, B) which defines the macro +``A'' to have value ``B''. Macros are expanded as they are read, so +one normally quotes both values to prevent expansion. For example, + + define(`SMART_HOST', `smart.foo.com') + +One word of warning: M4 macros are expanded even in lines that appear +to be comments. For example, if you have + + # See FEATURE(foo) above + +it will not do what you expect, because the FEATURE(foo) will be +expanded. This also applies to + + # And then define the $X macro to be the return address + +because ``define'' is an M4 keyword. If you want to use them, surround +them with directed quotes, `like this'. + ++----------------+ +| FILE LOCATIONS | ++----------------+ + +sendmail 8.9 has introduced a new configuration directory for sendmail +related files, /etc/mail. The new files available for sendmail 8.9 -- +the class 'R' /etc/mail/relay-domains and the access database +/etc/mail/access -- take advantage of this new directory. 8.9 will +serve as a transition release. Beginning with 8.10, all of the files +will use this directory by default. + ++--------+ +| OSTYPE | ++--------+ + +You MUST define an operating system environment, or the configuration +file build will puke. There are several environments available; look +at the "ostype" directory for the current list. This macro changes +things like the location of the alias file and queue directory. Some +of these files are identical to one another. + +It is IMPERATIVE that the OSTYPE occur before any MAILER definitions. +In general, the OSTYPE macro should go immediately after any version +information, and MAILER definitions should always go last. + +Operating system definitions are usually easy to write. They may define +the following variables (everything defaults, so an ostype file may be +empty). Unfortunately, the list of configuration-supported systems is +not as broad as the list of source-supported systems, since many of +the source contributors do not include corresponding ostype files. + +ALIAS_FILE [/etc/aliases] The location of the text version + of the alias file(s). It can be a comma-separated + list of names (but be sure you quote values with + commas in them -- for example, use + define(`ALIAS_FILE', `a,b') + to get "a" and "b" both listed as alias files; + otherwise the define() primitive only sees "a"). +HELP_FILE [/usr/lib/sendmail.hf] The name of the file + containing information printed in response to + the SMTP HELP command. +QUEUE_DIR [/var/spool/mqueue] The directory containing + queue files. +STATUS_FILE [/etc/sendmail.st] The file containing status + information. +LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. +LOCAL_MAILER_FLAGS [rmn9] The flags used by the local mailer. The + flags lsDFM are always included. +LOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local + mail. +LOCAL_MAILER_MAX [undefined] If defined, the maximum size of local + mail that you are willing to accept. +LOCAL_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to the + local mailer and which are converted to MIME will be + labeled with this character set. +LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. +LOCAL_SHELL_FLAGS [eu9] The flags used by the shell mailer. The + flags lsDFM are always included. +LOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" + mail. +LOCAL_SHELL_DIR [$z:/] The directory search path in which the + shell should run. +USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program + used to submit news. +USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. +USENET_MAILER_ARGS [-m -h -n] The command line arguments for the + usenet mailer. +USENET_MAILER_MAX [100000] The maximum size of messages that will + be accepted by the usenet mailer. +SMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. Default + flags are `mDFMUX' for all SMTP-based mailers; the + "esmtp" mailer adds `a' and "smtp8" adds `8'. +SMTP_MAILER_MAX [undefined] The maximum size of messages that will + be transported using the smtp, smtp8, or esmtp + mailers. +SMTP_MAILER_ARGS [IPC $h] The arguments passed to the smtp mailer. + About the only reason you would want to change this + would be to change the default port. +ESMTP_MAILER_ARGS [IPC $h] The arguments passed to the esmtp mailer. +SMTP8_MAILER_ARGS [IPC $h] The arguments passed to the smtp8 mailer. +RELAY_MAILER_ARGS [IPC $h] The arguments passed to the relay mailer. +SMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to one of + the SMTP mailers and which are converted to MIME will + be labeled with this character set. +UUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail. +UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default + flags are `DFMhuU' (and `m' for uucp-new mailer, + minus `U' for uucp-dom mailer). +UUCP_MAILER_ARGS [uux - -r -z -a$g -gC $h!rmail ($u)] The arguments + passed to the UUCP mailer. +UUCP_MAILER_MAX [100000] The maximum size message accepted for + transmission by the UUCP mailers. +UUCP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data + that ARRIVE from an address that resolves to one of + the UUCP mailers and which are converted to MIME will + be labeled with this character set. +FAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to + submit FAX messages. +FAX_MAILER_ARGS [mailfax $u $h $f] The arguments passed to the FAX + mailer. +FAX_MAILER_MAX [100000] The maximum size message accepted for + transmission by FAX. +POP_MAILER_PATH [/usr/lib/mh/spop] The pathname of the POP mailer. +POP_MAILER_FLAGS [Penu] Flags added to POP mailer. Flags "lsDFM" + are always added. +POP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer. +PROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail + program. This is also used by FEATURE(local_procmail). +PROCMAIL_MAILER_FLAGS [SPhnu9] Flags added to Procmail mailer. Flags + ``DFM'' are always set. This is NOT used by + FEATURE(local_procmail); tweak LOCAL_MAILER_FLAGS + instead. +PROCMAIL_MAILER_ARGS [procmail -Y -m $h $f $u] The arguments passed to + the Procmail mailer. This is NOT used by + FEATURE(local_procmail); tweak LOCAL_MAILER_ARGS + instead. +PROCMAIL_MAILER_MAX [undefined] If set, the maximum size message that + will be accepted by the procmail mailer. +MAIL11_MAILER_PATH [/usr/etc/mail11] The path to the mail11 mailer. +MAIL11_MAILER_FLAGS [nsFx] Flags for the mail11 mailer. +MAIL11_MAILER_ARGS [mail11 $g $x $h $u] Arguments passed to the mail11 + mailer. +PH_MAILER_PATH [/usr/local/etc/phquery] The path to the phquery + program. +PH_MAILER_FLAGS [ehmu] Flags for the phquery mailer. +PH_MAILER_ARGS [phquery -- $u] -- arguments to the phquery mailer. +CYRUS_MAILER_FLAGS [A5@/:|] The flags used by the cyrus mailer. The + flags lsDFMnPq are always included. +CYRUS_MAILER_PATH [/usr/cyrus/bin/deliver] The program used to deliver + cyrus mail. +CYRUS_MAILER_ARGS [deliver -e -m $h -- $u] The arguments passed + to deliver cyrus mail. +CYRUS_MAILER_MAX [undefined] If set, the maximum size message that + will be accepted by the cyrus mailer. +CYRUS_MAILER_USER [cyrus:mail] The user and group to become when + running the cyrus mailer. +CYRUS_BB_MAILER_FLAGS [undefined] The flags used by the cyrusbb + mailer. The flags lsDFMnP are always included. +CYRUS_BB_MAILER_ARGS [deliver -e -m $u] The arguments passed + to deliver cyrusbb mail. +confEBINDIR [/usr/libexec] The directory for executables. + Currently used for FEATURE(local_lmtp) and + FEATURE(smrsh). + + + ++---------+ +| DOMAINS | ++---------+ + +You will probably want to collect domain-dependent defines into one +file, referenced by the DOMAIN macro. For example, our Berkeley +domain file includes definitions for several internal distinguished +hosts: + +UUCP_RELAY The host that will accept UUCP-addressed email. + If not defined, all UUCP sites must be directly + connected. +BITNET_RELAY The host that will accept BITNET-addressed email. + If not defined, the .BITNET pseudo-domain won't work. +DECNET_RELAY The host that will accept DECNET-addressed email. + If not defined, the .DECNET pseudo-domain and addresses + of the form node::user will not work. +FAX_RELAY The host that will accept mail to the .FAX pseudo-domain. + The "fax" mailer overrides this value. +LOCAL_RELAY DEPRECATED. The site that will handle unqualified + names -- that is, names with out an @domain extension. + If not set, they are assumed to belong on this machine. + This allows you to have a central site to store a + company- or department-wide alias database. This + only works at small sites, and only with some user + agents. +LUSER_RELAY The site that will handle lusers -- that is, apparently + local names that aren't local accounts or aliases. + +Any of these can be either ``mailer:hostname'' (in which case the +mailer is the internal mailer name, such as ``uucp-new'' and the hostname +is the name of the host as appropriate for that mailer) or just a +``hostname'', in which case a default mailer type (usually ``relay'', +a variant on SMTP) is used. WARNING: if you have a wildcard MX +record matching your domain, you probably want to define these to +have a trailing dot so that you won't get the mail diverted back +to yourself. + +The domain file can also be used to define a domain name, if needed +(using "DD<domain>") and set certain site-wide features. If all hosts +at your site masquerade behind one email name, you could also use +MASQUERADE_AS here. + +You do not have to define a domain -- in particular, if you are a +single machine sitting off somewhere, it is probably more work than +it's worth. This is just a mechanism for combining "domain dependent +knowledge" into one place. + ++---------+ +| MAILERS | ++---------+ + +There are fewer mailers supported in this version than the previous +version, owing mostly to a simpler world. As a general rule, put the +MAILER definitions last in your .mc file, and always put MAILER(smtp) +before MAILER(uucp) -- several features and definitions will modify +the definition of mailers, and the smtp mailer modifies the UUCP +mailer. + +local The local and prog mailers. You will almost always + need these; the only exception is if you relay ALL + your mail to another site. This mailer is included + automatically. + +smtp The Simple Mail Transport Protocol mailer. This does + not hide hosts behind a gateway or another other + such hack; it assumes a world where everyone is + running the name server. This file actually defines + four mailers: "smtp" for regular (old-style) SMTP to + other servers, "esmtp" for extended SMTP to other + servers, "smtp8" to do SMTP to other servers without + converting 8-bit data to MIME (essentially, this is + your statement that you know the other end is 8-bit + clean even if it doesn't say so), and "relay" for + transmission to our RELAY_HOST, LUSER_RELAY, or + MAILER_HUB. + +uucp The Unix-to-Unix Copy Program mailer. Actually, this + defines two mailers, "uucp-old" (a.k.a. "uucp") and + "uucp-new" (a.k.a. "suucp"). The latter is for when you + know that the UUCP mailer at the other end can handle + multiple recipients in one transfer. If the smtp mailer + is also included in your configuration, two other mailers + ("uucp-dom" and "uucp-uudom") are also defined [warning: + you MUST specify MAILER(smtp) before MAILER(uucp)]. When you + include the uucp mailer, sendmail looks for all names in + the $=U class and sends them to the uucp-old mailer; all + names in the $=Y class are sent to uucp-new; and all + names in the $=Z class are sent to uucp-uudom. Note that + this is a function of what version of rmail runs on + the receiving end, and hence may be out of your control. + See the section below describing UUCP mailers in more + detail. + +usenet Usenet (network news) delivery. If this is specified, + an extra rule is added to ruleset 0 that forwards all + local email for users named ``group.usenet'' to the + ``inews'' program. Note that this works for all groups, + and may be considered a security problem. + +fax Facsimile transmission. This is experimental and based + on Sam Leffler's HylaFAX software. For more information, + see http://www.vix.com/hylafax/. + +pop Post Office Protocol. + +procmail An interface to procmail (does not come with sendmail). + This is designed to be used in mailertables. For example, + a common question is "how do I forward all mail for a given + domain to a single person?". If you have this mailer + defined, you could set up a mailertable reading: + + host.com procmail:/etc/procmailrcs/host.com + + with the file /etc/procmailrcs/host.com reading: + + :0 # forward mail for host.com + ! -oi -f $1 person@other.host + + This would arrange for (anything)@host.com to be sent + to person@other.host. Within the procmail script, $1 is + the name of the sender and $2 is the name of the recipient. + If you use this with FEATURE(local_procmail), the FEATURE + should be listed first. + +mail11 The DECnet mail11 mailer, useful only if you have the mail11 + program from gatekeeper.dec.com:/pub/DEC/gwtools (and + DECnet, of course). This is for Phase IV DECnet support; + if you have Phase V at your site you may have additional + problems. + +phquery The phquery program. This is somewhat counterintuitively + referenced as the "ph" mailer internally. It can be used + to do CCSO name server lookups. The phquery program, which + this mailer uses, is distributed with the ph client. + +cyrus The cyrus and cyrusbb mailers. The cyrus mailer delivers to + a local cyrus user. this mailer can make use of the + "user+detail@local.host" syntax; it will deliver the mail to + the user's "detail" mailbox if the mailbox's ACL permits. + The cyrusbb mailer delivers to a system-wide cyrus mailbox + if the mailbox's ACL permits. + + +The local mailer accepts addresses of the form "user+detail", where +the "+detail" is not used for mailbox matching but is available +to certain local mail programs (in particular, see FEATURE(local_procmail)). +For example, "eric", "eric+sendmail", and "eric+sww" all indicate +the same user, but additional arguments <null>, "sendmail", and "sww" +may be provided for use in sorting mail. + + ++----------+ +| FEATURES | ++----------+ + +Special features can be requested using the "FEATURE" macro. For +example, the .mc line: + + FEATURE(use_cw_file) + +tells sendmail that you want to have it read an /etc/sendmail.cw +file to get values for class $=w. The FEATURE may contain a single +optional parameter -- for example: + + FEATURE(mailertable, dbm /usr/lib/mailertable) + +The default database map type for the table features can be set with + + define(`DATABASE_MAP_TYPE', `dbm') + +which would set it to use ndbm databases. The default is the Berkeley DB +hash database format. Note that you must still declare a database map type +if you specify an argument to a FEATURE. DATABASE_MAP_TYPE is only used +if no argument is given for the FEATURE. + +Available features are: + +use_cw_file Read the file /etc/sendmail.cw file to get alternate + names for this host. This might be used if you were + on a host that MXed for a dynamic set of other + hosts. If the set is static, just including the line + "Cw<name1> <name2> ..." (where the names are fully + qualified domain names) is probably superior. + The actual filename can be overridden by redefining + confCW_FILE. + +use_ct_file Read the file /etc/sendmail.ct file to get the names + of users that will be ``trusted'', that is, able to + set their envelope from address using -f without + generating a warning message. + The actual filename can be overridden by redefining + confCT_FILE. + +redirect Reject all mail addressed to "address.REDIRECT" with + a ``551 User not local; please try <address>'' message. + If this is set, you can alias people who have left + to their new address with ".REDIRECT" appended. + +nouucp Don't do anything special with UUCP addresses at all. + +nocanonify Don't pass addresses to $[ ... $] for canonification. + This would generally only be used by sites that only + act as mail gateways or which have user agents that do + full canonification themselves. You may also want to + use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to + turn off the usual resolver options that do a similar + thing. + +stickyhost If set, email sent to "user@local.host" are marked + as "sticky" -- that is, the local addresses aren't + matched against UDB and don't go through ruleset 5. + This is used if you want a set up where "user" is + not necessarily the same as "user@local.host", e.g., + to make a distinct domain-wide namespace. Prior to + 8.7 this was the default, and notsticky was used to + turn this off. + +mailertable Include a "mailer table" which can be used to override + routing for particular domains. The argument of the + FEATURE may be the key definition. If none is specified, + the definition used is: + hash -o /etc/mailertable + Keys in this database are fully qualified domain names + or partial domains preceded by a dot -- for example, + "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". + Values must be of the form: + mailer:domain + where "mailer" is the internal mailer name, and "domain" + is where to send the message. These maps are not + reflected into the message header. As a special case, + the forms: + local:user + will forward to the indicated user using the local mailer, + local: + will forward to the original user in the e-mail address + using the local mailer, and + error:code message + will give an error message with the indicated code and + message. + +domaintable Include a "domain table" which can be used to provide + domain name mapping. Use of this should really be + limited to your own domains. It may be useful if you + change names (e.g., your company changes names from + oldname.com to newname.com). The argument of the + FEATURE may be the key definition. If none is specified, + the definition used is: + hash -o /etc/domaintable + The key in this table is the domain name; the value is + the new (fully qualified) domain. Anything in the + domaintable is reflected into headers; that is, this + is done in ruleset 3. + +bitdomain Look up bitnet hosts in a table to try to turn them into + internet addresses. The table can be built using the + bitdomain program contributed by John Gardiner Myers. + The argument of the FEATURE may be the key definition; if + none is specified, the definition used is: + hash -o /etc/bitdomain.db + Keys are the bitnet hostname; values are the corresponding + internet hostname. + +uucpdomain Similar feature for UUCP hosts. The default map definition + is: + hash -o /etc/uudomain.db + At the moment there is no automagic tool to build this + database. + +always_add_domain + Include the local host domain even on locally delivered + mail. Normally it is not added on unqualified names. + However, if you use a shared message store but do not use + the same user name space everywhere, you may need the host + name on local names. + +allmasquerade If masquerading is enabled (using MASQUERADE_AS), this + feature will cause recipient addresses to also masquerade + as being from the masquerade host. Normally they get + the local hostname. Although this may be right for + ordinary users, it can break local aliases. For example, + if you send to "localalias", the originating sendmail will + find that alias and send to all members, but send the + message with "To: localalias@masqueradehost". Since that + alias likely does not exist, replies will fail. Use this + feature ONLY if you can guarantee that the ENTIRE + namespace on your masquerade host supersets all the + local entries. + +limited_masquerade + Normally, any hosts listed in $=w are masqueraded. If this + feature is given, only the hosts listed in $=M are masqueraded. + This is useful if you have several domains with disjoint + namespaces hosted on the same machine. + +masquerade_entire_domain + If masquerading is enabled (using MASQUERADE_AS) and + MASQUERADE_DOMAIN (see below) is set, this feature will + cause addresses to be rewritten such that the masquerading + domains are actually entire domains to be hidden. All + hosts within the masquerading domains will be rewritten + to the masquerade name (used in MASQUERADE_AS). For example, + if you have: + + MASQUERADE_AS(masq.com) + MASQUERADE_DOMAIN(foo.org) + MASQUERADE_DOMAIN(bar.com) + + then *foo.org and *bar.com are converted to masq.com. Without + this feature, only foo.org and bar.com are masqueraded. + + NOTE: only domains within your jurisdiction and + current hierarchy should be masqueraded using this. + +genericstable This feature will cause certain addresses originating locally + (i.e. that are unqualified) or a domain listed in $=G to be + looked up in a map and turned into another ("generic") form, + which can change both the domain name and the user name. This + is similar to the userdb functionality. The same types of + addresses as for masquerading are looked up, i.e. only header + sender addresses unless the allmasquerade and/or + masquerade_envelope features are given. Qualified addresses + must have the domain part in the list of names given by the + by the macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE + (analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, + see below). + + The argument of FEATURE(genericstable) may be the map + definition; the default map definition is: + + hash -o /etc/genericstable + + The key for this table is either the full address or the + unqualified username (the former is tried first); the + value is the new user address. If the new user address does + not include a domain, it will be qualified in the standard + manner, i.e. using $j or the masquerade name. Note that the + address being looked up must be fully qualified. For local + mail, it is necessary to use FEATURE(always_add_domain) for + the addresses to be qualified. + +virtusertable A domain-specific form of aliasing, allowing multiple + virtual domains to be hosted on one machine. For example, + if the virtuser table contained: + + info@foo.com foo-info + info@bar.com bar-info + @baz.org jane@elsewhere.net + + then mail addressed to info@foo.com will be sent to the + address foo-info, mail addressed to info@bar.com will be + delivered to bar-info, and mail addressed to anyone at + baz.org will be sent to jane@elsewhere.net. The username + from the original address is passed as %1 allowing: + + @foo.org %1@elsewhere.com + + meaning someone@foo.org will be sent to someone@elsewhere.com. + + All the host names on the left hand side (foo.com, bar.com, + and baz.org) must be in $=w. The default map definition is: + + hash -o /etc/virtusertable + + A new definition can be specified as the second argument of + the FEATURE macro, such as + + FEATURE(virtusertable, dbm -o /etc/mail/virtusers) + +nodns We aren't running DNS at our site (for example, + we are UUCP-only connected). It's hard to consider + this a "feature", but hey, it had to go somewhere. + Actually, as of 8.7 this is a no-op -- remove "dns" from + the hosts service switch entry instead. + +nullclient This is a special case -- it creates a stripped down + configuration file containing nothing but support for + forwarding all mail to a central hub via a local + SMTP-based network. The argument is the name of that + hub. + + The only other feature that should be used in conjunction + with this one is "nocanonify" (this causes addresses to + be sent unqualified via the SMTP connection; normally + they are qualified with the masquerade name, which + defaults to the name of the hub machine). No mailers + should be defined. No aliasing or forwarding is done. + +local_lmtp Use an LMTP capable local mailer. The argument to this + feature is the pathname of an LMTP capable mailer. By + default, mail.local is used. This is expected to be the + mail.local which came with the 8.9 distribution which is + LMTP capable. The path to mail.local is set by the + confEBINDIR m4 variable -- making the default + LOCAL_MAILER_PATH /usr/libexec/mail.local. + +local_procmail Use procmail as the local mailer. This mailer can + make use of the "user+indicator@local.host" syntax; + normally the +indicator is just tossed, but by default + it is passed as the -a argument to procmail. The + argument to this feature is the pathname of procmail, + which defaults to PROCMAIL_MAILER_PATH. Note that this + does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS + for the local mailer; tweak LOCAL_MAILER_FLAGS and + LOCAL_MAILER_ARGS instead. + +bestmx_is_local Accept mail as though locally addressed for any host that + lists us as the best possible MX record. This generates + additional DNS traffic, but should be OK for low to + medium traffic hosts. The argument may be a set of + domains, which will limit the feature to only apply to + these domains -- this will reduce unnecessary DNS + traffic. THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH + WILDCARD MX RECORDS!!! If you have a wildcard MX record + that matches your domain, you cannot use this feature. + +smrsh Use the SendMail Restricted SHell (smrsh) provided + with the distribution instead of /bin/sh for mailing + to programs. This improves the ability of the local + system administrator to control what gets run via + e-mail. If an argument is provided it is used as the + pathname to smrsh; otherwise, the path defined by + confEBINDIR is used for the smrsh binary -- by default, + /usr/libexec/smrsh is assumed. + +promiscuous_relay + By default, the sendmail configuration files do not permit + mail relaying (that is, accepting mail from outside your + domain and sending it to another host outside your domain). + This option sets your site to allow mail relaying from any + site to any site. In general, it is better to control the + relaying more carefully with the access db and the 'R' + class ($=R). Domains can be added to class 'R' by the + macros RELAY_DOMAIN or RELAY_DOMAIN_FILE (analogously to + MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). + +relay_entire_domain + By default, only hosts listed as RELAY in the access db + will be allowed to relay. This option also allows any + host in your domain as defined by the 'm' class ($=m). + +relay_hosts_only + By default, names that are listed as RELAY in the access + db and class 'R' ($=R) are domain names, not host names. + For example, if you specify ``foo.com'', then mail to or + from foo.com, abc.foo.com, or a.very.deep.domain.foo.com + will all be accepted for relaying. This feature changes + the behaviour to lookup individual host names only. + +relay_based_on_MX + Turns on the ability to allow relaying based on the MX + records of the host portion of an incoming recipient. See + description below for more information before using this + feature. + +relay_local_from + Allows relaying if the domain portion of the mail sender + is a local host. This should only be used if absolutely + necessary as it opens a window for spammers. + +accept_unqualified_senders + Normally, MAIL FROM: commands in the SMTP session will be + refused if the connection is a network connection and the + sender address does not include a domain name. If your + setup sends local mail unqualified (i.e. MAIL FROM: <joe>), + you will need to use this feature to accept unqualified + sender addresses. + +accept_unresolvable_domains + Normally, MAIL FROM: commands in the SMTP session will be + refused if the host part of the argument to MAIL FROM: cannot + be located in the host name service (e.g., DNS). If you are + inside a firewall that has only a limited view of the + Internet host name space, this could cause problems. In this + case you probably want to use this feature to accept all + domains on input, even if they are unresolvable. + +access_db Turns on the access database feature. The access db gives + you the ability to allow or refuse to accept mail from + specified domains for administrative reasons. By default, + the access database specification is + ``hash -o /etc/mail/access''. The format of the + database is described below. + +blacklist_recipients + Turns on the ability to block incoming mail for certain + recipient usernames, hostnames, or addresses. For + example, you can block incoming mail to user nobody, + host foo.mydomain.com, or guest@bar.mydomain.com. + These specifications are put in the access db as + described below. + +rbl Turns on rejection of hosts found in the Realtime Blackhole + List. If an argument is provided it is used as the + name sever to contact; otherwise, the main RBL server at + rbl.maps.vix.com is used. For details, see + http://maps.vix.com/rbl/. + +loose_relay_check + Normally, if a recipient using % addressing is used, e.g. + user%site@othersite, and othersite is in class 'R', the + check_rcpt ruleset will strip @othersite and recheck + user@site for relaying. This feature changes that + behavior. It should not be needed for most installations. + + ++-------+ +| HACKS | ++-------+ + +Some things just can't be called features. To make this clear, +they go in the hack subdirectory and are referenced using the HACK +macro. These will tend to be site-dependent. The release +includes the Berkeley-dependent "cssubdomain" hack (that makes +sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; +this is intended as a short-term aid while we move hosts into +subdomains. + + ++--------------------+ +| SITE CONFIGURATION | ++--------------------+ + + ***************************************************** + * This section is really obsolete, and is preserved * + * only for back compatibility. You should plan on * + * using mailertables for new installations. In * + * particular, it doesn't work for the newer forms * + * of UUCP mailers, such as uucp-uudom. * + ***************************************************** + +Complex sites will need more local configuration information, such as +lists of UUCP hosts they speak with directly. This can get a bit more +tricky. For an example of a "complex" site, see cf/ucbvax.mc. + +If your host is known by several different names, you need to augment +the $=w class. This is a list of names by which you are known, and +anything sent to an address using a host name in this list will be +treated as local mail. You can do this in two ways: either create +the file /etc/sendmail.cw containing a list of your aliases (one per +line), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the +line: + + Cw alias.host.name + +at the end of that file. See the ``vangogh.mc'' file for an example. +Be sure you use the fully-qualified name of the host, rather than a +short name. + +The SITECONFIG macro allows you to indirectly reference site-dependent +configuration information stored in the siteconfig subdirectory. For +example, the line + + SITECONFIG(uucp.ucbvax, ucbvax, U) + +reads the file uucp.ucbvax for local connection information. The +second parameter is the local name (in this case just "ucbvax" since +it is locally connected, and hence a UUCP hostname). The third +parameter is the name of both a macro to store the local name (in +this case, $U) and the name of the class (e.g., $=U) in which to store +the host information read from the file. Another SITECONFIG line reads + + SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) + +This says that the file uucp.ucbarpa contains the list of UUCP sites +connected to ucbarpa.Berkeley.EDU. The $=W class will be used to +store this list, and $W is defined to be ucbarpa.Berkeley.EDU, that +is, the name of the relay to which the hosts listed in uucp.ucbarpa +are connected. [The machine ucbarpa is gone now, but I've left +this out-of-date configuration file around to demonstrate how you +might do this.] + +Note that the case of SITECONFIG with a third parameter of ``U'' is +special; the second parameter is assumed to be the UUCP name of the +local site, rather than the name of a remote site, and the UUCP name +is entered into $=w (the list of local hostnames) as $U.UUCP. + +The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing +more than a sequence of SITE macros describing connectivity. For +example: + + SITE(cnmat) + SITE(sgi olympus) + +The second example demonstrates that you can use two names on the +same line; these are usually aliases for the same host (or are at +least in the same company). + + ++--------------------+ +| USING UUCP MAILERS | ++--------------------+ + +It's hard to get UUCP mailers right because of the extremely ad hoc +nature of UUCP addressing. These config files are really designed +for domain-based addressing, even for UUCP sites. + +There are four UUCP mailers available. The choice of which one to +use is partly a matter of local preferences and what is running at +the other end of your UUCP connection. Unlike good protocols that +define what will go over the wire, UUCP uses the policy that you +should do what is right for the other end; if they change, you have +to change. This makes it hard to do the right thing, and discourages +people from updating their software. In general, if you can avoid +UUCP, please do. + +The major choice is whether to go for a domainized scheme or a +non-domainized scheme. This depends entirely on what the other +end will recognize. If at all possible, you should encourage the +other end to go to a domain-based system -- non-domainized addresses +don't work entirely properly. + +The four mailers are: + + uucp-old (obsolete name: "uucp") + This is the oldest, the worst (but the closest to UUCP) way of + sending messages accros UUCP connections. It does bangify + everything and prepends $U (your UUCP name) to the sender's + address (which can already be a bang path itself). It can + only send to one address at a time, so it spends a lot of + time copying duplicates of messages. Avoid this if at all + possible. + + uucp-new (obsolete name: "suucp") + The same as above, except that it assumes that in one rmail + command you can specify several recipients. It still has a + lot of other problems. + + uucp-dom + This UUCP mailer keeps everything as domain addresses. + Basically, it uses the SMTP mailer rewriting rules. This mailer + is only included if MAILER(smtp) is also specified. + + Unfortunately, a lot of UUCP mailer transport agents require + bangified addresses in the envelope, although you can use + domain-based addresses in the message header. (The envelope + shows up as the From_ line on UNIX mail.) So.... + + uucp-uudom + This is a cross between uucp-new (for the envelope addresses) + and uucp-dom (for the header addresses). It bangifies the + envelope sender (From_ line in messages) without adding the + local hostname, unless there is no host name on the address + at all (e.g., "wolf") or the host component is a UUCP host name + instead of a domain name ("somehost!wolf" instead of + "some.dom.ain!wolf"). This is also included only if MAILER(smtp) + is also specified. + +Examples: + +We are on host grasp.insa-lyon.fr (UUCP host name "grasp"). The +following summarizes the sender rewriting for various mailers. + +Mailer sender rewriting in the envelope +------ ------ ------------------------- +uucp-{old,new} wolf grasp!wolf +uucp-dom wolf wolf@grasp.insa-lyon.fr +uucp-uudom wolf grasp.insa-lyon.fr!wolf + +uucp-{old,new} wolf@fr.net grasp!fr.net!wolf +uucp-dom wolf@fr.net wolf@fr.net +uucp-uudom wolf@fr.net fr.net!wolf + +uucp-{old,new} somehost!wolf grasp!somehost!wolf +uucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr +uucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf + +If you are using one of the domainized UUCP mailers, you really want +to convert all UUCP addresses to domain format -- otherwise, it will +do it for you (and probably not the way you expected). For example, +if you have the address foo!bar!baz (and you are not sending to foo), +the heuristics will add the @uucp.relay.name or @local.host.name to +this address. However, if you map foo to foo.host.name first, it +will not add the local hostname. You can do this using the uucpdomain +feature. + + ++-------------------+ +| TWEAKING RULESETS | ++-------------------+ + +For more complex configurations, you can define special rules. +The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing +the names. Any modifications made here are reflected in the header. + +A common use is to convert old UUCP addresses to SMTP addresses using +the UUCPSMTP macro. For example: + + LOCAL_RULE_3 + UUCPSMTP(decvax, decvax.dec.com) + UUCPSMTP(research, research.att.com) + +will cause addresses of the form "decvax!user" and "research!user" +to be converted to "user@decvax.dec.com" and "user@research.att.com" +respectively. + +This could also be used to look up hosts in a database map: + + LOCAL_RULE_3 + R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 + +This map would be defined in the LOCAL_CONFIG portion, as shown below. + +Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. +For example, new rules are needed to parse hostnames that you accept +via MX records. For example, you might have: + + LOCAL_RULE_0 + R$+ <@ host.dom.ain.> $#uucp $@ cnmat $: $1 < @ host.dom.ain.> + +You would use this if you had installed an MX record for cnmat.Berkeley.EDU +pointing at this host; this rule catches the message and forwards it on +using UUCP. + +You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. +These rulesets are normally empty. + +A similar macro is LOCAL_CONFIG. This introduces lines added after the +boilerplate option setting but before rulesets, and can be used to +declare local database maps or whatever. For example: + + LOCAL_CONFIG + Khostmap hash /etc/hostmap.db + Kyplocal nis -m hosts.byname + + ++---------------------------+ +| MASQUERADING AND RELAYING | ++---------------------------+ + +You can have your host masquerade as another using + + MASQUERADE_AS(host.domain) + +This causes mail being sent to be labeled as coming from the +indicated host.domain, rather than $j. One normally masquerades as +one of one's own subdomains (for example, it's unlikely that I would +choose to masquerade as an MIT site). This behaviour is modified by +a plethora of FEATUREs; in particular, see masquerade_envelope, +allmasquerade, limited_masquerade, and masquerade_entire_domain. + +The masquerade name is not normally canonified, so it is important +that it be your One True Name, that is, fully qualified and not a +CNAME. However, if you use a CNAME, the receiving side may canonify +it for you, so don't think you can cheat CNAME mapping this way. + +Normally the only addresses that are masqueraded are those that come +from this host (that is, are either unqualified or in $=w, the list +of local domain names). You can augment this list using + + MASQUERADE_DOMAIN(otherhost.domain) + +The effect of this is that although mail to user@otherhost.domain +will not be delivered locally, any mail including any user@otherhost.domain +will, when relayed, be rewritten to have the MASQUERADE_AS address. +This can be a space-separated list of names. + +If these names are in a file, you can use + + MASQUERADE_DOMAIN_FILE(filename) + +to read the list of names from the indicated file. + +Normally only header addresses are masqueraded. If you want to +masquerade the envelope as well, use + + FEATURE(masquerade_envelope) + +There are always users that need to be "exposed" -- that is, their +internal site name should be displayed instead of the masquerade name. +Root is an example. You can add users to this list using + + EXPOSED_USER(usernames) + +This adds users to class E; you could also use something like + + FE/etc/sendmail.cE + +You can also arrange to relay all unqualified names (that is, names +without @host) to a relay host. For example, if you have a central +email server, you might relay to that host so that users don't have +to have .forward files or aliases. You can do this using + + define(`LOCAL_RELAY', mailer:hostname) + +The ``mailer:'' can be omitted, in which case the mailer defaults to +"relay". There are some user names that you don't want relayed, perhaps +because of local aliases. A common example is root, which may be +locally aliased. You can add entries to this list using + + LOCAL_USER(usernames) + +This adds users to class L; you could also use something like + + FL/etc/sendmail.cL + +If you want all incoming mail sent to a centralized hub, as for a +shared /var/spool/mail scheme, use + + define(`MAIL_HUB', mailer:hostname) + +Again, ``mailer:'' defaults to "relay". If you define both LOCAL_RELAY +and MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will +be sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB. +Names in $=L will be delivered locally, so you MUST have aliases or +.forward files for them. + +For example, if you are on machine mastodon.CS.Berkeley.EDU and you have +FEATURE(stickyhost), the following combinations of settings will have the +indicated effects: + +email sent to.... eric eric@mastodon.CS.Berkeley.EDU + +LOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) +mail.CS.Berkeley.EDU (no local aliasing) (aliasing done) + +MAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU +mammoth.CS.Berkeley.EDU (aliasing done) (aliasing done) + +Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU +MAIL_HUB set as above (no local aliasing) (aliasing done) + +If you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and +MAIL_HUB act identically, with MAIL_HUB taking precedence. + +If you want all outgoing mail to go to a central relay site, define +SMART_HOST as well. Briefly: + + LOCAL_RELAY applies to unqualified names (e.g., "eric"). + MAIL_HUB applies to names qualified with the name of the + local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). + SMART_HOST applies to names qualified with other hosts. + +However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, +DECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you +really want absolutely everything to go to a single central site you will +need to unset all the other relays -- or better yet, find or build a +minimal config file that does this. + +For duplicate suppression to work properly, the host name is best +specified with a terminal dot: + + define(`MAIL_HUB', `host.domain.') + note the trailing dot ---^ + + ++---------------------------------+ +| ANTI-SPAM CONFIGURATION CONTROL | ++---------------------------------+ + +The primary anti-spam features available in sendmail are: + +* Relaying is denied by default. +* Better checking on sender information. +* Access database. +* Header checks. + +Relaying (transmission of messages from a site outside your domain to +another site outside your domain) is denied by default. Note that +this changed in sendmail 8.9; previous versions allowed relaying by +default. If you want to revert to the old behaviour, you will need +to use FEATURE(promiscuous_relay). You can allow certain domains to +relay through your server by adding their domain name or IP address to +class 'R' ($=R) using RELAY_DOMAIN() and RELAY_DOMAIN_FILE() or via the +access database (described below). + +If you use + + FEATURE(relay_entire_domain) + +then any host in any of your local domains (that is, the $=m class) +will be relayed. + +You can also allow relaying based on the MX records of the host +portion of an incoming recipient address by using + + FEATURE(relay_based_on_MX) + +For example, if your server receives a recipient of user@domain.com +and domain.com lists your server in its MX records, the mail will be +accepted. Note that this will stop spammers from using your host to +relay spam but it will not stop outsiders from using your server as a +relay for their site. Along the same lines, + + FEATURE(relay_local_from) + +will allow relaying if the sender specifies a return path (i.e. +MAIL FROM: <user@domain>) domain which is a local domain. This a +dangerous feature as it will allow spammers to spam using your mail +server by simply specifying a return address of user@your.domain.com. +It should not be used unless absolutely necessary. + +If source routing is used in the recipient address (i.e. +RCPT TO: <user%site.com@othersite.com>), sendmail will check +user@site.com for relaying if othersite.com is an allowed relay host +in either class 'R', class 'm' if FEATURE(relay_entire_domain) is used, +or the access database if FEATURE(access_db) is used. To prevent +the address from being stripped down, use: + + FEATURE(loose_relay_check) + +If you think you need to use this feature, you probably do not. This +should only be used for sites which have no control over the addresses +that they provide a gateway for. Use this FEATURE with caution as it +can allow spammers to relay through your server if not setup properly. + +As of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has +an unresolvable domain (i.e., one that DNS, your local name service, +or special case rules in ruleset 3 cannot locate). If you want to +continue to accept such domains, e.g. because you are inside a +firewall that has only a limited view of the Internet host name space +(note that you will not be able to return mail to them unless you have +some "smart host" forwarder), use + + FEATURE(accept_unresolvable_domains) + +sendmail will also refuse mail if the MAIL FROM: parameter is not +fully qualified (i.e., contains a domain as well as a user). If you +want to continue to accept such senders, use + + FEATURE(accept_unqualified_senders) + +An ``access'' database can be created to accept or reject mail from +selected domains. For example, you may choose to reject all mail +originating from known spammers. To enable such a database, use + + FEATURE(access_db) + +The FEATURE macro can accept a second parameter giving the key file +definition for the database; for example + + FEATURE(access_db, hash -o /etc/mail/access) + +The table itself uses e-mail addresses, domain names, and network +numbers as keys. For example, + + spammer@aol.com REJECT + cyberspammer.com REJECT + 206.117.147 REJECT + +would refuse mail from spammer@aol.com, any user from cyberspammer.com +(or any host within the cyberspammer.com domain), and any host on the +206.117.147.* network. + +The value part of the map can contain: + + OK accept mail even if other rules in the + running ruleset would reject it. + RELAY Allow domain to relay through your SMTP + server. RELAY also serves an implicit + OK for the other checks. + REJECT reject the sender/recipient with a general + purpose message. + DISCARD discard the message completely using + the $#discard mailer + ### any text where ### is an RFC 821 compliant error code + and "any text" is a message to return for + the command. + +For example: + + cyberspammer.com 550 We don't accept mail from spammers + okay.cyberspammer.com OK + sendmail.org OK + 128.32 RELAY + +would accept mail from okay.cyberspammer.com, but would reject mail +from all other hosts at cyberspammer.com with the indicated message. +It would allow accept mail from any hosts in the sendmail.org domain, +and allow relaying for the 128.32.*.* network. Note, UUCP users may +need to add hostname.UUCP to the access database or class 'R' ($=R). +If you also use: + + FEATURE(relay_hosts_only) + +then the above example will allow relaying for sendmail.org, but not +hosts within the sendmail.org domain. Note that this will also require +hosts listed in class 'R' ($=R) to be fully qualified host names. + +You can also use the access database to block sender addresses based on +the username portion of the address. For example: + + FREE.STEALTH.MAILER@ 550 Spam not accepted + +Note that you must include the @ after the username to signify that +this database entry is for checking only the username portion of the +sender address. + +If you use: + + FEATURE(blacklist_recipients) + +then you can add entries to the map for local users, hosts in your +domains, or addresses in your domain which should not receive mail: + + badlocaluser 550 Mailbox disabled for this username + host.mydomain.com 550 That host does not accept mail + user@otherhost.mydomain.com 550 Mailbox disabled for this recipient + +This would prevent a recipient of badlocaluser@mydomain.com, any +user at host.mydomain.com, and the single address +user@otherhost.mydomain.com from receiving mail. + +There is also a ``Realtime Blackhole List'' run by the MAPS project +at http://maps.vix.com/. This is a database maintained in DNS of +spammers. To use this database, use + + FEATURE(rbl) + +This will cause sendmail to reject mail from any site in the +Realtime Blackhole List database. You can specify an alternative +RBL name server to contact by specifying an argument to the FEATURE. + +The features described above make use of the check_relay, check_mail, +and check_rcpt rulesets. If you wish to include your own checks, +you can put your checks in the rulesets Local_check_relay, +Local_check_mail, and Local_check_rcpt. For example if you wanted to +block senders with all numeric usernames (i.e. 2312343@bigisp.com), +you would use Local_check_mail and the new regex map: + + LOCAL_CONFIG + Kallnumbers regex -a@MATCH ^[0-9]+$ + + LOCAL_RULESETS + SLocal_check_mail + # check address against various regex checks + R$* $: $>Parse0 $>3 $1 + R$+ < @ bigisp.com. > $* $: $(allnumbers $1 $) + R@MATCH $#error $: 553 Header Error + +These rules are called with the original arguments of the corresponding +check_* ruleset. If the local ruleset returns $#OK, no further checking +is done by the features described above and the mail is accepted. If the +local ruleset resolves to a mailer (such as $#error or $#discard), the +appropriate action is taken. Otherwise, the results of the local +rewriting are ignored. + + +You can also reject mail on the basis of the contents of headers. +This is done by adding a ruleset call to the 'H' header definition command +in sendmail.cf. For example, this can be used to check the validity of +a Message-ID: header: + + LOCAL_RULESETS + HMessage-Id: $>CheckMessageId + + SCheckMessageId + R< $+ @ $+ > $@ OK + R$* $#error $: 553 Header Error + + ++--------------------------------+ +| ADDING NEW MAILERS OR RULESETS | ++--------------------------------+ + +Sometimes you may need to add entirely new mailers or rulesets. They +should be introduced with the constructs MAILER_DEFINITIONS and +LOCAL_RULESETS respectively. For example: + + MAILER_DEFINITIONS + Mmymailer, ... + ... + + LOCAL_RULESETS + Smyruleset + ... + + ++-------------------------------+ +| NON-SMTP BASED CONFIGURATIONS | ++-------------------------------+ + +These configuration files are designed primarily for use by SMTP-based +sites. I don't pretend that they are well tuned for UUCP-only or +UUCP-primarily nodes (the latter is defined as a small local net +connected to the rest of the world via UUCP). However, there is one +hook to handle some special cases. + +You can define a ``smart host'' that understands a richer address syntax +using: + + define(`SMART_HOST', mailer:hostname) + +In this case, the ``mailer:'' defaults to "relay". Any messages that +can't be handled using the usual UUCP rules are passed to this host. + +If you are on a local SMTP-based net that connects to the outside +world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. +For example: + + define(`SMART_HOST', suucp:uunet) + LOCAL_NET_CONFIG + R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 + +This will cause all names that end in your domain name ($m) via +SMTP; anything else will be sent via suucp (smart UUCP) to uunet. +If you have FEATURE(nocanonify), you may need to omit the dots after +the $m. If you are running a local DNS inside your domain which is +not otherwise connected to the outside world, you probably want to +use: + + define(`SMART_HOST', smtp:fire.wall.com) + LOCAL_NET_CONFIG + R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 + +That is, send directly only to things you found in your DNS lookup; +anything else goes through SMART_HOST. + +You may need to turn off the anti-spam rules in order to accept +UUCP mail with FEATURE(promiscuous_relay) and +FEATURE(accept_unresolvable_domains). + + ++-----------+ +| WHO AM I? | ++-----------+ + +Normally, the $j macro is automatically defined to be your fully +qualified domain name (FQDN). Sendmail does this by getting your +host name using gethostname and then calling gethostbyname on the +result. For example, in some environments gethostname returns +only the root of the host name (such as "foo"); gethostbyname is +supposed to return the FQDN ("foo.bar.com"). In some (fairly rare) +cases, gethostbyname may fail to return the FQDN. In this case +you MUST define confDOMAIN_NAME to be your fully qualified domain +name. This is usually done using: + + Dmbar.com + define(`confDOMAIN_NAME', `$w.$m')dnl + + ++--------------------+ +| USING MAILERTABLES | ++--------------------+ + +To use FEATURE(mailertable), you will have to create an external +database containing the routing information for various domains. +For example, a mailertable file in text format might be: + + .my.domain xnet:%1.my.domain + uuhost1.my.domain suucp:uuhost1 + .bitnet smtp:relay.bit.net + +This should normally be stored in /etc/mailertable. The actual +database version of the mailertable is built using: + + makemap hash /etc/mailertable.db < /etc/mailertable + +The semantics are simple. Any LHS entry that does not begin with +a dot matches the full host name indicated. LHS entries beginning +with a dot match anything ending with that domain name -- that is, +they can be thought of as having a leading "*" wildcard. Matching +is done in order of most-to-least qualified -- for example, even +though ".my.domain" is listed first in the above example, an entry +of "uuhost1.my.domain" will match the second entry since it is +more explicit. + +The RHS should always be a "mailer:host" pair. The mailer is the +configuration name of a mailer (that is, an `M' line in the +sendmail.cf file). The "host" will be the hostname passed to +that mailer. In domain-based matches (that is, those with leading +dots) the "%1" may be used to interpolate the wildcarded part of +the host name. For example, the first line above sends everything +addressed to "anything.my.domain" to that same host name, but using +the (presumably experimental) xnet mailer. + +In some cases you may want to temporarily turn off MX records, +particularly on gateways. For example, you may want to MX +everything in a domain to one machine that then forwards it +directly. To do this, you might use the DNS configuration: + + *.domain. IN MX 0 relay.machine + +and on relay.machine use the mailertable: + + .domain smtp:[gateway.domain] + +The [square brackets] turn off MX records for this host only. +If you didn't do this, the mailertable would use the MX record +again, which would give you an MX loop. + + ++--------------------------------+ +| USING USERDB TO MAP FULL NAMES | ++--------------------------------+ + +The user database was not originally intended for mapping full names +to login names (e.g., Eric.Allman => eric), but some people are using +it that way. (I would recommend that you set up aliases for this +purpose instead -- since you can specify multiple alias files, this +is fairly easy.) The intent was to locate the default maildrop at +a site, but allow you to override this by sending to a specific host. + +If you decide to set up the user database in this fashion, it is +imperative that you not use FEATURE(stickyhost) -- otherwise, +e-mail sent to Full.Name@local.host.name will be rejected. + +To build the internal form of the user database, use: + + makemap btree /usr/data/base.db < /usr/data/base.txt + +As a general rule, I am adamantly opposed to using full names as +e-mail addresses, since they are not in any sense unique. For example, +the Unix software-development community has two Andy Tannenbaums, +at least two well-known Peter Deutsches, and at one time Bell Labs +had two Stephen R. Bournes with offices along the same hallway. +Which one will be forced to suffer the indignity of being +Stephen_R_Bourne_2? The less famous of the two, or the one that +was hired later? + +Finger should handle full names (and be fuzzy). Mail should use +handles, and not be fuzzy. [Not that I expect anyone to pay any +attention to my opinions.] + + ++--------------------------------+ +| MISCELLANEOUS SPECIAL FEATURES | ++--------------------------------+ + +Plussed users + Sometimes it is convenient to merge configuration on a + centralized mail machine, for example, to forward all + root mail to a mail server. In this case it might be + useful to be able to treat the root addresses as a class + of addresses with subtle differences. You can do this + using plussed users. For example, a client might include + the alias: + + root: root+client1@server + + On the server, this will match an alias for "root+client1". + If that is not found, the alias "root+*" will be tried, + then "root". + +LDAP + For notes on use LDAP in sendmail, see + http://www.stanford.edu/~bbense/Inst.html + + + ++----------------+ +| SECURITY NOTES | ++----------------+ + +A lot of sendmail security comes down to you. Sendmail 8 is much +more careful about checking for security problems than previous +versions, but there are some things that you still need to watch +for. In particular: + +* Make sure the aliases file isn't writable except by trusted + system personnel. This includes both the text and database + version. + +* Make sure that other files that sendmail reads, such as the + mailertable, are only writable by trusted system personnel. + +* The queue directory should not be world writable PARTICULARLY + if your system allows "file giveaways" (that is, if a non-root + user can chown any file they own to any other user). + +* If your system allows file giveaways, DO NOT create a publically + writable directory for forward files. This will allow anyone + to steal anyone else's e-mail. Instead, create a script that + copies the .forward file from users' home directories once a + night (if you want the non-NFS-mounted forward directory). + +* If your system allows file giveaways, you'll find that + sendmail is much less trusting of :include: files -- in + particular, you'll have to have /SENDMAIL/ANY/SHELL/ in + /etc/shells before they will be trusted (that is, before + files and programs listed in them will be honored). + +In general, file giveaways are a mistake -- if you can turn them +off I recommend you do so. + + ++--------------------------------+ +| TWEAKING CONFIGURATION OPTIONS | ++--------------------------------+ + +There are a large number of configuration options that don't normally +need to be changed. However, if you feel you need to tweak them, you +can define the following M4 variables. This list is shown in four +columns: the name you define, the default value for that definition, +the option or macro that is affected (either Ox for an option or Dx +for a macro), and a brief description. Greater detail of the semantics +can be found in the Installation and Operations Guide. + +Some options are likely to be deprecated in future versions -- that is, +the option is only included to provide back-compatibility. These are +marked with "*". + +Remember that these options are M4 variables, and hence may need to +be quoted. In particular, arguments with commas will usually have to +be ``double quoted, like this phrase'' to avoid having the comma +confuse things. This is common for alias file definitions and for +the read timeout. + +M4 Variable Name Configuration Description & [Default] +================ ============= ======================= +confMAILER_NAME $n macro [MAILER-DAEMON] The sender name used + for internally generated outgoing + messages. +confDOMAIN_NAME $j macro If defined, sets $j. This should + only be done if your system cannot + determine your local domain name, + and then it should be set to + $w.Foo.COM, where Foo.COM is your + domain name. +confCF_VERSION $Z macro If defined, this is appended to the + configuration version name. +confFROM_HEADER From: [$?x$x <$g>$|$g$.] The format of an + internally generated From: address. +confRECEIVED_HEADER Received: + [$?sfrom $s $.$?_($?s$|from $.$_) + $.by $j ($v/$Z)$?r with $r$. id $i$?u + for $u; $|; + $.$b] + The format of the Received: header + in messages passed through this host. + It is unwise to try to change this. +confCW_FILE Fw class [/etc/sendmail.cw] Name of file used + to get the local additions to the $=w + (local host names) class. +confCT_FILE Ft class [/etc/sendmail.ct] Name of file used + to get the local additions to the $=t + (trusted users) class. +confCR_FILE FR class [/etc/mail/relay-domains] Name of + file used to get the local additions + to the $=R (hosts allowed to relay) + class. +confTRUSTED_USERS Ct class [no default] Names of users to add to + the list of trusted users. This list + always includes root, uucp, and daemon. + See also FEATURE(use_ct_file). +confSMTP_MAILER - [esmtp] The mailer name used when + SMTP connectivity is required. + One of "smtp", "smtp8", or "esmtp". +confUUCP_MAILER - [uucp-old] The mailer to be used by + default for bang-format recipient + addresses. See also discussion of + $=U, $=Y, and $=Z in the MAILER(uucp) + section. +confLOCAL_MAILER - [local] The mailer name used when + local connectivity is required. + Almost always "local". +confRELAY_MAILER - [relay] The default mailer name used + for relaying any mail (e.g., to a + BITNET_RELAY, a SMART_HOST, or + whatever). This can reasonably be + "uucp-new" if you are on a + UUCP-connected site. +confSEVEN_BIT_INPUT SevenBitInput [False] Force input to seven bits? +confEIGHT_BIT_HANDLING EightBitMode [pass8] 8-bit data handling +confALIAS_WAIT AliasWait [10m] Time to wait for alias file + rebuild until you get bored and + decide that the apparently pending + rebuild failed. +confMIN_FREE_BLOCKS MinFreeBlocks [100] Minimum number of free blocks on + queue filesystem to accept SMTP mail. + (Prior to 8.7 this was minfree/maxsize, + where minfree was the number of free + blocks and maxsize was the maximum + message size. Use confMAX_MESSAGE_SIZE + for the second value now.) +confMAX_MESSAGE_SIZE MaxMessageSize [infinite] The maximum size of messages + that will be accepted (in bytes). +confBLANK_SUB BlankSub [.] Blank (space) substitution + character. +confCON_EXPENSIVE HoldExpensive [False] Avoid connecting immediately + to mailers marked expensive? +confCHECKPOINT_INTERVAL CheckpointInterval + [10] Checkpoint queue files every N + recipients. +confDELIVERY_MODE DeliveryMode [background] Default delivery mode. +confAUTO_REBUILD AutoRebuildAliases + [False] Automatically rebuild alias + file if needed. +confERROR_MODE ErrorMode [print] Error message mode. +confERROR_MESSAGE ErrorHeader [undefined] Error message header/file. +confSAVE_FROM_LINES SafeFromLine Save extra leading From_ lines. +confTEMP_FILE_MODE TempFileMode [0600] Temporary file mode. +confMATCH_GECOS MatchGECOS [False] Match GECOS field. +confMAX_HOP MaxHopCount [25] Maximum hop count. +confIGNORE_DOTS* IgnoreDots [False; always False in -bs or -bd mode] + Ignore dot as terminator for incoming + messages? +confBIND_OPTS ResolverOptions [undefined] Default options for DNS + resolver. +confMIME_FORMAT_ERRORS* SendMimeErrors [True] Send error messages as MIME- + encapsulated messages per RFC 1344. +confFORWARD_PATH ForwardPath [$z/.forward.$w:$z/.forward] + The colon-separated list of places to + search for .forward files. N.B.: see + the Security Notes section. +confMCI_CACHE_SIZE ConnectionCacheSize + [2] Size of open connection cache. +confMCI_CACHE_TIMEOUT ConnectionCacheTimeout + [5m] Open connection cache timeout. +confHOST_STATUS_DIRECTORY HostStatusDirectory + [undefined] If set, host status is kept + on disk between sendmail runs in the + named directory tree. This need not be + a full pathname, in which case it is + interpreted relative to the queue + directory. +confSINGLE_THREAD_DELIVERY SingleThreadDelivery + [False] If this option and the + HostStatusDirectory option are both + set, single thread deliveries to other + hosts. That is, don't allow any two + sendmails on this host to connect + simultaneously to any other single + host. This can slow down delivery in + some cases, in particular since a + cached but otherwise idle connection + to a host will prevent other sendmails + from connecting to the other host. +confUSE_ERRORS_TO* UserErrorsTo [False] Use the Errors-To: header to + deliver error messages. This should + not be necessary because of general + acceptance of the envelope/header + distinction. +confLOG_LEVEL LogLevel [9] Log level. +confME_TOO MeToo [False] Include sender in group + expansions. +confCHECK_ALIASES CheckAliases [False] Check RHS of aliases when + running newaliases. Since this does + DNS lookups on every address, it can + slow down the alias rebuild process + considerably on large alias files. +confOLD_STYLE_HEADERS* OldStyleHeaders [True] Assume that headers without + special chars are old style. +confDAEMON_OPTIONS DaemonPortOptions + [none] SMTP daemon options. +confPRIVACY_FLAGS PrivacyOptions [authwarnings] Privacy flags. +confCOPY_ERRORS_TO PostmasterCopy [undefined] Address for additional + copies of all error messages. +confQUEUE_FACTOR QueueFactor [600000] Slope of queue-only function. +confDONT_PRUNE_ROUTES DontPruneRoutes [False] Don't prune down route-addr + syntax addresses to the minimum + possible. +confSAFE_QUEUE* SuperSafe [True] Commit all messages to disk + before forking. +confTO_INITIAL Timeout.initial [5m] The timeout waiting for a response + on the initial connect. +confTO_CONNECT Timeout.connect [0] The timeout waiting for an initial + connect() to complete. This can only + shorten connection timeouts; the kernel + silently enforces an absolute maximum + (which varies depending on the system). +confTO_ICONNECT Timeout.iconnect + [undefined] Like Timeout.connect, but + applies only to the very first attempt + to connect to a host in a message. + This allows a single very fast pass + followed by more careful delivery + attempts in the future. +confTO_HELO Timeout.helo [5m] The timeout waiting for a response + to a HELO or EHLO command. +confTO_MAIL Timeout.mail [10m] The timeout waiting for a + response to the MAIL command. +confTO_RCPT Timeout.rcpt [1h] The timeout waiting for a response + to the RCPT command. +confTO_DATAINIT Timeout.datainit + [5m] The timeout waiting for a 354 + response from the DATA command. +confTO_DATABLOCK Timeout.datablock + [1h] The timeout waiting for a block + during DATA phase. +confTO_DATAFINAL Timeout.datafinal + [1h] The timeout waiting for a response + to the final "." that terminates a + message. +confTO_RSET Timeout.rset [5m] The timeout waiting for a response + to the RSET command. +confTO_QUIT Timeout.quit [2m] The timeout waiting for a response + to the QUIT command. +confTO_MISC Timeout.misc [2m] The timeout waiting for a response + to other SMTP commands. +confTO_COMMAND Timeout.command [1h] In server SMTP, the timeout waiting + for a command to be issued. +confTO_IDENT Timeout.ident [30s] The timeout waiting for a response + to an IDENT query. +confTO_FILEOPEN Timeout.fileopen + [60s] The timeout waiting for a file + (e.g., :include: file) to be opened. +confTO_QUEUERETURN Timeout.queuereturn + [5d] The timeout before a message is + returned as undeliverable. +confTO_QUEUERETURN_NORMAL + Timeout.queuereturn.normal + [undefined] As above, for normal + priority messages. +confTO_QUEUERETURN_URGENT + Timeout.queuereturn.urgent + [undefined] As above, for urgent + priority messages. +confTO_QUEUERETURN_NONURGENT + Timeout.queuereturn.non-urgent + [undefined] As above, for non-urgent + (low) priority messages. +confTO_QUEUEWARN Timeout.queuewarn + [4h] The timeout before a warning + message is sent to the sender telling + them that the message has been deferred. +confTO_QUEUEWARN_NORMAL Timeout.queuewarn.normal + [undefined] As above, for normal + priority messages. +confTO_QUEUEWARN_URGENT Timeout.queuewarn.urgent + [undefined] As above, for urgent + priority messages. +confTO_QUEUEWARN_NONURGENT + Timeout.queuewarn.non-urgent + [undefined] As above, for non-urgent + (low) priority messages. +confTO_HOSTSTATUS Timeout.hoststatus + [30m] How long information about host + statuses will be maintained before it + is considered stale and the host should + be retried. This applies both within + a single queue run and to persistent + information (see below). +confTIME_ZONE TimeZoneSpec [USE_SYSTEM] Time zone info -- can be + USE_SYSTEM to use the system's idea, + USE_TZ to use the user's TZ envariable, + or something else to force that value. +confDEF_USER_ID DefaultUser [1:1] Default user id. +confUSERDB_SPEC UserDatabaseSpec + [undefined] User database specification. +confFALLBACK_MX FallbackMXhost [undefined] Fallback MX host. +confTRY_NULL_MX_LIST TryNullMXList [False] If we are the best MX for a + host and haven't made other + arrangements, try connecting to the + host directly; normally this would be + a config error. +confQUEUE_LA QueueLA [8] Load average at which queue-only + function kicks in. +confREFUSE_LA RefuseLA [12] Load average at which incoming + SMTP connections are refused. +confMAX_DAEMON_CHILDREN MaxDaemonChildren + [undefined] The maximum number of + children the daemon will permit. After + this number, connections will be + rejected. If not set or <= 0, there is + no limit. +confCONNECTION_RATE_THROTTLE ConnectionRateThrottle + [undefined] The maximum number of + connections permitted per second. + After this many connections are + accepted, further connections will be + delayed. If not set or <= 0, there is + no limit. +confWORK_RECIPIENT_FACTOR + RecipientFactor [30000] Cost of each recipient. +confSEPARATE_PROC ForkEachJob [False] Run all deliveries in a separate + process. +confWORK_CLASS_FACTOR ClassFactor [1800] Priority multiplier for class. +confWORK_TIME_FACTOR RetryFactor [90000] Cost of each delivery attempt. +confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: + Priority, Host, or Time. +confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job + must sit in the queue between queue + runs. This allows you to set the + queue run interval low for better + responsiveness without trying all + jobs in each run. +confDEF_CHAR_SET DefaultCharSet [unknown-8bit] When converting + unlabeled 8 bit input to MIME, the + character set to use by default. +confSERVICE_SWITCH_FILE ServiceSwitchFile + [/etc/service.switch] The file to use + for the service switch on systems that + do not have a system-defined switch. +confHOSTS_FILE HostsFile [/etc/hosts] The file to use when doing + "file" type access of hosts names. +confDIAL_DELAY DialDelay [0s] If a connection fails, wait this + long and try again. Zero means "don't + retry". This is to allow "dial on + demand" connections to have enough time + to complete a connection. +confNO_RCPT_ACTION NoRecipientAction + [none] What to do if there are no legal + recipient fields (To:, Cc: or Bcc:) + in the message. Legal values can + be "none" to just leave the + nonconforming message as is, "add-to" + to add a To: header with all the + known recipients (which may expose + blind recipients), "add-apparently-to" + to do the same but use Apparently-To: + instead of To:, "add-bcc" to add an + empty Bcc: header, or + "add-to-undisclosed" to add the header + ``To: undisclosed-recipients:;''. +confSAFE_FILE_ENV SafeFileEnvironment + [undefined] If set, sendmail will do a + chroot() into this directory before + writing files. +confCOLON_OK_IN_ADDR ColonOkInAddr [True unless Configuration Level > 6] + If set, colons are treated as a regular + character in addresses. If not set, + they are treated as the introducer to + the RFC 822 "group" syntax. Colons are + handled properly in route-addrs. This + option defaults on for V5 and lower + configuration files. +confMAX_QUEUE_RUN_SIZE MaxQueueRunSize [0] If set, limit the maximum size of + any given queue run to this number of + entries. Essentially, this will stop + reading the queue directory after this + number of entries are reached; it does + _not_ pick the highest priority jobs, + so this should be as large as your + system can tolerate. If not set, there + is no limit. +confDONT_EXPAND_CNAMES DontExpandCnames + [False] If set, $[ ... $] lookups that + do DNS based lookups do not expand + CNAME records. This currently violates + the published standards, but the IETF + seems to be moving toward legalizing + this. For example, if "FTP.Foo.ORG" + is a CNAME for "Cruft.Foo.ORG", then + with this option set a lookup of + "FTP" will return "FTP.Foo.ORG"; if + clear it returns "Cruft.FOO.ORG". N.B. + you may not see any effect until your + downstream neighbors stop doing CNAME + lookups as well. +confFROM_LINE UnixFromLine [From $g $d] The From_ line used + when sending to files or programs. +confSINGLE_LINE_FROM_HEADER SingleLineFromHeader + [False] From: lines that have + embedded newlines are unwrapped + onto one line. +confALLOW_BOGUS_HELO AllowBogusHELO [False] Allow HELO SMTP command that + does not include a host name. +confMUST_QUOTE_CHARS MustQuoteChars [.'] Characters to be quoted in a full + name phrase (@,;:\()[] are automatic). +confOPERATORS OperatorChars [.:%@!^/[]+] Address operator + characters. +confSMTP_LOGIN_MSG SmtpGreetingMessage + [$j Sendmail $v/$Z; $b] + The initial (spontaneous) SMTP + greeting message. The word "ESMTP" + will be inserted between the first and + second words to convince other + sendmails to try to speak ESMTP. +confDONT_INIT_GROUPS DontInitGroups [False] If set, the initgroups(3) + routine will never be invoked. You + might want to do this if you are + running NIS and you have a large group + map, since this call does a sequential + scan of the map; in a large site this + can cause your ypserv to run + essentially full time. If you set + this, agents run on behalf of users + will only have their primary + (/etc/passwd) group permissions. +confUNSAFE_GROUP_WRITES UnsafeGroupWrites + [False] If set, group-writable + :include: and .forward files are + considered "unsafe", that is, programs + and files cannot be directly referenced + from such files. World-writable files + are always considered unsafe. +confDOUBLE_BOUNCE_ADDRESS DoubleBounceAddress + [postmaster] If an error occurs when + sending an error message, send that + "double bounce" error message to this + address. +confRUN_AS_USER RunAsUser [undefined] If set, become this user + when reading and delivering mail. + Causes all file reads (e.g., .forward + and :include: files) to be done as + this user. Also, all programs will + be run as this user, and all output + files will be written as this user. + Intended for use only on firewalls + where users do not have accounts. +confMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage + [infinite] If set, allow no more than + the specified number of recipients in + an SMTP envelope. Further recipients + receive a 452 error code (i.e., they + are deferred for the next delivery + attempt). +confDONT_PROBE_INTERFACES DontProbeInterfaces + [False] If set, sendmail will _not_ + insert the names and addresses of any + local interfaces into the $=w class + (list of known "equivalent" addresses). + If you set this, you must also include + some support for these addresses (e.g., + in a mailertable entry) -- otherwise, + mail to addresses in this list will + bounce with a configuration error. +confDONT_BLAME_SENDMAIL DontBlameSendmail + [safe] Override sendmail's file + safety checks. This will definitely + compromise system security and should + not be used unless absolutely + necessary. +confREJECT_MSG - [550 Access denied] The message + given if the access database contains + REJECT in the value portion. + +See also the description of OSTYPE for some parameters that can be +tweaked (generally pathnames to mailers). + + ++-----------+ +| HIERARCHY | ++-----------+ + +Within this directory are several subdirectories, to wit: + +m4 General support routines. These are typically + very important and should not be changed without + very careful consideration. + +cf The configuration files themselves. They have + ".mc" suffixes, and must be run through m4 to + become complete. The resulting output should + have a ".cf" suffix. + +ostype Definitions describing a particular operating + system type. These should always be referenced + using the OSTYPE macro in the .mc file. Examples + include "bsd4.3", "bsd4.4", "sunos3.5", and + "sunos4.1". + +domain Definitions describing a particular domain, referenced + using the DOMAIN macro in the .mc file. These are + site dependent; for example, "CS.Berkeley.EDU.m4" + describes hosts in the CS.Berkeley.EDU subdomain. + +mailer Descriptions of mailers. These are referenced using + the MAILER macro in the .mc file. + +sh Shell files used when building the .cf file from the + .mc file in the cf subdirectory. + +feature These hold special orthogonal features that you might + want to include. They should be referenced using + the FEATURE macro. + +hack Local hacks. These can be referenced using the HACK + macro. They shouldn't be of more than voyeuristic + interest outside the .Berkeley.EDU domain, but who knows? + We've all got our own peccadillos. + +siteconfig Site configuration -- e.g., tables of locally connected + UUCP sites. + + ++------------------------+ +| ADMINISTRATIVE DETAILS | ++------------------------+ + +The following sections detail usage of certain internal parts of the +sendmail.cf file. Read them carefully if you are trying to modify +the current model. If you find the above descriptions adequate, these +should be {boring, confusing, tedious, ridiculous} (pick one or more). + +RULESETS (* means built in to sendmail) + + 0 * Parsing + 1 * Sender rewriting + 2 * Recipient rewriting + 3 * Canonicalization + 4 * Post cleanup + 5 * Local address rewrite (after aliasing) + 1x mailer rules (sender qualification) + 2x mailer rules (recipient qualification) + 3x mailer rules (sender header qualification) + 4x mailer rules (recipient header qualification) + 5x mailer subroutines (general) + 6x mailer subroutines (general) + 7x mailer subroutines (general) + 8x reserved + 90 Mailertable host stripping + 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) + 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) + 98 Local part of ruleset 0 (ruleset 8 in old sendmail) + 99 Guaranteed null (for debugging) + + +MAILERS + + 0 local, prog local and program mailers + 1 [e]smtp, relay SMTP channel + 2 uucp-* UNIX-to-UNIX Copy Program + 3 netnews Network News delivery + 4 fax Sam Leffler's HylaFAX software + 5 mail11 DECnet mailer + + +MACROS + + A + B Bitnet Relay + C DECnet Relay + D The local domain -- usually not needed + E reserved for X.400 Relay + F FAX Relay + G + H mail Hub (for mail clusters) + I + J + K + L Luser Relay + M Masquerade (who I claim to be) + N + O + P + Q + R Relay (for unqualified names) + S Smart Host + T + U my UUCP name (if I have a UUCP connection) + V UUCP Relay (class V hosts) + W UUCP Relay (class W hosts) + X UUCP Relay (class X hosts) + Y UUCP Relay (all other hosts) + Z Version number + + +CLASSES + + A + B domains that are candidates for bestmx lookup + C + D + E addresses that should not seem to come from $M + F hosts we forward for + G domains that should be looked up in genericstable + H + I + J + K + L addresses that should not be forwarded to $R + M domains that should be mapped to $M + N + O operators that indicate network operations (cannot be in local names) + P top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc. + Q + R domains we are willing to relay (pass anti-spam filters) + S + T + U locally connected UUCP hosts + V UUCP hosts connected to relay $V + W UUCP hosts connected to relay $W + X UUCP hosts connected to relay $X + Y locally connected smart UUCP hosts + Z locally connected domain-ized UUCP hosts + . the class containing only a dot + [ the class containing only a left bracket + + +M4 DIVERSIONS + + 1 Local host detection and resolution + 2 Local Ruleset 3 additions + 3 Local Ruleset 0 additions + 4 UUCP Ruleset 0 additions + 5 locally interpreted names (overrides $R) + 6 local configuration (at top of file) + 7 mailer definitions + 8 + 9 special local rulesets (1 and 2) diff --git a/contrib/sendmail/cf/cf/Build b/contrib/sendmail/cf/cf/Build new file mode 100755 index 000000000000..3efaffdcdba8 --- /dev/null +++ b/contrib/sendmail/cf/cf/Build @@ -0,0 +1,28 @@ +#!/bin/sh + +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# +# @(#)Build 8.3 (Berkeley) 5/19/98 +# + +# +# A quick-and-dirty script to create cf files. +# + +SMROOT=${SMROOT-../..} +BUILDTOOLS=${BUILDTOOLS-$SMROOT/BuildTools} + +M4=`sh $BUILDTOOLS/bin/find_m4.sh` +ret=$? +if [ $ret -ne 0 ] +then + exit $ret +fi +echo "Using M4=$M4" + +eval exec ${MAKE-make} M4=$M4 $* diff --git a/contrib/sendmail/cf/cf/Makefile b/contrib/sendmail/cf/cf/Makefile new file mode 100644 index 000000000000..8b6fb4d64e96 --- /dev/null +++ b/contrib/sendmail/cf/cf/Makefile @@ -0,0 +1,143 @@ +# +# Makefile for configuration files. +# +# @(#)Makefile 8.17 (Berkeley) 4/2/98 +# + +# +# Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf"; +# this may be easier than tweaking the Makefile. You do need to +# have a fairly modern M4 available (GNU m4 works). On SunOS, use +# /usr/5bin/m4. +# + +M4= m4 +CFDIR= .. +CHMOD= chmod +ROMODE= 444 +RM= rm -f + +.SUFFIXES: .mc .cf + +.mc.cf: + $(RM) $@ + $(M4) ${CFDIR}/m4/cf.m4 $*.mc > $@ || ( $(RM) $@ && exit 1 ) + $(CHMOD) $(ROMODE) $@ + +ALL= generic-bsd4.4.cf generic-hpux9.cf generic-hpux10.cf \ + generic-osf1.cf generic-solaris2.cf \ + generic-sunos4.1.cf generic-ultrix4.cf \ + cs-hpux9.cf cs-osf1.cf cs-solaris2.cf \ + cs-sunos4.1.cf cs-ultrix4.cf \ + s2k-osf1.cf s2k-ultrix4.cf \ + chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ + python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf knecht.cf + +all: $(ALL) + +clean cleandir: + $(RM) $(ALL) core + +depend install: + +# this is overkill, but.... +M4FILES=\ + ${CFDIR}/domain/Berkeley.EDU.m4 \ + ${CFDIR}/domain/CS.Berkeley.EDU.m4 \ + ${CFDIR}/domain/EECS.Berkeley.EDU.m4 \ + ${CFDIR}/domain/S2K.Berkeley.EDU.m4 \ + ${CFDIR}/domain/berkeley-only.m4 \ + ${CFDIR}/domain/generic.m4 \ + ${CFDIR}/feature/accept_unqualified_senders.m4 \ + ${CFDIR}/feature/accept_unresolvable_domains.m4 \ + ${CFDIR}/feature/access_db.m4 \ + ${CFDIR}/feature/allmasquerade.m4 \ + ${CFDIR}/feature/always_add_domain.m4 \ + ${CFDIR}/feature/bestmx_is_local.m4 \ + ${CFDIR}/feature/bitdomain.m4 \ + ${CFDIR}/feature/blacklist_recipients.m4 \ + ${CFDIR}/feature/loose_relay_check.m4 \ + ${CFDIR}/feature/domaintable.m4 \ + ${CFDIR}/feature/genericstable.m4 \ + ${CFDIR}/feature/limited_masquerade.m4 \ + ${CFDIR}/feature/local_lmtp.m4 \ + ${CFDIR}/feature/local_procmail.m4 \ + ${CFDIR}/feature/mailertable.m4 \ + ${CFDIR}/feature/masquerade_entire_domain.m4 \ + ${CFDIR}/feature/masquerade_envelope.m4 \ + ${CFDIR}/feature/nocanonify.m4 \ + ${CFDIR}/feature/nodns.m4 \ + ${CFDIR}/feature/notsticky.m4 \ + ${CFDIR}/feature/nouucp.m4 \ + ${CFDIR}/feature/nullclient.m4 \ + ${CFDIR}/feature/promiscuous_relay.m4 \ + ${CFDIR}/feature/rbl.m4 \ + ${CFDIR}/feature/redirect.m4 \ + ${CFDIR}/feature/relay_based_on_MX.m4 \ + ${CFDIR}/feature/relay_entire_domain.m4 \ + ${CFDIR}/feature/relay_hosts_only.m4 \ + ${CFDIR}/feature/relay_local_from.m4 \ + ${CFDIR}/feature/smrsh.m4 \ + ${CFDIR}/feature/stickyhost.m4 \ + ${CFDIR}/feature/use_ct_file.m4 \ + ${CFDIR}/feature/use_cw_file.m4 \ + ${CFDIR}/feature/uucpdomain.m4 \ + ${CFDIR}/feature/virtusertable.m4 \ + ${CFDIR}/hack/cssubdomain.m4 \ + ${CFDIR}/m4/cf.m4 \ + ${CFDIR}/m4/cfhead.m4 \ + ${CFDIR}/m4/nullrelay.m4 \ + ${CFDIR}/m4/proto.m4 \ + ${CFDIR}/m4/version.m4 \ + ${CFDIR}/mailer/cyrus.m4 \ + ${CFDIR}/mailer/fax.m4 \ + ${CFDIR}/mailer/local.m4 \ + ${CFDIR}/mailer/mail11.m4 \ + ${CFDIR}/mailer/pop.m4 \ + ${CFDIR}/mailer/procmail.m4 \ + ${CFDIR}/mailer/smtp.m4 \ + ${CFDIR}/mailer/usenet.m4 \ + ${CFDIR}/mailer/uucp.m4 \ + ${CFDIR}/ostype/aix2.m4 \ + ${CFDIR}/ostype/aix3.m4 \ + ${CFDIR}/ostype/altos.m4 \ + ${CFDIR}/ostype/amdahl-uts.m4 \ + ${CFDIR}/ostype/aux.m4 \ + ${CFDIR}/ostype/bsd4.3.m4 \ + ${CFDIR}/ostype/bsd4.4.m4 \ + ${CFDIR}/ostype/bsdi1.0.m4 \ + ${CFDIR}/ostype/bsdi2.0.m4 \ + ${CFDIR}/ostype/dgux.m4 \ + ${CFDIR}/ostype/domainos.m4 \ + ${CFDIR}/ostype/dynix3.2.m4 \ + ${CFDIR}/ostype/gnuhurd.m4 \ + ${CFDIR}/ostype/hpux10.m4 \ + ${CFDIR}/ostype/hpux9.m4 \ + ${CFDIR}/ostype/irix4.m4 \ + ${CFDIR}/ostype/irix5.m4 \ + ${CFDIR}/ostype/irix6.m4 \ + ${CFDIR}/ostype/linux.m4 \ + ${CFDIR}/ostype/maxion.m4 \ + ${CFDIR}/ostype/mklinux.m4 \ + ${CFDIR}/ostype/nextstep.m4 \ + ${CFDIR}/ostype/osf1.m4 \ + ${CFDIR}/ostype/powerux.m4 \ + ${CFDIR}/ostype/ptx2.m4 \ + ${CFDIR}/ostype/qnx.m4 \ + ${CFDIR}/ostype/riscos4.5.m4 \ + ${CFDIR}/ostype/sco-uw-2.1.m4 \ + ${CFDIR}/ostype/sco3.2.m4 \ + ${CFDIR}/ostype/solaris2.m4 \ + ${CFDIR}/ostype/solaris2.ml.m4 \ + ${CFDIR}/ostype/sunos3.5.m4 \ + ${CFDIR}/ostype/sunos4.1.m4 \ + ${CFDIR}/ostype/svr4.m4 \ + ${CFDIR}/ostype/ultrix4.m4 \ + ${CFDIR}/ostype/unknown.m4 \ + ${CFDIR}/ostype/uxpds.m4 \ + ${CFDIR}/siteconfig/uucp.cogsci.m4 \ + ${CFDIR}/siteconfig/uucp.old.arpa.m4 \ + ${CFDIR}/siteconfig/uucp.ucbarpa.m4 \ + ${CFDIR}/siteconfig/uucp.ucbvax.m4 \ + +$(ALL): $(M4FILES) diff --git a/contrib/sendmail/cf/cf/chez.cs.mc b/contrib/sendmail/cf/cf/chez.cs.mc new file mode 100644 index 000000000000..9858330bd407 --- /dev/null +++ b/contrib/sendmail/cf/cf/chez.cs.mc @@ -0,0 +1,33 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for a home machine that wants to masquerade as an +# on-campus machine. Additionally, all addresses without a hostname +# will be forwarded to that machine. +# + +divert(0)dnl +VERSIONID(`@(#)chez.cs.mc 8.11 (Berkeley) 5/19/98') +OSTYPE(bsd4.4)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl +MASQUERADE_AS(vangogh.CS.Berkeley.EDU)dnl +FEATURE(use_cw_file)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/clientproto.mc b/contrib/sendmail/cf/cf/clientproto.mc new file mode 100644 index 000000000000..f0a6ae7d6b23 --- /dev/null +++ b/contrib/sendmail/cf/cf/clientproto.mc @@ -0,0 +1,33 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This the prototype for a "null client" -- that is, a client that +# does nothing except forward all mail to a mail hub. IT IS NOT +# USABLE AS IS!!! +# +# To use this, you MUST use the nullclient feature with the name of +# the mail hub as its argument. You MUST also define an `OSTYPE' to +# define the location of the queue directories and the like. +# In addition, you MAY select the nocanonify feature. This causes +# addresses to be sent unqualified via the SMTP connection; normally +# they are qualifed with the masquerade name, which defaults to the +# name of the hub machine. +# Other than these, it should never contain any other lines. +# + +divert(0)dnl +VERSIONID(`@(#)clientproto.mc 8.12 (Berkeley) 5/19/98') + +OSTYPE(unknown) +FEATURE(nullclient, mailhost.$m) diff --git a/contrib/sendmail/cf/cf/cs-hpux10.mc b/contrib/sendmail/cf/cf/cs-hpux10.mc new file mode 100644 index 000000000000..527f9308b990 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-hpux10.mc @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for HP-UX 9.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-hpux10.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(hpux10)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-hpux9.mc b/contrib/sendmail/cf/cf/cs-hpux9.mc new file mode 100644 index 000000000000..f65505296fec --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-hpux9.mc @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for HP-UX 9.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-hpux9.mc 8.11 (Berkeley) 5/19/98') +OSTYPE(hpux9)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-osf1.mc b/contrib/sendmail/cf/cf/cs-osf1.mc new file mode 100644 index 000000000000..ba35c04ac687 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-osf1.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for OSF/1. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-osf1.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(osf1)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-solaris2.mc b/contrib/sendmail/cf/cf/cs-solaris2.mc new file mode 100644 index 000000000000..395d19fc7aa5 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-solaris2.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for Solaris 2.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-solaris2.mc 8.9 (Berkeley) 5/19/98') +OSTYPE(solaris2)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-sunos4.1.mc b/contrib/sendmail/cf/cf/cs-sunos4.1.mc new file mode 100644 index 000000000000..45dcd124d99f --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-sunos4.1.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for SunOS 4.1.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-sunos4.1.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(sunos4.1)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cs-ultrix4.mc b/contrib/sendmail/cf/cf/cs-ultrix4.mc new file mode 100644 index 000000000000..f2a4b423b907 --- /dev/null +++ b/contrib/sendmail/cf/cf/cs-ultrix4.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for Ultrix 4.x. +# It applies only to the Computer Science Division at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)cs-ultrix4.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/cyrusproto.mc b/contrib/sendmail/cf/cf/cyrusproto.mc new file mode 100644 index 000000000000..c660898b738f --- /dev/null +++ b/contrib/sendmail/cf/cf/cyrusproto.mc @@ -0,0 +1,41 @@ +divert(-1) +# +# (C) Copyright 1995 by Carnegie Mellon University +# +# All Rights Reserved +# +# Permission to use, copy, modify, and distribute this software and its +# documentation for any purpose and without fee is hereby granted, +# provided that the above copyright notice appear in all copies and that +# both that copyright notice and this permission notice appear in +# supporting documentation, and that the name of CMU not be +# used in advertising or publicity pertaining to distribution of the +# software without specific, written prior permission. +# +# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +# SOFTWARE. +# +# Contributed to Berkeley by John Gardiner Myers <jgm+@CMU.EDU>. +# +# This sample mc file is for a site that uses the Cyrus IMAP server +# exclusively for local mail. +# + +divert(0)dnl +VERSIONID(`@(#)cyrusproto.mc 8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3') +define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') +FEATURE(nouucp) +FEATURE(nocanonify) +FEATURE(always_add_domain) +MAILER(smtp) +MAILER(cyrus) + +define(`confLOCAL_MAILER',`cyrus') + +LOCAL_RULE_0 +Rbb + $+ < @ $=w . > $#cyrusbb $: $1 diff --git a/contrib/sendmail/cf/cf/generic-bsd4.4.mc b/contrib/sendmail/cf/cf/generic-bsd4.4.mc new file mode 100644 index 000000000000..106fa31c44dd --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-bsd4.4.mc @@ -0,0 +1,27 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for 4.4 BSD-based systems, +# including 4.4-Lite, BSDi, NetBSD, and FreeBSD. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-bsd4.4.mc 8.7 (Berkeley) 5/19/98') +OSTYPE(bsd4.4)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-hpux10.mc b/contrib/sendmail/cf/cf/generic-hpux10.mc new file mode 100644 index 000000000000..1a7eda909423 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-hpux10.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for HP-UX 9.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-hpux10.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(hpux10)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-hpux9.mc b/contrib/sendmail/cf/cf/generic-hpux9.mc new file mode 100644 index 000000000000..6aaf3b65e3de --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-hpux9.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for HP-UX 9.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-hpux9.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(hpux9)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-nextstep3.3.mc b/contrib/sendmail/cf/cf/generic-nextstep3.3.mc new file mode 100644 index 000000000000..5c81faaf6e7a --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-nextstep3.3.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for NEXTSTEP 3.3 systems. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-nextstep3.3.mc 8.7 (Berkeley) 5/19/98') +OSTYPE(nextstep)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-osf1.mc b/contrib/sendmail/cf/cf/generic-osf1.mc new file mode 100644 index 000000000000..2113b927223f --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-osf1.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for OSF/1. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-osf1.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(osf1)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-solaris2.mc b/contrib/sendmail/cf/cf/generic-solaris2.mc new file mode 100644 index 000000000000..1e1aa96a6c43 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-solaris2.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for SunOS 5.x (a.k.a. Solaris 2.x) +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-solaris2.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(solaris2)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-sunos4.1.mc b/contrib/sendmail/cf/cf/generic-sunos4.1.mc new file mode 100644 index 000000000000..7e916c15ea88 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-sunos4.1.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for SunOS 4.1.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-sunos4.1.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(sunos4.1)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/generic-ultrix4.mc b/contrib/sendmail/cf/cf/generic-ultrix4.mc new file mode 100644 index 000000000000..8c900b86e713 --- /dev/null +++ b/contrib/sendmail/cf/cf/generic-ultrix4.mc @@ -0,0 +1,26 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a generic configuration file for Ultrix 4.x. +# It has support for local and SMTP mail only. If you want to +# customize it, copy it to a name appropriate for your environment +# and do the modifications there. +# + +divert(0)dnl +VERSIONID(`@(#)generic-ultrix4.mc 8.8 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(generic)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/huginn.cs.mc b/contrib/sendmail/cf/cf/huginn.cs.mc new file mode 100644 index 000000000000..949e917882d5 --- /dev/null +++ b/contrib/sendmail/cf/cf/huginn.cs.mc @@ -0,0 +1,42 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for the backup CS Division mail server. +# + +divert(0)dnl +VERSIONID(`@(#)huginn.cs.mc 8.12 (Berkeley) 5/19/98') +OSTYPE(hpux9)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MASQUERADE_AS(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# hosts for which we accept and forward mail (must be in .Berkeley.EDU) +CF CS +FF/etc/sendmail.cw + +LOCAL_RULE_0 +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB diff --git a/contrib/sendmail/cf/cf/knecht.mc b/contrib/sendmail/cf/cf/knecht.mc new file mode 100644 index 000000000000..97e5e43eb36a --- /dev/null +++ b/contrib/sendmail/cf/cf/knecht.mc @@ -0,0 +1,71 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is specific to Eric's home machine. +# + +divert(0)dnl +VERSIONID(`@(#)knecht.mc 8.30 (Berkeley) 6/11/98') +OSTYPE(bsd4.4)dnl +DOMAIN(generic)dnl +define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')dnl +define(`confDEF_USER_ID', `mailnull')dnl +define(`confHOST_STATUS_DIRECTORY', `.hoststat')dnl +define(`confTO_ICONNECT', `10s')dnl +define(`confCOPY_ERRORS_TO', `Postmaster')dnl +define(`confTO_QUEUEWARN', `8h')dnl +define(`confTRUSTED_USERS', `www')dnl +define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')dnl +FEATURE(virtusertable)dnl +FEATURE(access_db)dnl +FEATURE(local_lmtp)dnl +define(`LOCAL_MAILER_FLAGS', LOCAL_MAILER_FLAGS`'P)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +LOCAL_CONFIG +# +# Regular expression to reject: +# * numeric-only localparts from aol.com and msn.com +# * localparts starting with a digit from juno.com +# * localparts longer than 10 characters from aol.com +# +Kcheckaddress regex -a@MATCH + ^([0-9]+<@(aol|msn)\.com|[0-9][^<]*<@juno\.com|.{10}[^<]+<@aol\.com)\.?> + +# +# Names that won't be allowed in a To: line (local-part and domains) +# +C{RejectToLocalparts} friend you +C{RejectToDomains} public.com + +LOCAL_RULESETS +HTo: $>CheckTo + +SCheckTo +R$={RejectToLocalparts}@$* $#error $: "553 Header error" +R$*@$={RejectToDomains} $#error $: "553 Header error" + +HMessage-Id: $>CheckMessageId + +SCheckMessageId +R< $+ @ $+ > $@ OK +R$* $#error $: "553 Header error" + +LOCAL_RULESETS +SLocal_check_mail +# check address against various regex checks +R$* $: $>Parse0 $>3 $1 +R$+ $: $(checkaddress $1 $) +R@MATCH $#error $: "553 Header error" diff --git a/contrib/sendmail/cf/cf/mail.cs.mc b/contrib/sendmail/cf/cf/mail.cs.mc new file mode 100644 index 000000000000..1ecf34e2a910 --- /dev/null +++ b/contrib/sendmail/cf/cf/mail.cs.mc @@ -0,0 +1,43 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for the primary CS Division mail server. +# + +divert(0)dnl +VERSIONID(`@(#)mail.cs.mc 8.15 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(Berkeley.EDU)dnl +MASQUERADE_AS(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl +define(`confUSERDB_SPEC', ``/usr/local/lib/users.cs.db,/usr/local/lib/users.eecs.db'')dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# hosts for which we accept and forward mail (must be in .Berkeley.EDU) +CF CS +FF/etc/sendmail.cw + +LOCAL_RULE_0 +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB diff --git a/contrib/sendmail/cf/cf/mail.eecs.mc b/contrib/sendmail/cf/cf/mail.eecs.mc new file mode 100644 index 000000000000..42d053d70ee1 --- /dev/null +++ b/contrib/sendmail/cf/cf/mail.eecs.mc @@ -0,0 +1,43 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in Electrical Engineering and Computer Sciences at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. +# +# This file is for the primary EECS mail server. +# + +divert(0)dnl +VERSIONID(`@(#)mail.eecs.mc 8.15 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(EECS.Berkeley.EDU)dnl +MASQUERADE_AS(EECS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl +define(`confUSERDB_SPEC', `/usr/local/lib/users.eecs.db,/usr/local/lib/users.cs.db,/usr/local/lib/users.coe.db')dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# hosts for which we accept and forward mail (must be in .Berkeley.EDU) +CF EECS +FF/etc/sendmail.cw + +LOCAL_RULE_0 +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB diff --git a/contrib/sendmail/cf/cf/mailspool.cs.mc b/contrib/sendmail/cf/cf/mailspool.cs.mc new file mode 100644 index 000000000000..7ae62b24d607 --- /dev/null +++ b/contrib/sendmail/cf/cf/mailspool.cs.mc @@ -0,0 +1,36 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for our mail spool machine. For a while we were using +# "root.machinename" instead of "root+machinename", so this is included +# for back compatibility. +# + +divert(0)dnl +VERSIONID(`@(#)mailspool.cs.mc 8.9 (Berkeley) 5/19/98') +OSTYPE(sunos4.1)dnl +DOMAIN(CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +LOCAL_CONFIG +CDroot sys-custodian + +LOCAL_RULE_3 +R$=D . $+ $1 + $2 diff --git a/contrib/sendmail/cf/cf/python.cs.mc b/contrib/sendmail/cf/cf/python.cs.mc new file mode 100644 index 000000000000..2cb111d0b655 --- /dev/null +++ b/contrib/sendmail/cf/cf/python.cs.mc @@ -0,0 +1,41 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for a home machine that wants to masquerade as an +# on-campus machine. Additionally, all addresses without a hostname +# will be forwarded to that machine. +# + +divert(0)dnl +VERSIONID(`@(#)python.cs.mc 8.9 (Berkeley) 5/19/98') +OSTYPE(bsd4.4)dnl +DOMAIN(CS.Berkeley.EDU)dnl +define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl +MASQUERADE_AS(vangogh.CS.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl + +# accept mail sent to the domain head +DDBostic.COM + +LOCAL_RULE_0 +# accept mail sent to the domain head +R< @ $D . > : $* $@ $>7 $1 @here:... -> ... +R$* $=O $* < @ $D . > $@ $>7 $1 $2 $3 ...@here -> ... +R$* < @ $D . > $#local $: $1 user@here -> user diff --git a/contrib/sendmail/cf/cf/s2k-osf1.mc b/contrib/sendmail/cf/cf/s2k-osf1.mc new file mode 100644 index 000000000000..1c7b1ccd1d74 --- /dev/null +++ b/contrib/sendmail/cf/cf/s2k-osf1.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for OSF/1. +# It applies only to the Sequoia 2000 Project at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)s2k-osf1.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(osf1)dnl +DOMAIN(S2K.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/s2k-ultrix4.mc b/contrib/sendmail/cf/cf/s2k-ultrix4.mc new file mode 100644 index 000000000000..06c70d45be63 --- /dev/null +++ b/contrib/sendmail/cf/cf/s2k-ultrix4.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for Ultrix 4.x. +# It applies only to the Sequoia 2000 Project at Berkeley, +# and should not be used elsewhere. It is provided on the sendmail +# distribution as a sample only. To create your own configuration +# file, create an appropriate domain file in ../domain, change the +# `DOMAIN' macro below to reference that file, and copy the result +# to a name of your own choosing. +# + +divert(0)dnl +VERSIONID(`@(#)s2k-ultrix4.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(ultrix4)dnl +DOMAIN(S2K.Berkeley.EDU)dnl +MAILER(local)dnl +MAILER(smtp)dnl diff --git a/contrib/sendmail/cf/cf/tcpproto.mc b/contrib/sendmail/cf/cf/tcpproto.mc new file mode 100644 index 000000000000..eb6eadecb656 --- /dev/null +++ b/contrib/sendmail/cf/cf/tcpproto.mc @@ -0,0 +1,32 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is the prototype file for a configuration that supports nothing +# but basic SMTP connections via TCP. +# +# You MUST change the `OSTYPE' macro to specify the operating system +# on which this will run; this will set the location of various +# support files for your operating system environment. You MAY +# create a domain file in ../domain and reference it by adding a +# `DOMAIN' macro after the `OSTYPE' macro. I recommend that you +# first copy this to another file name so that new sendmail releases +# will not trash your changes. +# + +divert(0)dnl +VERSIONID(`@(#)tcpproto.mc 8.10 (Berkeley) 5/19/98') +OSTYPE(unknown) +FEATURE(nouucp) +MAILER(local) +MAILER(smtp) diff --git a/contrib/sendmail/cf/cf/ucbarpa.mc b/contrib/sendmail/cf/cf/ucbarpa.mc new file mode 100644 index 000000000000..925d47fefb74 --- /dev/null +++ b/contrib/sendmail/cf/cf/ucbarpa.mc @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This machine has been decommissioned at Berkeley, and hence should +# not be considered to be tested. This file is provided as an example +# only, of how you might set up a joint SMTP/UUCP configuration. At +# this point I recommend using `FEATURE(mailertable)' instead of +# `SITECONFIG'. See also ucbvax.mc. +# + +divert(0)dnl +VERSIONID(`@(#)ucbarpa.mc 8.9 (Berkeley) 5/19/98') +DOMAIN(CS.Berkeley.EDU)dnl +OSTYPE(bsd4.4)dnl +MAILER(local)dnl +MAILER(smtp)dnl +MAILER(uucp)dnl +SITECONFIG(uucp.ucbarpa, ucbarpa, U) diff --git a/contrib/sendmail/cf/cf/ucbvax.mc b/contrib/sendmail/cf/cf/ucbvax.mc new file mode 100644 index 000000000000..76027fb951e4 --- /dev/null +++ b/contrib/sendmail/cf/cf/ucbvax.mc @@ -0,0 +1,90 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This machine has been decommissioned at Berkeley, and hence should +# not be considered to be tested. This file is provided as an example +# only, of how you might set up a fairly complex configuration. +# Ucbvax was our main relay (both SMTP and UUCP) for many years. +# At this point I recommend using `FEATURE(mailertable)' instead of +# `SITECONFIG' for routing of UUCP within your domain. +# + +divert(0)dnl +VERSIONID(`@(#)ucbvax.mc 8.11 (Berkeley) 5/19/98') +OSTYPE(bsd4.3) +DOMAIN(CS.Berkeley.EDU) +MASQUERADE_AS(CS.Berkeley.EDU) +MAILER(local) +MAILER(smtp) +MAILER(uucp) +undefine(`UUCP_RELAY')dnl + +LOCAL_CONFIG +DDBerkeley.EDU + +# names for which we act as a local forwarding agent +CF CS +FF/etc/sendmail.cw + +# local UUCP connections, and our local uucp name +SITECONFIG(uucp.ucbvax, ucbvax, U) + +# remote UUCP connections, and the machine they are on +SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) + +SITECONFIG(uucp.cogsci, cogsci.Berkeley.EDU, X) + +LOCAL_RULE_3 +# map old UUCP names into Internet names +UUCPSMTP(bellcore, bellcore.com) +UUCPSMTP(decvax, decvax.dec.com) +UUCPSMTP(decwrl, decwrl.dec.com) +UUCPSMTP(hplabs, hplabs.hp.com) +UUCPSMTP(lbl-csam, lbl-csam.arpa) +UUCPSMTP(pur-ee, ecn.purdue.edu) +UUCPSMTP(purdue, purdue.edu) +UUCPSMTP(research, research.att.com) +UUCPSMTP(sdcarl, sdcarl.ucsd.edu) +UUCPSMTP(sdcsvax, sdcsvax.ucsd.edu) +UUCPSMTP(ssyx, ssyx.ucsc.edu) +UUCPSMTP(sun, sun.com) +UUCPSMTP(ucdavis, ucdavis.ucdavis.edu) +UUCPSMTP(ucivax, ics.uci.edu) +UUCPSMTP(ucla-cs, cs.ucla.edu) +UUCPSMTP(ucla-se, seas.ucla.edu) +UUCPSMTP(ucsbcsl, ucsbcsl.ucsb.edu) +UUCPSMTP(ucscc, c.ucsc.edu) +UUCPSMTP(ucsd, ucsd.edu) +UUCPSMTP(ucsfcgl, cgl.ucsf.edu) +UUCPSMTP(unmvax, unmvax.cs.unm.edu) +UUCPSMTP(uwvax, spool.cs.wisc.edu) + +LOCAL_RULE_0 + +# make sure we handle the local domain as absolute +R$* < @ $* $D > $* $: $1 < @ $2 $D . > $3 + +# handle names we forward for as though they were local, so we will use UDB +R< @ $=F . $D . > : $* $@ $>7 $2 @here:... -> ... +R< @ $D . > : $* $@ $>7 $1 @here:... -> ... +R$* $=O $* < @ $=F . $D . > $@ $>7 $1 $2 $3 ...@here -> ... +R$* $=O $* < @ $D . > $@ $>7 $1 $2 $3 ...@here -> ... + +R$* < @ $=F . $D . > $#local $: $1 use UDB + +# handle local UUCP connections in the Berkeley.EDU domain +R$+<@cnmat.$D . > $#uucp$@cnmat$:$1 +R$+<@cnmat.CS.$D . > $#uucp$@cnmat$:$1 +R$+<@craig.$D . > $#uucp$@craig$:$1 +R$+<@craig.CS.$D . > $#uucp$@craig$:$1 diff --git a/contrib/sendmail/cf/cf/uucpproto.mc b/contrib/sendmail/cf/cf/uucpproto.mc new file mode 100644 index 000000000000..4f1c54a332e2 --- /dev/null +++ b/contrib/sendmail/cf/cf/uucpproto.mc @@ -0,0 +1,33 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is the prototype for a configuration that only supports UUCP +# and does not have DNS support at all. +# +# You MUST change the `OSTYPE' macro to specify the operating system +# on which this will run; this will set the location of various +# support files for your operating system environment. You MAY +# create a domain file in ../domain and reference it by adding a +# `DOMAIN' macro after the `OSTYPE' macro. I recommend that you +# first copy this to another file name so that new sendmail releases +# will not trash your changes. +# + +divert(0)dnl +VERSIONID(`@(#)uucpproto.mc 8.12 (Berkeley) 5/19/98') +OSTYPE(unknown) +FEATURE(promiscuous_relay)dnl +FEATURE(accept_unresolvable_domains)dnl +MAILER(local)dnl +MAILER(uucp)dnl diff --git a/contrib/sendmail/cf/cf/vangogh.cs.mc b/contrib/sendmail/cf/cf/vangogh.cs.mc new file mode 100644 index 000000000000..deefc29febde --- /dev/null +++ b/contrib/sendmail/cf/cf/vangogh.cs.mc @@ -0,0 +1,32 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This is a Berkeley-specific configuration file for a specific +# machine in the Computer Science Division at Berkeley, and should +# not be used elsewhere. It is provided on the sendmail distribution +# as a sample only. +# +# This file is for the BSD development machine; it has some parameters +# set up (to stress sendmail) and accepts mail for some other machines. +# + +divert(0)dnl +VERSIONID(`@(#)vangogh.cs.mc 8.10 (Berkeley) 5/19/98') +DOMAIN(CS.Berkeley.EDU)dnl +OSTYPE(bsd4.4)dnl +MAILER(local)dnl +MAILER(smtp)dnl +define(`MCI_CACHE_SIZE', 5) +Cw okeeffe.CS.Berkeley.EDU +Cw python.CS.Berkeley.EDU diff --git a/contrib/sendmail/cf/domain/Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/Berkeley.EDU.m4 new file mode 100644 index 000000000000..48e151b7b285 --- /dev/null +++ b/contrib/sendmail/cf/domain/Berkeley.EDU.m4 @@ -0,0 +1,23 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) +VERSIONID(`@(#)Berkeley.EDU.m4 8.14 (Berkeley) 5/19/98') +DOMAIN(berkeley-only)dnl +define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl +define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl +define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')dnl +define(`confCW_FILE', `-o /etc/sendmail.cw')dnl +define(`confDONT_INIT_GROUPS', True)dnl +FEATURE(redirect)dnl +FEATURE(use_cw_file)dnl +FEATURE(stickyhost)dnl diff --git a/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 new file mode 100644 index 000000000000..20309210b8c6 --- /dev/null +++ b/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) +VERSIONID(`@(#)CS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98') +DOMAIN(Berkeley.EDU)dnl +HACK(cssubdomain)dnl +define(`confUSERDB_SPEC', + `/usr/sww/share/lib/users.cs.db,/usr/sww/share/lib/users.eecs.db')dnl diff --git a/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 new file mode 100644 index 000000000000..022dddd13a57 --- /dev/null +++ b/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) +VERSIONID(`@(#)EECS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98') +DOMAIN(Berkeley.EDU)dnl +MASQUERADE_AS(EECS.Berkeley.EDU)dnl diff --git a/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 new file mode 100644 index 000000000000..14965a6bff0e --- /dev/null +++ b/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) +VERSIONID(`@(#)S2K.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98') +DOMAIN(CS.Berkeley.EDU)dnl +MASQUERADE_AS(postgres.Berkeley.EDU)dnl diff --git a/contrib/sendmail/cf/domain/berkeley-only.m4 b/contrib/sendmail/cf/domain/berkeley-only.m4 new file mode 100644 index 000000000000..d3d770811c68 --- /dev/null +++ b/contrib/sendmail/cf/domain/berkeley-only.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) +VERSIONID(`@(#)unspecified-domain.m4 8.7 (Berkeley) 5/19/98') +errprint(`*** ERROR: You are trying to use the Berkeley sample configuration') +errprint(` files outside of the Computer Science Division at Berkeley.') +errprint(` The configuration (.mc) files must be customized to reference') +errprint(` domain files appropriate for your environment.') diff --git a/contrib/sendmail/cf/domain/generic.m4 b/contrib/sendmail/cf/domain/generic.m4 new file mode 100644 index 000000000000..1329e4499b81 --- /dev/null +++ b/contrib/sendmail/cf/domain/generic.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# The following is a generic domain file. You should be able to +# use it anywhere. If you want to customize it, copy it to a file +# named with your domain and make the edits; then, copy the appropriate +# .mc files and change `DOMAIN(generic)' to reference your updated domain +# files. +# +divert(0) +VERSIONID(`@(#)generic.m4 8.9 (Berkeley) 5/19/98') +define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl +FEATURE(redirect)dnl +FEATURE(use_cw_file)dnl diff --git a/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 b/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 new file mode 100644 index 000000000000..16bef7825394 --- /dev/null +++ b/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)accept_unqualified_senders.m4 8.3 (Berkeley) 5/19/98') +divert(-1) + +define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1) diff --git a/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 b/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 new file mode 100644 index 000000000000..5b7241a314e5 --- /dev/null +++ b/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)accept_unresolvable_domains.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1) diff --git a/contrib/sendmail/cf/feature/access_db.m4 b/contrib/sendmail/cf/feature/access_db.m4 new file mode 100644 index 000000000000..85820723deee --- /dev/null +++ b/contrib/sendmail/cf/feature/access_db.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)access_db.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`ACCESS_TABLE', + ifelse(_ARG_, `', + DATABASE_MAP_TYPE` -o /etc/mail/access', + `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/allmasquerade.m4 b/contrib/sendmail/cf/feature/allmasquerade.m4 new file mode 100644 index 000000000000..42121e5cc488 --- /dev/null +++ b/contrib/sendmail/cf/feature/allmasquerade.m4 @@ -0,0 +1,19 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)allmasquerade.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + + +define(`_ALL_MASQUERADE_', 1) diff --git a/contrib/sendmail/cf/feature/always_add_domain.m4 b/contrib/sendmail/cf/feature/always_add_domain.m4 new file mode 100644 index 000000000000..e609bf000277 --- /dev/null +++ b/contrib/sendmail/cf/feature/always_add_domain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)always_add_domain.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_ALWAYS_ADD_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/bestmx_is_local.m4 b/contrib/sendmail/cf/feature/bestmx_is_local.m4 new file mode 100644 index 000000000000..2d3048809ecc --- /dev/null +++ b/contrib/sendmail/cf/feature/bestmx_is_local.m4 @@ -0,0 +1,46 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)bestmx_is_local.m4 8.12 (Berkeley) 5/19/98') +divert(-1) + +LOCAL_CONFIG +# turn on bestMX lookup table +Kbestmx bestmx +ifelse(_ARG_, `', `dnl',` +# limit bestmx to these domains +CB`'_ARG_') + +LOCAL_NET_CONFIG + +# If we are the best MX for a site, then we want to accept +# its mail as local. We assume we've already weeded out mail to +# UUCP sites which are connected to us, which should also have +# listed us as their best MX. +# +# Warning: this may generate a lot of extra DNS traffic -- a +# lower cost method is to list all the expected best MX hosts +# in $=w. This should be fine (and easier to administer) for +# low to medium traffic hosts. If you use the limited bestmx +# by passing in a set of possible domains it will improve things. + +ifelse(_ARG_, `', `dnl +# unlimited bestmx +R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3', +`dnl +# limit bestmx to $=B +R$* < @ $* $=B . > $* $: $1 < @ $2 $3 . @@ $(bestmx $2 $3 . $) > $4') +R$* $=O $* < @ $* @@ $=w . > $* $@ $>97 $1 $2 $3 +R$* < @ $* @@ $=w . > $* $#local $: $1 +R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4 diff --git a/contrib/sendmail/cf/feature/bitdomain.m4 b/contrib/sendmail/cf/feature/bitdomain.m4 new file mode 100644 index 000000000000..be5155bd3242 --- /dev/null +++ b/contrib/sendmail/cf/feature/bitdomain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)bitdomain.m4 8.13 (Berkeley) 5/19/98') +divert(-1) + +define(`BITDOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/bitdomain', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/blacklist_recipients.m4 b/contrib/sendmail/cf/feature/blacklist_recipients.m4 new file mode 100644 index 000000000000..4417fe093695 --- /dev/null +++ b/contrib/sendmail/cf/feature/blacklist_recipients.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)blacklist_recipients.m4 8.9 (Berkeley) 5/19/98') +divert(-1) + +ifdef(`ACCESS_TABLE', + `define(`_BLACKLIST_RCPT_', 1)', + `errprint(`*** ERROR: FEATURE(blacklist_recipients) requires FEATURE(access_db) +')') diff --git a/contrib/sendmail/cf/feature/domaintable.m4 b/contrib/sendmail/cf/feature/domaintable.m4 new file mode 100644 index 000000000000..0bf9f05fb340 --- /dev/null +++ b/contrib/sendmail/cf/feature/domaintable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)domaintable.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`DOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/domaintable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/genericstable.m4 b/contrib/sendmail/cf/feature/genericstable.m4 new file mode 100644 index 000000000000..ec7a4d3f7d51 --- /dev/null +++ b/contrib/sendmail/cf/feature/genericstable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)genericstable.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`GENERICS_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/genericstable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/limited_masquerade.m4 b/contrib/sendmail/cf/feature/limited_masquerade.m4 new file mode 100644 index 000000000000..ae5e868ed966 --- /dev/null +++ b/contrib/sendmail/cf/feature/limited_masquerade.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)limited_masquerade.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_LIMITED_MASQUERADE_', 1) diff --git a/contrib/sendmail/cf/feature/local_lmtp.m4 b/contrib/sendmail/cf/feature/local_lmtp.m4 new file mode 100644 index 000000000000..f323b5b1908e --- /dev/null +++ b/contrib/sendmail/cf/feature/local_lmtp.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)local_lmtp.m4 8.5 (Berkeley) 5/19/98') +divert(-1) + +define(`LOCAL_MAILER_PATH', + ifelse(_ARG_, `', + ifdef(`confEBINDIR', confEBINDIR, `/usr/libexec')`/mail.local', + _ARG_)) +define(`LOCAL_MAILER_FLAGS', `SXfmnz9') +define(`LOCAL_MAILER_ARGS', `mail.local -l') diff --git a/contrib/sendmail/cf/feature/local_procmail.m4 b/contrib/sendmail/cf/feature/local_procmail.m4 new file mode 100644 index 000000000000..adf1237b3987 --- /dev/null +++ b/contrib/sendmail/cf/feature/local_procmail.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1994 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/98') +divert(-1) + +define(`LOCAL_MAILER_PATH', + ifelse(_ARG_, `', + ifdef(`PROCMAIL_MAILER_PATH', + PROCMAIL_MAILER_PATH, + `/usr/local/bin/procmail'), + _ARG_)) +define(`LOCAL_MAILER_FLAGS', `SPfhn9') +define(`LOCAL_MAILER_ARGS', `procmail -Y -a $h -d $u') diff --git a/contrib/sendmail/cf/feature/loose_relay_check.m4 b/contrib/sendmail/cf/feature/loose_relay_check.m4 new file mode 100644 index 000000000000..6e3584b02ed8 --- /dev/null +++ b/contrib/sendmail/cf/feature/loose_relay_check.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)loose_relay_check.m4 8.3 (Berkeley) 5/19/98') +divert(-1) + +define(`_LOOSE_RELAY_CHECK_', 1) diff --git a/contrib/sendmail/cf/feature/mailertable.m4 b/contrib/sendmail/cf/feature/mailertable.m4 new file mode 100644 index 000000000000..3078261a452c --- /dev/null +++ b/contrib/sendmail/cf/feature/mailertable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)mailertable.m4 8.9 (Berkeley) 5/19/98') +divert(-1) + +define(`MAILER_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/mailertable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 b/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 new file mode 100644 index 000000000000..9766ae4499a0 --- /dev/null +++ b/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)masquerade_entire_domain.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_MASQUERADE_ENTIRE_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/masquerade_envelope.m4 b/contrib/sendmail/cf/feature/masquerade_envelope.m4 new file mode 100644 index 000000000000..75d257e64f5d --- /dev/null +++ b/contrib/sendmail/cf/feature/masquerade_envelope.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)masquerade_envelope.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_MASQUERADE_ENVELOPE_', 1) diff --git a/contrib/sendmail/cf/feature/nocanonify.m4 b/contrib/sendmail/cf/feature/nocanonify.m4 new file mode 100644 index 000000000000..6211a8ebec55 --- /dev/null +++ b/contrib/sendmail/cf/feature/nocanonify.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)nocanonify.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_NO_CANONIFY_', 1) diff --git a/contrib/sendmail/cf/feature/nodns.m4 b/contrib/sendmail/cf/feature/nodns.m4 new file mode 100644 index 000000000000..26458fc3af89 --- /dev/null +++ b/contrib/sendmail/cf/feature/nodns.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)nodns.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +undefine(`confBIND_OPTS')dnl +errprint(`FEATURE(nodns) is no-op. +Use ServiceSwitchFile ('ifdef(`confSERVICE_SWITCH_FILE',confSERVICE_SWITCH_FILE,`/etc/service.switch' if your OS does not provide its own)`) instead. +') diff --git a/contrib/sendmail/cf/feature/notsticky.m4 b/contrib/sendmail/cf/feature/notsticky.m4 new file mode 100644 index 000000000000..4fa344d70696 --- /dev/null +++ b/contrib/sendmail/cf/feature/notsticky.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)notsticky.m4 8.8 (Berkeley) 5/19/98') +# +# This is now the default. Use ``FEATURE(stickyhost)'' if you want +# the old default behaviour. +# +divert(-1) diff --git a/contrib/sendmail/cf/feature/nouucp.m4 b/contrib/sendmail/cf/feature/nouucp.m4 new file mode 100644 index 000000000000..3c1098cac4e6 --- /dev/null +++ b/contrib/sendmail/cf/feature/nouucp.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)nouucp.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_NO_UUCP_', 1) diff --git a/contrib/sendmail/cf/feature/nullclient.m4 b/contrib/sendmail/cf/feature/nullclient.m4 new file mode 100644 index 000000000000..1df782e24dea --- /dev/null +++ b/contrib/sendmail/cf/feature/nullclient.m4 @@ -0,0 +1,50 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +ifdef(`SMTP_MAILER_FLAGS',, `define(`SMTP_MAILER_FLAGS', `')') +define(_NULL_CLIENT_ONLY_, `1') +ifelse(_ARG_, `', `errprint(`Feature "nullclient" requires argument')', + `define(`MAIL_HUB', _ARG_)') +POPDIVERT + +# +# This is used only for relaying mail from a client to a hub when +# that client does absolutely nothing else -- i.e., it is a "null +# mailer". In this sense, it acts like the "R" option in Sun +# sendmail. +# + +VERSIONID(`@(#)nullclient.m4 8.12 (Berkeley) 5/19/98') + +PUSHDIVERT(6) +# hub host (to which all mail is sent) +DH`'ifdef(`MAIL_HUB', MAIL_HUB, + `errprint(`MAIL_HUB not defined for nullclient feature')') +ifdef(`MASQUERADE_NAME',, `define(`MASQUERADE_NAME', MAIL_HUB)')dnl + +# route-addr separators +C: : , +POPDIVERT +PUSHDIVERT(7) +############################################ +### Null Client Mailer specification ### +############################################ + +ifdef(`confRELAY_MAILER',, + `define(`confRELAY_MAILER', `nullclient')')dnl +ifdef(`confFROM_HEADER',, + `define(`confFROM_HEADER', <$g>)')dnl +ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `IPC $h')')dnl + +Mnullclient, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS),ifdef(`SMTP_MAILER_MAX', ` M=SMTP_MAILER_MAX,') + A=SMTP_MAILER_ARGS +POPDIVERT diff --git a/contrib/sendmail/cf/feature/promiscuous_relay.m4 b/contrib/sendmail/cf/feature/promiscuous_relay.m4 new file mode 100644 index 000000000000..975afab752d6 --- /dev/null +++ b/contrib/sendmail/cf/feature/promiscuous_relay.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)promiscuous_relay.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_PROMISCUOUS_RELAY_', 1) diff --git a/contrib/sendmail/cf/feature/rbl.m4 b/contrib/sendmail/cf/feature/rbl.m4 new file mode 100644 index 000000000000..a9251e049782 --- /dev/null +++ b/contrib/sendmail/cf/feature/rbl.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/redirect.m4 b/contrib/sendmail/cf/feature/redirect.m4 new file mode 100644 index 000000000000..721d2260c284 --- /dev/null +++ b/contrib/sendmail/cf/feature/redirect.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)redirect.m4 8.10 (Berkeley) 5/19/98') +divert(-1) + + +PUSHDIVERT(3) +# addresses sent to foo@host.REDIRECT will give a 551 error code +R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} > +R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. > +R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2> +POPDIVERT + +PUSHDIVERT(6) +CPREDIRECT +POPDIVERT diff --git a/contrib/sendmail/cf/feature/relay_based_on_MX.m4 b/contrib/sendmail/cf/feature/relay_based_on_MX.m4 new file mode 100644 index 000000000000..44d07116ceb0 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_based_on_MX.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)relay_based_on_MX.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_MX_SERVED_', 1) diff --git a/contrib/sendmail/cf/feature/relay_entire_domain.m4 b/contrib/sendmail/cf/feature/relay_entire_domain.m4 new file mode 100644 index 000000000000..823da1e50ff1 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_entire_domain.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)relay_entire_domain.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_ENTIRE_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/relay_hosts_only.m4 b/contrib/sendmail/cf/feature/relay_hosts_only.m4 new file mode 100644 index 000000000000..98f72c8f82d8 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_hosts_only.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)relay_hosts_only.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_HOSTS_ONLY_', 1) diff --git a/contrib/sendmail/cf/feature/relay_local_from.m4 b/contrib/sendmail/cf/feature/relay_local_from.m4 new file mode 100644 index 000000000000..549bc9c74232 --- /dev/null +++ b/contrib/sendmail/cf/feature/relay_local_from.m4 @@ -0,0 +1,15 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# + +divert(0) +VERSIONID(`@(#)relay_local_from.m4 8.2 (Berkeley) 5/19/98') +divert(-1) + +define(`_RELAY_LOCAL_FROM_', 1) diff --git a/contrib/sendmail/cf/feature/smrsh.m4 b/contrib/sendmail/cf/feature/smrsh.m4 new file mode 100644 index 000000000000..2c47632649b3 --- /dev/null +++ b/contrib/sendmail/cf/feature/smrsh.m4 @@ -0,0 +1,23 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)smrsh.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +ifdef(`_MAILER_local_', + `errprint(`*** FEATURE(smrsh) must occur before MAILER(local)')')dnl +define(`LOCAL_SHELL_PATH', + ifelse(_ARG_, `', + ifdef(`confEBINDIR', confEBINDIR, `/usr/libexec')`/smrsh', + _ARG_)) diff --git a/contrib/sendmail/cf/feature/stickyhost.m4 b/contrib/sendmail/cf/feature/stickyhost.m4 new file mode 100644 index 000000000000..8bbeb49cac62 --- /dev/null +++ b/contrib/sendmail/cf/feature/stickyhost.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)stickyhost.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +define(`_STICKY_LOCAL_DOMAIN_', 1) diff --git a/contrib/sendmail/cf/feature/use_ct_file.m4 b/contrib/sendmail/cf/feature/use_ct_file.m4 new file mode 100644 index 000000000000..344d178504d1 --- /dev/null +++ b/contrib/sendmail/cf/feature/use_ct_file.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)use_ct_file.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +# if defined, the sendmail.cf will read the /etc/sendmail.ct file +# to find the names of trusted users. There should only be a few +# of these, and normally this is done directly in the .cf file. + +define(`_USE_CT_FILE_', `') + +divert(0) diff --git a/contrib/sendmail/cf/feature/use_cw_file.m4 b/contrib/sendmail/cf/feature/use_cw_file.m4 new file mode 100644 index 000000000000..9abf2c1b4992 --- /dev/null +++ b/contrib/sendmail/cf/feature/use_cw_file.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)use_cw_file.m4 8.6 (Berkeley) 5/19/98') +divert(-1) + +# if defined, the sendmail.cf will read the /etc/sendmail.cw file +# to find alternate names for this host. Typically only used when +# several hosts have been squashed into one another at high speed. + +define(`USE_CW_FILE', `') + +divert(0) diff --git a/contrib/sendmail/cf/feature/uucpdomain.m4 b/contrib/sendmail/cf/feature/uucpdomain.m4 new file mode 100644 index 000000000000..1c6a33a81fa7 --- /dev/null +++ b/contrib/sendmail/cf/feature/uucpdomain.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)uucpdomain.m4 8.13 (Berkeley) 5/19/98') +divert(-1) + +define(`UUDOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/uudomain', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/feature/virtusertable.m4 b/contrib/sendmail/cf/feature/virtusertable.m4 new file mode 100644 index 000000000000..337f635766c0 --- /dev/null +++ b/contrib/sendmail/cf/feature/virtusertable.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)virtusertable.m4 8.7 (Berkeley) 5/19/98') +divert(-1) + +define(`VIRTUSER_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/virtusertable', `_ARG_'))dnl diff --git a/contrib/sendmail/cf/hack/cssubdomain.m4 b/contrib/sendmail/cf/hack/cssubdomain.m4 new file mode 100644 index 000000000000..b79b69b5b119 --- /dev/null +++ b/contrib/sendmail/cf/hack/cssubdomain.m4 @@ -0,0 +1,22 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) +VERSIONID(`@(#)cssubdomain.m4 8.6 (Berkeley) 5/19/98') + +divert(2) +# find possible (old & new) versions of our name via short circuit hack +# (this code should exist ONLY during the transition from .Berkeley.EDU +# names to .CS.Berkeley.EDU names -- probably not more than a few months) +R$* < @ $=w .CS.Berkeley.EDU > $* $: $1 < @ $j > $3 +R$* < @ $=w .Berkeley.EDU> $* $: $1 < @ $j > $3 +divert(0) diff --git a/contrib/sendmail/cf/m4/cf.m4 b/contrib/sendmail/cf/m4/cf.m4 new file mode 100644 index 000000000000..21655822b226 --- /dev/null +++ b/contrib/sendmail/cf/m4/cf.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +# +# This file is included so that multiple includes of cf.m4 will work +# + +# figure out where the CF files live +ifdef(`_CF_DIR_', `', + `ifelse(__file__, `__file__', + `define(`_CF_DIR_', `../')', + `define(`_CF_DIR_', + substr(__file__, 0, eval(len(__file__) - 8)))')') + +divert(0)dnl +ifdef(`OSTYPE', `dnl', +`include(_CF_DIR_`'m4/cfhead.m4)dnl +VERSIONID(`@(#)cf.m4 8.29 (Berkeley) 5/19/98')') diff --git a/contrib/sendmail/cf/m4/cfhead.m4 b/contrib/sendmail/cf/m4/cfhead.m4 new file mode 100644 index 000000000000..a7a109856d4e --- /dev/null +++ b/contrib/sendmail/cf/m4/cfhead.m4 @@ -0,0 +1,142 @@ +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +###################################################################### +###################################################################### +##### +##### SENDMAIL CONFIGURATION FILE +##### +define(`TEMPFILE', maketemp(/tmp/cfXXXXXX))dnl +syscmd(sh _CF_DIR_`'sh/makeinfo.sh _CF_DIR_ > TEMPFILE)dnl +include(TEMPFILE)dnl +syscmd(rm -f TEMPFILE)dnl +##### +###################################################################### +###################################################################### + +divert(-1) + +changecom() +undefine(`format') +undefine(`hpux') +ifdef(`pushdef', `', + `errprint(`You need a newer version of M4, at least as new as +System V or GNU') + include(NoSuchFile)') +define(`PUSHDIVERT', `pushdef(`__D__', divnum)divert($1)') +define(`POPDIVERT', `divert(__D__)popdef(`__D__')') +define(`OSTYPE', + `PUSHDIVERT(-1) + ifdef(`__OSTYPE__', `errprint(`duplicate OSTYPE'($1))') + define(`__OSTYPE__', $1) + define(`_ARG_', $2) + include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') +define(`MAILER', +`ifdef(`_MAILER_$1_', `dnl`'', +`define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')') +define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'') +define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') +define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'') +define(`VERSIONID', ``##### $1 #####'') +define(`LOCAL_RULE_0', `divert(3)') +define(`LOCAL_RULE_1', +`divert(9)dnl +####################################### +### Ruleset 1 -- Sender Rewriting ### +####################################### + +S1 +') +define(`LOCAL_RULE_2', +`divert(9)dnl +########################################## +### Ruleset 2 -- Recipient Rewriting ### +########################################## + +S2 +') +define(`LOCAL_RULESETS', +`divert(9) + +') +define(`LOCAL_RULE_3', `divert(2)') +define(`LOCAL_CONFIG', `divert(6)') +define(`MAILER_DEFINITIONS', `divert(7)') +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') +define(`DOL', ``$'$1') +define(`SITECONFIG', +`CONCAT(D, $3, $2) +define(`_CLASS_$3_', `')dnl +ifelse($3, U, Cw$2 $2.UUCP, `dnl') +define(`SITE', `ifelse(CONCAT($'2`, $3), SU, + CONCAT(CY, $'1`), + CONCAT(C, $3, $'1`))') +sinclude(_CF_DIR_`'siteconfig/$1.m4)') +define(`EXPOSED_USER', `PUSHDIVERT(5)CE$1 +POPDIVERT`'dnl`'') +define(`LOCAL_USER', `PUSHDIVERT(5)CL$1 +POPDIVERT`'dnl`'') +define(`MASQUERADE_AS', `define(`MASQUERADE_NAME', $1)') +define(`MASQUERADE_DOMAIN', `PUSHDIVERT(5)CM$1 +POPDIVERT`'dnl`'') +define(`MASQUERADE_DOMAIN_FILE', `PUSHDIVERT(5)FM$1 +POPDIVERT`'dnl`'') +define(`GENERICS_DOMAIN', `PUSHDIVERT(5)CG$1 +POPDIVERT`'dnl`'') +define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)FG$1 +POPDIVERT`'dnl`'') +define(`RELAY_DOMAIN', `PUSHDIVERT(5)CR$1 +POPDIVERT`'dnl`'') +define(`RELAY_DOMAIN_FILE', `PUSHDIVERT(5)FR$1 +POPDIVERT`'dnl`'') +define(`_OPTINS', `ifdef(`$1', `$2$1$3')') + +m4wrap(`include(_CF_DIR_`m4/proto.m4')') + +# set up default values for options +define(`ALIAS_FILE', `/etc/aliases') +define(`confMAILER_NAME', ``MAILER-DAEMON'') +define(`confFROM_LINE', `From $g $d') +define(`confOPERATORS', `.:%@!^/[]+') +define(`confSMTP_LOGIN_MSG', `$j Sendmail $v/$Z; $b') +define(`confRECEIVED_HEADER', `$?sfrom $s $.$?_($?s$|from $.$_) + $.by $j ($v/$Z)$?r with $r$. id $i$?u + for $u; $|; + $.$b') +define(`confSEVEN_BIT_INPUT', `False') +define(`confEIGHT_BIT_HANDLING', `pass8') +define(`confALIAS_WAIT', `10') +define(`confMIN_FREE_BLOCKS', `100') +define(`confBLANK_SUB', `.') +define(`confCON_EXPENSIVE', `False') +define(`confDELIVERY_MODE', `background') +define(`confTEMP_FILE_MODE', `0600') +define(`confMCI_CACHE_SIZE', `2') +define(`confMCI_CACHE_TIMEOUT', `5m') +define(`confUSE_ERRORS_TO', `False') +define(`confLOG_LEVEL', `9') +define(`confCHECK_ALIASES', `False') +define(`confOLD_STYLE_HEADERS', `True') +define(`confPRIVACY_FLAGS', `authwarnings') +define(`confSAFE_QUEUE', `True') +define(`confTO_QUEUERETURN', `5d') +define(`confTO_QUEUEWARN', `4h') +define(`confTIME_ZONE', `USE_SYSTEM') +define(`confCW_FILE', `/etc/sendmail.cw') +define(`confMIME_FORMAT_ERRORS', `True') +define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward') +define(`confCR_FILE', `-o /etc/mail/relay-domains') + +divert(0)dnl +VERSIONID(`@(#)cfhead.m4 8.22 (Berkeley) 5/19/98') diff --git a/contrib/sendmail/cf/m4/nullrelay.m4 b/contrib/sendmail/cf/m4/nullrelay.m4 new file mode 100644 index 000000000000..02020697a862 --- /dev/null +++ b/contrib/sendmail/cf/m4/nullrelay.m4 @@ -0,0 +1,113 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) + +VERSIONID(`@(#)nullrelay.m4 8.19 (Berkeley) 5/19/98') + +# +# This configuration applies only to relay-only hosts. They send +# all mail to a hub without consideration of the address syntax +# or semantics, except for adding the hub qualification to the +# addresses. +# +# This is based on a prototype done by Bryan Costales of ICSI. +# + +###################################################################### +###################################################################### +##### +##### REWRITING RULES +##### +###################################################################### +###################################################################### + +########################################### +### Rulset 3 -- Name Canonicalization ### +########################################### +S3 + +# handle null input +R$@ $@ <@> + +# strip group: syntax (not inside angle brackets!) and trailing semicolon +R$* $: $1 <@> mark addresses +R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr> +R$* :: $* <@> $: $1 :: $2 unmark node::addr +R:`include': $* <@> $: :`include': $1 unmark :`include':... +R$* : $* <@> $: $2 strip colon if marked +R$* <@> $: $1 unmark +R$* ; $1 strip trailing semi +R$* < $* ; > $1 < $2 > bogus bracketed semi + +# null input now results from list:; syntax +R$@ $@ :; <@> + +# basic textual canonicalization -- note RFC733 heuristic here +R$* $: < $1 > housekeeping <> +R$+ < $* > < $2 > strip excess on left +R< $* > $+ < $1 > strip excess on right +R<> $@ < @ > MAIL FROM:<> case +R< $+ > $: $1 remove housekeeping <> + +ifdef(`_NO_CANONIFY_', `dnl', +`# eliminate local host if present +R@ $=w $=: $+ $@ @ $M $2 $3 @thishost ... +R@ $+ $@ @ $1 @somewhere ... + +R$=E @ $=w $@ $1 @ $2 leave exposed +R$+ @ $=w $@ $1 @ $M ...@thishost +R$+ @ $+ $@ $1 @ $2 ...@somewhere + +R$=w ! $=E $@ $2 @ $1 leave exposed +R$=w ! $+ $@ $2 @ $M thishost!... +R$+ ! $+ $@ $1 ! $2 @ $M somewhere ! ... + +R$=E % $=w $@ $1 @ $2 leave exposed +R$+ % $=w $@ $1 @ $M ...%thishost +R$+ % $+ $@ $1 @ $2 ...%somewhere + +R$=E $@ $1 @ $j leave exposed +R$+ $@ $1 @ $M unadorned user') + + +###################################### +### Ruleset 0 -- Parse Address ### +###################################### + +S0 + +R$*:;<@> $#error $@ USAGE $: "List:; syntax illegal for recipient addresses" + +# pass everything else to a relay host +R$* $#_RELAY_ $@ $H $: $1 + + +################################################## +### Ruleset 4 -- Final Output Post-rewriting ### +################################################## +S4 + +R$* <@> $@ handle <> and list:; + +# strip trailing dot off before passing to nullclient relay +R$* @ $+ . $1 @ $2 + +# +###################################################################### +###################################################################### +##### +`##### MAILER DEFINITIONS' +##### +###################################################################### +###################################################################### +undivert(7)dnl diff --git a/contrib/sendmail/cf/m4/proto.m4 b/contrib/sendmail/cf/m4/proto.m4 new file mode 100644 index 000000000000..d8842bfff1f5 --- /dev/null +++ b/contrib/sendmail/cf/m4/proto.m4 @@ -0,0 +1,1268 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +divert(0) + +VERSIONID(`@(#)proto.m4 8.223 (Berkeley) 6/30/98') + +MAILER(local)dnl + +# level 8 config file format +V8/Berkeley +divert(-1) + +# do some sanity checking +ifdef(`__OSTYPE__',, + `errprint(`*** ERROR: No system type defined (use OSTYPE macro)')') + +# pick our default mailers +ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `esmtp')') +ifdef(`confLOCAL_MAILER',, `define(`confLOCAL_MAILER', `local')') +ifdef(`confRELAY_MAILER',, + `define(`confRELAY_MAILER', + `ifdef(`_MAILER_smtp_', `relay', + `ifdef(`_MAILER_uucp', `uucp-new', `unknown')')')') +ifdef(`confUUCP_MAILER',, `define(`confUUCP_MAILER', `uucp-old')') +define(`_SMTP_', `confSMTP_MAILER')dnl for readability only +define(`_LOCAL_', `confLOCAL_MAILER')dnl for readability only +define(`_RELAY_', `confRELAY_MAILER')dnl for readability only +define(`_UUCP_', `confUUCP_MAILER')dnl for readability only + +# set our default hashed database type +ifdef(`DATABASE_MAP_TYPE',, `define(`DATABASE_MAP_TYPE', `hash')') + +# back compatibility with old config files +ifdef(`confDEF_GROUP_ID', + `errprint(`*** confDEF_GROUP_ID is obsolete.') + errprint(` Use confDEF_USER_ID with a colon in the value instead.')') +ifdef(`confREAD_TIMEOUT', + `errprint(`*** confREAD_TIMEOUT is obsolete.') + errprint(` Use individual confTO_<timeout> parameters instead.')') +ifdef(`confMESSAGE_TIMEOUT', + `define(`_ARG_', index(confMESSAGE_TIMEOUT, /)) + ifelse(_ARG_, -1, + `define(`confTO_QUEUERETURN', confMESSAGE_TIMEOUT)', + `define(`confTO_QUEUERETURN', + substr(confMESSAGE_TIMEOUT, 0, _ARG_)) + define(`confTO_QUEUEWARN', + substr(confMESSAGE_TIMEOUT, eval(_ARG_+1)))')') +ifdef(`confMIN_FREE_BLOCKS', `ifelse(index(confMIN_FREE_BLOCKS, /), -1,, + `errprint(`*** compound confMIN_FREE_BLOCKS is obsolete.') + errprint(` Use confMAX_MESSAGE_SIZE for the second part of the value.')')') + +# clean option definitions below.... +define(`_OPTION', `ifdef(`$2', `O $1=$2', `#O $1`'ifelse($3, `',, `=$3')')')dnl + +divert(0)dnl + +# override file safeties - setting this option compromises system security +# need to set this now for the sake of class files +_OPTION(DontBlameSendmail, `confDONT_BLAME_SENDMAIL', safe) + +################## +# local info # +################## + +Cwlocalhost +ifdef(`USE_CW_FILE', +`# file containing names of hosts for which we receive email +Fw`'confCW_FILE', + `dnl') + +# my official domain name +# ... `define' this only if sendmail cannot automatically determine your domain +ifdef(`confDOMAIN_NAME', `Dj`'confDOMAIN_NAME', `#Dj$w.Foo.COM') + +ifdef(`_NULL_CLIENT_ONLY_', `divert(-1)')dnl + +CP. + +ifdef(`UUCP_RELAY', +`# UUCP relay host +DY`'UUCP_RELAY +CPUUCP + +')dnl +ifdef(`BITNET_RELAY', +`# BITNET relay host +DB`'BITNET_RELAY +CPBITNET + +')dnl +ifdef(`DECNET_RELAY', +`define(`_USE_DECNET_SYNTAX_', 1)dnl +# DECnet relay host +DC`'DECNET_RELAY +CPDECNET + +')dnl +ifdef(`FAX_RELAY', +`# FAX relay host +DF`'FAX_RELAY +CPFAX + +')dnl +# "Smart" relay host (may be null) +DS`'ifdef(`SMART_HOST', SMART_HOST) + +ifdef(`LUSER_RELAY', `dnl +# place to which unknown users should be forwarded +Kuser user -m -a<> +DL`'LUSER_RELAY', +`dnl') + +# operators that cannot be in local usernames (i.e., network indicators) +CO @ % ifdef(`_NO_UUCP_', `', `!') + +# a class with just dot (for identifying canonical names) +C.. + +# a class with just a left bracket (for identifying domain literals) +C[[ + +ifdef(`MAILER_TABLE', `dnl +# Mailer table (overriding domains) +Kmailertable MAILER_TABLE', +`dnl') + +ifdef(`DOMAIN_TABLE', `dnl +# Domain table (adding domains) +Kdomaintable DOMAIN_TABLE', +`dnl') + +ifdef(`GENERICS_TABLE', `dnl +# Generics table (mapping outgoing addresses) +Kgenerics GENERICS_TABLE', +`dnl') + +ifdef(`UUDOMAIN_TABLE', `dnl +# UUCP domain table +Kuudomain UUDOMAIN_TABLE', +`dnl') + +ifdef(`BITDOMAIN_TABLE', `dnl +# BITNET mapping table +Kbitdomain BITDOMAIN_TABLE', +`dnl') + +ifdef(`VIRTUSER_TABLE', `dnl +# Virtual user table (maps incoming users) +Kvirtuser VIRTUSER_TABLE', +`dnl') + +ifdef(`ACCESS_TABLE', `dnl +# Access list database (for spam stomping) +Kaccess ACCESS_TABLE', +`dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +# MX map (to allow relaying to hosts that we MX for) +Kmxserved bestmx -z: -T<TEMP>', +`dnl') + +ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',`dnl',`dnl +# Resolve map (to check if a host exists in check_mail) +Kresolve host -a<OK> -T<TEMP>') + +ifdef(`confCR_FILE', `dnl +# Hosts that will permit relaying ($=R) +FR`'confCR_FILE', +`dnl') + +# who I send unqualified names to (null means deliver locally) +DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY) + +# who gets all local email traffic ($R has precedence for unqualified names) +DH`'ifdef(`MAIL_HUB', MAIL_HUB) + +# dequoting map +Kdequote dequote + +divert(0)dnl # end of nullclient diversion +# class E: names that should be exposed as from this host, even if we masquerade +ifdef(`_NULL_CLIENT_ONLY_', `#', +`# class L: names that should be delivered locally, even if we have a relay +# class M: domains that should be converted to $M +#CL root +')CE root +undivert(5)dnl + +# who I masquerade as (null for no masquerading) (see also $=M) +DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME) + +# my name for error messages +ifdef(`confMAILER_NAME', `Dn`'confMAILER_NAME', `#DnMAILER-DAEMON') + +undivert(6)dnl +include(_CF_DIR_`m4/version.m4') + +############### +# Options # +############### + +# strip message body to 7 bits on input? +_OPTION(SevenBitInput, `confSEVEN_BIT_INPUT') + +# 8-bit data handling +_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', adaptive) + +ifdef(`_NULL_CLIENT_ONLY_', `dnl', ` +# wait for alias file rebuild (default units: minutes) +_OPTION(AliasWait, `confALIAS_WAIT', 5m) + +# location of alias file +_OPTION(AliasFile, `ALIAS_FILE', /etc/aliases) +') +# minimum number of free blocks on filesystem +_OPTION(MinFreeBlocks, `confMIN_FREE_BLOCKS', 100) + +# maximum message size +_OPTION(MaxMessageSize, `confMAX_MESSAGE_SIZE', 1000000) + +# substitution for space (blank) characters +_OPTION(BlankSub, `confBLANK_SUB', _) + +# avoid connecting to "expensive" mailers on initial submission? +_OPTION(HoldExpensive, `confCON_EXPENSIVE') + +# checkpoint queue runs after every N successful deliveries +_OPTION(CheckpointInterval, `confCHECKPOINT_INTERVAL', 10) + +# default delivery mode +_OPTION(DeliveryMode, `confDELIVERY_MODE', background) + +# automatically rebuild the alias database? +_OPTION(AutoRebuildAliases, `confAUTO_REBUILD') + +# error message header/file +_OPTION(ErrorHeader, `confERROR_MESSAGE', /etc/sendmail.oE) + +# error mode +_OPTION(ErrorMode, `confERROR_MODE', print) + +# save Unix-style "From_" lines at top of header? +_OPTION(SaveFromLine, `confSAVE_FROM_LINES') + +# temporary file mode +_OPTION(TempFileMode, `confTEMP_FILE_MODE', 0600) + +# match recipients against GECOS field? +_OPTION(MatchGECOS, `confMATCH_GECOS') + +# maximum hop count +_OPTION(MaxHopCount, `confMAX_HOP', 17) + +# location of help file +O HelpFile=ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf) + +# ignore dots as terminators in incoming messages? +_OPTION(IgnoreDots, `confIGNORE_DOTS') + +# name resolver options +_OPTION(ResolverOptions, `confBIND_OPTS', +AAONLY) + +# deliver MIME-encapsulated error messages? +_OPTION(SendMimeErrors, `confMIME_FORMAT_ERRORS') + +# Forward file search path +_OPTION(ForwardPath, `confFORWARD_PATH', /var/forward/$u:$z/.forward.$w:$z/.forward) + +# open connection cache size +_OPTION(ConnectionCacheSize, `confMCI_CACHE_SIZE', 2) + +# open connection cache timeout +_OPTION(ConnectionCacheTimeout, `confMCI_CACHE_TIMEOUT', 5m) + +# persistent host status directory +_OPTION(HostStatusDirectory, `confHOST_STATUS_DIRECTORY', .hoststat) + +# single thread deliveries (requires HostStatusDirectory)? +_OPTION(SingleThreadDelivery, `confSINGLE_THREAD_DELIVERY') + +# use Errors-To: header? +_OPTION(UseErrorsTo, `confUSE_ERRORS_TO') + +# log level +_OPTION(LogLevel, `confLOG_LEVEL', 10) + +# send to me too, even in an alias expansion? +_OPTION(MeToo, `confME_TOO') + +# verify RHS in newaliases? +_OPTION(CheckAliases, `confCHECK_ALIASES') + +# default messages to old style headers if no special punctuation? +_OPTION(OldStyleHeaders, `confOLD_STYLE_HEADERS') + +# SMTP daemon options +_OPTION(DaemonPortOptions, `confDAEMON_OPTIONS', Port=esmtp) + +# privacy flags +_OPTION(PrivacyOptions, `confPRIVACY_FLAGS', authwarnings) + +# who (if anyone) should get extra copies of error messages +_OPTION(PostMasterCopy, `confCOPY_ERRORS_TO', Postmaster) + +# slope of queue-only function +_OPTION(QueueFactor, `confQUEUE_FACTOR', 600000) + +# queue directory +O QueueDirectory=ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue) + +# timeouts (many of these) +_OPTION(Timeout.initial, `confTO_INITIAL', 5m) +_OPTION(Timeout.connect, `confTO_CONNECT', 5m) +_OPTION(Timeout.iconnect, `confTO_ICONNECT', 5m) +_OPTION(Timeout.helo, `confTO_HELO', 5m) +_OPTION(Timeout.mail, `confTO_MAIL', 10m) +_OPTION(Timeout.rcpt, `confTO_RCPT', 1h) +_OPTION(Timeout.datainit, `confTO_DATAINIT', 5m) +_OPTION(Timeout.datablock, `confTO_DATABLOCK', 1h) +_OPTION(Timeout.datafinal, `confTO_DATAFINAL', 1h) +_OPTION(Timeout.rset, `confTO_RSET', 5m) +_OPTION(Timeout.quit, `confTO_QUIT', 2m) +_OPTION(Timeout.misc, `confTO_MISC', 2m) +_OPTION(Timeout.command, `confTO_COMMAND', 1h) +_OPTION(Timeout.ident, `confTO_IDENT', 30s) +_OPTION(Timeout.fileopen, `confTO_FILEOPEN', 60s) +_OPTION(Timeout.queuereturn, `confTO_QUEUERETURN', 5d) +_OPTION(Timeout.queuereturn.normal, `confTO_QUEUERETURN_NORMAL', 5d) +_OPTION(Timeout.queuereturn.urgent, `confTO_QUEUERETURN_URGENT', 2d) +_OPTION(Timeout.queuereturn.non-urgent, `confTO_QUEUERETURN_NONURGENT', 7d) +_OPTION(Timeout.queuewarn, `confTO_QUEUEWARN', 4h) +_OPTION(Timeout.queuewarn.normal, `confTO_QUEUEWARN_NORMAL', 4h) +_OPTION(Timeout.queuewarn.urgent, `confTO_QUEUEWARN_URGENT', 1h) +_OPTION(Timeout.queuewarn.non-urgent, `confTO_QUEUEWARN_NONURGENT', 12h) +_OPTION(Timeout.hoststatus, `confTO_HOSTSTATUS', 30m) + +# should we not prune routes in route-addr syntax addresses? +_OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES') + +# queue up everything before forking? +_OPTION(SuperSafe, `confSAFE_QUEUE') + +# status file +O StatusFile=ifdef(`STATUS_FILE', `STATUS_FILE', /etc/sendmail.st) + +# time zone handling: +# if undefined, use system default +# if defined but null, use TZ envariable passed in +# if defined and non-null, use that info +ifelse(confTIME_ZONE, `USE_SYSTEM', `#O TimeZoneSpec=', + confTIME_ZONE, `USE_TZ', `O TimeZoneSpec=', + `O TimeZoneSpec=confTIME_ZONE') + +# default UID (can be username or userid:groupid) +_OPTION(DefaultUser, `confDEF_USER_ID', mailnull) + +# list of locations of user database file (null means no lookup) +_OPTION(UserDatabaseSpec, `confUSERDB_SPEC', /etc/userdb) + +# fallback MX host +_OPTION(FallbackMXhost, `confFALLBACK_MX', fall.back.host.net) + +# if we are the best MX host for a site, try it directly instead of config err +_OPTION(TryNullMXList, `confTRY_NULL_MX_LIST') + +# load average at which we just queue messages +_OPTION(QueueLA, `confQUEUE_LA', 8) + +# load average at which we refuse connections +_OPTION(RefuseLA, `confREFUSE_LA', 12) + +# maximum number of children we allow at one time +_OPTION(MaxDaemonChildren, `confMAX_DAEMON_CHILDREN', 12) + +# maximum number of new connections per second +_OPTION(ConnectionRateThrottle, `confCONNECTION_RATE_THROTTLE', 3) + +# work recipient factor +_OPTION(RecipientFactor, `confWORK_RECIPIENT_FACTOR', 30000) + +# deliver each queued job in a separate process? +_OPTION(ForkEachJob, `confSEPARATE_PROC') + +# work class factor +_OPTION(ClassFactor, `confWORK_CLASS_FACTOR', 1800) + +# work time factor +_OPTION(RetryFactor, `confWORK_TIME_FACTOR', 90000) + +# shall we sort the queue by hostname first? +_OPTION(QueueSortOrder, `confQUEUE_SORT_ORDER', priority) + +# minimum time in queue before retry +_OPTION(MinQueueAge, `confMIN_QUEUE_AGE', 30m) + +# default character set +_OPTION(DefaultCharSet, `confDEF_CHAR_SET', iso-8859-1) + +# service switch file (ignored on Solaris, Ultrix, OSF/1, others) +_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', /etc/service.switch) + +# hosts file (normally /etc/hosts) +_OPTION(HostsFile, `confHOSTS_FILE', /etc/hosts) + +# dialup line delay on connection failure +_OPTION(DialDelay, `confDIAL_DELAY', 10s) + +# action to take if there are no recipients in the message +_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', add-to-undisclosed) + +# chrooted environment for writing to files +_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', /arch) + +# are colons OK in addresses? +_OPTION(ColonOkInAddr, `confCOLON_OK_IN_ADDR') + +# how many jobs can you process in the queue? +_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', 10000) + +# shall I avoid expanding CNAMEs (violates protocols)? +_OPTION(DontExpandCnames, `confDONT_EXPAND_CNAMES') + +# SMTP initial login message (old $e macro) +_OPTION(SmtpGreetingMessage, `confSMTP_LOGIN_MSG') + +# UNIX initial From header format (old $l macro) +_OPTION(UnixFromLine, `confFROM_LINE') + +# From: lines that have embedded newlines are unwrapped onto one line +_OPTION(SingleLineFromHeader, `confSINGLE_LINE_FROM_HEADER', False) + +# Allow HELO SMTP command that does not `include' a host name +_OPTION(AllowBogusHELO, `confALLOW_BOGUS_HELO', False) + +# Characters to be quoted in a full name phrase (@,;:\()[] are automatic) +_OPTION(MustQuoteChars, `confMUST_QUOTE_CHARS', .) + +# delimiter (operator) characters (old $o macro) +_OPTION(OperatorChars, `confOPERATORS') + +# shall I avoid calling initgroups(3) because of high NIS costs? +_OPTION(DontInitGroups, `confDONT_INIT_GROUPS') + +# are group-writable `:include:' and .forward files (un)trustworthy? +_OPTION(UnsafeGroupWrites, `confUNSAFE_GROUP_WRITES') + +# where do errors that occur when sending errors get sent? +_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS', postmaster) + +# what user id do we assume for the majority of the processing? +_OPTION(RunAsUser, `confRUN_AS_USER', sendmail) + +# maximum number of recipients per SMTP envelope +_OPTION(MaxRecipientsPerMessage, `confMAX_RCPTS_PER_MESSAGE', 100) + +# shall we get local names from our installed interfaces? +_OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES') + +########################### +# Message precedences # +########################### + +Pfirst-class=0 +Pspecial-delivery=100 +Plist=-30 +Pbulk=-60 +Pjunk=-100 + +##################### +# Trusted users # +##################### + +# this is equivalent to setting class "t" +ifdef(`_USE_CT_FILE_', `', `#')Ft`'ifdef(`confCT_FILE', confCT_FILE, `/etc/sendmail.ct') +Troot +Tdaemon +ifdef(`_NO_UUCP_', `dnl', `Tuucp') +ifdef(`confTRUSTED_USERS', `T`'confTRUSTED_USERS', `dnl') + +######################### +# Format of headers # +######################### + +ifdef(`confFROM_HEADER',, `define(`confFROM_HEADER', `$?x$x <$g>$|$g$.')')dnl +H?P?Return-Path: <$g> +HReceived: confRECEIVED_HEADER +H?D?Resent-Date: $a +H?D?Date: $a +H?F?Resent-From: confFROM_HEADER +H?F?From: confFROM_HEADER +H?x?Full-Name: $x +# HPosted-Date: $a +# H?l?Received-Date: $b +H?M?Resent-Message-Id: <$t.$i@$j> +H?M?Message-Id: <$t.$i@$j> +ifdef(`_NULL_CLIENT_ONLY_', + `include(_CF_DIR_`'m4/nullrelay.m4)m4exit', + `dnl') +# +###################################################################### +###################################################################### +##### +##### REWRITING RULES +##### +###################################################################### +###################################################################### + +############################################ +### Ruleset 3 -- Name Canonicalization ### +############################################ +S3 + +# handle null input (translate to <@> special case) +R$@ $@ <@> + +# strip group: syntax (not inside angle brackets!) and trailing semicolon +R$* $: $1 <@> mark addresses +R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr> +R@ $* <@> $: @ $1 unmark @host:... +R$* :: $* <@> $: $1 :: $2 unmark node::addr +R:`include': $* <@> $: :`include': $1 unmark :`include':... +R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs +R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon +R$* : $* <@> $: $2 strip colon if marked +R$* <@> $: $1 unmark +R$* ; $1 strip trailing semi +R$* < $* ; > $1 < $2 > bogus bracketed semi + +# null input now results from list:; syntax +R$@ $@ :; <@> + +# strip angle brackets -- note RFC733 heuristic to get innermost item +R$* $: < $1 > housekeeping <> +R$+ < $* > < $2 > strip excess on left +R< $* > $+ < $1 > strip excess on right +R<> $@ < @ > MAIL FROM:<> case +R< $+ > $: $1 remove housekeeping <> + +# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later +R@ $+ , $+ @ $1 : $2 change all "," to ":" + +# localize and dispose of route-based addresses +R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr> + +# find focus for list syntax +R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax +R $+ : $* ; $@ $1 : $2; list syntax + +# find focus for @ syntax addresses +R$+ @ $+ $: $1 < @ $2 > focus on domain +R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right +R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical + +# do some sanity checking +R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs + +ifdef(`_NO_UUCP_', `dnl', +`# convert old-style addresses to a domain-based address +R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names +R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps +R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains +') +ifdef(`_USE_DECNET_SYNTAX_', +`# convert node::user addresses into a domain-based address +R$- :: $+ $@ $>96 $2 < @ $1 .DECNET > resolve DECnet names +R$- . $- :: $+ $@ $>96 $3 < @ $1.$2 .DECNET > numeric DECnet addr +', + `dnl') +# if we have % signs, take the rightmost one +R$* % $* $1 @ $2 First make them all @s. +R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last. +R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish + +# else we must be a local name +R$* $@ $>96 $1 + + +################################################ +### Ruleset 96 -- bottom half of ruleset 3 ### +################################################ + +S96 + +# handle special cases for local names +R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all +R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain +ifdef(`_NO_UUCP_', `dnl', +`R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain') +R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d] +R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal +R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr + +ifdef(`DOMAIN_TABLE', `dnl +# look up domains in the domain table +R$* < @ $+ > $* $: $1 < @ $(domaintable $2 $) > $3', `dnl') + +undivert(2)dnl + +ifdef(`BITDOMAIN_TABLE', `dnl +# handle BITNET mapping +R$* < @ $+ .BITNET > $* $: $1 < @ $(bitdomain $2 $: $2.BITNET $) > $3', `dnl') + +ifdef(`UUDOMAIN_TABLE', `dnl +# handle UUCP mapping +R$* < @ $+ .UUCP > $* $: $1 < @ $(uudomain $2 $: $2.UUCP $) > $3', `dnl') + +ifdef(`_NO_UUCP_', `dnl', +`ifdef(`UUCP_RELAY', +`# pass UUCP addresses straight through +R$* < @ $+ . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', +`# if really UUCP, handle it immediately +ifdef(`_CLASS_U_', +`R$* < @ $=U . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_V_', +`R$* < @ $=V . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_W_', +`R$* < @ $=W . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_X_', +`R$* < @ $=X . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') +ifdef(`_CLASS_Y_', +`R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') + +ifdef(`_NO_CANONIFY_', `dnl', `dnl +# try UUCP traffic as a local address +R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 +R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3') +')') +ifdef(`_NO_CANONIFY_', `dnl', `dnl +# pass to name server to make hostname canonical +R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4') + +# local host aliases and pseudo-domains are always canonical +R$* < @ $=w > $* $: $1 < @ $2 . > $3 +R$* < @ $j > $* $: $1 < @ $j . > $2 +ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', +`R$* < @ $* $=M > $* $: $1 < @ $2 $3 . > $4', +`R$* < @ $=M > $* $: $1 < @ $2 . > $3') +R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4 +R$* < @ $* . . > $* $1 < @ $2 . > $3 + + +################################################## +### Ruleset 4 -- Final Output Post-rewriting ### +################################################## +S4 + +R$* <@> $@ handle <> and list:; + +# strip trailing dot off possibly canonical name +R$* < @ $+ . > $* $1 < @ $2 > $3 + +# eliminate internal code -- should never get this far! +R$* < @ *LOCAL* > $* $1 < @ $j > $2 + +# externalize local domain info +R$* < $+ > $* $1 $2 $3 defocus +R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical +R@ $* $@ @ $1 ... and exit + +ifdef(`_NO_UUCP_', `dnl', +`# UUCP must always be presented in old form +R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u') + +ifdef(`_USE_DECNET_SYNTAX_', +`# put DECnet back in :: form +R$+ @ $+ . DECNET $2 :: $1 u@h.DECNET => h::u', + `dnl') +# delete duplicate local names +R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host + + + +############################################################## +### Ruleset 97 -- recanonicalize and call ruleset zero ### +### (used for recursive calls) ### +############################################################## + +S`'97 +R$* $: $>3 $1 +R$* $@ $>0 $1 + + +###################################### +### Ruleset 0 -- Parse Address ### +###################################### + +S0 + +R$* $: $>Parse0 $1 initial parsing +R<@> $#_LOCAL_ $: <@> special case error msgs +R$* $: $>98 $1 handle local hacks +R$* $: $>Parse1 $1 final parsing + +# +# Parse0 -- do initial syntax checking and eliminate local addresses. +# This should either return with the (possibly modified) input +# or return with a #error mailer. It should not return with a +# #mailer other than the #error mailer. +# + +SParse0 +R<@> $@ <@> special case error msgs +R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses" +#R@ <@ $* > < @ $1 > catch "@@host" bogosity +R<@ $+> $#error $@ 5.1.3 $: "User address required" +R$* $: <> $1 +R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3 +R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part" +R<> $* $1 +R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name" +R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name" + +# now delete the local info -- note $=O to find characters that cause forwarding +R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user +R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ... +R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here +R< @ $+ > $#error $@ 5.1.3 $: "User address required" +R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ... +R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo" +R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required" +R$* $=O $* < @ *LOCAL* > + $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ... +R$* < @ *LOCAL* > $: $1 + +# +# Parse1 -- the bottom half of ruleset 0. +# + +SParse1 +ifdef(`_MAILER_smtp_', +`# handle numeric address spec +R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec +R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send', + `dnl') + +ifdef(`VIRTUSER_TABLE', `dnl +# handle virtual users +R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > +R<@> $+ + $* < @ $* . > + $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > +R<@> $+ + $* < @ $* . > + $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > +R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > +R<@> $+ $: $1 +R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< $+ > $+ < @ $+ > $: $>97 $1', +`dnl') + +# short circuit local delivery so forwarded email works +ifdef(`_MAILER_usenet_', `dnl +R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially', `dnl') +ifdef(`_STICKY_LOCAL_DOMAIN_', +`R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub +R< $+ > $+ < $+ > $>95 < $1 > $2 < $3 > yep .... +R< > $+ + $* < $+ > $#_LOCAL_ $: $1 + $2 plussed name? +R< > $+ < $+ > $#_LOCAL_ $: @ $1 nope, local address', +`R$=L < @ $=w . > $#_LOCAL_ $: @ $1 special local names +R$+ < @ $=w . > $#_LOCAL_ $: $1 regular local name') + +ifdef(`MAILER_TABLE', `dnl +# not local -- try mailer table lookup +R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name +R< $+ . > $* $: < $1 > $2 strip trailing dot +R< $+ > $* $: < $(mailertable $1 $) > $2 lookup +R< $~[ : $+ > $* $>95 < $1 : $2 > $3 check -- resolved? +R< $+ > $* $: $>90 <$1> $2 try domain', +`dnl') +undivert(4)dnl + +ifdef(`_NO_UUCP_', `dnl', +`# resolve remotely connected UUCP links (if any) +ifdef(`_CLASS_V_', +`R$* < @ $=V . UUCP . > $* $: $>95 < $V > $1 <@$2.UUCP.> $3', + `dnl') +ifdef(`_CLASS_W_', +`R$* < @ $=W . UUCP . > $* $: $>95 < $W > $1 <@$2.UUCP.> $3', + `dnl') +ifdef(`_CLASS_X_', +`R$* < @ $=X . UUCP . > $* $: $>95 < $X > $1 <@$2.UUCP.> $3', + `dnl')') + +# resolve fake top level domains by forwarding to other hosts +ifdef(`BITNET_RELAY', +`R$*<@$+.BITNET.>$* $: $>95 < $B > $1 <@$2.BITNET.> $3 user@host.BITNET', + `dnl') +ifdef(`DECNET_RELAY', +`R$*<@$+.DECNET.>$* $: $>95 < $C > $1 <@$2.DECNET.> $3 user@host.DECNET', + `dnl') +ifdef(`_MAILER_pop_', +`R$+ < @ POP. > $#pop $: $1 user@POP', + `dnl') +ifdef(`_MAILER_fax_', +`R$+ < @ $+ .FAX. > $#fax $@ $2 $: $1 user@host.FAX', +`ifdef(`FAX_RELAY', +`R$*<@$+.FAX.>$* $: $>95 < $F > $1 <@$2.FAX.> $3 user@host.FAX', + `dnl')') + +ifdef(`UUCP_RELAY', +`# forward non-local UUCP traffic to our UUCP relay +R$*<@$*.UUCP.>$* $: $>95 < $Y > $1 <@$2.UUCP.> $3 uucp mail', +`ifdef(`_MAILER_uucp_', +`# forward other UUCP traffic straight to UUCP +R$* < @ $+ .UUCP. > $* $#_UUCP_ $@ $2 $: $1 < @ $2 .UUCP. > $3 user@host.UUCP', + `dnl')') +ifdef(`_MAILER_usenet_', ` +# addresses sent to net.group.USENET will get forwarded to a newsgroup +R$+ . USENET $#usenet $: $1', + `dnl') + +ifdef(`_LOCAL_RULES_', +`# figure out what should stay in our local mail system +undivert(1)', `dnl') + +# pass names that still have a host to a smarthost (if defined) +R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name + +# deal with other remote names +ifdef(`_MAILER_smtp_', +`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain', +`R$* < @$* > $* $#error $@ 5.1.2 $: "Unrecognized host name" $2') + +# handle locally delivered names +R$=L $#_LOCAL_ $: @ $1 special local names +R$+ $#_LOCAL_ $: $1 regular local names + +########################################################################### +### Ruleset 5 -- special rewriting after aliases have been expanded ### +########################################################################### + +S5 + +# deal with plussed users so aliases work nicely +R$+ + * $#_LOCAL_ $@ $&h $: $1 +R$+ + $* $#_LOCAL_ $@ + $2 $: $1 + * + +# prepend an empty "forward host" on the front +R$+ $: <> $1 + +ifdef(`LUSER_RELAY', `dnl +# send unrecognized local users to a relay host +R< > $+ $: < $L . > $(user $1 $) look up user +R< $* > $+ <> $* $: < > $2 $3 found; strip $L +R< $* . > $+ $: < $1 > $2 strip extra dot', +`dnl') + +# see if we have a relay or a hub +R< > $+ $: < $H > $1 try hub +R< > $+ $: < $R > $1 try relay +R< > $+ $: < > < $1 $&h > nope, restore +detail +R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part +R< > < $+ > + $* $#_LOCAL_ $@ $2 $: @ $1 strip the extra + +R< > < $+ > $@ $1 no +detail +R$+ $: $1 $&h add +detail back in +R< local : $* > $* $: $>95 < local : $1 > $2 no host extension +R< error : $* > $* $: $>95 < error : $1 > $2 no host extension +R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 > +R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 > + +ifdef(`MAILER_TABLE', `dnl +################################################################### +### Ruleset 90 -- try domain part of mailertable entry ### +################################################################### + +S90 +R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4 +R$* <$~[ : $+ > $* $>95 < $2 : $3 > $4 check -- resolved? +R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again +R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "." +R< $~[ : $+ > $* $>95 < $1 : $2 > $3 "." found? +R< $* > $* $@ $2 no mailertable match', +`dnl') + +################################################################### +### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ### +################################################################### + +S95 +R< > $* $@ $1 strip off null relay +R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< local : $* > $* $>CanonLocal < $1 > $2 +R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user +R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer +R< $=w > $* $@ $2 delete local host +R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer + +################################################################### +### Ruleset CanonLocal -- canonify local: syntax ### +################################################################### + +SCanonLocal +# strip trailing dot from any host name that may appear +R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 > + +# handle local: syntax -- use old user, either with or without host +R< > $* < @ $* > $* $#_LOCAL_ $@ $1@$2 $: $1 +R< > $+ $#_LOCAL_ $@ $1 $: $1 + +# handle local:user@host syntax -- ignore host part +R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 > + +# handle local:user syntax +R< $+ > $* <@ $* > $* $#_LOCAL_ $@ $2@$3 $: $1 +R< $+ > $* $#_LOCAL_ $@ $2 $: $1 + +################################################################### +### Ruleset 93 -- convert header names to masqueraded form ### +################################################################### + +S93 + +ifdef(`GENERICS_TABLE', `dnl +# handle generics database +ifdef(`_GENERICS_ENTIRE_DOMAIN_', +`R$+ < @ $* $=G . > $: < $1@$2$3 > $1 < @ $2$3 . > @ mark', +`R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark') +R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark +R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 > +R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 > +R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified +R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified +R< > $* $: $1 not found', +`dnl') + +# special case the users that should be exposed +R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed +ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', +`R$=E < @ $* $=M . > $@ $1 < @ $2 $3 . >', +`R$=E < @ $=M . > $@ $1 < @ $2 . >') +ifdef(`_LIMITED_MASQUERADE_', `dnl', +`R$=E < @ $=w . > $@ $1 < @ $2 . >') + +# handle domain-specific masquerading +ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', +`R$* < @ $* $=M . > $* $: $1 < @ $2 $3 . @ $M > $4 convert masqueraded doms', +`R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms') +ifdef(`_LIMITED_MASQUERADE_', `dnl', +`R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3') +R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2 +R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null +R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null + +################################################################### +### Ruleset 94 -- convert envelope names to masqueraded form ### +################################################################### + +S94 +ifdef(`_MASQUERADE_ENVELOPE_', +`R$+ $@ $>93 $1', +`R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2') + +################################################################### +### Ruleset 98 -- local part of ruleset zero (can be null) ### +################################################################### + +S98 +undivert(3)dnl + +ifelse(confDELIVERY_MODE, defer, `errprint(`WARNING: Antispam rules not available in deferred delivery mode.')') +ifdef(`ACCESS_TABLE', `dnl +###################################################################### +### LookUpDomain -- search for domain in access database +### +### Parameters: +### <$1> -- key (domain name) +### <$2> -- default (what to return if not found in db) +### <$3> -- passthru (additional data passed unchanged through) +###################################################################### + +SLookUpDomain +R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> +R<?> <$+.$+> <$+> <$*> $@ $>LookUpDomain <$2> <$3> <$4> +R<?> <$+> <$+> <$*> $@ <$2> <$3> +R<$*> <$+> <$+> <$*> $@ <$1> <$4> + +###################################################################### +### LookUpAddress -- search for host address in access database +### +### Parameters: +### <$1> -- key (dot quadded host address) +### <$2> -- default (what to return if not found in db) +### <$3> -- passthru (additional data passed through) +###################################################################### + +SLookUpAddress +R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3> +R<?> <$+.$-> <$+> <$*> $@ $>LookUpAddress <$1> <$3> <$4> +R<?> <$+> <$+> <$*> $@ <$2> <$3> +R<$*> <$+> <$+> <$*> $@ <$1> <$4>', +`dnl') + +###################################################################### +### ParseRecipient -- Strip off hosts in $=R as well as possibly +### $* $=m or the access database. +### Check user portion for host separators. +### +### Parameters: +### $1 -- full recipient address +### +### Returns: +### parsed, non-local-relaying address +###################################################################### + +SParseRecipient +R$* $: <?> $>Parse0 $>3 $1 +R<?> $* < @ $* . > <?> $1 < @ $2 > strip trailing dots +R<?> $- < @ $* > $: <?> $(dequote $1 $) < @ $2 > dequote local part + +# if no $=O character, no host in the user portion, we are done +R<?> $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4> +R<?> $* $@ $1 + +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +# if we relay, check username portion for user%host so host can be checked also +R<NO> $* < @ $* $=m > $: <RELAY> $1 < @ $2 $3 >', `dnl') +ifdef(`_RELAY_HOSTS_ONLY_', +`R<NO> $* < @ $=R > $: <RELAY> $1 < @ $2 > +ifdef(`ACCESS_TABLE', `dnl +R<NO> $* < @ $* > $: <$(access $2 $: NO $)> $1 < @ $2 >',`dnl')', +`R<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 > +ifdef(`ACCESS_TABLE', `dnl +R<NO> $* < @ $* > $: $>LookUpDomain <$2> <NO> <$1 < @ $2 >> +R<$+> <$+> $: <$1> $2',`dnl')') +R<RELAY> $* < @ $* > $@ $>ParseRecipient $1 +R<$-> $* $@ $2 + +###################################################################### +### check_relay -- check hostname/address on SMTP startup +###################################################################### + +SLocal_check_relay +Scheck_relay +R$* $: $1 $| $>"Local_check_relay" $1 +R$* $| $* $| $#$* $#$3 +R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2 + +SBasic_check_relay +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +ifdef(`ACCESS_TABLE', `dnl +R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 > +R<?> < $+ > $: $>LookUpAddress < $1 > <OK> < $1 > +R<OK> < $* > $: $1 +R<RELAY> < $* > $: $1 +R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')" +R<DISCARD> $* $#discard $: discard +R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') + +ifdef(`_RBL_', `dnl +# MAPS project checks -- http://maps.vix.com/ +R$* $: $&{client_addr} +R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) +ROK $@ OK +R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused; see http://maps.vix.com/rbl/"', +`dnl') + +###################################################################### +### check_mail -- check SMTP ``MAIL FROM:'' command argument +###################################################################### + +SLocal_check_mail +Scheck_mail +R$* $: $1 $| $>"Local_check_mail" $1 +R$* $| $#$* $#$2 +R$* $| $* $@ $>"Basic_check_mail" $1 + +SBasic_check_mail +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +R<> $@ <OK> +R$* $: <?> $>Parse0 $>3 $1 make domain canonical +R<?> $* < @ $+ . > $* <?> $1 < @ $2 > $3 strip trailing dots +# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc) +R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4 +ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_', +`R<?> $* < @ $+ > $* $: <OK> $1 < @ $2 > $3 ... unresolvable OK', +`R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3 +R<? $* <$->> $* < @ $+ > $* + $: <$2> $3 < @ $4 > $5') + +ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl +# handle case of @localhost on address +R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost > +R<$+> $* < @localhost.$m > + $: < ? $&{client_name} > <$1> $2 < @localhost.$m > +ifdef(`_NO_UUCP_', `dnl', +`R<$+> $* < @localhost.UUCP > + $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >') +R<? $=w> <$+> $* <?> <$2> $3 +R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required" +R<?> <$+> $* $: <$1> $2') + +ifdef(`ACCESS_TABLE', `dnl +# lookup localpart (user@) +R<$+> $* < @ $+ > $* $: <USER $(access $2@ $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try full address (user@domain rest) +R<USER ?> <$+> $* < @ $* > $* + $: <USER $(access $2@$3$4 $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try address (user@domain) +R<USER ?> <$+> $+ < @ $+ > $* + $: <USER $(access $2@$3 $: ? $) > <$1> $2 < @ $3 > $4 +# no match, try (sub)domain (domain) +R<USER ?> <$+> $* < @ $+ > $* + $: $>LookUpDomain <$3> <$1> <> +# check unqualified user in access database +R<?> $* $: <USER $(access $1@ $: ? $) > <?> $1 +# retransform for further use +R<USER $+> <$+> $* $: <$1> $3', +`dnl') + +ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl +# handle case of no @domain on address +R<?> $* $: < ? $&{client_name} > $1 +R<?> $* $@ <OK> ...local unqualed ok +R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required" + ...remote is not') +# check results +R<?> $* $@ <OK> +R<OK> $* $@ <OK> +R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve" +R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist" +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ <RELAY> +R<DISCARD> $* $#discard $: discard +R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')" +R<$+> $* $#error $@ 5.7.1 $: $1 error from access db', +`dnl') + +###################################################################### +### check_rcpt -- check SMTP ``RCPT TO:'' command argument +###################################################################### + +SLocal_check_rcpt +Scheck_rcpt +R$* $: $1 $| $>"Local_check_rcpt" $1 +R$* $| $#$* $#$2 +R$* $| $* $@ $>"Basic_check_rcpt" $1 + +SBasic_check_rcpt +# check for deferred delivery mode +R$* $: < ${deliveryMode} > $1 +R< d > $* $@ deferred +R< $* > $* $: $2 + +ifdef(`_LOOSE_RELAY_CHECK_',`dnl +R$* $: $>Parse0 $>3 $1 +R$* < @ $* . > $1 < @ $2 > strip trailing dots', +`R$* $: $>ParseRecipient $1 strip relayable hosts') + +ifdef(`_BLACKLIST_RCPT_',`dnl +ifdef(`ACCESS_TABLE', `dnl +# blacklist local users or any host from receiving mail +R$* $: <?> $1 +R<?> $+ < @ $=w > $: <> <USER $1> <FULL $1@$2> <HOST $2> <$1 < @ $2 >> +R<?> $+ < @ $* > $: <> <FULL $1@$2> <HOST $2> <$1 < @ $2 >> +R<?> $+ $: <> <USER $1> <$1> +R<> <USER $+> $* $: <$(access $1 $: $)> $2 +R<> <FULL $+> $* $: <$(access $1 $: $)> $2 +R<OK> <FULL $+> $* $: <$(access $1 $: $)> $2 +R<> <HOST $+> $* $: <$(access $1 $: $)> $2 +R<OK> <HOST $+> $* $: <$(access $1 $: $)> $2 +R<> <$*> $: $1 +R<OK> <$*> $: $1 +R<RELAY> <$*> $: $1 +R<REJECT> $* $#error $@ 5.2.1 $: "550 Mailbox disabled for this recipient" +R<$+> $* $#error $@ 5.2.1 $: $1 error from access db', `dnl')', `dnl') + +ifdef(`_PROMISCUOUS_RELAY_', `dnl', `dnl +# anything terminating locally is ok +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +R$+ < @ $* $=m > $@ OK', `dnl') +R$+ < @ $=w > $@ OK +ifdef(`_RELAY_HOSTS_ONLY_', +`R$+ < @ $=R > $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$+ < @ $* > $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')', +`R$+ < @ $* $=R > $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$+ < @ $* > $: $>LookUpDomain <$2> <?> <$1 < @ $2 >>',`dnl')') +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ RELAY +R<$*> <$*> $: $2',`dnl') + +ifdef(`_RELAY_MX_SERVED_', `dnl +# allow relaying for hosts which we MX serve +R$+ < @ $* > $: < : $(mxserved $2 $) : > $1 < @ $2 > +R< : $* <TEMP> : > $* $#error $@ 4.7.1 $: "450 Can not check MX records for recipient host " $1 +R<$* : $=w . : $*> $* $@ OK +R<$*> $* $: $2', +`dnl') + +# check for local user (i.e. unqualified address) +R$* $: <?> $1 +R<?> $+ < @ $+ > $: <REMOTE> $1 < @ $2 > +# local user is ok +R<?> $+ $@ OK +R<$+> $* $: $2 + +# anything originating locally is ok +R$* $: <?> $&{client_name} +# check if bracketed IP address (forward lookup != reverse lookup) +R<?> [$+] $: <BAD> [$1] +# pass to name server to make hostname canonical +R<?> $* $~P $: <?> $[ $1 $2 $] +R<$-> $* $: $2 +R$* . $1 strip trailing dots +R$@ $@ OK +ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl +R$* $=m $@ OK', `dnl') +R$=w $@ OK +ifdef(`_RELAY_HOSTS_ONLY_', +`R$=R $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$* $: <$(access $1 $: ? $)> <$1>',`dnl')', +`R$* $=R $@ OK +ifdef(`ACCESS_TABLE', `dnl +R$* $: $>LookUpDomain <$1> <?> <$1>',`dnl')') +ifdef(`ACCESS_TABLE', `dnl +R<RELAY> $* $@ RELAY +R<$*> <$*> $: $2',`dnl') + +# check IP address +R$* $: $&{client_addr} +R$@ $@ OK originated locally +R0 $@ OK originated locally +R$=R $* $@ OK relayable IP address +ifdef(`ACCESS_TABLE', `dnl +R$* $: $>LookUpAddress <$1> <?> <$1> +R<RELAY> $* $@ RELAY relayable IP address +R<$*> <$*> $: $2', `dnl') +R$* $: [ $1 ] put brackets around it... +R$=w $@ OK ... and see if it is local + +ifdef(`_RELAY_LOCAL_FROM_', `dnl +# anything with a local FROM is ok +R$* $: $1 $| $>Parse0 $>3 $&f +R$* $| $+ < @ $=w . > $@ OK FROM local +R$* $| $* $: $1 +', `dnl') + +# anything else is bogus +R$* $#error $@ 5.7.1 $: "550 Relaying denied"') + +undivert(9)dnl +# +###################################################################### +###################################################################### +##### +`##### MAILER DEFINITIONS' +##### +###################################################################### +###################################################################### +undivert(7)dnl diff --git a/contrib/sendmail/cf/m4/version.m4 b/contrib/sendmail/cf/m4/version.m4 new file mode 100644 index 000000000000..2db220271ad5 --- /dev/null +++ b/contrib/sendmail/cf/m4/version.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +VERSIONID(`@(#)version.m4 8.9.1.1 (Berkeley) 7/2/98') +# +divert(0) +# Configuration version number +DZ8.9.1`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff --git a/contrib/sendmail/cf/mailer/cyrus.m4 b/contrib/sendmail/cf/mailer/cyrus.m4 new file mode 100644 index 000000000000..6e4badcce29b --- /dev/null +++ b/contrib/sendmail/cf/mailer/cyrus.m4 @@ -0,0 +1,58 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# +# This code incorporates code from Carnegie Mellon University, whose +# copyright notice and conditions of redistribution are as follows: +# +#*************************************************************************** +# (C) Copyright 1995 by Carnegie Mellon University +# +# All Rights Reserved +# +# Permission to use, copy, modify, and distribute this software and its +# documentation for any purpose and without fee is hereby granted, +# provided that the above copyright notice appear in all copies and that +# both that copyright notice and this permission notice appear in +# supporting documentation, and that the name of CMU not be +# used in advertising or publicity pertaining to distribution of the +# software without specific, written prior permission. +# +# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +# SOFTWARE. +# +# Contributed to Berkeley by John Gardiner Myers <jgm+@CMU.EDU>. +# + +ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@/:|')') +ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)') +ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')') +ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')') +ifdef(`CYRUS_BB_MAILER_FLAGS',, `define(`CYRUS_BB_MAILER_FLAGS', `')') +ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `deliver -e -m $u')') + +POPDIVERT + +################################################## +### Cyrus Mailer specification ### +################################################## + +VERSIONID(`@(#)cyrus.m4 8.9 (Carnegie Mellon) 5/19/98') + +Mcyrus, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnPq', CYRUS_MAILER_FLAGS), S=10, R=20/40, T=X-Unix, + ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, + A=CYRUS_MAILER_ARGS + +Mcyrusbb, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnP', CYRUS_BB_MAILER_FLAGS), S=10, R=20/40, T=X-Unix, + ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, + A=CYRUS_BB_MAILER_ARGS diff --git a/contrib/sendmail/cf/mailer/fax.m4 b/contrib/sendmail/cf/mailer/fax.m4 new file mode 100644 index 000000000000..581cfed088c3 --- /dev/null +++ b/contrib/sendmail/cf/mailer/fax.m4 @@ -0,0 +1,35 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# This assumes you already have Sam Leffler's HylaFAX software. +# +# Tested with HylaFAX 4.0pl1 +# + +ifdef(`FAX_MAILER_ARGS',, + `define(`FAX_MAILER_ARGS', faxmail -d $u@$h $f)') +ifdef(`FAX_MAILER_PATH',, + `define(`FAX_MAILER_PATH', /usr/local/bin/faxmail)') +ifdef(`FAX_MAILER_MAX',, + `define(`FAX_MAILER_MAX', 100000)') +POPDIVERT +#################################### +### FAX Mailer specification ### +#################################### + +VERSIONID(`@(#)fax.m4 8.11 (Berkeley) 5/19/98') + +Mfax, P=FAX_MAILER_PATH, F=DFMhu, S=14, R=24, M=FAX_MAILER_MAX, T=X-Phone/X-FAX/X-Unix, + A=FAX_MAILER_ARGS + +LOCAL_CONFIG +CPFAX diff --git a/contrib/sendmail/cf/mailer/local.m4 b/contrib/sendmail/cf/mailer/local.m4 new file mode 100644 index 000000000000..705e723c6ca4 --- /dev/null +++ b/contrib/sendmail/cf/mailer/local.m4 @@ -0,0 +1,74 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmn9')') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/mail)') +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d $u')') +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `eu9')') +ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /bin/sh)') +ifdef(`LOCAL_SHELL_ARGS',, `define(`LOCAL_SHELL_ARGS', `sh -c $u')') +ifdef(`LOCAL_SHELL_DIR',, `define(`LOCAL_SHELL_DIR', `$z:/')') +POPDIVERT + +################################################## +### Local and Program Mailer specification ### +################################################## + +VERSIONID(`@(#)local.m4 8.30 (Berkeley) 6/30/98') + +Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40, + _OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix, + A=LOCAL_MAILER_ARGS +Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(`lsDFMoq', LOCAL_SHELL_FLAGS), S=10/30, R=20/40, D=LOCAL_SHELL_DIR, + _OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix, + A=LOCAL_SHELL_ARGS + +# +# Envelope sender rewriting +# +S10 +R<@> $n errors to mailer-daemon +R@ <@ $*> $n temporarily bypass Sun bogosity +R$+ $: $>50 $1 add local domain if needed +R$* $: $>94 $1 do masquerading + +# +# Envelope recipient rewriting +# +S20 +R$+ < @ $* > $: $1 strip host part + +# +# Header sender rewriting +# +S30 +R<@> $n errors to mailer-daemon +R@ <@ $*> $n temporarily bypass Sun bogosity +R$+ $: $>50 $1 add local domain if needed +R$* $: $>93 $1 do masquerading + +# +# Header recipient rewriting +# +S40 +R$+ $: $>50 $1 add local domain if needed +ifdef(`_ALL_MASQUERADE_', `dnl +R$* $: $>93 $1 do all-masquerading', `dnl') + +# +# Common code to add local domain name (only if always-add-domain) +# +S50 +ifdef(`_ALWAYS_ADD_DOMAIN_', `dnl +R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified +R$+ $@ $1 < @ *LOCAL* > add local qualification', +`dnl') diff --git a/contrib/sendmail/cf/mailer/mail11.m4 b/contrib/sendmail/cf/mailer/mail11.m4 new file mode 100644 index 000000000000..5c9d94810c6b --- /dev/null +++ b/contrib/sendmail/cf/mailer/mail11.m4 @@ -0,0 +1,58 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# +# Not exciting enough to bother with copyrights and most of the +# rulesets are based from those provided by DEC. +# Barb Dijker, Labyrinth Computer Services, barb@labyrinth.com +# +# This mailer is only useful if you have DECNET and the +# mail11 program - gatekeeper.dec.com:/pub/DEC/gwtools. +# +# For local delivery of DECNET style addresses to the local +# DECNET node, you will need feature(use_cw_file) and put +# your DECNET nodename in in the cw file. +# +ifdef(`MAIL11_MAILER_PATH',, `define(`MAIL11_MAILER_PATH', /usr/etc/mail11)') +ifdef(`MAIL11_MAILER_FLAGS',, `define(`MAIL11_MAILER_FLAGS', nsFx)') +ifdef(`MAIL11_MAILER_ARGS',, `define(`MAIL11_MAILER_ARGS', mail11 $g $x $h $u)') +define(`_USE_DECNET_SYNTAX_') +define(`_LOCAL_', ifdef(`confLOCAL_MAILER', confLOCAL_MAILER, `local')) + +POPDIVERT + +PUSHDIVERT(3) +# DECNET delivery +R$* < @ $=w .DECNET. > $#_LOCAL_ $: $1 local DECnet +R$+ < @ $+ .DECNET. > $#mail11 $@ $2 $: $1 DECnet user +POPDIVERT + +PUSHDIVERT(6) +CPDECNET +POPDIVERT + +########################################### +### UTK-MAIL11 Mailer specification ### +########################################### + +VERSIONID(`@(#)mail11.m4 8.8 (Berkeley) 5/19/98') + +Mmail11, P=MAIL11_MAILER_PATH, F=MAIL11_MAILER_FLAGS, S=15, R=25, + A=MAIL11_MAILER_ARGS + +S15 +R$+ $: $>25 $1 preprocess +R$w :: $+ $@ $w :: $1 ready to go + +S25 +R$+ < @ $- .UUCP > $: $2 ! $1 back to old style +R$+ < @ $- .DECNET > $: $2 :: $1 convert to DECnet style +R$+ < @ $- .LOCAL > $: $2 :: $1 convert to DECnet style +R$+ < @ $=w. > $: $2 :: $1 convert to DECnet style +R$=w :: $+ $2 strip local names +R$+ :: $+ $@ $1 :: $2 already qualified diff --git a/contrib/sendmail/cf/mailer/phquery.m4 b/contrib/sendmail/cf/mailer/phquery.m4 new file mode 100644 index 000000000000..5f1b6b41ce86 --- /dev/null +++ b/contrib/sendmail/cf/mailer/phquery.m4 @@ -0,0 +1,29 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# Contributed by Kimmo Suominen <kim@tac.nyc.ny.us>. +# + +ifdef(`PH_MAILER_PATH',, `define(`PH_MAILER_PATH', /usr/local/etc/phquery)') +ifdef(`PH_MAILER_FLAGS',, `define(`PH_MAILER_FLAGS', `ehmu')') +ifdef(`PH_MAILER_ARGS',, `define(`PH_MAILER_ARGS', `phquery -- $u')') + +POPDIVERT + +#################################### +### PH Mailer specification ### +#################################### + +VERSIONID(`@(#)phquery.m4 8.6 (Berkeley) 5/19/98') + +Mph, P=PH_MAILER_PATH, F=CONCAT(`nrDFM', PH_MAILER_FLAGS), S=10, R=20/40, + A=PH_MAILER_ARGS diff --git a/contrib/sendmail/cf/mailer/pop.m4 b/contrib/sendmail/cf/mailer/pop.m4 new file mode 100644 index 000000000000..a4f3128f19fd --- /dev/null +++ b/contrib/sendmail/cf/mailer/pop.m4 @@ -0,0 +1,31 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +ifdef(`POP_MAILER_PATH',, `define(`POP_MAILER_PATH', /usr/lib/mh/spop)') +ifdef(`POP_MAILER_FLAGS',, `define(`POP_MAILER_FLAGS', `Penu')') +ifdef(`POP_MAILER_ARGS',, `define(`POP_MAILER_ARGS', `pop $u')') + +POPDIVERT + +#################################### +### POP Mailer specification ### +#################################### + +VERSIONID(`@(#)pop.m4 8.11 (Berkeley) 5/19/98') + +Mpop, P=POP_MAILER_PATH, F=CONCAT(`lsDFMq', POP_MAILER_FLAGS), S=10, R=20/40, T=DNS/RFC822/X-Unix, + A=POP_MAILER_ARGS + +LOCAL_CONFIG +# POP mailer is a pseudo-domain +CPPOP diff --git a/contrib/sendmail/cf/mailer/procmail.m4 b/contrib/sendmail/cf/mailer/procmail.m4 new file mode 100644 index 000000000000..b6131c06678d --- /dev/null +++ b/contrib/sendmail/cf/mailer/procmail.m4 @@ -0,0 +1,32 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +ifdef(`PROCMAIL_MAILER_PATH',, + `ifdef(`PROCMAIL_PATH', + `define(`PROCMAIL_MAILER_PATH', PROCMAIL_PATH)', + `define(`PROCMAIL_MAILER_PATH', /usr/local/bin/procmail)')') +ifdef(`PROCMAIL_MAILER_FLAGS',, + `define(`PROCMAIL_MAILER_FLAGS', `SPhnu9')') +ifdef(`PROCMAIL_MAILER_ARGS',, + `define(`PROCMAIL_MAILER_ARGS', `procmail -Y -m $h $f $u')') + +POPDIVERT + +######################*****############## +### PROCMAIL Mailer specification ### +##################*****################## + +VERSIONID(`@(#)procmail.m4 8.11 (Berkeley) 5/19/98') + +Mprocmail, P=PROCMAIL_MAILER_PATH, F=CONCAT(`DFM', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix, + ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')A=PROCMAIL_MAILER_ARGS diff --git a/contrib/sendmail/cf/mailer/smtp.m4 b/contrib/sendmail/cf/mailer/smtp.m4 new file mode 100644 index 000000000000..d70195e70669 --- /dev/null +++ b/contrib/sendmail/cf/mailer/smtp.m4 @@ -0,0 +1,115 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +ifdef(`SMTP_MAILER_FLAGS',, `define(`SMTP_MAILER_FLAGS', `')') +ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `IPC $h')') +ifdef(`ESMTP_MAILER_ARGS',, `define(`ESMTP_MAILER_ARGS', `IPC $h')') +ifdef(`SMTP8_MAILER_ARGS',, `define(`SMTP8_MAILER_ARGS', `IPC $h')') +ifdef(`RELAY_MAILER_ARGS',, `define(`RELAY_MAILER_ARGS', `IPC $h')') +ifdef(`_MAILER_uucp_', + `errprint(`*** MAILER(smtp) must appear before MAILER(uucp)')')dnl +POPDIVERT +##################################### +### SMTP Mailer specification ### +##################################### + +VERSIONID(`@(#)smtp.m4 8.38 (Berkeley) 5/19/98') + +Msmtp, P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990, + _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP, + A=SMTP_MAILER_ARGS +Mesmtp, P=[IPC], F=CONCAT(mDFMuXa, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990, + _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP, + A=ESMTP_MAILER_ARGS +Msmtp8, P=[IPC], F=CONCAT(mDFMuX8, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990, + _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP, + A=SMTP8_MAILER_ARGS +Mrelay, P=[IPC], F=CONCAT(mDFMuXa8, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `61/71', `61'), E=\r\n, L=2040, + _OPTINS(`RELAY_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP, + A=RELAY_MAILER_ARGS + +# +# envelope sender rewriting +# +S11 +R$+ $: $>51 $1 sender/recipient common +R$* :; <@> $@ list:; special case +R$* $: $>61 $1 qualify unqual'ed names +R$+ $: $>94 $1 do masquerading + + +# +# envelope recipient rewriting -- +# also header recipient if not masquerading recipients +# +S21 +R$+ $: $>51 $1 sender/recipient common +R$+ $: $>61 $1 qualify unqual'ed names + + +# +# header sender and masquerading header recipient rewriting +# +S31 +R$+ $: $>51 $1 sender/recipient common +R:; <@> $@ list:; special case + +# do special header rewriting +R$* <@> $* $@ $1 <@> $2 pass null host through +R< @ $* > $* $@ < @ $1 > $2 pass route-addr through +R$* $: $>61 $1 qualify unqual'ed names +R$+ $: $>93 $1 do masquerading + + +# +# convert pseudo-domain addresses to real domain addresses +# +S51 + +# pass <route-addr>s through +R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr> + +# output fake domains as user%fake@relay +ifdef(`BITNET_RELAY', +`R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET +R$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part', + `dnl') +ifdef(`_NO_UUCP_', `dnl', ` +# do UUCP heuristics; note that these are shared with UUCP mailers +R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form +R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form + +# leave these in .UUCP form to avoid further tampering +R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. > +R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 > +R< $&h ! > $+ $@ $1 < @ $&h .UUCP. > +R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY +R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part +R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY') + + +# +# common sender and masquerading recipient rewriting +# +S61 + +R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified +R$+ $@ $1 < @ *LOCAL* > add local qualification + + +# +# relay mailer header masquerading recipient rewriting +# +S71 + +R$+ $: $>61 $1 +R$+ $: $>93 $1 diff --git a/contrib/sendmail/cf/mailer/usenet.m4 b/contrib/sendmail/cf/mailer/usenet.m4 new file mode 100644 index 000000000000..6c92f5f8dadf --- /dev/null +++ b/contrib/sendmail/cf/mailer/usenet.m4 @@ -0,0 +1,26 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +ifdef(`USENET_MAILER_PATH',, `define(`USENET_MAILER_PATH', /usr/lib/news/inews)') +ifdef(`USENET_MAILER_FLAGS',, `define(`USENET_MAILER_FLAGS', `rlsDFMmn')') +ifdef(`USENET_MAILER_ARGS',, `define(`USENET_MAILER_ARGS', `inews -m -h -n')') +POPDIVERT +#################################### +### USENET Mailer specification ### +#################################### + +VERSIONID(`@(#)usenet.m4 8.10 (Berkeley) 5/19/98') + +Musenet, P=USENET_MAILER_PATH, F=USENET_MAILER_FLAGS, S=10, R=20, + _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix, + A=USENET_MAILER_ARGS $u diff --git a/contrib/sendmail/cf/mailer/uucp.m4 b/contrib/sendmail/cf/mailer/uucp.m4 new file mode 100644 index 000000000000..cd2619db47ec --- /dev/null +++ b/contrib/sendmail/cf/mailer/uucp.m4 @@ -0,0 +1,152 @@ +PUSHDIVERT(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)') +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')') +ifdef(`UUCP_MAILER_FLAGS',, `define(`UUCP_MAILER_FLAGS', `')') +ifdef(`UUCP_MAILER_MAX',, + `define(`UUCP_MAILER_MAX', + `ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')') +POPDIVERT +##################################### +### UUCP Mailer specification ### +##################################### + +VERSIONID(`@(#)uucp.m4 8.30 (Berkeley) 5/19/98') + +# +# There are innumerable variations on the UUCP mailer. It really +# is rather absurd. +# + +# old UUCP mailer (two names) +Muucp, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX, + _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix, + A=UUCP_MAILER_ARGS +Muucp-old, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX, + _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix, + A=UUCP_MAILER_ARGS + +# smart UUCP mailer (handles multiple addresses) (two names) +Msuucp, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX, + _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix, + A=UUCP_MAILER_ARGS +Muucp-new, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuUd, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAILER_MAX, + _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix, + A=UUCP_MAILER_ARGS + +ifdef(`_MAILER_smtp_', +`# domain-ized UUCP mailer +Muucp-dom, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhud, UUCP_MAILER_FLAGS), S=52/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), M=UUCP_MAILER_MAX, + _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix, + A=UUCP_MAILER_ARGS + +# domain-ized UUCP mailer with UUCP-style sender envelope +Muucp-uudom, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhud, UUCP_MAILER_FLAGS), S=72/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), M=UUCP_MAILER_MAX, + _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix, + A=UUCP_MAILER_ARGS') + + +# +# envelope and header sender rewriting +# +S12 + +# handle error address as a special case +R<@> $n errors to mailer-daemon + +# list:; syntax should disappear +R:; <@> $@ + +R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots +R$* < @ $=w > $1 strip local name +R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format +R<@ $+ > : $+ $1 ! $2 convert to UUCP format +R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format +R$* < @ $+ > $2 ! $1 convert to UUCP format +R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user +R$&h ! $+ $@ $&h ! $1 $h!user => $h!user +R$+ $: $U ! $1 prepend our name +R! $+ $: $k ! $1 in case $U undefined + +# +# envelope recipient rewriting +# +S22 + +# list:; should disappear +R:; <@> $@ + +R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots +R$* < @ $=w > $1 strip local name +R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format +R<@ $+ > : $+ $1 ! $2 convert to UUCP format +R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format +R$* < @ $+ > $2 ! $1 convert to UUCP format + +# +# header recipient rewriting +# +S42 + +# list:; syntax should disappear +R:; <@> $@ + +R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots +R$* < @ $=w > $1 strip local name +R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format +R<@ $+ > : $+ $1 ! $2 convert to UUCP format +R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format +R$* < @ $+ > $2 ! $1 convert to UUCP format +R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user +R$&h ! $+ $@ $&h ! $1 $h!user => $h!user +R$+ $: $U ! $1 prepend our name +R! $+ $: $k ! $1 in case $U undefined + + +ifdef(`_MAILER_smtp_', +`# +# envelope sender rewriting for uucp-dom mailer +# +S52 + +# handle error address as a special case +R<@> $n errors to mailer-daemon + +# pass everything to standard SMTP mailer rewriting +R$* $@ $>11 $1 + +# +# envelope sender rewriting for uucp-uudom mailer +# +S72 + +# handle error address as a special case +R<@> $n errors to mailer-daemon + +# do standard SMTP mailer rewriting +R$* $: $>11 $1 + +R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots +R<@ $- . UUCP > : $+ $@ $1 ! $2 convert to UUCP format +R<@ $+ > : $+ $@ $1 ! $2 convert to UUCP format +R$* < @ $- . UUCP > $@ $2 ! $1 convert to UUCP format +R$* < @ $+ > $@ $2 ! $1 convert to UUCP format') + + +PUSHDIVERT(4) +# resolve locally connected UUCP links +R$* < @ $=Z . UUCP. > $* $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3 +R$* < @ $=Y . UUCP. > $* $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3 +R$* < @ $=U . UUCP. > $* $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3 +POPDIVERT diff --git a/contrib/sendmail/cf/ostype/aix2.m4 b/contrib/sendmail/cf/ostype/aix2.m4 new file mode 100644 index 000000000000..1e77c1cd1e39 --- /dev/null +++ b/contrib/sendmail/cf/ostype/aix2.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)aix2.m4 8.8 (Berkeley) 5/19/98') +define(`LOCAL_MAILER_PATH', /bin/bellmail)dnl +define(`LOCAL_MAILER_ARGS', mail $u)dnl +define(`LOCAL_MAILER_FLAGS', `mn9')dnl +define(`confEBINDIR', `/usr/lib')dnl +define(`confTIME_ZONE', `USE_TZ')dnl diff --git a/contrib/sendmail/cf/ostype/aix3.m4 b/contrib/sendmail/cf/ostype/aix3.m4 new file mode 100644 index 000000000000..2cfc8c58220a --- /dev/null +++ b/contrib/sendmail/cf/ostype/aix3.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)aix3.m4 8.12 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail $u)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl +define(`confEBINDIR', `/usr/lib')dnl +define(`confTIME_ZONE', `USE_TZ')dnl diff --git a/contrib/sendmail/cf/ostype/aix4.m4 b/contrib/sendmail/cf/ostype/aix4.m4 new file mode 100644 index 000000000000..06c7d1aba15e --- /dev/null +++ b/contrib/sendmail/cf/ostype/aix4.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)aix4.m4 8.7 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail -F $g $u)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl +define(`confEBINDIR', `/usr/lib')dnl +define(`confTIME_ZONE', `USE_TZ')dnl diff --git a/contrib/sendmail/cf/ostype/altos.m4 b/contrib/sendmail/cf/ostype/altos.m4 new file mode 100644 index 000000000000..38a07a0a3199 --- /dev/null +++ b/contrib/sendmail/cf/ostype/altos.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# Contributed by Tim Rice <tim@trr.metro.NET>. +# + +divert(0) +VERSIONID(`@(#)altos.m4 8.9 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mPuhCE9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail $u')')dnl +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', Peu)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/amdahl-uts.m4 b/contrib/sendmail/cf/ostype/amdahl-uts.m4 new file mode 100644 index 000000000000..022b50741371 --- /dev/null +++ b/contrib/sendmail/cf/ostype/amdahl-uts.m4 @@ -0,0 +1,23 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)amdahl-uts.m4 8.10 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /etc/mail/aliases) +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)') +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSn9')') +define(`confCW_FILE', /etc/mail/sendmail.cw) +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/aux.m4 b/contrib/sendmail/cf/ostype/aux.m4 new file mode 100644 index 000000000000..2adbfe4d221a --- /dev/null +++ b/contrib/sendmail/cf/ostype/aux.m4 @@ -0,0 +1,22 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)aux.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mn9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d -r $f $u')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/bsd4.3.m4 b/contrib/sendmail/cf/ostype/bsd4.3.m4 new file mode 100644 index 000000000000..47c02cc764ae --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsd4.3.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)bsd4.3.m4 8.9 (Berkeley) 5/19/98') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl diff --git a/contrib/sendmail/cf/ostype/bsd4.4.m4 b/contrib/sendmail/cf/ostype/bsd4.4.m4 new file mode 100644 index 000000000000..c023de544011 --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsd4.4.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# + +divert(0) +VERSIONID(`@(#)bsd4.4.m4 8.9 (Berkeley) 5/19/98') +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/misc/sendmail.hf)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl diff --git a/contrib/sendmail/cf/ostype/bsdi1.0.m4 b/contrib/sendmail/cf/ostype/bsdi1.0.m4 new file mode 100644 index 000000000000..48d60b333808 --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsdi1.0.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)bsdi1.0.m4 8.7 (Berkeley) 5/19/98')dnl +include(_CF_DIR_`'ostype/bsd4.4.m4)dnl diff --git a/contrib/sendmail/cf/ostype/bsdi2.0.m4 b/contrib/sendmail/cf/ostype/bsdi2.0.m4 new file mode 100644 index 000000000000..73b0447ec369 --- /dev/null +++ b/contrib/sendmail/cf/ostype/bsdi2.0.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)bsdi2.0.m4 8.6 (Berkeley) 5/19/98')dnl +include(_CF_DIR_`'ostype/bsd4.4.m4)dnl diff --git a/contrib/sendmail/cf/ostype/dgux.m4 b/contrib/sendmail/cf/ostype/dgux.m4 new file mode 100644 index 000000000000..eeb8c4de3a2d --- /dev/null +++ b/contrib/sendmail/cf/ostype/dgux.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)dgux.m4 8.10 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', m9)')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +define(`confEBINDIR', `/usr/lib')dnl +LOCAL_CONFIG +E_FORCE_MAIL_LOCAL_=yes diff --git a/contrib/sendmail/cf/ostype/domainos.m4 b/contrib/sendmail/cf/ostype/domainos.m4 new file mode 100644 index 000000000000..c03dee5fc94f --- /dev/null +++ b/contrib/sendmail/cf/ostype/domainos.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)domainos.m4 8.9 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /usr/lib/aliases) +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)') +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/dynix3.2.m4 b/contrib/sendmail/cf/ostype/dynix3.2.m4 new file mode 100644 index 000000000000..94d59b5f3712 --- /dev/null +++ b/contrib/sendmail/cf/ostype/dynix3.2.m4 @@ -0,0 +1,18 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)dynix3.2.m4 8.9 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/gnuhurd.m4 b/contrib/sendmail/cf/ostype/gnuhurd.m4 new file mode 100644 index 000000000000..d7127f6b7eb8 --- /dev/null +++ b/contrib/sendmail/cf/ostype/gnuhurd.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1997 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# + +divert(0) +VERSIONID(`@(#)gnuhurd.m4 8.7 (Berkeley) 5/19/98') +ifdef(`HELP_FILE',, `define(`HELP_FILE', /share/misc/sendmail.hf)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /libexec/mail.local)')dnl +define(`confEBINDIR', `/libexec')dnl diff --git a/contrib/sendmail/cf/ostype/hpux10.m4 b/contrib/sendmail/cf/ostype/hpux10.m4 new file mode 100644 index 000000000000..9499474de74b --- /dev/null +++ b/contrib/sendmail/cf/ostype/hpux10.m4 @@ -0,0 +1,29 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)hpux10.m4 8.13 (Berkeley) 5/19/98') + +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/mail/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/rmail)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl +ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /usr/bin/sh)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +dnl +dnl For maximum compability with HP-UX, use: +dnl define(`confME_TOO', True)dnl diff --git a/contrib/sendmail/cf/ostype/hpux9.m4 b/contrib/sendmail/cf/ostype/hpux9.m4 new file mode 100644 index 000000000000..19579caef067 --- /dev/null +++ b/contrib/sendmail/cf/ostype/hpux9.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)hpux9.m4 8.18 (Berkeley) 5/19/98') + +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/bin/rmail')')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +define(`confEBINDIR', `/usr/lib')dnl +dnl +dnl For maximum compability with HP-UX, use: +dnl define(`confME_TOO', True)dnl diff --git a/contrib/sendmail/cf/ostype/irix4.m4 b/contrib/sendmail/cf/ostype/irix4.m4 new file mode 100644 index 000000000000..69890e6acbce --- /dev/null +++ b/contrib/sendmail/cf/ostype/irix4.m4 @@ -0,0 +1,20 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)irix4.m4 8.13 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehm9)')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/irix5.m4 b/contrib/sendmail/cf/ostype/irix5.m4 new file mode 100644 index 000000000000..32f23756e005 --- /dev/null +++ b/contrib/sendmail/cf/ostype/irix5.m4 @@ -0,0 +1,40 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# Contributed by Kari E. Hurtta <Kari.Hurtta@dionysos.fmi.fi> +# + +# +# Notes: +# - SGI's /etc/sendmail.cf defines also 'u' for local mailer flags -- you +# perhaps don't want it. +# - Perhaps is should also add define(`LOCAL_MAILER_CHARSET', iso-8859-1) +# put some Asian sites may prefer otherwise -- or perhaps not. +# - SGI's /etc/sendmail.cf seems use: A=mail -s -d $u +# It seems work without that -s however. +# - SGI's /etc/sendmail.cf set's default uid and gid to 998 (guest) +# - In SGI seems that TZ variable is needed that correct time is marked to +# syslog +# - helpfile is in /etc/sendmail.hf in SGI's /etc/sendmail.cf +# + +divert(0) +VERSIONID(`@(#)irix5.m4 8.10 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl +define(`confDEF_USER_ID', `998:998')dnl +define(`confTIME_ZONE', USE_TZ)dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/irix6.m4 b/contrib/sendmail/cf/ostype/irix6.m4 new file mode 100644 index 000000000000..f046dbf0e8fb --- /dev/null +++ b/contrib/sendmail/cf/ostype/irix6.m4 @@ -0,0 +1,40 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1995 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# Contributed by Kari E. Hurtta <Kari.Hurtta@dionysos.fmi.fi> +# + +# +# Notes: +# - SGI's /etc/sendmail.cf defines also 'u' for local mailer flags -- you +# perhaps don't want it. +# - Perhaps is should also add define(`LOCAL_MAILER_CHARSET', iso-8859-1) +# put some Asian sites may prefer otherwise -- or perhaps not. +# - SGI's /etc/sendmail.cf seems use: A=mail -s -d $u +# It seems work without that -s however. +# - SGI's /etc/sendmail.cf set's default uid and gid to 998 (guest) +# - In SGI seems that TZ variable is needed that correct time is marked to +# syslog +# - helpfile is in /etc/sendmail.hf in SGI's /etc/sendmail.cf +# + +divert(0) +VERSIONID(`@(#)irix6.m4 8.7 (Berkeley) 5/19/98') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl +define(`confDEF_USER_ID', `998:998')dnl +define(`confTIME_ZONE', USE_TZ)dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/isc4.1.m4 b/contrib/sendmail/cf/ostype/isc4.1.m4 new file mode 100644 index 000000000000..1869eecfc636 --- /dev/null +++ b/contrib/sendmail/cf/ostype/isc4.1.m4 @@ -0,0 +1,27 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# + +divert(0) +VERSIONID(`@(#)isc4.1.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail -s $u')')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `humS9')')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/lmail)')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -gC $h!rmail ($u)')')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +define(`confTIME_ZONE', `USE_TZ')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/linux.m4 b/contrib/sendmail/cf/ostype/linux.m4 new file mode 100644 index 000000000000..d7c3b190b47a --- /dev/null +++ b/contrib/sendmail/cf/ostype/linux.m4 @@ -0,0 +1,16 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)linux.m4 8.7 (Berkeley) 5/19/98') +define(`LOCAL_MAILER_PATH', /bin/mail.local)dnl diff --git a/contrib/sendmail/cf/ostype/maxion.m4 b/contrib/sendmail/cf/ostype/maxion.m4 new file mode 100644 index 000000000000..c07ce876e300 --- /dev/null +++ b/contrib/sendmail/cf/ostype/maxion.m4 @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# Concurrent Computer Corporation Maxion system support contributed +# by Donald R. Laster Jr. <Laster@access.digex.com>. +# + +divert(0) +VERSIONID(`@(#)maxion.m4 8.10 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', `/etc/ucbmail/aliases')dnl +define(`HELP_FILE', `/etc/ucbmail/sendmail.hf')dnl +define(`QUEUE_DIR', `/var/spool/mqueue')dnl +define(`STATUS_FILE', `/var/adm/log/sendmail.st')dnl +define(`LOCAL_MAILER_PATH', `/usr/bin/mail')dnl +define(`LOCAL_MAILER_FLAGS',`rmn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`LOCAL_MAILER_ARGS', `mail $u')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl +divert(-1) diff --git a/contrib/sendmail/cf/ostype/mklinux.m4 b/contrib/sendmail/cf/ostype/mklinux.m4 new file mode 100644 index 000000000000..2f40c72d8e2c --- /dev/null +++ b/contrib/sendmail/cf/ostype/mklinux.m4 @@ -0,0 +1,22 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# MkLinux support contributed by Paul DuBois <dubois@primate.wisc.edu> +# + +divert(0) +VERSIONID(`@(#)mklinux.m4 8.7 (Berkeley) 5/19/98') +ifdef(`STATUS_FILE',, + `define(`STATUS_FILE', /var/log/sendmail.st)') +ifdef(`PROCMAIL_MAILER_PATH',, + define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')) +FEATURE(local_procmail) diff --git a/contrib/sendmail/cf/ostype/nextstep.m4 b/contrib/sendmail/cf/ostype/nextstep.m4 new file mode 100644 index 000000000000..73c995fb983c --- /dev/null +++ b/contrib/sendmail/cf/ostype/nextstep.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)nextstep.m4 8.14 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /etc/sendmail/aliases)dnl +define(`confCW_FILE', /etc/sendmail/sendmail.cw)dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/sendmail/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmnP9')')dnl +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `euP')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/osf1.m4 b/contrib/sendmail/cf/ostype/osf1.m4 new file mode 100644 index 000000000000..fe17b35ee6c9 --- /dev/null +++ b/contrib/sendmail/cf/ostype/osf1.m4 @@ -0,0 +1,19 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)osf1.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/adm/sendmail/aliases)dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/adm/sendmail/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl +define(`confDEF_USER_ID', `daemon') diff --git a/contrib/sendmail/cf/ostype/powerux.m4 b/contrib/sendmail/cf/ostype/powerux.m4 new file mode 100644 index 000000000000..dc23c7ed2956 --- /dev/null +++ b/contrib/sendmail/cf/ostype/powerux.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)powerux.m4 8.7 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /etc/mail/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /etc/mail/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/bin/rmail')dnl +define(`LOCAL_MAILER_FLAGS', `mn9')dnl +define(`LOCAL_MAILER_ARGS', `rmail $u')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/local/lib')dnl diff --git a/contrib/sendmail/cf/ostype/ptx2.m4 b/contrib/sendmail/cf/ostype/ptx2.m4 new file mode 100644 index 000000000000..83a05580b14a --- /dev/null +++ b/contrib/sendmail/cf/ostype/ptx2.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1994 Eric P. Allman. All rights reserved. +# Copyright (c) 1994 +# The Regents of the University of California. 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. +# +# + +# Support for DYNIX/ptx 2.x. + +divert(0) +VERSIONID(`@(#)ptx2.m4 8.11 (Berkeley) 5/19/98') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +define(`ALIAS_FILE', /usr/lib/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/bin/mail')dnl +define(`LOCAL_MAILER_FLAGS', `fmn9')dnl +define(`LOCAL_SHELL_FLAGS', `eu')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/qnx.m4 b/contrib/sendmail/cf/ostype/qnx.m4 new file mode 100644 index 000000000000..10624dde39f1 --- /dev/null +++ b/contrib/sendmail/cf/ostype/qnx.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1997 Eric P. Allman. 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. +# +# +# Contributed by Glen McCready <glen@qnx.com> +# + +divert(0) +VERSIONID(`@(#)qnx.m4 8.7 (Berkeley) 5/19/98') +define(`QUEUE_DIR', /usr/spool/mqueue)dnl +define(`HELP_FILE', /etc/sendmail.hf)dnl +define(`LOCAL_MAILER_ARGS', `mail $u')dnl +define(`LOCAL_MAILER_FLAGS', `Sh')dnl +define(`LOCAL_MAILER_PATH', /usr/bin/mailx)dnl +define(`UUCP_MAILER_ARGS', `uux - -r -z -a$f $h!rmail ($u)')dnl diff --git a/contrib/sendmail/cf/ostype/riscos4.5.m4 b/contrib/sendmail/cf/ostype/riscos4.5.m4 new file mode 100644 index 000000000000..02db750c023b --- /dev/null +++ b/contrib/sendmail/cf/ostype/riscos4.5.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)riscos4.5.m4 8.10 (Berkeley) 5/19/98') + +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl +define(`ALIAS_FILE', `/usr/lib/aliases')dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', `/usr/spool/mqueue')')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', `/usr/lib/sendmail.hf')')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 b/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 new file mode 100644 index 000000000000..356c984fa422 --- /dev/null +++ b/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. 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. +# +# +# SCO UnixWare 2.1.2 ostype file +# +# Contributed by Christopher Durham <chrisdu@SCO.COM> of SCO. +# +divert(0) +VERSIONID(`@(#)sco-uw-2.1.m4 8.6 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/bin/rmail')dnl +define(`LOCAL_MAILER_FLAGS', `fhCEn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`LOCAL_MAILER_ARGS',`rmail $u')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sco3.2.m4 b/contrib/sendmail/cf/ostype/sco3.2.m4 new file mode 100644 index 000000000000..1c58585035be --- /dev/null +++ b/contrib/sendmail/cf/ostype/sco3.2.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)sco3.2.m4 8.10 (Berkeley) 5/19/98') +define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl +ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', PuhCE9)')dnl +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail $u')')dnl +ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', Peu)')dnl +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sinix.m4 b/contrib/sendmail/cf/ostype/sinix.m4 new file mode 100644 index 000000000000..51c469d8d741 --- /dev/null +++ b/contrib/sendmail/cf/ostype/sinix.m4 @@ -0,0 +1,21 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1996 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)sinix.m4 8.8 (Berkeley) 5/19/98') +ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl +define(`ALIAS_FILE', /etc/aliases)dnl +define(`LOCAL_MAILER_PATH', `/bin/mail.local')dnl +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl diff --git a/contrib/sendmail/cf/ostype/solaris2.m4 b/contrib/sendmail/cf/ostype/solaris2.m4 new file mode 100644 index 000000000000..5a90175bd363 --- /dev/null +++ b/contrib/sendmail/cf/ostype/solaris2.m4 @@ -0,0 +1,25 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)solaris2.m4 8.15 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /etc/mail/aliases) +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)') +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `SnE9')') +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -f $g -d $u')') +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')') +define(`confCW_FILE', /etc/mail/sendmail.cw) +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/solaris2.ml.m4 b/contrib/sendmail/cf/ostype/solaris2.ml.m4 new file mode 100644 index 000000000000..0995d50ff18e --- /dev/null +++ b/contrib/sendmail/cf/ostype/solaris2.ml.m4 @@ -0,0 +1,30 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# This ostype file is suitable for use on Solaris 2.x systems that +# have mail.local installed. It is my understanding that this is +# standard as of Solaris 2.5. +# + +divert(0) +VERSIONID(`@(#)solaris2.ml.m4 8.8 (Berkeley) 5/19/98') +divert(-1) + +define(`ALIAS_FILE', /etc/mail/aliases) +ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)') +ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)') +ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/usr/lib/mail.local')') +ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSmn9')') +ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail.local -d $u')') +ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')') +define(`confCW_FILE', /etc/mail/sendmail.cw) +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sunos3.5.m4 b/contrib/sendmail/cf/ostype/sunos3.5.m4 new file mode 100644 index 000000000000..540d36e60756 --- /dev/null +++ b/contrib/sendmail/cf/ostype/sunos3.5.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)sunos3.5.m4 8.7 (Berkeley) 5/19/98') + +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/sunos4.1.m4 b/contrib/sendmail/cf/ostype/sunos4.1.m4 new file mode 100644 index 000000000000..aec96d2fdc9c --- /dev/null +++ b/contrib/sendmail/cf/ostype/sunos4.1.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)sunos4.1.m4 8.7 (Berkeley) 5/19/98') + +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/svr4.m4 b/contrib/sendmail/cf/ostype/svr4.m4 new file mode 100644 index 000000000000..1451414797fe --- /dev/null +++ b/contrib/sendmail/cf/ostype/svr4.m4 @@ -0,0 +1,24 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)svr4.m4 8.10 (Berkeley) 5/19/98') + +define(`ALIAS_FILE', /usr/ucblib/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl +define(`LOCAL_MAILER_FLAGS', `rmn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl diff --git a/contrib/sendmail/cf/ostype/ultrix4.m4 b/contrib/sendmail/cf/ostype/ultrix4.m4 new file mode 100644 index 000000000000..874fa8b89d6b --- /dev/null +++ b/contrib/sendmail/cf/ostype/ultrix4.m4 @@ -0,0 +1,17 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)ultrix4.m4 8.8 (Berkeley) 5/19/98') + +define(`confEBINDIR', `/usr/lib')dnl diff --git a/contrib/sendmail/cf/ostype/unknown.m4 b/contrib/sendmail/cf/ostype/unknown.m4 new file mode 100644 index 000000000000..bb85604efa13 --- /dev/null +++ b/contrib/sendmail/cf/ostype/unknown.m4 @@ -0,0 +1,19 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# + +divert(0) +VERSIONID(`@(#)unknown.m4 8.6 (Berkeley) 5/19/98') +errprint(`*** ERROR: You have not specified a valid operating system type.') +errprint(` Use the OSTYPE macro to select a valid system type. This') +errprint(` is necessary in order to get the proper pathnames and flags') +errprint(` appropriate for your environment.') diff --git a/contrib/sendmail/cf/ostype/uxpds.m4 b/contrib/sendmail/cf/ostype/uxpds.m4 new file mode 100644 index 000000000000..2fb147eb5223 --- /dev/null +++ b/contrib/sendmail/cf/ostype/uxpds.m4 @@ -0,0 +1,28 @@ +divert(-1) +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# Definitions for UXP/DS (Fujitsu/ICL DS/90 series) +# Diego R. Lopez, CICA (Seville). 1995 +# + +divert(0) +VERSIONID(`@(#)uxpds.m4 8.9 (Berkeley) 5/19/98') + +define(`confDEF_GROUP_ID', `6') +define(`ALIAS_FILE', /usr/ucblib/aliases)dnl +ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl +ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl +define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl +define(`LOCAL_MAILER_FLAGS', `rmn9')dnl +define(`LOCAL_SHELL_FLAGS', `ehuP')dnl +define(`UUCP_MAILER_ARGS', `uux - -r -a$f -gmedium $h!rmail ($u)')dnl +define(`confEBINDIR', `/usr/ucblib')dnl diff --git a/contrib/sendmail/cf/sh/makeinfo.sh b/contrib/sendmail/cf/sh/makeinfo.sh new file mode 100644 index 000000000000..424c699d649f --- /dev/null +++ b/contrib/sendmail/cf/sh/makeinfo.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Copyright (c) 1998 Sendmail, Inc. All rights reserved. +# Copyright (c) 1983 Eric P. Allman. All rights reserved. +# Copyright (c) 1988, 1993 +# The Regents of the University of California. 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. +# +# +# @(#)makeinfo.sh 8.11 (Berkeley) 5/19/98 +# + +usewhoami=0 +usehostname=0 +for p in `echo $PATH | sed 's/:/ /g'` +do + if [ "x$p" = "x" ] + then + p="." + fi + if [ -f $p/whoami ] + then + usewhoami=1 + if [ $usehostname -ne 0 ] + then + break; + fi + fi + if [ -f $p/hostname ] + then + usehostname=1 + if [ $usewhoami -ne 0 ] + then + break; + fi + fi +done +if [ $usewhoami -ne 0 ] +then + user=`whoami` +else + user=$LOGNAME +fi + +if [ $usehostname -ne 0 ] +then + host=`hostname` +else + host=`uname -n` +fi +echo '#####' built by $user@$host on `date` +echo '#####' in `pwd` | sed 's/\/tmp_mnt//' +echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//' +echo "define(\`__HOST__', $host)dnl" diff --git a/contrib/sendmail/cf/siteconfig/uucp.cogsci.m4 b/contrib/sendmail/cf/siteconfig/uucp.cogsci.m4 new file mode 100644 index 000000000000..33c71511781c --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.cogsci.m4 @@ -0,0 +1,6 @@ +SITE(contessa) +SITE(emind) +SITE(hoptoad) +SITE(nkainc) +SITE(well) +SITE(ferdy) diff --git a/contrib/sendmail/cf/siteconfig/uucp.old.arpa.m4 b/contrib/sendmail/cf/siteconfig/uucp.old.arpa.m4 new file mode 100644 index 000000000000..81d5e9443d99 --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.old.arpa.m4 @@ -0,0 +1,4 @@ +SITE(endotsew) +SITE(fateman) +SITE(interlan) +SITE(metron) diff --git a/contrib/sendmail/cf/siteconfig/uucp.ucbarpa.m4 b/contrib/sendmail/cf/siteconfig/uucp.ucbarpa.m4 new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.ucbarpa.m4 @@ -0,0 +1 @@ + diff --git a/contrib/sendmail/cf/siteconfig/uucp.ucbvax.m4 b/contrib/sendmail/cf/siteconfig/uucp.ucbvax.m4 new file mode 100644 index 000000000000..ee2c34f60d96 --- /dev/null +++ b/contrib/sendmail/cf/siteconfig/uucp.ucbvax.m4 @@ -0,0 +1,73 @@ +SITE(Padova) +SITE(Shasta) +SITE(alice) +SITE(allegra) +SITE(amdcad) +SITE(att) +SITE(attunix) +SITE(avsd) +SITE(bellcore bellcor) +SITE(calma) +SITE(cithep) +SITE(cnmat) +SITE(craig) +SITE(craylab) +SITE(decusj) +SITE(decvax, S) +SITE(decwrl) +SITE(dssovax) +SITE(eagle) +SITE(ecovax) +SITE(floyd) +SITE(franz) +SITE(geoff) +SITE(harpo) +SITE(ho3e2) +SITE(hpda) +SITE(hplabs) +SITE(ibmsupt ibmuupa ibmpa) +SITE(iiasa70) +SITE(imagen) +SITE(isunix menlo70) +SITE(kentmth) +SITE(lbl-csam lbl-csa) +SITE(lime) +SITE(mothra) +SITE(mseonyx) +SITE(mtxinu) +SITE(pixar) +SITE(pur-ee) +SITE(purdue) +SITE(pwbd) +SITE(sdcarl) +SITE(sftig) +SITE(sgi olympus) +SITE(sii) +SITE(srivisi) +SITE(ssyx) +SITE(sun) +SITE(trwrb) +SITE(twg) +SITE(ucivax) +SITE(ucla-se) +SITE(ucla-cs) +SITE(ucsbcsl ucsbhub) +SITE(ucscc) +SITE(ucsd) +SITE(ucsfcgl) +SITE(ucsfmis) +SITE(ulysses) +SITE(unisoft) +SITE(unmvax) +SITE(usenix) +SITE(uw) +SITE(uwvax) +SITE(vax135) +SITE(voder) +SITE(wheps) +SITE(whuxle) +SITE(whuxlj) +SITE(xicomp) +SITE(xprin) +SITE(zehntel) +SITE(zilog) |