From 14ffa91298406b12812dfaaadba8af66aa34752e Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Fri, 27 Oct 2000 00:00:00 -0500 Subject: [PATCH] snapshot-20001027 --- postfix/0README | 4 +- postfix/BEWARE | 2 +- postfix/COMPATIBILITY | 2 +- postfix/DB_README | 21 ++++ postfix/DEBUG_README | 2 +- postfix/ETRN_README | 8 +- postfix/HISTORY | 66 ++++++++-- postfix/INSTALL | 6 +- postfix/LMTP_README | 8 +- postfix/MYSQL_README | 4 +- postfix/RELEASE_NOTES | 20 ++- postfix/conf/access | 53 ++++---- postfix/conf/canonical | 88 ++++++------- postfix/conf/main.cf | 14 +-- postfix/conf/pcre_table | 41 +++--- postfix/conf/regexp_table | 36 +++--- postfix/conf/relocated | 54 ++++---- postfix/conf/sample-filter.cf | 22 +++- postfix/conf/sample-flush.cf | 10 +- postfix/conf/transport | 106 ++++++++-------- postfix/conf/virtual | 68 +++++----- postfix/html/access.5.html | 58 ++++----- postfix/html/canonical.5.html | 94 +++++++------- postfix/html/flush.8.html | 124 +++++++++--------- postfix/html/pcre_table.5.html | 44 +++---- postfix/html/regexp_table.5.html | 40 +++--- postfix/html/relocated.5.html | 56 ++++----- postfix/html/transport.5.html | 108 ++++++++-------- postfix/html/virtual.5.html | 72 +++++------ postfix/makedefs | 11 +- postfix/man/man5/access.5 | 2 + postfix/man/man5/canonical.5 | 2 + postfix/man/man5/pcre_table.5 | 2 + postfix/man/man5/regexp_table.5 | 2 + postfix/man/man5/relocated.5 | 2 + postfix/man/man5/transport.5 | 2 + postfix/man/man5/virtual.5 | 2 + postfix/man/man8/flush.8 | 21 ++-- postfix/proto/access | 2 + postfix/proto/canonical | 2 + postfix/proto/pcre_table | 2 + postfix/proto/regexp_table | 2 + postfix/proto/relocated | 2 + postfix/proto/transport | 2 + postfix/proto/virtual | 2 + postfix/src/cleanup/Makefile.in | 2 +- postfix/src/cleanup/cleanup_map1n.c | 17 +-- postfix/src/flush/flush.c | 66 ++-------- postfix/src/fsstone/fsstone | Bin 0 -> 80084 bytes postfix/src/fsstone/fsstone.c | 27 ++-- postfix/src/global/been_here.c | 3 +- postfix/src/global/flush_clnt.c | 8 +- postfix/src/global/mail_params.c | 9 +- postfix/src/global/mail_params.h | 10 +- postfix/src/global/mail_version.h | 2 +- postfix/src/global/mkmap_dbm.c | 1 + postfix/src/global/quote_821_local.c | 2 +- postfix/src/global/quote_822_local.c | 2 +- postfix/src/postfix/postfix.c | 6 +- postfix/src/smtp/Makefile.in | 1 + postfix/src/smtp/smtp_addr.c | 83 +----------- postfix/src/smtp/smtp_connect.c | 87 ++++++++++--- postfix/src/smtpd/smtpd.c | 4 +- postfix/src/util/Makefile.in | 1 + postfix/src/util/dict_db.c | 180 +++++++++++++++++++++++---- postfix/src/util/dict_dbm.c | 4 + postfix/src/util/dict_open.c | 4 +- postfix/src/util/dict_tcp.c | 47 ++++++- postfix/src/util/hex_quote.c | 7 +- 69 files changed, 1056 insertions(+), 808 deletions(-) create mode 100644 postfix/DB_README create mode 100755 postfix/src/fsstone/fsstone diff --git a/postfix/0README b/postfix/0README index 1fd916279..c399b2519 100644 --- a/postfix/0README +++ b/postfix/0README @@ -49,8 +49,8 @@ Mail addresses (PLEASE send questions to the mailing list) In order to subscribe to a mailing list, see http://www.postfix.org/. -Acknowledgements -================ +Acknowledgments +=============== This release could not have happened without the input from a team of competent alpha testers. Their names appear in numerous places diff --git a/postfix/BEWARE b/postfix/BEWARE index fb62e11ce..1b0c41829 100644 --- a/postfix/BEWARE +++ b/postfix/BEWARE @@ -2,7 +2,7 @@ LINUX SYSLOGD PERFORMANCE ========================= LINUX syslogd uses synchronous writes by default, which is very -expensive. For services such a mail it is recommended that you +expensive. For services such as mail it is recommended that you disable synchronous logfile writes by editing /etc/syslog.conf and by prepending a - to the logfile name: diff --git a/postfix/COMPATIBILITY b/postfix/COMPATIBILITY index 1cb895c60..4c161b920 100644 --- a/postfix/COMPATIBILITY +++ b/postfix/COMPATIBILITY @@ -14,7 +14,7 @@ delivered-to yes dsn not yet errors-to: yes esmtp yes -etrn support yes (flushes entire queue) +etrn support yes (uses per-destination log or flushes entire queue) fcntl locking yes (compile time) flock locking yes (compile time) home mailbox yes diff --git a/postfix/DB_README b/postfix/DB_README new file mode 100644 index 000000000..103fdc1cd --- /dev/null +++ b/postfix/DB_README @@ -0,0 +1,21 @@ +Purpose of this document +======================== + +This document describes how to build Postfix with Berkeley DB +support on systems that ship without DB library. The canonical +third-party source for Berkeley DB is www.sleepycat.com. + +The information can also be used to build Postfix with a non-default +Berkeley DB version. However, the file formats of Berkeley DB +version 2 and later are not compatible with the older Berkeley DB +version that ships with, for example, 4.4BSD. + +Building Postfix with third-party Berkeley DB support +===================================================== + +If you installed the Berkeley DB from Sleepycat, use something like: + + % make tidy + % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \ + AUXLIBS=/usr/local/BerkeleyDB/lib/libdb.a + % make diff --git a/postfix/DEBUG_README b/postfix/DEBUG_README index 3ad762120..4e8f2cea2 100644 --- a/postfix/DEBUG_README +++ b/postfix/DEBUG_README @@ -128,7 +128,7 @@ In order to compile Postfix with optimizations turned off: % make makefiles OPT= This produces a set of Makefiles that do not request compiler -optomization. +optimization. Once the makefiles are set up, build the software: diff --git a/postfix/ETRN_README b/postfix/ETRN_README index 4f5b1685f..c7b18d31d 100644 --- a/postfix/ETRN_README +++ b/postfix/ETRN_README @@ -45,7 +45,7 @@ in the main.cf configuration file. By default, Postfix "fast ETRN/sendmail -qR" service is available only for destinations that Postfix is willing to relay mail to: - fast_flush_policy = relay + fast_flush_domains = $relay_domains The "relay_domains" parameter specifies what destinations Postfix will relay to. @@ -54,14 +54,14 @@ For destinations that are not eligible for the new "fast ETRN/sendmail -qR" service, Postfix falls back to the old "slow ETRN" method which attempts to deliver all queued mail. -To enable "fast ETRN/sendmail -qR" for all destinations, specify: +To enable "fast ETRN/sendmail -qR" for some other destination, specify: - fast_flush_policy = all + fast_flush_domains = $relay_domains, some.other.domain To disable "fast ETRN/sendmail -qR", so that Postfix always uses the old "slow ETRN" which delivers all queued mail, specify: - fast_flush_policy = none + fast_flush_domains = Testing the fast ETRN service ============================= diff --git a/postfix/HISTORY b/postfix/HISTORY index 828ae4a3e..937faa4f1 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -104,7 +104,7 @@ Apologies for any names omitted. that use short hostnames will have to specify their FQDN in main.cf (this will eventually be done by the system installation/configuration procedure). Should the config - language support backtics so one can say `domainname`? What + language support backticks so one can say `domainname`? What about $name stuff between the backtics? Security: the master now creates FIFOs and UNIX-domain @@ -822,7 +822,7 @@ Apologies for any names omitted. Feature: hashed queues. Rewrote parts of the mail queue API. Configuration parameters: "hash_queue_names" specifies what queue directories will be hashed (default: the defer - log drectory), "hash_queue_depth" specifies the number of + log directory), "hash_queue_depth" specifies the number of subdirectories used for hashing (default 2). 19980802 @@ -2321,7 +2321,7 @@ Apologies for any names omitted. Bugfix: the SMTPD check scaffolding didn't apply the same sanity checks as the production code. Problem reported by - Alain Thivillon, Hervé Schauer Consultants, France. File: + Alain Thivillon, Herve Schauer Consultants, France. File: smtpd/smtpd_check.c. Portability: some systems can have more than 59 seconds in @@ -2491,7 +2491,7 @@ Apologies for any names omitted. This needed the partial lookup key support to avoid passing partial addresses to regexp-based lookup tables (user, @domain, user@, domain). Files: global/maps.c - globl/mail_addr_find.c. + global/mail_addr_find.c. Feature: new dictionary types can be registered with dict_open_register(). File: util/dict_open.c. @@ -2670,7 +2670,7 @@ Apologies for any names omitted. Workaround: renamed config.h to mail_conf.h etc. in order to avoid name collisions with LINUX (yes, they have a system - include file calle config.h). For compatibility with people + include file called config.h). For compatibility with people who have written software for Postfix, there's a config.h that aliases the old names to the new ones. That file will go away eventually. @@ -2906,7 +2906,7 @@ Apologies for any names omitted. Workaround: in the INSTALL file, use `&&' instead of `;' in (cd path; tar ...) pipelines because some UNIX re-invented shells don't bail out when cd fails. Matthias Andree - @dosis.uni-dortmund.de. + @stud.uni-dortmund.de. 19990709 @@ -3566,7 +3566,7 @@ Apologies for any names omitted. Workaround: rename() over NFS can fail with ENOENT even when the operation succeeds (Graham Orndorff @ WebTV). This is not news. Any non-idempotent operation can fail over - NFS when the NFS server's acknowledgement is lost and the + NFS when the NFS server's acknowledgment is lost and the NFS client code retries the operation (other examples are: create, symlink, link, unlink, mkdir, rmdir). Postfix has workarounds for the cases where this is most likely to @@ -3658,7 +3658,7 @@ Apologies for any names omitted. Robustness: limit the number of recipient addresses that can be extracted from message headers. Parameter: extract_recipient_limit (default: 10240). Files: - cleaup/cleanup_message.c, cleanup/cleanup_extracted.c. + cleanup/cleanup_message.c, cleanup/cleanup_extracted.c. Cleanup: the message header reject logging now includes sender and recipient address (if possible), so that the @@ -3712,7 +3712,7 @@ Apologies for any names omitted. Cleanup: the manual pages in Postfix configuration files no longer contain troff formatting codes. The text is now generated from prototype files in a new "proto" subdirectory. - Requested by Matthias Andree @ dt.e-technik.uni-dortmund.de. + Requested by Matthias Andree @ stud.uni-dortmund.de. 20000308 @@ -3853,7 +3853,7 @@ Apologies for any names omitted. VSTREAM_CTL_TIMEOUT...) sets the timeout deadline on a stream, and vstream_ftimeout(stream) queries a stream for timeout errors. This change simplified timeout handling - considerably. Files: util/vbuf.h, util/vstrean.[hc], + considerably. Files: util/vbuf.h, util/vstream.[hc], global/smtp_stream.c, global/timed_ipc.c. 20000504 @@ -4063,7 +4063,7 @@ Apologies for any names omitted. 20000623 Bugfix: the SMTP server did not reset the so-called junk - command counter after successfull delivery (Mark Hoffman + command counter after successful delivery (Mark Hoffman @ wallst.com). File: smtpd/smtpd.c. 20000625 @@ -4286,7 +4286,7 @@ Apologies for any names omitted. Feature: Postfix bounced mail and delayed mail notifications now have the standard RFC 1894 form (DSN). The bounce - service now uses the's generic bounce logfile API. File: + service now uses the generic bounce logfile API. File: bounce/bounce_notify_service.c, bounce/bounce_notify_util.c. Cleanup: deleted the per-recipient bounce protocol. Future @@ -4353,3 +4353,45 @@ Apologies for any names omitted. Portability: Redhat 7 library interfaces have changed incompatibly, which breaks existing software. File makedefs. + + Bugfix: the fallback_relay parameter did not work with [] + or with network ports, and Postfix would always attempt to + perform MX record lookups. Files: smtp/smtp_addr.c + + Convenience: you can now specify multiple destinations in + the relayhost configuration parameter. They will be tried + in the specified order. File: smtp/smtp_connect.c. + + Typographical corrections by Matthias Andree. + +20001024 + + Documentation: the canonical, virtual etc. manual pages + did not document the effect of leading whitespace. + +20001025 + + Bugfix: virtual map expansion stopped too early with + self-referential aliases. Reported by Michael Douglass + @ datafoundry.net. File: cleanup/cleanup_map1n.c. + +20001026 + + Horror: postmap and postalias (newaliases) silently lose + the file lock while building a lookup table with Berkeley + DB 2.x and later on Solaris, HP-UX or IRIX. The result is + that table lookups fail while the table is being built, so + that mail is lost. In order to avoid this misbehavior one + has to use an undocumented feature that is NOT available + with the DB1.85 compatibility interface. Therefore, Postfix + now supports three Berkeley DB programming interfaces of + increasing complexity. File: util/dict_db.c. + + Bugfix: made some character manipulations independent of + signed/unsigned characters. Files: global/quote_821_local.c, + global/quote_822_local.c. + + Workaround: some software sends SMTP mail that begins with + "From sender time-stamp". Sendmail accepts such RFC vioating + garbage, and therefore Postfix needs to jump another hoop. + File: smtpd/smtpd.c. diff --git a/postfix/INSTALL b/postfix/INSTALL index d44582673..49cf95a8a 100644 --- a/postfix/INSTALL +++ b/postfix/INSTALL @@ -31,7 +31,7 @@ should be executed as an unprivileged user. ================= Documentation is available as HTML web pages (point your browser -to html/index.html) and as UNIX-style manpages (point your MANPATH +to html/index.html) and as UNIX-style man pages (point your MANPATH environment variable to the `man' subdirectory; be sure to use an absolute path). @@ -419,7 +419,7 @@ every Postfix daemon can run chrooted. By default, no Postfix daemon runs chrooted. In order to enable chroot operation, edit the file /etc/postfix/master.cf. It is -highy recommended to chroot the daemons that talk to the network: +highly recommended to chroot the daemons that talk to the network: the smtp and smtpd processes. Note that a chrooted daemon resolves all filenames relative to the @@ -432,7 +432,7 @@ Postfix systems. 12 - Security: writable versus protected maildrop directory =========================================================== -Postfix offers a choice of submission mechanims. +Postfix offers a choice of submission mechanisms. 1 - Postfix can use a world-writable, sticky, mode 1733 maildrop directory where local users can submit mail. This approach diff --git a/postfix/LMTP_README b/postfix/LMTP_README index f21f7cbb9..33ab63198 100644 --- a/postfix/LMTP_README +++ b/postfix/LMTP_README @@ -31,7 +31,7 @@ Next, put the following in /etc/inetd.conf: /usr/sbin/tcpd is from the tcp_wrappers package. You want this to make sure only your mail relay(s) can talk to the LMTP server. Postfix by default does multiple deliveries per LMTP session -(connection cacheing), so do not worry about the overhead of +(connection caching), so do not worry about the overhead of tcp_wrapping the LMTP port. On some systems, tcpd is built into inetd, so you do not have to @@ -63,15 +63,15 @@ Instead of "hash", use the map type of your choice. Some systems use "dbm" instead. Use "postconf -m" to find out what map types are supported. -Improving connection cacheing performance -========================================= +Improving connection caching performance +======================================== After delivering a message via LMTP, Postfix will keep the connection open for a while, so that it can be reused for a subsequent delivery. This reduces overhead of LMTP servers that create one process per connection. -For LMTP connection cacheing to work, the Postfix LMTP client should +For LMTP connection caching to work, the Postfix LMTP client should not switch destination hosts. This is no problem when you run only one LMTP server. However, if you run multiple LMTP servers, this can be an issue. diff --git a/postfix/MYSQL_README b/postfix/MYSQL_README index 97735bd1e..7fb79e108 100644 --- a/postfix/MYSQL_README +++ b/postfix/MYSQL_README @@ -37,7 +37,7 @@ map config file follows: # the user name and password to log into the mysql server user = someone -password = some_passwordd +password = some_password # the database name on the servers dbname = customer_database @@ -79,7 +79,7 @@ databases on two or more hosts. Whenever queries fail with an error at one host, the rest of the hosts will be tried in order. Each host that is in an error state will undergo a reconnection attempt every so often, and if no mysql server hosts are reachable, then mail will be -deferred until atleast one of those hosts is reachable. +deferred until at least one of those hosts is reachable. Performance of postfix with mysql has not been thoroughly tested, however, we have found it to be stable. Busy mail servers using mysql diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index c92903b46..2f4e9b7f8 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -1,3 +1,17 @@ +Incompatible changes with snapshot-20001027 +=========================================== + +Berkeley DB support has changed for Solaris, HP-UX, UNIXWARE, IRIX. +You can no longer use the DB 1.85 compatibility interface, because +that interface loses the file lock while building a table, so that +table lookups fail and mail is lost. See the DB_README file for +instructions on how to build with third-party Berkeley DB support. + +The "fast ETRN" policy configuration has changed. You now specify +the list of eligible "fast ETRN" domains with the fast_flush_domains +parameter (default: $relay_domains). In order to disable the feature, +specify an empty value (fast_flush_domains =). + Incompatible changes with snapshot-20001005 =========================================== @@ -229,12 +243,12 @@ connections to a specific local interface. Or override the default setting in master.cf with "smtp -o smtp_bind_address=x.x.x.x". For now, you must specify a numeric IP address. -Preliminary LMTP client support over TCP with connection cacheing. +Preliminary LMTP client support over TCP with connection caching. Support for LMTP over UNIX-domain sockets will be added later as an enhancement to the transport table syntax. See the LMTP_README file for more details. -By the way, LMTP client-side connection cacheing is a good example +By the way, LMTP client-side connection caching is a good example for how to do the same in the SMTP client. Preliminary support for SASL authentication, both in the SMTP server @@ -684,7 +698,7 @@ Incompatible changes with postfix-beta-19990122: customer.org smtp:[gateway.customer.org] .customer.org smtp:[gateway.customer.org] - This change makes tranport tables more compatible with + This change makes transport tables more compatible with sendmail mailer tables. - The format of syslog records has changed. A client is now always diff --git a/postfix/conf/access b/postfix/conf/access index 37c2169ab..06e3ebec2 100644 --- a/postfix/conf/access +++ b/postfix/conf/access @@ -35,43 +35,47 @@ # Blank lines are ignored, as are lines beginning # with `#'. # +# leading whitespace +# Lines that begin with whitespace continue the pre- +# vious line. +# # pattern action # When pattern matches a mail address, domain or host # address, perform the corresponding action. # # PATTERNS # With lookups from indexed files such as DB or DBM, or from -# networked tables such as NIS, LDAP or SQL, patterns are +# networked tables such as NIS, LDAP or SQL, patterns are # tried in the order as listed below: # # user@domain # Matches the specified mail address. # # domain.name -# Matches the domain.name itself and any subdomain -# thereof, either in hostnames or in mail addresses. +# Matches the domain.name itself and any subdomain +# thereof, either in hostnames or in mail addresses. # Top-level domains will never be matched. # -# user@ Matches all mail addresses with the specified user -# part. -# # 1 # # ACCESS(5) ACCESS(5) # +# user@ Matches all mail addresses with the specified user +# part. +# # net.work.addr.ess # # net.work.addr # # net.work # -# net Matches any host address in the specified network. -# A network address is a sequence of one or more +# net Matches any host address in the specified network. +# A network address is a sequence of one or more # octets separated by ".". # # ACTIONS # [45]XX text -# Reject the address etc. that matches the pattern, +# Reject the address etc. that matches the pattern, # and respond with the numerical code and text. # # REJECT Reject the address etc. that matches the pattern. A @@ -83,42 +87,43 @@ # Accept the address etc. that matches the pattern. # # REGULAR EXPRESSION TABLES -# This section describes how the table lookups change when +# This section describes how the table lookups change when # the table is given in the form of regular expressions. For -# a description of regular expression lookup table syntax, +# a description of regular expression lookup table syntax, # see regexp_table(5) or pcre_table(5). # -# Each pattern is a regular expression that is applied to +# Each pattern is a regular expression that is applied to # the entire string being looked up. Depending on the appli- -# cation, that string is an entire client hostname, an +# cation, that string is an entire client hostname, an # entire client IP address, or an entire mail address. Thus, -# no parent domain or parent network search is done, and -# user@domain mail addresses are not broken up into their +# no parent domain or parent network search is done, and +# user@domain mail addresses are not broken up into their # user@ and domain constituent parts. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search +# Patterns are applied in the order as specified in the +# table, until a pattern is found that matches the search # string. # -# Actions are the same as with normal indexed file lookups, -# with the additional feature that parenthesized substrings -# from the pattern can be interpolated as $1, $2 and so on. +# Actions are the same as with normal indexed file lookups, +# with the additional feature that parenthesized substrings +# from the pattern can be interpolated as $1, $2 and so on. # # BUGS -# The table format does not understand quoting conventions. +# The table format does not understand quoting conventions. # # SEE ALSO # postmap(1) create mapping table # smtpd(8) smtp server -# pcre_table(5) format of PCRE tables -# regexp_table(5) format of POSIX regular expression tables # # 2 # # ACCESS(5) ACCESS(5) # +# pcre_table(5) format of PCRE tables +# regexp_table(5) format of POSIX regular expression tables +# # LICENSE -# The Secure Mailer license must be distributed with this +# The Secure Mailer license must be distributed with this # software. # # AUTHOR(S) diff --git a/postfix/conf/canonical b/postfix/conf/canonical index fc3083cec..c00227c29 100644 --- a/postfix/conf/canonical +++ b/postfix/conf/canonical @@ -50,84 +50,87 @@ # Blank lines are ignored, as are lines beginning # with `#'. # -# pattern result -# When pattern matches a mail address, replace it by -# the corresponding result. -# -# With lookups from indexed files such as DB or DBM, or from +# leading whitespace +# Lines that begin with whitespace continue the pre- +# vious line. # # 1 # # CANONICAL(5) CANONICAL(5) # -# networked tables such as NIS, LDAP or SQL, patterns are +# pattern result +# When pattern matches a mail address, replace it by +# the corresponding result. +# +# With lookups from indexed files such as DB or DBM, or from +# networked tables such as NIS, LDAP or SQL, patterns are # tried in the order as listed below: # # user@domain address -# user@domain is replaced by address. This form has +# user@domain is replaced by address. This form has # the highest precedence. # -# This form useful to clean up addresses produced by -# legacy mail systems. It can also be used to pro- -# duce Firstname.Lastname style addresses, but see +# This form useful to clean up addresses produced by +# legacy mail systems. It can also be used to pro- +# duce Firstname.Lastname style addresses, but see # below for a simpler solution. # # user address # user@site is replaced by address when site is equal -# to $myorigin, when site is listed in $mydestina- +# to $myorigin, when site is listed in $mydestina- # tion, or when it is listed in $inet_interfaces. # -# This form is useful for replacing login names by +# This form is useful for replacing login names by # Firstname.Lastname. # # @domain address -# Every address in domain is replaced by address. +# Every address in domain is replaced by address. # This form has the lowest precedence. # -# In all the above forms, when address has the form @other- +# In all the above forms, when address has the form @other- # domain, the result is the same user in otherdomain. # # ADDRESS EXTENSION -# When table lookup fails, and the address localpart con- -# tains the optional recipient delimiter (e.g., -# user+foo@domain), the search is repeated for the unex- -# tended address (e.g. user@domain), and the unmatched +# When table lookup fails, and the address localpart con- +# tains the optional recipient delimiter (e.g., +# user+foo@domain), the search is repeated for the unex- +# tended address (e.g. user@domain), and the unmatched # extension is propagated to the result of table lookup. The # matching order is: user+foo@domain, user@domain, user+foo, # user, and @domain. # # REGULAR EXPRESSION TABLES -# This section describes how the table lookups change when +# This section describes how the table lookups change when # the table is given in the form of regular expressions. For -# a description of regular expression lookup table syntax, +# a description of regular expression lookup table syntax, # see regexp_table(5) or pcre_table(5). # -# Each pattern is a regular expression that is applied to +# Each pattern is a regular expression that is applied to # the entire address being looked up. Thus, user@domain mail -# addresses are not broken up into their user and @domain +# addresses are not broken up into their user and @domain # constituent parts, nor is user+foo broken up into user and # foo. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search -# string. -# -# Results are the same as with normal indexed file lookups, -# with the additional feature that parenthesized substrings +# Patterns are applied in the order as specified in the # # 2 # # CANONICAL(5) CANONICAL(5) # -# from the pattern can be interpolated as $1, $2 and so on. +# table, until a pattern is found that matches the search +# string. +# +# Results are the same as with normal indexed file lookups, +# with the additional feature that parenthesized substrings +# from the pattern can be interpolated as $1, $2 and so on. # # BUGS -# The table format does not understand quoting conventions. +# The table format does not understand quoting conventions. # # CONFIGURATION PARAMETERS -# The following main.cf parameters are especially relevant -# to this topic. See the Postfix main.cf file for syntax -# details and for default values. Use the postfix reload +# The following main.cf parameters are especially relevant +# to this topic. See the Postfix main.cf file for syntax +# details and for default values. Use the postfix reload # command after a configuration change. # # canonical_maps @@ -144,19 +147,19 @@ # Other parameters of interest: # # inet_interfaces -# The network interface addresses that this system +# The network interface addresses that this system # receives mail on. # # masquerade_domains -# List of domains that hide their subdomain struc- +# List of domains that hide their subdomain struc- # ture. # # masquerade_exceptions -# List of user names that are not subject to address +# List of user names that are not subject to address # masquerading. # # mydestination -# List of domains that this mail system considers +# List of domains that this mail system considers # local. # # myorigin @@ -168,17 +171,18 @@ # # SEE ALSO # cleanup(8) canonicalize and enqueue mail -# postmap(1) create mapping table -# virtual(5) virtual domain mapping -# pcre_table(5) format of PCRE tables -# regexp_table(5) format of POSIX regular expression tables # # 3 # # CANONICAL(5) CANONICAL(5) # +# postmap(1) create mapping table +# virtual(5) virtual domain mapping +# pcre_table(5) format of PCRE tables +# regexp_table(5) format of POSIX regular expression tables +# # LICENSE -# The Secure Mailer license must be distributed with this +# The Secure Mailer license must be distributed with this # software. # # AUTHOR(S) diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index 92a27f328..659e0ef64 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -288,7 +288,8 @@ mail_owner = postfix # headers. This requires that POSIX or PCRE regular expression support # is built-in. Specify "/^header-name: stuff you do not want/ REJECT" # in the pattern file. Patterns are case-insensitive by default. Note: -# specify only patterns ending in REJECT. Patterns ending in OK are +# specify only patterns ending in REJECT (reject entire message) or +# IGNORE (silently discard this header). Patterns ending in OK are # mostly a waste of cycles. # #header_checks = regexp:/etc/postfix/filename @@ -354,14 +355,11 @@ mail_owner = postfix # SMTP "ETRN domain.name" command, or after execution of "sendmail # -qRdomain.name". This can be slow when a lot of mail is queued. # -# The fast_flush_policy controls what destinations are eligible for -# this "fast ETRN/sendmail -qR" service. Specify "all" to make all -# destinations eligible, "relay" for relay destinations only (the -# default), and "none" to turn this feature off. +# The fast_flush_domains controls what destinations are eligible for +# this "fast ETRN/sendmail -qR" service. # -#fast_flush_policy = all -#fast_flush_policy = relay -#fast_flush_policy = none +#fast_flush_domains = $relay_domains +#fast_flush_policy = # SHOW SOFTWARE VERSION OR NOT # diff --git a/postfix/conf/pcre_table b/postfix/conf/pcre_table index 0193058cd..389466383 100644 --- a/postfix/conf/pcre_table +++ b/postfix/conf/pcre_table @@ -22,45 +22,48 @@ # Blank lines are ignored, as are lines beginning # with `#'. # +# leading whitespace +# Lines that begin with whitespace continue the pre- +# vious line. +# # pattern result -# When pattern matches a search string, use the cor- -# responding result. A line that starts with white +# When pattern matches a search string, use the cor- +# responding result. A line that starts with white # space continues the preceding line. # # Each pattern is a perl-like regular expression. The -# expression delimiter can be any character, except whites- -# pace or characters that have special meaning (tradition- -# ally the forward slash is used). The regular expression +# expression delimiter can be any character, except whites- +# pace or characters that have special meaning (tradition- +# ally the forward slash is used). The regular expression # can contain whitespace. # # By default, matching is case-insensitive, although follow- -# ing the second slash with an `i' flag will reverse this. -# Other flags are supported, but the only other useful one +# ing the second slash with an `i' flag will reverse this. +# Other flags are supported, but the only other useful one # is `U', which makes matching ungreedy (see PCRE documenta- # tion and source for more info). # -# Each pattern is applied to the entire string being looked -# up. Depending on the application, that string is an +# Each pattern is applied to the entire string being looked +# up. Depending on the application, that string is an # entire client hostname, an entire client IP address, or an -# entire mail address. Thus, no parent domain or parent +# entire mail address. Thus, no parent domain or parent # network search is done, and user@domain mail addresses are -# not broken up into their user and domain constituent +# not broken up into their user and domain constituent # parts, nor is user+foo broken up into user and foo. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search +# Patterns are applied in the order as specified in the +# table, until a pattern is found that matches the search # string. # -# Substitution of sub-strings from the matched expression is -# possible using the conventional perl syntax ($1, $2, -# etc.). The macros in the replacement string may need to be -# written as ${n} or $(n) if they aren't followed by -# # 1 # # PCRE_TABLE(5) PCRE_TABLE(5) # -# whitespace. +# Substitution of sub-strings from the matched expression is +# possible using the conventional perl syntax ($1, $2, +# etc.). The macros in the replacement string may need to be +# written as ${n} or $(n) if they aren't followed by whites- +# pace. # # EXAMPLES # # Protect your outgoing majordomo exploders diff --git a/postfix/conf/regexp_table b/postfix/conf/regexp_table index c269a38c5..f9b8a5e2e 100644 --- a/postfix/conf/regexp_table +++ b/postfix/conf/regexp_table @@ -22,9 +22,13 @@ # Blank lines are ignored, as are lines beginning # with `#'. # +# leading whitespace +# Lines that begin with whitespace continue the pre- +# vious line. +# # pattern result -# When pattern matches a search string, use the cor- -# responding result. A line that starts with white +# When pattern matches a search string, use the cor- +# responding result. A line that starts with white # space continues the preceding line. # # pattern1!pattern2 result @@ -33,35 +37,35 @@ # Each pattern is a regular expression enclosed by a pair of # delimiters. The regular expression syntax is described in # re_format(7). The expression delimiter can be any charac- -# ter, except whitespace or characters that have special -# meaning (traditionally the forward slash is used). The +# ter, except whitespace or characters that have special +# meaning (traditionally the forward slash is used). The # regular expression can contain whitespace. # # By default, matching is case-insensitive, although follow- -# ing the second slash with an `i' flag will reverse this. -# Other flags are `x' (disable extended expression syntax), +# ing the second slash with an `i' flag will reverse this. +# Other flags are `x' (disable extended expression syntax), # and `m' (enable multi-line mode). # -# Each pattern is applied to the entire string being looked -# up. Depending on the application, that string is an +# Each pattern is applied to the entire string being looked +# up. Depending on the application, that string is an # entire client hostname, an entire client IP address, or an -# entire mail address. Thus, no parent domain or parent +# entire mail address. Thus, no parent domain or parent # network search is done, and user@domain mail addresses are -# not broken up into their user and domain constituent +# not broken up into their user and domain constituent # parts, nor is user+foo broken up into user and foo. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search -# string. -# -# Substitution of sub-strings from the matched expression is +# Patterns are applied in the order as specified in the # # 1 # # REGEXP_TABLE(5) REGEXP_TABLE(5) # +# table, until a pattern is found that matches the search +# string. +# +# Substitution of sub-strings from the matched expression is # possible using $1, $2, etc.. The macros in the replacement -# string may need to be written as ${n} or $(n) if they +# string may need to be written as ${n} or $(n) if they # aren't followed by whitespace. # # EXAMPLES diff --git a/postfix/conf/relocated b/postfix/conf/relocated index 832b8c5ae..bd1dfa469 100644 --- a/postfix/conf/relocated +++ b/postfix/conf/relocated @@ -35,66 +35,68 @@ # o Blank lines are ignored, as are lines beginning # with `#'. # +# o Lines that begin with whitespace continue the pre- +# vious line. +# # o An entry has one of the following form: # key new_location -# Where new_location specifies contact information -# such as an email address, or perhaps a street +# Where new_location specifies contact information +# such as an email address, or perhaps a street # address or telephone number. # # With lookups from indexed files such as DB or DBM, or from -# networked tables such as NIS, LDAP or SQL, the key field +# networked tables such as NIS, LDAP or SQL, the key field # is one of the following: # # user@domain -# Matches user@domain. This form has precedence over +# Matches user@domain. This form has precedence over # all other forms. # # user Matches user@site when site is $myorigin, when site # is listed in $mydestination, or when site is listed # in $inet_interfaces. # -# @domain -# Matches every address in domain. This form has the -# # 1 # # RELOCATED(5) RELOCATED(5) # +# @domain +# Matches every address in domain. This form has the # lowest precedence. # # ADDRESS EXTENSION -# When the search fails, and the address localpart contains -# the optional recipient delimiter (e.g., user+foo@domain), -# the search is repeated for the unextended address (e.g. +# When the search fails, and the address localpart contains +# the optional recipient delimiter (e.g., user+foo@domain), +# the search is repeated for the unextended address (e.g. # user@domain). # # REGULAR EXPRESSION TABLES -# This section describes how the table lookups change when +# This section describes how the table lookups change when # the table is given in the form of regular expressions. For -# a description of regular expression lookup table syntax, +# a description of regular expression lookup table syntax, # see regexp_table(5) or pcre_table(5). # -# Each pattern is a regular expression that is applied to +# Each pattern is a regular expression that is applied to # the entire address being looked up. Thus, user@domain mail -# addresses are not broken up into their user and @domain +# addresses are not broken up into their user and @domain # constituent parts, nor is user+foo broken up into user and # foo. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search +# Patterns are applied in the order as specified in the +# table, until a pattern is found that matches the search # string. # -# Results are the same as with normal indexed file lookups, -# with the additional feature that parenthesized substrings -# from the pattern can be interpolated as $1, $2 and so on. +# Results are the same as with normal indexed file lookups, +# with the additional feature that parenthesized substrings +# from the pattern can be interpolated as $1, $2 and so on. # # BUGS -# The table format does not understand quoting conventions. +# The table format does not understand quoting conventions. # # CONFIGURATION PARAMETERS -# The following main.cf parameters are especially relevant -# to this topic. See the Postfix main.cf file for syntax -# details and for default values. Use the postfix reload +# The following main.cf parameters are especially relevant +# to this topic. See the Postfix main.cf file for syntax +# details and for default values. Use the postfix reload # command after a configuration change. # # relocated_maps @@ -103,11 +105,11 @@ # Other parameters of interest: # # inet_interfaces -# The network interface addresses that this system +# The network interface addresses that this system # receives mail on. # # mydestination -# List of domains that this mail system considers +# List of domains that this mail system considers # local. # # myorigin @@ -123,7 +125,7 @@ # regexp_table(5) format of POSIX regular expression tables # # LICENSE -# The Secure Mailer license must be distributed with this +# The Secure Mailer license must be distributed with this # software. # # AUTHOR(S) diff --git a/postfix/conf/sample-filter.cf b/postfix/conf/sample-filter.cf index 51903c68a..9093de574 100644 --- a/postfix/conf/sample-filter.cf +++ b/postfix/conf/sample-filter.cf @@ -8,8 +8,15 @@ # that each logical message header is matched against, including # headers that span multiple physical lines. Patterns are matched # in the specified order, and the search stops upon the first match. -# When a pattern matches, and the associated action is REJECT, the -# entire message is rejected. +# When a pattern matches, what happens next depends on the associated +# action: +# +# REJECT the entire message is rejected. +# +# IGNORE the header line is silently discarded. +# +# OK Nothing happens. the message will still be rejected when some +# other header line matches a REJECT pattern. # # These patterns do not apply to MIME headers in the message body. # @@ -21,7 +28,14 @@ header_checks = regexp:/etc/postfix/header_checks # recognize multi-line MIME headers). Lines are matched one at a # time. Long lines are matched in chunks of at most $line_length_limit # characters. Patterns are matched in the specified order, and the -# search stops upon the first match. When a pattern matches, and -# the associated action is REJECT, the entire message is rejected. +# search stops upon the first match. When a pattern matches, what +# happens next depends on the associated action: +# +# REJECT the entire message is rejected. +# +# IGNORE the body line is silently discarded. +# +# OK Nothing happens. The message will still be rejected when some +# other body line matches a REJECT pattern. # body_checks = regexp:/etc/postfix/body_checks diff --git a/postfix/conf/sample-flush.cf b/postfix/conf/sample-flush.cf index 0cc0105aa..9b3c92791 100644 --- a/postfix/conf/sample-flush.cf +++ b/postfix/conf/sample-flush.cf @@ -5,7 +5,7 @@ # control the fast flush service, which is the code that implements # fast ETRN and fast "sendmail -qR". -# The fast_flush_policy parameter specifies what destinations are +# The fast_flush_domains parameter specifies what destinations are # eligible for per-destination logfiles with mail that is queued to # those destinations. # @@ -25,12 +25,10 @@ # destinations that the Postfix SMTP server is willing to relay to # (see the relay_domains parameter in sample-smtpd.cf). # -# Specify "all" to enable "fast flush" logfiles for all destinations, -# "none" to disable the logfiles altogether. +# Specify "fast_flush_policy =" to disable the feature altogether. # -#fast_flush_policy = all -fast_flush_policy = relay -#fast_flush_policy = none +fast_flush_policy = $relay_domains +#fast_flush_policy = # The fast_flush_purge_time parameter controls how long an empty # per-destination "fast flush" logfile is allowed to live. diff --git a/postfix/conf/transport b/postfix/conf/transport index 072efb3f0..b14e6814f 100644 --- a/postfix/conf/transport +++ b/postfix/conf/transport @@ -35,115 +35,118 @@ # Blank lines are ignored, as are lines beginning # with `#'. # +# leading whitespace +# Lines that begin with whitespace continue the pre- +# vious line. +# # pattern result -# When pattern matches the domain, use the corre- +# When pattern matches the domain, use the corre- # sponding result. # # With lookups from indexed files such as DB or DBM, or from -# networked tables such as NIS, LDAP or SQL, patterns are +# networked tables such as NIS, LDAP or SQL, patterns are # tried in the order as listed below: # # domain transport:nexthop -# Mail for domain is delivered through transport to +# Mail for domain is delivered through transport to # nexthop. # # .domain transport:nexthop -# Mail for any subdomain of domain is delivered +# Mail for any subdomain of domain is delivered # through transport to nexthop. # -# Note: transport map entries take precedence over domains -# specified in the mydestination parameter. If you use the -# optional transport map, it may be safer to specify -# explicit entries for all domains specified in -# # 1 # # TRANSPORT(5) TRANSPORT(5) # -# mydestination, for example: +# Note: transport map entries take precedence over domains +# specified in the mydestination parameter. If you use the +# optional transport map, it may be safer to specify +# explicit entries for all domains specified in mydestina- +# tion, for example: # # hostname.my.domain local: # localhost.my.domain local: # -# The interpretation of the nexthop field is transport +# The interpretation of the nexthop field is transport # dependent. In the case of SMTP, specify host:service for a -# non-default server port, and use [host] or [host]:port in -# order to disable MX (mail exchanger) DNS lookups. The [] -# form can also be used with IP addresses instead of host- +# non-default server port, and use [host] or [host]:port in +# order to disable MX (mail exchanger) DNS lookups. The [] +# form can also be used with IP addresses instead of host- # names. # # EXAMPLES -# In order to send mail for foo.org and its subdomains via +# In order to send mail for foo.org and its subdomains via # the uucp transport to the UUCP host named foo: # # foo.org uucp:foo # .foo.org uucp:foo # -# When no nexthop host name is specified, the destination -# domain name is used instead. For example, the following -# directs mail for user@foo.org via the slow transport to a -# mail exchanger for foo.org. The slow transport could be -# something that runs at most one delivery process at a +# When no nexthop host name is specified, the destination +# domain name is used instead. For example, the following +# directs mail for user@foo.org via the slow transport to a +# mail exchanger for foo.org. The slow transport could be +# something that runs at most one delivery process at a # time: # # foo.org slow: # -# When no transport is specified, the default transport is +# When no transport is specified, the default transport is # used, as specified via the default_transport configuration -# parameter. The following sends all mail for foo.org and +# parameter. The following sends all mail for foo.org and # its subdomains to host gateway.foo.org: # # foo.org :[gateway.foo.org] # .foo.org :[gateway.foo.org] # -# In the above example, the [] are used to suppress MX -# lookups. The result would likely point to your local +# In the above example, the [] are used to suppress MX +# lookups. The result would likely point to your local # machine. # -# In the case of delivery via SMTP, one may specify host- +# In the case of delivery via SMTP, one may specify host- # name:service instead of just a host: # # foo.org smtp:bar.org:2025 # -# This directs mail for user@foo.org to host bar.org port -# 2025. Instead of a numerical port a symbolic name may be -# used. Specify [] around the hostname in order to disable +# This directs mail for user@foo.org to host bar.org port +# 2025. Instead of a numerical port a symbolic name may be +# used. Specify [] around the hostname in order to disable # MX lookups. # -# The error mailer can be used to bounce mail: -# -# .foo.org error:mail for *.foo.org is not deliv- -# erable -# # 2 # # TRANSPORT(5) TRANSPORT(5) # -# This causes all mail for user@anything.foo.org to be +# The error mailer can be used to bounce mail: +# +# .foo.org error:mail for *.foo.org is not deliv- +# erable +# +# This causes all mail for user@anything.foo.org to be # bounced. # # REGULAR EXPRESSION TABLES -# This section describes how the table lookups change when +# This section describes how the table lookups change when # the table is given in the form of regular expressions. For -# a description of regular expression lookup table syntax, +# a description of regular expression lookup table syntax, # see regexp_table(5) or pcre_table(5). # -# Each pattern is a regular expression that is applied to +# Each pattern is a regular expression that is applied to # the entire domain being looked up. Thus, some.domain.hier- # archy is not broken up into parent domains. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search +# Patterns are applied in the order as specified in the +# table, until a pattern is found that matches the search # string. # -# Results are the same as with normal indexed file lookups, -# with the additional feature that parenthesized substrings -# from the pattern can be interpolated as $1, $2 and so on. +# Results are the same as with normal indexed file lookups, +# with the additional feature that parenthesized substrings +# from the pattern can be interpolated as $1, $2 and so on. # # CONFIGURATION PARAMETERS -# The following main.cf parameters are especially relevant -# to this topic. See the Postfix main.cf file for syntax -# details and for default values. Use the postfix reload +# The following main.cf parameters are especially relevant +# to this topic. See the Postfix main.cf file for syntax +# details and for default values. Use the postfix reload # command after a configuration change. # # transport_maps @@ -152,7 +155,7 @@ # Other parameters of interest: # # default_transport -# The transport to use when no transport is explic- +# The transport to use when no transport is explic- # itly specified. # # relayhost @@ -166,18 +169,17 @@ # regexp_table(5) format of POSIX regular expression tables # # LICENSE -# The Secure Mailer license must be distributed with this +# The Secure Mailer license must be distributed with this # software. # -# AUTHOR(S) -# Wietse Venema -# IBM T.J. Watson Research -# P.O. Box 704 -# # 3 # # TRANSPORT(5) TRANSPORT(5) # +# AUTHOR(S) +# Wietse Venema +# IBM T.J. Watson Research +# P.O. Box 704 # Yorktown Heights, NY 10598, USA # # 4 diff --git a/postfix/conf/virtual b/postfix/conf/virtual index 9d3fef76d..591f146ac 100644 --- a/postfix/conf/virtual +++ b/postfix/conf/virtual @@ -58,76 +58,80 @@ # # VIRTUAL(5) VIRTUAL(5) # +# leading whitespace +# Lines that begin with whitespace continue the pre- +# vious line. +# # pattern result -# When pattern matches a mail address, replace it by +# When pattern matches a mail address, replace it by # the corresponding result. # # With lookups from indexed files such as DB or DBM, or from -# networked tables such as NIS, LDAP or SQL, patterns are +# networked tables such as NIS, LDAP or SQL, patterns are # tried in the order as listed below: # # user@domain address, address, ... -# Mail for user@domain is redirected to address. +# Mail for user@domain is redirected to address. # This form has the highest precedence. # # user address, address, ... -# Mail for user@site is redirected to address when -# site is equal to $myorigin, when site is listed in +# Mail for user@site is redirected to address when +# site is equal to $myorigin, when site is listed in # $mydestination, or when it is listed in # $inet_interfaces. # -# This functionality overlaps with functionality of +# This functionality overlaps with functionality of # the local alias(5) database. The difference is that -# virtual mapping can be applied to non-local +# virtual mapping can be applied to non-local # addresses. # # @domain address, address, ... -# Mail for any user in domain is redirected to +# Mail for any user in domain is redirected to # address. This form has the lowest precedence. # -# In all the above forms, when address has the form @other- -# domain, the result is the same user in otherdomain. This +# In all the above forms, when address has the form @other- +# domain, the result is the same user in otherdomain. This # works for the first address in the expansion only. # # ADDRESS EXTENSION -# When the search fails, and the address localpart contains -# the optional recipient delimiter (e.g., user+foo@domain), -# the search is repeated for the unextended address (e.g. +# When the search fails, and the address localpart contains +# the optional recipient delimiter (e.g., user+foo@domain), +# the search is repeated for the unextended address (e.g. # user@domain), and the unmatched address extension is prop- -# agated to the result of expansion. The matching order is: +# agated to the result of expansion. The matching order is: # user+foo@domain, user@domain, user+foo, user, and @domain. # # REGULAR EXPRESSION TABLES -# This section describes how the table lookups change when +# This section describes how the table lookups change when # the table is given in the form of regular expressions. For -# a description of regular expression lookup table syntax, +# a description of regular expression lookup table syntax, # see regexp_table(5) or pcre_table(5). # -# Each pattern is a regular expression that is applied to +# Each pattern is a regular expression that is applied to # the entire address being looked up. Thus, user@domain mail -# addresses are not broken up into their user and @domain +# addresses are not broken up into their user and @domain # constituent parts, nor is user+foo broken up into user and # foo. # -# Patterns are applied in the order as specified in the -# table, until a pattern is found that matches the search -# string. -# # 2 # # VIRTUAL(5) VIRTUAL(5) # -# Results are the same as with normal indexed file lookups, -# with the additional feature that parenthesized substrings -# from the pattern can be interpolated as $1, $2 and so on. +# Patterns are applied in the order as specified in the +# table, until a pattern is found that matches the search +# string. +# +# Results are the same as with normal indexed file lookups, +# with the additional feature that parenthesized substrings +# from the pattern can be interpolated as $1, $2 and so on. # # BUGS -# The table format does not understand quoting conventions. +# The table format does not understand quoting conventions. # # CONFIGURATION PARAMETERS -# The following main.cf parameters are especially relevant -# to this topic. See the Postfix main.cf file for syntax -# details and for default values. Use the postfix reload +# The following main.cf parameters are especially relevant +# to this topic. See the Postfix main.cf file for syntax +# details and for default values. Use the postfix reload # command after a configuration change. # # virtual_maps @@ -136,11 +140,11 @@ # Other parameters of interest: # # inet_interfaces -# The network interface addresses that this system +# The network interface addresses that this system # receives mail on. # # mydestination -# List of domains that this mail system considers +# List of domains that this mail system considers # local. # # myorigin @@ -157,7 +161,7 @@ # regexp_table(5) format of POSIX regular expression tables # # LICENSE -# The Secure Mailer license must be distributed with this +# The Secure Mailer license must be distributed with this # software. # # AUTHOR(S) diff --git a/postfix/html/access.5.html b/postfix/html/access.5.html index 1ec447443..f99e6e146 100644 --- a/postfix/html/access.5.html +++ b/postfix/html/access.5.html @@ -39,27 +39,27 @@ ACCESS(5) ACCESS(5) Blank lines are ignored, as are lines beginning with `#'. + leading whitespace + Lines that begin with whitespace continue the pre- + vious line. + pattern action When pattern matches a mail address, domain or host address, perform the corresponding action. PATTERNS With lookups from indexed files such as DB or DBM, or from - networked tables such as NIS, LDAP or SQL, patterns are + networked tables such as NIS, LDAP or SQL, patterns are tried in the order as listed below: user@domain Matches the specified mail address. domain.name - Matches the domain.name itself and any subdomain - thereof, either in hostnames or in mail addresses. + Matches the domain.name itself and any subdomain + thereof, either in hostnames or in mail addresses. Top-level domains will never be matched. - user@ Matches all mail addresses with the specified user - part. - - 1 @@ -71,19 +71,22 @@ ACCESS(5) ACCESS(5) ACCESS(5) ACCESS(5) + user@ Matches all mail addresses with the specified user + part. + net.work.addr.ess net.work.addr net.work - net Matches any host address in the specified network. - A network address is a sequence of one or more + net Matches any host address in the specified network. + A network address is a sequence of one or more octets separated by ".". ACTIONS [45]XX text - Reject the address etc. that matches the pattern, + Reject the address etc. that matches the pattern, and respond with the numerical code and text. REJECT Reject the address etc. that matches the pattern. A @@ -95,36 +98,33 @@ ACCESS(5) ACCESS(5) Accept the address etc. that matches the pattern. REGULAR EXPRESSION TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when the table is given in the form of regular expressions. For - a description of regular expression lookup table syntax, + a description of regular expression lookup table syntax, see regexp_table(5) or pcre_table(5). - Each pattern is a regular expression that is applied to + Each pattern is a regular expression that is applied to the entire string being looked up. Depending on the appli- - cation, that string is an entire client hostname, an + cation, that string is an entire client hostname, an entire client IP address, or an entire mail address. Thus, - no parent domain or parent network search is done, and - user@domain mail addresses are not broken up into their + no parent domain or parent network search is done, and + user@domain mail addresses are not broken up into their user@ and domain constituent parts. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search + Patterns are applied in the order as specified in the + table, until a pattern is found that matches the search string. - Actions are the same as with normal indexed file lookups, - with the additional feature that parenthesized substrings - from the pattern can be interpolated as $1, $2 and so on. + Actions are the same as with normal indexed file lookups, + with the additional feature that parenthesized substrings + from the pattern can be interpolated as $1, $2 and so on. BUGS - The table format does not understand quoting conventions. + The table format does not understand quoting conventions. SEE ALSO postmap(1) create mapping table smtpd(8) smtp server - pcre_table(5) format of PCRE tables - regexp_table(5) format of POSIX regular expression tables - @@ -137,8 +137,11 @@ ACCESS(5) ACCESS(5) ACCESS(5) ACCESS(5) + pcre_table(5) format of PCRE tables + regexp_table(5) format of POSIX regular expression tables + LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -187,9 +190,6 @@ ACCESS(5) ACCESS(5) - - - diff --git a/postfix/html/canonical.5.html b/postfix/html/canonical.5.html index 06642ea33..664326072 100644 --- a/postfix/html/canonical.5.html +++ b/postfix/html/canonical.5.html @@ -54,11 +54,11 @@ CANONICAL(5) CANONICAL(5) Blank lines are ignored, as are lines beginning with `#'. - pattern result - When pattern matches a mail address, replace it by - the corresponding result. + leading whitespace + Lines that begin with whitespace continue the pre- + vious line. + - With lookups from indexed files such as DB or DBM, or from @@ -71,60 +71,60 @@ CANONICAL(5) CANONICAL(5) CANONICAL(5) CANONICAL(5) - networked tables such as NIS, LDAP or SQL, patterns are + pattern result + When pattern matches a mail address, replace it by + the corresponding result. + + With lookups from indexed files such as DB or DBM, or from + networked tables such as NIS, LDAP or SQL, patterns are tried in the order as listed below: user@domain address - user@domain is replaced by address. This form has + user@domain is replaced by address. This form has the highest precedence. - This form useful to clean up addresses produced by - legacy mail systems. It can also be used to pro- - duce Firstname.Lastname style addresses, but see + This form useful to clean up addresses produced by + legacy mail systems. It can also be used to pro- + duce Firstname.Lastname style addresses, but see below for a simpler solution. user address user@site is replaced by address when site is equal - to $myorigin, when site is listed in $mydestina- + to $myorigin, when site is listed in $mydestina- tion, or when it is listed in $inet_interfaces. - This form is useful for replacing login names by + This form is useful for replacing login names by Firstname.Lastname. @domain address - Every address in domain is replaced by address. + Every address in domain is replaced by address. This form has the lowest precedence. - In all the above forms, when address has the form @other- + In all the above forms, when address has the form @other- domain, the result is the same user in otherdomain. ADDRESS EXTENSION - When table lookup fails, and the address localpart con- - tains the optional recipient delimiter (e.g., - user+foo@domain), the search is repeated for the unex- - tended address (e.g. user@domain), and the unmatched + When table lookup fails, and the address localpart con- + tains the optional recipient delimiter (e.g., + user+foo@domain), the search is repeated for the unex- + tended address (e.g. user@domain), and the unmatched extension is propagated to the result of table lookup. The matching order is: user+foo@domain, user@domain, user+foo, user, and @domain. REGULAR EXPRESSION TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when the table is given in the form of regular expressions. For - a description of regular expression lookup table syntax, + a description of regular expression lookup table syntax, see regexp_table(5) or pcre_table(5). - Each pattern is a regular expression that is applied to + Each pattern is a regular expression that is applied to the entire address being looked up. Thus, user@domain mail - addresses are not broken up into their user and @domain + addresses are not broken up into their user and @domain constituent parts, nor is user+foo broken up into user and foo. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search - string. - - Results are the same as with normal indexed file lookups, - with the additional feature that parenthesized substrings + Patterns are applied in the order as specified in the @@ -137,15 +137,20 @@ CANONICAL(5) CANONICAL(5) CANONICAL(5) CANONICAL(5) - from the pattern can be interpolated as $1, $2 and so on. + table, until a pattern is found that matches the search + string. + + Results are the same as with normal indexed file lookups, + with the additional feature that parenthesized substrings + from the pattern can be interpolated as $1, $2 and so on. BUGS - The table format does not understand quoting conventions. + The table format does not understand quoting conventions. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant - to this topic. See the Postfix main.cf file for syntax - details and for default values. Use the postfix reload + The following main.cf parameters are especially relevant + to this topic. See the Postfix main.cf file for syntax + details and for default values. Use the postfix reload command after a configuration change. canonical_maps @@ -162,19 +167,19 @@ CANONICAL(5) CANONICAL(5) Other parameters of interest: inet_interfaces - The network interface addresses that this system + The network interface addresses that this system receives mail on. masquerade_domains - List of domains that hide their subdomain struc- + List of domains that hide their subdomain struc- ture. masquerade_exceptions - List of user names that are not subject to address + List of user names that are not subject to address masquerading. mydestination - List of domains that this mail system considers + List of domains that this mail system considers local. myorigin @@ -186,11 +191,6 @@ CANONICAL(5) CANONICAL(5) SEE ALSO cleanup(8) canonicalize and enqueue mail - postmap(1) create mapping table - virtual(5) virtual domain mapping - pcre_table(5) format of PCRE tables - regexp_table(5) format of POSIX regular expression tables - @@ -203,8 +203,13 @@ CANONICAL(5) CANONICAL(5) CANONICAL(5) CANONICAL(5) + postmap(1) create mapping table + virtual(5) virtual domain mapping + pcre_table(5) format of PCRE tables + regexp_table(5) format of POSIX regular expression tables + LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -249,11 +254,6 @@ CANONICAL(5) CANONICAL(5) - - - - - diff --git a/postfix/html/flush.8.html b/postfix/html/flush.8.html index e8f8d77f3..b28f20fb3 100644 --- a/postfix/html/flush.8.html +++ b/postfix/html/flush.8.html @@ -26,40 +26,40 @@ FLUSH(8) FLUSH(8) an email address. Per-destination logfiles of deferred mail are maintained - only for eligible destinations. The policy is specified - with the fast_flush_policy configuration parameter: - - all Maintain per-destination logfiles for all destina- - tions. - - relay (default policy) - Maintain per-destination logfiles only for destina- - tions that this system is willing to relay mail to - (as controlled by the relay_domains configuration - parameter). - - none Do not maintain per-destination logfiles. + only for eligible destinations. The list of eligible des- + tinations is specified with the fast_flush_domains config- + uration parameter, which defaults to $relay_domains. This server implements the following requests: FLUSH_REQ_ADD sitename queue_id - Inform the fast flush server that the specified - message is queued for sitename. Depending on log- + Inform the fast flush server that the specified + message is queued for sitename. Depending on log- ging policy, the fast flush server stores or ignores the information. FLUSH_REQ_SEND sitename - Request delivery of mail that is queued for site- - name. If the destination is eligible for a fast - flush logfile, this request triggers delivery of - messages listed in that destination's logfile, and + Request delivery of mail that is queued for site- + name. If the destination is eligible for a fast + flush logfile, this request triggers delivery of + messages listed in that destination's logfile, and the logfile is truncated to zero length; if mail is undeliverable it will be added back to the logfile. If the destination is not eligible for a fast flush - logfile, this request triggers delivery of all + logfile, this request triggers delivery of all queued mail. + TRIGGER_REQ_WAKEUP + This wakeup request from the master is an alterna- + tive way to request FLUSH_REQ_REFRESH. + + FLUSH_REQ_REFRESH (completes in the background) + Refresh non-empty per-destination logfiles that + were not read in $fast_flush_refresh_time hours, by + simulating send requests (see above) for the corre- + sponding destinations. + 1 @@ -71,24 +71,14 @@ FLUSH(8) FLUSH(8) FLUSH(8) FLUSH(8) - TRIGGER_REQ_WAKEUP - This wakeup request from the master is an alterna- - tive way to request FLUSH_REQ_REFRESH. - - FLUSH_REQ_REFRESH (completes in the background) - Refresh non-empty per-destination logfiles that - were not read in $fast_flush_refresh_time hours, by - simulating send requests (see above) for the corre- - sponding destinations. - Delete empty per-destination logfiles that were not updated in fast_flush_purge_time days. FLUSH_REQ_PURGE (completes in the background) - Refresh all non-empty per-destination logfiles, by + Refresh all non-empty per-destination logfiles, by simulating send requests (see above) for the corre- sponding destinations. This can be incredibly - expensive when logging is enabled for all deferred + expensive when logging is enabled for all deferred mail, and is not recommended. Delete empty per-destination logfiles that were not @@ -100,31 +90,41 @@ FLUSH(8) FLUSH(8) The request completed normally. FLUSH_STAT_BAD - The flush server rejected the request (bad request + The flush server rejected the request (bad request name, bad request parameter value). FLUSH_STAT_FAIL The request failed. SECURITY - The fast flush server is not security-sensitive. It does - not talk to the network, and it does not talk to local - users. The fast flush server can run chrooted at fixed + The fast flush server is not security-sensitive. It does + not talk to the network, and it does not talk to local + users. The fast flush server can run chrooted at fixed low privilege. DIAGNOSTICS Problems and transactions are logged to syslogd(8). BUGS - Fast flush logfiles are truncated only after a - FLUSH_REQ_SEND request, not when mail is actually deliv- - ered, and therefore can accumulate outdated or redundant - data. In order to maintain sanity, FLUSH_REQ_REFRESH must - be executed periodically. This can be automated with a - suitable wakeup timer setting in the master.cf configura- + Fast flush logfiles are truncated only after a + FLUSH_REQ_SEND request, not when mail is actually deliv- + ered, and therefore can accumulate outdated or redundant + data. In order to maintain sanity, FLUSH_REQ_REFRESH must + be executed periodically. This can be automated with a + suitable wakeup timer setting in the master.cf configura- tion file. - Upon receipt of a request to deliver all mail for an + Upon receipt of a request to deliver all mail for an eli- + gible destination, this server requests delivery of all + messages that are listed in that destination's logfile, + regardless of the recipients of those messages. This is + not an issue for mail that is sent to a relay_domains des- + tination because such mail typically only has recipients + in one domain. + +FILES + /var/spool/postfix/flush, location of "fast flush" logfiles. + @@ -137,34 +137,24 @@ FLUSH(8) FLUSH(8) FLUSH(8) FLUSH(8) - eligible destination, this server requests delivery of all - messages that are listed in that destination's logfile, - regardless of the recipients of those messages. This is - not an issue for mail that is sent to a relay_domains des- - tination because such mail typically only has recipients - in one domain. - -FILES - /var/spool/postfix/flush, location of "fast flush" logfiles. - CONFIGURATION PARAMETERS - See the Postfix main.cf file for syntax details and for - default values. Use the postfix reload command after a + See the Postfix main.cf file for syntax details and for + default values. Use the postfix reload command after a configuration change. - fast_flush_policy - What destinations can have a "fast flush" logfile: - all, relay (relay destinations) or none. + fast_flush_domains + What destinations can have a "fast flush" logfile. + By default, this is set to $relay_domains. fast_flush_refresh_time - Refresh a non-empty "fast flush" logfile that was + Refresh a non-empty "fast flush" logfile that was not read in this amount of time (default time unit: hours), by simulating a send request for the corre- sponding destination. fast_flush_purge_time - Remove an empty "fast flush" logfile that was not - updated in this amount of time (default time unit: + Remove an empty "fast flush" logfile that was not + updated in this amount of time (default time unit: days). SEE ALSO @@ -173,7 +163,7 @@ FLUSH(8) FLUSH(8) syslogd(8) system logging LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -191,6 +181,16 @@ FLUSH(8) FLUSH(8) + + + + + + + + + + diff --git a/postfix/html/pcre_table.5.html b/postfix/html/pcre_table.5.html index a4fc4d439..d27e0bb44 100644 --- a/postfix/html/pcre_table.5.html +++ b/postfix/html/pcre_table.5.html @@ -26,39 +26,39 @@ PCRE_TABLE(5) PCRE_TABLE(5) Blank lines are ignored, as are lines beginning with `#'. + leading whitespace + Lines that begin with whitespace continue the pre- + vious line. + pattern result - When pattern matches a search string, use the cor- - responding result. A line that starts with white + When pattern matches a search string, use the cor- + responding result. A line that starts with white space continues the preceding line. Each pattern is a perl-like regular expression. The - expression delimiter can be any character, except whites- - pace or characters that have special meaning (tradition- - ally the forward slash is used). The regular expression + expression delimiter can be any character, except whites- + pace or characters that have special meaning (tradition- + ally the forward slash is used). The regular expression can contain whitespace. By default, matching is case-insensitive, although follow- - ing the second slash with an `i' flag will reverse this. - Other flags are supported, but the only other useful one + ing the second slash with an `i' flag will reverse this. + Other flags are supported, but the only other useful one is `U', which makes matching ungreedy (see PCRE documenta- tion and source for more info). - Each pattern is applied to the entire string being looked - up. Depending on the application, that string is an + Each pattern is applied to the entire string being looked + up. Depending on the application, that string is an entire client hostname, an entire client IP address, or an - entire mail address. Thus, no parent domain or parent + entire mail address. Thus, no parent domain or parent network search is done, and user@domain mail addresses are - not broken up into their user and domain constituent + not broken up into their user and domain constituent parts, nor is user+foo broken up into user and foo. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search + Patterns are applied in the order as specified in the + table, until a pattern is found that matches the search string. - Substitution of sub-strings from the matched expression is - possible using the conventional perl syntax ($1, $2, - etc.). The macros in the replacement string may need to be - written as ${n} or $(n) if they aren't followed by @@ -71,7 +71,11 @@ PCRE_TABLE(5) PCRE_TABLE(5) PCRE_TABLE(5) PCRE_TABLE(5) - whitespace. + Substitution of sub-strings from the matched expression is + possible using the conventional perl syntax ($1, $2, + etc.). The macros in the replacement string may need to be + written as ${n} or $(n) if they aren't followed by whites- + pace. EXAMPLES # Protect your outgoing majordomo exploders @@ -119,10 +123,6 @@ PCRE_TABLE(5) PCRE_TABLE(5) - - - - diff --git a/postfix/html/regexp_table.5.html b/postfix/html/regexp_table.5.html index 80bef7f2e..ad38289d1 100644 --- a/postfix/html/regexp_table.5.html +++ b/postfix/html/regexp_table.5.html @@ -26,9 +26,13 @@ REGEXP_TABLE(5) REGEXP_TABLE(5) Blank lines are ignored, as are lines beginning with `#'. + leading whitespace + Lines that begin with whitespace continue the pre- + vious line. + pattern result - When pattern matches a search string, use the cor- - responding result. A line that starts with white + When pattern matches a search string, use the cor- + responding result. A line that starts with white space continues the preceding line. pattern1!pattern2 result @@ -37,28 +41,24 @@ REGEXP_TABLE(5) REGEXP_TABLE(5) Each pattern is a regular expression enclosed by a pair of delimiters. The regular expression syntax is described in re_format(7). The expression delimiter can be any charac- - ter, except whitespace or characters that have special - meaning (traditionally the forward slash is used). The + ter, except whitespace or characters that have special + meaning (traditionally the forward slash is used). The regular expression can contain whitespace. By default, matching is case-insensitive, although follow- - ing the second slash with an `i' flag will reverse this. - Other flags are `x' (disable extended expression syntax), + ing the second slash with an `i' flag will reverse this. + Other flags are `x' (disable extended expression syntax), and `m' (enable multi-line mode). - Each pattern is applied to the entire string being looked - up. Depending on the application, that string is an + Each pattern is applied to the entire string being looked + up. Depending on the application, that string is an entire client hostname, an entire client IP address, or an - entire mail address. Thus, no parent domain or parent + entire mail address. Thus, no parent domain or parent network search is done, and user@domain mail addresses are - not broken up into their user and domain constituent + not broken up into their user and domain constituent parts, nor is user+foo broken up into user and foo. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search - string. - - Substitution of sub-strings from the matched expression is + Patterns are applied in the order as specified in the @@ -71,8 +71,12 @@ REGEXP_TABLE(5) REGEXP_TABLE(5) REGEXP_TABLE(5) REGEXP_TABLE(5) + table, until a pattern is found that matches the search + string. + + Substitution of sub-strings from the matched expression is possible using $1, $2, etc.. The macros in the replacement - string may need to be written as ${n} or $(n) if they + string may need to be written as ${n} or $(n) if they aren't followed by whitespace. EXAMPLES @@ -123,10 +127,6 @@ REGEXP_TABLE(5) REGEXP_TABLE(5) - - - - 2 diff --git a/postfix/html/relocated.5.html b/postfix/html/relocated.5.html index 8c7ab95f3..f7309f0dc 100644 --- a/postfix/html/relocated.5.html +++ b/postfix/html/relocated.5.html @@ -39,27 +39,27 @@ RELOCATED(5) RELOCATED(5) o Blank lines are ignored, as are lines beginning with `#'. + o Lines that begin with whitespace continue the pre- + vious line. + o An entry has one of the following form: key new_location - Where new_location specifies contact information - such as an email address, or perhaps a street + Where new_location specifies contact information + such as an email address, or perhaps a street address or telephone number. With lookups from indexed files such as DB or DBM, or from - networked tables such as NIS, LDAP or SQL, the key field + networked tables such as NIS, LDAP or SQL, the key field is one of the following: user@domain - Matches user@domain. This form has precedence over + Matches user@domain. This form has precedence over all other forms. user Matches user@site when site is $myorigin, when site is listed in $mydestination, or when site is listed in $inet_interfaces. - @domain - Matches every address in domain. This form has the - 1 @@ -71,41 +71,43 @@ RELOCATED(5) RELOCATED(5) RELOCATED(5) RELOCATED(5) + @domain + Matches every address in domain. This form has the lowest precedence. ADDRESS EXTENSION - When the search fails, and the address localpart contains - the optional recipient delimiter (e.g., user+foo@domain), - the search is repeated for the unextended address (e.g. + When the search fails, and the address localpart contains + the optional recipient delimiter (e.g., user+foo@domain), + the search is repeated for the unextended address (e.g. user@domain). REGULAR EXPRESSION TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when the table is given in the form of regular expressions. For - a description of regular expression lookup table syntax, + a description of regular expression lookup table syntax, see regexp_table(5) or pcre_table(5). - Each pattern is a regular expression that is applied to + Each pattern is a regular expression that is applied to the entire address being looked up. Thus, user@domain mail - addresses are not broken up into their user and @domain + addresses are not broken up into their user and @domain constituent parts, nor is user+foo broken up into user and foo. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search + Patterns are applied in the order as specified in the + table, until a pattern is found that matches the search string. - Results are the same as with normal indexed file lookups, - with the additional feature that parenthesized substrings - from the pattern can be interpolated as $1, $2 and so on. + Results are the same as with normal indexed file lookups, + with the additional feature that parenthesized substrings + from the pattern can be interpolated as $1, $2 and so on. BUGS - The table format does not understand quoting conventions. + The table format does not understand quoting conventions. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant - to this topic. See the Postfix main.cf file for syntax - details and for default values. Use the postfix reload + The following main.cf parameters are especially relevant + to this topic. See the Postfix main.cf file for syntax + details and for default values. Use the postfix reload command after a configuration change. relocated_maps @@ -114,11 +116,11 @@ RELOCATED(5) RELOCATED(5) Other parameters of interest: inet_interfaces - The network interface addresses that this system + The network interface addresses that this system receives mail on. mydestination - List of domains that this mail system considers + List of domains that this mail system considers local. myorigin @@ -126,8 +128,6 @@ RELOCATED(5) RELOCATED(5) - - 2 @@ -143,7 +143,7 @@ RELOCATED(5) RELOCATED(5) regexp_table(5) format of POSIX regular expression tables LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/html/transport.5.html b/postfix/html/transport.5.html index 50afd33dc..96a8a29cb 100644 --- a/postfix/html/transport.5.html +++ b/postfix/html/transport.5.html @@ -39,26 +39,26 @@ TRANSPORT(5) TRANSPORT(5) Blank lines are ignored, as are lines beginning with `#'. + leading whitespace + Lines that begin with whitespace continue the pre- + vious line. + pattern result - When pattern matches the domain, use the corre- + When pattern matches the domain, use the corre- sponding result. With lookups from indexed files such as DB or DBM, or from - networked tables such as NIS, LDAP or SQL, patterns are + networked tables such as NIS, LDAP or SQL, patterns are tried in the order as listed below: domain transport:nexthop - Mail for domain is delivered through transport to + Mail for domain is delivered through transport to nexthop. .domain transport:nexthop - Mail for any subdomain of domain is delivered + Mail for any subdomain of domain is delivered through transport to nexthop. - Note: transport map entries take precedence over domains - specified in the mydestination parameter. If you use the - optional transport map, it may be safer to specify - explicit entries for all domains specified in @@ -71,60 +71,60 @@ TRANSPORT(5) TRANSPORT(5) TRANSPORT(5) TRANSPORT(5) - mydestination, for example: + Note: transport map entries take precedence over domains + specified in the mydestination parameter. If you use the + optional transport map, it may be safer to specify + explicit entries for all domains specified in mydestina- + tion, for example: hostname.my.domain local: localhost.my.domain local: - The interpretation of the nexthop field is transport + The interpretation of the nexthop field is transport dependent. In the case of SMTP, specify host:service for a - non-default server port, and use [host] or [host]:port in - order to disable MX (mail exchanger) DNS lookups. The [] - form can also be used with IP addresses instead of host- + non-default server port, and use [host] or [host]:port in + order to disable MX (mail exchanger) DNS lookups. The [] + form can also be used with IP addresses instead of host- names. EXAMPLES - In order to send mail for foo.org and its subdomains via + In order to send mail for foo.org and its subdomains via the uucp transport to the UUCP host named foo: foo.org uucp:foo .foo.org uucp:foo - When no nexthop host name is specified, the destination - domain name is used instead. For example, the following - directs mail for user@foo.org via the slow transport to a - mail exchanger for foo.org. The slow transport could be - something that runs at most one delivery process at a + When no nexthop host name is specified, the destination + domain name is used instead. For example, the following + directs mail for user@foo.org via the slow transport to a + mail exchanger for foo.org. The slow transport could be + something that runs at most one delivery process at a time: foo.org slow: - When no transport is specified, the default transport is + When no transport is specified, the default transport is used, as specified via the default_transport configuration - parameter. The following sends all mail for foo.org and + parameter. The following sends all mail for foo.org and its subdomains to host gateway.foo.org: foo.org :[gateway.foo.org] .foo.org :[gateway.foo.org] - In the above example, the [] are used to suppress MX - lookups. The result would likely point to your local + In the above example, the [] are used to suppress MX + lookups. The result would likely point to your local machine. - In the case of delivery via SMTP, one may specify host- + In the case of delivery via SMTP, one may specify host- name:service instead of just a host: foo.org smtp:bar.org:2025 - This directs mail for user@foo.org to host bar.org port - 2025. Instead of a numerical port a symbolic name may be - used. Specify [] around the hostname in order to disable + This directs mail for user@foo.org to host bar.org port + 2025. Instead of a numerical port a symbolic name may be + used. Specify [] around the hostname in order to disable MX lookups. - The error mailer can be used to bounce mail: - - .foo.org error:mail for *.foo.org is not deliv- - erable @@ -137,31 +137,36 @@ TRANSPORT(5) TRANSPORT(5) TRANSPORT(5) TRANSPORT(5) - This causes all mail for user@anything.foo.org to be + The error mailer can be used to bounce mail: + + .foo.org error:mail for *.foo.org is not deliv- + erable + + This causes all mail for user@anything.foo.org to be bounced. REGULAR EXPRESSION TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when the table is given in the form of regular expressions. For - a description of regular expression lookup table syntax, + a description of regular expression lookup table syntax, see regexp_table(5) or pcre_table(5). - Each pattern is a regular expression that is applied to + Each pattern is a regular expression that is applied to the entire domain being looked up. Thus, some.domain.hier- archy is not broken up into parent domains. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search + Patterns are applied in the order as specified in the + table, until a pattern is found that matches the search string. - Results are the same as with normal indexed file lookups, - with the additional feature that parenthesized substrings - from the pattern can be interpolated as $1, $2 and so on. + Results are the same as with normal indexed file lookups, + with the additional feature that parenthesized substrings + from the pattern can be interpolated as $1, $2 and so on. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant - to this topic. See the Postfix main.cf file for syntax - details and for default values. Use the postfix reload + The following main.cf parameters are especially relevant + to this topic. See the Postfix main.cf file for syntax + details and for default values. Use the postfix reload command after a configuration change. transport_maps @@ -170,7 +175,7 @@ TRANSPORT(5) TRANSPORT(5) Other parameters of interest: default_transport - The transport to use when no transport is explic- + The transport to use when no transport is explic- itly specified. relayhost @@ -184,14 +189,9 @@ TRANSPORT(5) TRANSPORT(5) regexp_table(5) format of POSIX regular expression tables LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. -AUTHOR(S) - Wietse Venema - IBM T.J. Watson Research - P.O. Box 704 - 3 @@ -203,6 +203,10 @@ TRANSPORT(5) TRANSPORT(5) TRANSPORT(5) TRANSPORT(5) +AUTHOR(S) + Wietse Venema + IBM T.J. Watson Research + P.O. Box 704 Yorktown Heights, NY 10598, USA @@ -251,10 +255,6 @@ TRANSPORT(5) TRANSPORT(5) - - - - diff --git a/postfix/html/virtual.5.html b/postfix/html/virtual.5.html index 5f6065006..b31557443 100644 --- a/postfix/html/virtual.5.html +++ b/postfix/html/virtual.5.html @@ -71,61 +71,61 @@ VIRTUAL(5) VIRTUAL(5) VIRTUAL(5) VIRTUAL(5) + leading whitespace + Lines that begin with whitespace continue the pre- + vious line. + pattern result - When pattern matches a mail address, replace it by + When pattern matches a mail address, replace it by the corresponding result. With lookups from indexed files such as DB or DBM, or from - networked tables such as NIS, LDAP or SQL, patterns are + networked tables such as NIS, LDAP or SQL, patterns are tried in the order as listed below: user@domain address, address, ... - Mail for user@domain is redirected to address. + Mail for user@domain is redirected to address. This form has the highest precedence. user address, address, ... - Mail for user@site is redirected to address when - site is equal to $myorigin, when site is listed in + Mail for user@site is redirected to address when + site is equal to $myorigin, when site is listed in $mydestination, or when it is listed in $inet_interfaces. - This functionality overlaps with functionality of + This functionality overlaps with functionality of the local alias(5) database. The difference is that - virtual mapping can be applied to non-local + virtual mapping can be applied to non-local addresses. @domain address, address, ... - Mail for any user in domain is redirected to + Mail for any user in domain is redirected to address. This form has the lowest precedence. - In all the above forms, when address has the form @other- - domain, the result is the same user in otherdomain. This + In all the above forms, when address has the form @other- + domain, the result is the same user in otherdomain. This works for the first address in the expansion only. ADDRESS EXTENSION - When the search fails, and the address localpart contains - the optional recipient delimiter (e.g., user+foo@domain), - the search is repeated for the unextended address (e.g. + When the search fails, and the address localpart contains + the optional recipient delimiter (e.g., user+foo@domain), + the search is repeated for the unextended address (e.g. user@domain), and the unmatched address extension is prop- - agated to the result of expansion. The matching order is: + agated to the result of expansion. The matching order is: user+foo@domain, user@domain, user+foo, user, and @domain. REGULAR EXPRESSION TABLES - This section describes how the table lookups change when + This section describes how the table lookups change when the table is given in the form of regular expressions. For - a description of regular expression lookup table syntax, + a description of regular expression lookup table syntax, see regexp_table(5) or pcre_table(5). - Each pattern is a regular expression that is applied to + Each pattern is a regular expression that is applied to the entire address being looked up. Thus, user@domain mail - addresses are not broken up into their user and @domain + addresses are not broken up into their user and @domain constituent parts, nor is user+foo broken up into user and foo. - Patterns are applied in the order as specified in the - table, until a pattern is found that matches the search - string. - 2 @@ -137,17 +137,21 @@ VIRTUAL(5) VIRTUAL(5) VIRTUAL(5) VIRTUAL(5) - Results are the same as with normal indexed file lookups, - with the additional feature that parenthesized substrings - from the pattern can be interpolated as $1, $2 and so on. + Patterns are applied in the order as specified in the + table, until a pattern is found that matches the search + string. + + Results are the same as with normal indexed file lookups, + with the additional feature that parenthesized substrings + from the pattern can be interpolated as $1, $2 and so on. BUGS - The table format does not understand quoting conventions. + The table format does not understand quoting conventions. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant - to this topic. See the Postfix main.cf file for syntax - details and for default values. Use the postfix reload + The following main.cf parameters are especially relevant + to this topic. See the Postfix main.cf file for syntax + details and for default values. Use the postfix reload command after a configuration change. virtual_maps @@ -156,11 +160,11 @@ VIRTUAL(5) VIRTUAL(5) Other parameters of interest: inet_interfaces - The network interface addresses that this system + The network interface addresses that this system receives mail on. mydestination - List of domains that this mail system considers + List of domains that this mail system considers local. myorigin @@ -177,7 +181,7 @@ VIRTUAL(5) VIRTUAL(5) regexp_table(5) format of POSIX regular expression tables LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -190,10 +194,6 @@ VIRTUAL(5) VIRTUAL(5) - - - - 3 diff --git a/postfix/makedefs b/postfix/makedefs index 706418591..baacc13c4 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -159,17 +159,14 @@ case "$SYSTEM.$RELEASE" in *) echo "Unknown AIX version: `uname -v`." 1>&2; exit 1;; esac;; Linux.2*) SYSTYPE=LINUX2 - if [ -f /usr/lib/lib/db-3.1.a -a -f /usr/include/db3/db_185.h ] + if [ -f /usr/lib/libdb-3.1.a ] then - CCARGS="$CCARGS -DPATH_DB_H=''" + CCARGS="$CCARGS -I/usr/include/db3" SYSLIBS="$SYSLIBS -ldb-3.1" else - if [ -f /usr/include/db_185.h ] + if [ -f /usr/include/db/db.h ] then - CCARGS="$CCARGS -DPATH_DB_H=''" - elif [ -f /usr/include/db/db.h ] - then - CCARGS="$CCARGS -DPATH_DB_H=''" + CCARGS="$CCARGS -I/usr/include/db" fi test -f /usr/lib/libdb.a && SYSLIBS="$SYSLIBS -ldb" fi diff --git a/postfix/man/man5/access.5 b/postfix/man/man5/access.5 index e044efe1b..8c75d020d 100644 --- a/postfix/man/man5/access.5 +++ b/postfix/man/man5/access.5 @@ -36,6 +36,8 @@ the lookups are done in a slightly different way as described below. The format of the access table is as follows: .IP "blanks and comments" Blank lines are ignored, as are lines beginning with `#'. +.IP "leading whitespace" +Lines that begin with whitespace continue the previous line. .IP "\fIpattern action\fR" When \fIpattern\fR matches a mail address, domain or host address, perform the corresponding \fIaction\fR. diff --git a/postfix/man/man5/canonical.5 b/postfix/man/man5/canonical.5 index cc682f32a..2a7112e9f 100644 --- a/postfix/man/man5/canonical.5 +++ b/postfix/man/man5/canonical.5 @@ -51,6 +51,8 @@ Use the \fBaliases\fR(5) map for that purpose. The format of the \fBcanonical\fR table is as follows: .IP "blanks and comments" Blank lines are ignored, as are lines beginning with `#'. +.IP "leading whitespace" +Lines that begin with whitespace continue the previous line. .IP "\fIpattern result\fR" When \fIpattern\fR matches a mail address, replace it by the corresponding \fIresult\fR. diff --git a/postfix/man/man5/pcre_table.5 b/postfix/man/man5/pcre_table.5 index 96176844a..51d59c1ee 100644 --- a/postfix/man/man5/pcre_table.5 +++ b/postfix/man/man5/pcre_table.5 @@ -23,6 +23,8 @@ supports use the \fBpostconf -m\fR command. The general form of a PCRE table is: .IP "blanks and comments" Blank lines are ignored, as are lines beginning with `#'. +.IP "leading whitespace" +Lines that begin with whitespace continue the previous line. .IP "\fIpattern result\fR" When \fIpattern\fR matches a search string, use the corresponding \fIresult\fR. A line that starts with white space continues the diff --git a/postfix/man/man5/regexp_table.5 b/postfix/man/man5/regexp_table.5 index 1ff695e42..c9a9c60b2 100644 --- a/postfix/man/man5/regexp_table.5 +++ b/postfix/man/man5/regexp_table.5 @@ -23,6 +23,8 @@ supports use the \fBpostconf -m\fR command. The general form of a Postfix regular expression table is: .IP "blanks and comments" Blank lines are ignored, as are lines beginning with `#'. +.IP "leading whitespace" +Lines that begin with whitespace continue the previous line. .IP "\fIpattern result\fR" When \fIpattern\fR matches a search string, use the corresponding \fIresult\fR. A line that starts with white space continues the diff --git a/postfix/man/man5/relocated.5 b/postfix/man/man5/relocated.5 index 77c9390a2..b3766f653 100644 --- a/postfix/man/man5/relocated.5 +++ b/postfix/man/man5/relocated.5 @@ -38,6 +38,8 @@ The format of the table is as follows: .IP \(bu Blank lines are ignored, as are lines beginning with `#'. .IP \(bu +Lines that begin with whitespace continue the previous line. +.IP \(bu An entry has one of the following form: .ti +5 \fIkey new_location\fR diff --git a/postfix/man/man5/transport.5 b/postfix/man/man5/transport.5 index df7ffde3c..cb3ab02cf 100644 --- a/postfix/man/man5/transport.5 +++ b/postfix/man/man5/transport.5 @@ -36,6 +36,8 @@ the lookups are done in a slightly different way as described below. The format of the transport table is as follows: .IP "blanks and comments" Blank lines are ignored, as are lines beginning with `#'. +.IP "leading whitespace" +Lines that begin with whitespace continue the previous line. .IP "\fIpattern result\fR" When \fIpattern\fR matches the domain, use the corresponding \fIresult\fR. diff --git a/postfix/man/man5/virtual.5 b/postfix/man/man5/virtual.5 index 092ef209c..2aeb77afc 100644 --- a/postfix/man/man5/virtual.5 +++ b/postfix/man/man5/virtual.5 @@ -56,6 +56,8 @@ The format of the virtual table is as follows, mappings being tried in the order as listed in this manual page: .IP "blanks and comments" Blank lines are ignored, as are lines beginning with `#'. +.IP "leading whitespace" +Lines that begin with whitespace continue the previous line. .IP "\fIpattern result\fR" When \fIpattern\fR matches a mail address, replace it by the corresponding \fIresult\fR. diff --git a/postfix/man/man8/flush.8 b/postfix/man/man8/flush.8 index b3b0cc22b..dd4f31a98 100644 --- a/postfix/man/man8/flush.8 +++ b/postfix/man/man8/flush.8 @@ -27,17 +27,10 @@ part on the right-hand side of the right-most \fB@\fR in an email address. Per-destination logfiles of deferred mail are maintained only for -eligible destinations. The policy is specified with the -\fBfast_flush_policy\fR configuration parameter: -.IP \fBall\fR -Maintain per-destination logfiles for all destinations. -.IP "\fBrelay\fR (default policy)" -Maintain per-destination logfiles only for destinations -that this system is willing to relay mail to (as controlled -by the \fBrelay_domains\fR configuration parameter). -.IP \fBnone\fR -Do not maintain per-destination logfiles. -.PP +eligible destinations. The list of eligible destinations is +specified with the \fBfast_flush_domains\fR configuration parameter, +which defaults to \fB$relay_domains\fR. + This server implements the following requests: .IP "\fBFLUSH_REQ_ADD\fI sitename queue_id\fR" Inform the fast flush server that the specified message is queued for @@ -119,9 +112,9 @@ such mail typically only has recipients in one domain. See the Postfix \fBmain.cf\fR file for syntax details and for default values. Use the \fBpostfix reload\fR command after a configuration change. -.IP \fBfast_flush_policy\fR -What destinations can have a "fast flush" logfile: \fBall\fR, -\fBrelay\fR (relay destinations) or \fBnone\fR. +.IP \fBfast_flush_domains\fR +What destinations can have a "fast flush" logfile. By default, +this is set to \fB$relay_domains\fR. .IP \fBfast_flush_refresh_time\fR Refresh a non-empty "fast flush" logfile that was not read in this amount of time (default time unit: hours), by simulating diff --git a/postfix/proto/access b/postfix/proto/access index 7681e15b5..398ad4ef8 100644 --- a/postfix/proto/access +++ b/postfix/proto/access @@ -28,6 +28,8 @@ # The format of the access table is as follows: # .IP "blanks and comments" # Blank lines are ignored, as are lines beginning with `#'. +# .IP "leading whitespace" +# Lines that begin with whitespace continue the previous line. # .IP "\fIpattern action\fR" # When \fIpattern\fR matches a mail address, domain or host address, # perform the corresponding \fIaction\fR. diff --git a/postfix/proto/canonical b/postfix/proto/canonical index 26f2455ef..5836a56ff 100644 --- a/postfix/proto/canonical +++ b/postfix/proto/canonical @@ -43,6 +43,8 @@ # The format of the \fBcanonical\fR table is as follows: # .IP "blanks and comments" # Blank lines are ignored, as are lines beginning with `#'. +# .IP "leading whitespace" +# Lines that begin with whitespace continue the previous line. # .IP "\fIpattern result\fR" # When \fIpattern\fR matches a mail address, replace it by the # corresponding \fIresult\fR. diff --git a/postfix/proto/pcre_table b/postfix/proto/pcre_table index d6967b3a2..9ad5b9d90 100644 --- a/postfix/proto/pcre_table +++ b/postfix/proto/pcre_table @@ -17,6 +17,8 @@ # The general form of a PCRE table is: # .IP "blanks and comments" # Blank lines are ignored, as are lines beginning with `#'. +# .IP "leading whitespace" +# Lines that begin with whitespace continue the previous line. # .IP "\fIpattern result\fR" # When \fIpattern\fR matches a search string, use the corresponding # \fIresult\fR. A line that starts with white space continues the diff --git a/postfix/proto/regexp_table b/postfix/proto/regexp_table index 4eb43cc55..c65e215de 100644 --- a/postfix/proto/regexp_table +++ b/postfix/proto/regexp_table @@ -17,6 +17,8 @@ # The general form of a Postfix regular expression table is: # .IP "blanks and comments" # Blank lines are ignored, as are lines beginning with `#'. +# .IP "leading whitespace" +# Lines that begin with whitespace continue the previous line. # .IP "\fIpattern result\fR" # When \fIpattern\fR matches a search string, use the corresponding # \fIresult\fR. A line that starts with white space continues the diff --git a/postfix/proto/relocated b/postfix/proto/relocated index d6e277c6e..e0cfbdb8a 100644 --- a/postfix/proto/relocated +++ b/postfix/proto/relocated @@ -30,6 +30,8 @@ # .IP \(bu # Blank lines are ignored, as are lines beginning with `#'. # .IP \(bu +# Lines that begin with whitespace continue the previous line. +# .IP \(bu # An entry has one of the following form: # .ti +5 # \fIkey new_location\fR diff --git a/postfix/proto/transport b/postfix/proto/transport index e8b28bfc3..d616cebbe 100644 --- a/postfix/proto/transport +++ b/postfix/proto/transport @@ -28,6 +28,8 @@ # The format of the transport table is as follows: # .IP "blanks and comments" # Blank lines are ignored, as are lines beginning with `#'. +# .IP "leading whitespace" +# Lines that begin with whitespace continue the previous line. # .IP "\fIpattern result\fR" # When \fIpattern\fR matches the domain, use the corresponding # \fIresult\fR. diff --git a/postfix/proto/virtual b/postfix/proto/virtual index 1b706dffe..ba6680b68 100644 --- a/postfix/proto/virtual +++ b/postfix/proto/virtual @@ -48,6 +48,8 @@ # tried in the order as listed in this manual page: # .IP "blanks and comments" # Blank lines are ignored, as are lines beginning with `#'. +# .IP "leading whitespace" +# Lines that begin with whitespace continue the previous line. # .IP "\fIpattern result\fR" # When \fIpattern\fR matches a mail address, replace it by the # corresponding \fIresult\fR. diff --git a/postfix/src/cleanup/Makefile.in b/postfix/src/cleanup/Makefile.in index b77060a80..23923ac6d 100644 --- a/postfix/src/cleanup/Makefile.in +++ b/postfix/src/cleanup/Makefile.in @@ -199,10 +199,10 @@ cleanup_map1n.o: ../../include/mail_addr_map.h cleanup_map1n.o: ../../include/maps.h cleanup_map1n.o: ../../include/cleanup_user.h cleanup_map1n.o: ../../include/quote_822_local.h +cleanup_map1n.o: ../../include/been_here.h cleanup_map1n.o: cleanup.h cleanup_map1n.o: ../../include/tok822.h cleanup_map1n.o: ../../include/resolve_clnt.h -cleanup_map1n.o: ../../include/been_here.h cleanup_map1n.o: ../../include/mail_stream.h cleanup_map1n.o: ../../include/mail_conf.h cleanup_masquerade.o: cleanup_masquerade.c diff --git a/postfix/src/cleanup/cleanup_map1n.c b/postfix/src/cleanup/cleanup_map1n.c index bd7303ddf..6af064a10 100644 --- a/postfix/src/cleanup/cleanup_map1n.c +++ b/postfix/src/cleanup/cleanup_map1n.c @@ -54,6 +54,7 @@ #include #include #include +#include /* Application-specific. */ @@ -69,7 +70,7 @@ ARGV *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr, int count; int i; int arg; - int expand_to_self; + BH_TABLE *been_here; char *saved_lhs; /* @@ -78,6 +79,7 @@ ARGV *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr, argv = argv_alloc(1); argv_add(argv, addr, ARGV_END); argv_terminate(argv); + been_here = been_here_init(0, BH_FLAG_FOLD); /* * Rewrite the address vector in place. With each map lookup result, @@ -90,14 +92,17 @@ ARGV *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr, #define MAX_RECURSION 1000 #define MAX_EXPANSION 1000 #define STR vstring_str +#define RETURN(x) { been_here_free(been_here); return (x); } - for (expand_to_self = 0, arg = 0; arg < argv->argc; arg++) { + for (arg = 0; arg < argv->argc; arg++) { if (argv->argc > MAX_EXPANSION) { msg_warn("%s: unreasonable %s map expansion size for %s", state->queue_id, maps->title, addr); break; } for (count = 0; /* void */ ; count++) { + if (been_here_fixed(been_here, argv->argv[arg]) != 0) + break; if (count >= MAX_RECURSION) { msg_warn("%s: unreasonable %s map nesting for %s", state->queue_id, maps->title, addr); @@ -107,8 +112,6 @@ ARGV *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr, saved_lhs = mystrdup(argv->argv[arg]); for (i = 0; i < lookup->argc; i++) { unquote_822_local(state->temp1, lookup->argv[i]); - if (strcasecmp(saved_lhs, STR(state->temp1)) == 0) - expand_to_self = 1; if (i == 0) { UPDATE(argv->argv[arg], STR(state->temp1)); } else { @@ -118,17 +121,15 @@ ARGV *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr, } myfree(saved_lhs); argv_free(lookup); - if (expand_to_self) - return (argv); } else if (dict_errno != 0) { msg_warn("%s: %s map lookup problem for %s", state->queue_id, maps->title, addr); state->errs |= CLEANUP_STAT_WRITE; - return (argv); + RETURN(argv); } else { break; } } } - return (argv); + RETURN(argv); } diff --git a/postfix/src/flush/flush.c b/postfix/src/flush/flush.c index e763eb11c..bbc2ff0e6 100644 --- a/postfix/src/flush/flush.c +++ b/postfix/src/flush/flush.c @@ -21,17 +21,10 @@ /* an email address. /* /* Per-destination logfiles of deferred mail are maintained only for -/* eligible destinations. The policy is specified with the -/* \fBfast_flush_policy\fR configuration parameter: -/* .IP \fBall\fR -/* Maintain per-destination logfiles for all destinations. -/* .IP "\fBrelay\fR (default policy)" -/* Maintain per-destination logfiles only for destinations -/* that this system is willing to relay mail to (as controlled -/* by the \fBrelay_domains\fR configuration parameter). -/* .IP \fBnone\fR -/* Do not maintain per-destination logfiles. -/* .PP +/* eligible destinations. The list of eligible destinations is +/* specified with the \fBfast_flush_domains\fR configuration parameter, +/* which defaults to \fB$relay_domains\fR. +/* /* This server implements the following requests: /* .IP "\fBFLUSH_REQ_ADD\fI sitename queue_id\fR" /* Inform the fast flush server that the specified message is queued for @@ -103,9 +96,9 @@ /* See the Postfix \fBmain.cf\fR file for syntax details and for /* default values. Use the \fBpostfix reload\fR command after a /* configuration change. -/* .IP \fBfast_flush_policy\fR -/* What destinations can have a "fast flush" logfile: \fBall\fR, -/* \fBrelay\fR (relay destinations) or \fBnone\fR. +/* .IP \fBfast_flush_domains\fR +/* What destinations can have a "fast flush" logfile. By default, +/* this is set to \fB$relay_domains\fR. /* .IP \fBfast_flush_refresh_time\fR /* Refresh a non-empty "fast flush" logfile that was not read in /* this amount of time (default time unit: hours), by simulating @@ -173,18 +166,11 @@ */ int var_fflush_refresh; int var_fflush_purge; -char *var_relay_domains; /* * Flush policy stuff. */ -#define FLUSH_POLICY_UNKNOWN 0 -#define FLUSH_POLICY_ALL 1 -#define FLUSH_POLICY_RELAY 2 -#define FLUSH_POLICY_NONE 3 - static DOMAIN_LIST *flush_domains; -static int flush_policy = FLUSH_POLICY_UNKNOWN; /* * Some hard-wired policy: how many queue IDs we remember while we're @@ -199,41 +185,14 @@ static int flush_policy = FLUSH_POLICY_UNKNOWN; #define STR(x) vstring_str(x) #define STREQ(x,y) (strcmp(x,y) == 0) -/* flush_policy_init - initialize fast flush policy stuff */ - -static int flush_policy_init(void) -{ - - if (STREQ(var_fflush_policy, FFLUSH_POLICY_ALL)) { - flush_policy = FLUSH_POLICY_ALL; - } else if (STREQ(var_fflush_policy, FFLUSH_POLICY_RELAY)) { - flush_domains = domain_list_init(var_relay_domains); - flush_policy = FLUSH_POLICY_RELAY; - } else if (STREQ(var_fflush_policy, FFLUSH_POLICY_NONE)) { - flush_policy = FLUSH_POLICY_NONE; - } else { - msg_fatal("invalid %s configuration parameter value: %s", - VAR_FFLUSH_POLICY, var_fflush_policy); - } -} - /* flush_policy_ok - check logging policy */ static int flush_policy_ok(const char *site) { - if (flush_policy == FLUSH_POLICY_UNKNOWN) - flush_policy_init(); + if (flush_domains == 0) + flush_domains = domain_list_init(var_fflush_domains); - switch (flush_policy) { - case FLUSH_POLICY_ALL: - return (1); - case FLUSH_POLICY_RELAY: - return (domain_list_match(flush_domains, site)); - case FLUSH_POLICY_NONE: - return (0); - default: - msg_panic("invalid fast flush policy %d", flush_policy); - } + return (domain_list_match(flush_domains, site)); } /* flush_add_service - append queue ID to per-site fast flush log */ @@ -547,13 +506,8 @@ int main(int argc, char **argv) VAR_FFLUSH_PURGE, DEF_FFLUSH_PURGE, &var_fflush_purge, 'd', 1, 0, 0, }; - static CONFIG_STR_TABLE str_table[] = { - VAR_RELAY_DOMAINS, DEF_RELAY_DOMAINS, &var_relay_domains, 0, 0, - 0, - }; single_server_main(argc, argv, flush_service, MAIL_SERVER_TIME_TABLE, time_table, - MAIL_SERVER_STR_TABLE, str_table, 0); } diff --git a/postfix/src/fsstone/fsstone b/postfix/src/fsstone/fsstone new file mode 100755 index 0000000000000000000000000000000000000000..cd33f1c81508d5435353543b33d3b0deb3ea78be GIT binary patch literal 80084 zcmeFa34D~*)jxh`0S5>sC|ca328*oOSE7L|h_XZi!37+K%!C=p#w=k`U@%Y_$7rnD zx}hlUb!#iutr`KvUFyi>tL`iDvi;`&i{MPeV#iPNHD%_-}m$R{WE+Xp6}hx zJ@?#m&pr1(_j$6ed`5-EVi6U7k7sICnXn3*um~aCSK1xfbU%$kLS&0nF-VLN$BARb zU=AZLj6AruAWYXFTy|VGT<_3@G`fxhri;>unxqJTG`fCYAOu}hUZlwM4-x+GWxIo} zG!VS?6v6dUx)s@0PR8|`-9gtTgy|x_sE$dYfPYe*Z?R{kr)E-}dxEE~c4DA$Vg{1L zXk3{DjNe$?Il+v;o%kDRgipqOsDbGQHpCBbfelDQh>5t4#dRjGWL&4=O2Rb(7x6;B zGm*z(L)@tk z=yx=(Q*ou@I^6FFBo4!M46f6A$v9q%8wGr#7XB_sbg7>x-w5$}oMij)tBEl6!T3!w ze3UpsPvqRnbi@e!TZph5 z>C{Hb@58m|_jU*M52as*`&`hcKB4p$T-PJ~cO!fy?%60${YdFQ#x)Z4R~q4;;+~B# zZe0JZxR+_+I}x6X@@D$I1i+tJ|HB9_(D>PgFzLNaPZI42Uyt&Gp(s@UE?gfY9K@Z% zZ{V_{zNis?7xxXCygo#Drx7Ok`~}y3EqxEdcF=3Wo#_2HuDcM%jl*5Irx{@?--9cN z^20GuD8Ci=4M^V#OkoGYk0DIuD4dM&I|$D+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fixed(dup_filter, string) /* BH_TABLE *dup_filter; diff --git a/postfix/src/global/flush_clnt.c b/postfix/src/global/flush_clnt.c index 26b2899f5..6de4b426d 100644 --- a/postfix/src/global/flush_clnt.c +++ b/postfix/src/global/flush_clnt.c @@ -94,7 +94,7 @@ int flush_purge(void) /* * Don't bother the server if the service is turned off. */ - if (strcmp(var_fflush_policy, FFLUSH_POLICY_NONE) == 0) + if (*var_fflush_domains == 0) status = FLUSH_STAT_OK; else status = mail_command_write(MAIL_CLASS_PRIVATE, MAIL_SERVICE_FLUSH, @@ -119,7 +119,7 @@ int flush_refresh(void) /* * Don't bother the server if the service is turned off. */ - if (strcmp(var_fflush_policy, FFLUSH_POLICY_NONE) == 0) + if (*var_fflush_domains == 0) status = FLUSH_STAT_OK; else status = mail_command_write(MAIL_CLASS_PRIVATE, MAIL_SERVICE_FLUSH, @@ -144,7 +144,7 @@ int flush_send(const char *site) /* * Don't bother the server if the service is turned off. */ - if (strcmp(var_fflush_policy, FFLUSH_POLICY_NONE) == 0) + if (*var_fflush_domains == 0) status = mail_flush_deferred(); else status = mail_command_write(MAIL_CLASS_PRIVATE, MAIL_SERVICE_FLUSH, @@ -169,7 +169,7 @@ int flush_add(const char *site, const char *queue_id) /* * Don't bother the server if the service is turned off. */ - if (strcmp(var_fflush_policy, FFLUSH_POLICY_NONE) == 0) + if (*var_fflush_domains == 0) status = FLUSH_STAT_OK; else status = mail_command_write(MAIL_CLASS_PRIVATE, MAIL_SERVICE_FLUSH, diff --git a/postfix/src/global/mail_params.c b/postfix/src/global/mail_params.c index 34f58f81e..ea70c598f 100644 --- a/postfix/src/global/mail_params.c +++ b/postfix/src/global/mail_params.c @@ -58,7 +58,8 @@ /* int var_ownreq_special; /* int var_daemon_timeout; /* char *var_syslog_facility; -/* char *var_fflush_policy; +/* char *var_relay_domains; +/* char *var_fflush_domains; /* /* void mail_params_init() /* DESCRIPTION @@ -165,7 +166,8 @@ time_t var_starttime; int var_ownreq_special; int var_daemon_timeout; char *var_syslog_facility; -char *var_fflush_policy; +char *var_relay_domains; +char *var_fflush_domains; /* check_myhostname - lookup hostname and validate */ @@ -276,7 +278,8 @@ void mail_params_init() VAR_DB_TYPE, DEF_DB_TYPE, &var_db_type, 1, 0, VAR_HASH_QUEUE_NAMES, DEF_HASH_QUEUE_NAMES, &var_hash_queue_names, 1, 0, VAR_RCPT_DELIM, DEF_RCPT_DELIM, &var_rcpt_delim, 0, 1, - VAR_FFLUSH_POLICY, DEF_FFLUSH_POLICY, &var_fflush_policy, 1, 0, + VAR_RELAY_DOMAINS, DEF_RELAY_DOMAINS, &var_relay_domains, 0, 0, + VAR_FFLUSH_DOMAINS, DEF_FFLUSH_DOMAINS, &var_fflush_domains, 0, 0, 0, }; static CONFIG_STR_FN_TABLE function_str_defaults_2[] = { diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index de7fbea98..e2ffa5d53 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -1067,13 +1067,9 @@ extern char *var_filter_xport; /* * Fast flush service support. */ -#define VAR_FFLUSH_POLICY "fast_flush_policy" -#define DEF_FFLUSH_POLICY FFLUSH_POLICY_RELAY -extern char *var_fflush_policy; - -#define FFLUSH_POLICY_ALL "all" -#define FFLUSH_POLICY_RELAY "relay" -#define FFLUSH_POLICY_NONE "none" +#define VAR_FFLUSH_DOMAINS "fast_flush_domains" +#define DEF_FFLUSH_DOMAINS "$relay_domains" +extern char *var_fflush_domains; #define VAR_FFLUSH_PURGE "fast_flush_purge_time" #define DEF_FFLUSH_PURGE "7d" diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index b5e97cb80..52962ac12 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-20001005" +#define DEF_MAIL_VERSION "Snapshot-20001027" extern char *var_mail_version; /* LICENSE diff --git a/postfix/src/global/mkmap_dbm.c b/postfix/src/global/mkmap_dbm.c index db0d6f19e..c4b7b7b4b 100644 --- a/postfix/src/global/mkmap_dbm.c +++ b/postfix/src/global/mkmap_dbm.c @@ -33,6 +33,7 @@ /* System library. */ #include +#include /* Utility library. */ diff --git a/postfix/src/global/quote_821_local.c b/postfix/src/global/quote_821_local.c index d4522b210..16f012533 100644 --- a/postfix/src/global/quote_821_local.c +++ b/postfix/src/global/quote_821_local.c @@ -67,7 +67,7 @@ static int is_821_dot_string(char *local_part, char *end) */ if (local_part[0] == 0 || local_part[0] == '.') return (NO); - for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) { + for (cp = local_part; cp < end && (ch = *(unsigned char *) cp) != 0; cp++) { if (ch == '.' && cp[1] == '.') return (NO); if (ch > 127) diff --git a/postfix/src/global/quote_822_local.c b/postfix/src/global/quote_822_local.c index 138b46634..48f37bd8d 100644 --- a/postfix/src/global/quote_822_local.c +++ b/postfix/src/global/quote_822_local.c @@ -80,7 +80,7 @@ static int is_822_dot_string(const char *local_part, const char *end) */ if (local_part[0] == 0 || local_part[0] == '.') return (NO); - for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) { + for (cp = local_part; cp < end && (ch = *(unsigned char *) cp) != 0; cp++) { if (ch == '.' && (cp + 1) < end && cp[1] == '.') return (NO); #if 0 diff --git a/postfix/src/postfix/postfix.c b/postfix/src/postfix/postfix.c index 0d0edc889..1fb4c399f 100644 --- a/postfix/src/postfix/postfix.c +++ b/postfix/src/postfix/postfix.c @@ -172,8 +172,10 @@ int main(int argc, char **argv) * privileges for selected operations. That's right - it takes privileges * to toss privileges. */ - if ((uid = getuid()) != 0) - msg_fatal("must be run by the superuser, not by userid %d", uid); + if ((uid = getuid()) != 0) { + msg_error("to submit mail, use the Postfix sendmail command"); + msg_fatal("the postfix command must be run by the superuser"); + } /* * Parse switches. diff --git a/postfix/src/smtp/Makefile.in b/postfix/src/smtp/Makefile.in index 7dd7cbcae..c11599ef3 100644 --- a/postfix/src/smtp/Makefile.in +++ b/postfix/src/smtp/Makefile.in @@ -129,6 +129,7 @@ smtp_connect.o: ../../include/mymalloc.h smtp_connect.o: ../../include/inet_addr_list.h smtp_connect.o: ../../include/iostuff.h smtp_connect.o: ../../include/timed_connect.h +smtp_connect.o: ../../include/stringops.h smtp_connect.o: ../../include/mail_params.h smtp_connect.o: ../../include/own_inet_addr.h smtp_connect.o: ../../include/dns.h diff --git a/postfix/src/smtp/smtp_addr.c b/postfix/src/smtp/smtp_addr.c index a10c32c2d..75272dde7 100644 --- a/postfix/src/smtp/smtp_addr.c +++ b/postfix/src/smtp/smtp_addr.c @@ -51,6 +51,8 @@ /* The request failed due to a soft error, and should be retried later. /* .IP SMTP_FAIL /* The request attempt failed due to a hard error. +/* .IP SMTP_OK +/* The local machine is the best mail exchanger. /* .PP /* In addition, a textual description of the problem is made available /* via the \fIwhy\fR argument. @@ -212,83 +214,6 @@ static DNS_RR *smtp_addr_list(DNS_RR *mx_names, VSTRING *why) return (addr_list); } -/* smtp_addr_fallback - add list of fallback addresses */ - -static DNS_RR *smtp_addr_fallback(DNS_RR *addr_list) -{ - static DNS_RR *fallback_list = 0; - DNS_RR *mx_names; - DNS_RR *mx_addr_list; - DNS_RR *addr; - char *saved_fallback_relay; - char *cp; - char *relay; - int saved_smtp_errno = smtp_errno; - VSTRING *why; - DNS_RR *rr; - unsigned int pref; - - /* - * Build a cached list of fall-back host addresses. Issue a warning when - * a fall-back host or domain is not found. This is most likely a local - * configuration problem. - * - * XXX For the sake of admin-friendliness we want to support MX lookups for - * fall-back relays. This comes at a price: the fallback relay lookup - * routine almost entirely duplicates the smtp_domain_addr() routine. - * - * Fall-back hosts are given a preference that is outside the range of valid - * DNS preferences (unsigned 16-bit integer). - */ -#define FB_PREF (0xffff + 1) - - if (fallback_list == 0) { - why = vstring_alloc(1); - cp = saved_fallback_relay = mystrdup(var_fallback_relay); - for (pref = FB_PREF; (relay = mystrtok(&cp, " \t\r\n,")) != 0; pref++) { - smtp_errno = 0; - switch (dns_lookup(relay, T_MX, RES_DEFNAMES, &mx_names, (VSTRING *) 0, why)) { - default: - smtp_errno = SMTP_RETRY; - break; - case DNS_FAIL: - smtp_errno = SMTP_FAIL; - break; - case DNS_OK: - mx_addr_list = smtp_addr_list(mx_names, why); - dns_rr_free(mx_names); - for (addr = mx_addr_list; addr; addr = addr->next) - addr->pref = pref; - fallback_list = dns_rr_append(fallback_list, mx_addr_list); - break; - case DNS_NOTFOUND: - fallback_list = smtp_addr_one(fallback_list, relay, pref, why); - break; - } - if (smtp_errno != SMTP_OK) - msg_warn("look up fall-back relay %s: %s", - relay, vstring_str(why)); - } - vstring_free(why); - myfree(saved_fallback_relay); - } - - /* - * Append a copy of the fall-back address list to the mail exchanger - * address list - which may be an empty list if no mail exchanger was - * found. - */ - for (rr = fallback_list; rr; rr = rr->next) - addr_list = dns_rr_append(addr_list, dns_rr_copy(rr)); - - /* - * Clean up. - */ - smtp_errno = saved_smtp_errno; - - return (addr_list); -} - /* smtp_find_self - spot myself in a crowd of mail exchangers */ static DNS_RR *smtp_find_self(DNS_RR *addr_list) @@ -411,8 +336,6 @@ DNS_RR *smtp_domain_addr(char *name, VSTRING *why) addr_list = smtp_addr_list(mx_names, why); dns_rr_free(mx_names); best_found = (addr_list ? addr_list->pref : IMPOSSIBLE_PREFERENCE); - if (*var_fallback_relay) - addr_list = smtp_addr_fallback(addr_list); if (msg_verbose) smtp_print_addr(name, addr_list); if ((self = smtp_find_self(addr_list)) != 0) { @@ -455,8 +378,6 @@ DNS_RR *smtp_host_addr(char *host, VSTRING *why) */ #define PREF0 0 addr_list = smtp_addr_one((DNS_RR *) 0, host, PREF0, why); - if (*var_fallback_relay) - addr_list = smtp_addr_fallback(addr_list); if (msg_verbose) smtp_print_addr(host, addr_list); return (addr_list); diff --git a/postfix/src/smtp/smtp_connect.c b/postfix/src/smtp/smtp_connect.c index a802f6215..f037c594d 100644 --- a/postfix/src/smtp/smtp_connect.c +++ b/postfix/src/smtp/smtp_connect.c @@ -25,6 +25,11 @@ /* smtp_connect() attempts to establish an SMTP session with a host /* that represents the named domain. /* +/* No session and an smtp_errno of SMTP_OK means that the local +/* machine is the best mail exchanger for the specified destination. +/* It is left up to the caller to decide if this is a mailer loop +/* or if this is a "do what I mean" request. +/* /* The destination is either a host (or domain) name or a numeric /* address. Symbolic or numeric service port information may be /* appended, separated by a colon (":"). @@ -105,6 +110,7 @@ #include #include #include +#include /* Global library. */ @@ -379,34 +385,77 @@ static char *smtp_parse_destination(char *destination, char *def_service, SMTP_SESSION *smtp_connect(char *destination, VSTRING *why) { - SMTP_SESSION *session; - char *dest_buf; + SMTP_SESSION *session = 0; + char *dest_buf = 0; char *host; unsigned port; char *def_service = "smtp"; /* XXX configurable? */ + char *save; + char *dest; + char *cp; /* - * Parse the destination specification. Default is to use the SMTP port. + * First try to deliver to the indicated destination, then try to deliver + * to the optional fall-back relays. Each can be a list of destinations + * by itself, with domain, host, [], numerical address, and port. */ - dest_buf = smtp_parse_destination(destination, def_service, &host, &port); + cp = save = concatenate(destination, " ", var_fallback_relay, (char *) 0); + + while ((dest = mystrtok(&cp, " \t\r\n")) != 0) { + + /* + * Parse the destination. Default is to use the SMTP port. + */ + dest_buf = smtp_parse_destination(dest, def_service, &host, &port); + + /* + * Connect to an SMTP server. Skip mail exchanger lookups when a + * quoted host is specified, or when DNS lookups are disabled. + */ + if (msg_verbose) + msg_info("connecting to %s port %d", host, ntohs(port)); + if (var_disable_dns || *dest == '[') { + session = smtp_connect_host(host, port, why); + } else { + session = smtp_connect_domain(host, port, why); + } + myfree(dest_buf); + + /* + * Done if we have a session, or if we have no session and this host + * is the best MX relay for the destination. Agreed, an errno of OK + * after failure is a weird way to reporting progress. + */ + if (session != 0 || smtp_errno == SMTP_OK) + break; + } /* - * Connect to an SMTP server. Skip mail exchanger lookups when a quoted - * host is specified, or when DNS lookups are disabled. + * Sanity check. The destination must not be empty or all blanks. */ - if (msg_verbose) - msg_info("connecting to %s port %d", host, ntohs(port)); - if (var_disable_dns || *destination == '[') { - session = smtp_connect_host(host, port, why); - } else { - session = smtp_connect_domain(host, port, why); + if (session == 0 && dest_buf == 0) + msg_panic("null destination: \"%s\"", destination); + + /* + * Pay attention to what could be configuration problems, and pretend + * that these are recoverable rather than bouncing the mail. + */ + if (session == 0 && smtp_errno == SMTP_FAIL) { + if (strcmp(destination, var_relayhost) == 0) { + msg_warn("%s configuration problem: %s", + VAR_RELAYHOST, var_relayhost); + smtp_errno = SMTP_RETRY; + } + if (*var_fallback_relay) { + msg_warn("%s configuration problem: %s", + VAR_FALLBACK_RELAY, var_fallback_relay); + smtp_errno = SMTP_RETRY; + } } - if (session == 0 - && smtp_errno == SMTP_FAIL - && strcmp(host, var_relayhost) == 0) { - msg_warn("relayhost configuration problem: %s", var_relayhost); - smtp_errno = SMTP_RETRY; - } - myfree(dest_buf); + + /* + * Cleanup. + */ + myfree(save); return (session); } diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 201d4c249..aacdd5229 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -298,7 +298,6 @@ */ int var_smtpd_rcpt_limit; int var_smtpd_tmout; -char *var_relay_domains; int var_smtpd_soft_erlim; int var_smtpd_hard_erlim; int var_queue_minfree; /* XXX use off_t */ @@ -870,6 +869,8 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) first = 0; if (len > 0 && ISSPACE(start[0])) rec_put(state->cleanup, REC_TYPE_NORM, "", 0); + else if (strncmp(start + strspn(start, ">"), "From ", 5) == 0) + continue; } if (prev_rec_type != REC_TYPE_CONT && *start == '.' && (++start, --len) == 0) @@ -1430,7 +1431,6 @@ int main(int argc, char **argv) 0, }; static CONFIG_STR_TABLE str_table[] = { - VAR_RELAY_DOMAINS, DEF_RELAY_DOMAINS, &var_relay_domains, 0, 0, VAR_SMTPD_BANNER, DEF_SMTPD_BANNER, &var_smtpd_banner, 1, 0, VAR_DEBUG_PEER_LIST, DEF_DEBUG_PEER_LIST, &var_debug_peer_list, 0, 0, VAR_NOTIFY_CLASSES, DEF_NOTIFY_CLASSES, &var_notify_classes, 0, 0, diff --git a/postfix/src/util/Makefile.in b/postfix/src/util/Makefile.in index 7e7ba4293..4c3621fdc 100644 --- a/postfix/src/util/Makefile.in +++ b/postfix/src/util/Makefile.in @@ -473,6 +473,7 @@ dict_tcp.o: iostuff.h dict_tcp.o: hex_quote.h dict_tcp.o: dict.h dict_tcp.o: argv.h +dict_tcp.o: stringops.h dict_tcp.o: dict_tcp.h dict_unix.o: dict_unix.c dict_unix.o: sys_defs.h diff --git a/postfix/src/util/dict_db.c b/postfix/src/util/dict_db.c index 0a88d8435..1207402bc 100644 --- a/postfix/src/util/dict_db.c +++ b/postfix/src/util/dict_db.c @@ -57,6 +57,30 @@ #endif #include #include +#include + +#if defined(_DB_185_H_) && defined(USE_FCNTL_LOCK) +#error "Error: this system must not use the db 1.85 compatibility interface" +#endif + +#ifndef DB_VERSION_MAJOR +#define DB_VERSION_MAJOR 1 +#define DICT_DB_GET(db, key, val, flag) db->get(db, key, val, flag) +#define DICT_DB_PUT(db, key, val, flag) db->put(db, key, val, flag) +#define DICT_DB_DEL(db, key, flag) db->del(db, key, flag) +#define DICT_DB_SYNC(db, flag) db->sync(db, flag) +#define DICT_DB_CLOSE(db) db->close(db) +#define DONT_CLOBBER R_NOOVERWRITE +#endif + +#if DB_VERSION_MAJOR > 1 +#define DICT_DB_GET(db, key, val, flag) sanitize(db->get(db, 0, key, val, flag)) +#define DICT_DB_PUT(db, key, val, flag) sanitize(db->put(db, 0, key, val, flag)) +#define DICT_DB_DEL(db, key, flag) sanitize(db->del(db, 0, key, flag)) +#define DICT_DB_SYNC(db, flag) ((errno = db->sync(db, flag)) ? -1 : 0) +#define DICT_DB_CLOSE(db) ((errno = db->close(db, 0)) ? -1 : 0) +#define DONT_CLOBBER DB_NOOVERWRITE +#endif /* Utility library. */ @@ -78,7 +102,38 @@ typedef struct { } DICT_DB; #define DICT_DB_CACHE_SIZE (1024 * 1024) -#define DICT_DB_NELM 4096 +#define DICT_DB_NELM 4096 + +#if DB_VERSION_MAJOR > 1 + +/* sanitize - sanitize db_get/put/del result */ + +static int sanitize(int status) +{ + + /* + * XXX This is unclean but avoids a lot of clutter elsewhere. Categorize + * results into non-fatal errors (i.e., errors that we can deal with), + * success, or fatal error (i.e., all other errors). + */ + switch (status) { + + case DB_NOTFOUND: /* get, del */ + case DB_KEYEXIST: /* put */ + return (1); /* non-fatal */ + + case 0: + return (0); /* success */ + + case DB_KEYEMPTY: /* get, others? */ + status = EINVAL; + default: + errno = status; + return (-1); /* fatal */ + } +} + +#endif /* dict_db_lookup - find database entry */ @@ -93,6 +148,8 @@ static const char *dict_db_lookup(DICT *dict, const char *name) const char *result = 0; dict_errno = 0; + memset(&db_key, 0, sizeof(db_key)); + memset(&db_value, 0, sizeof(db_value)); /* * Acquire a shared lock. @@ -107,7 +164,7 @@ static const char *dict_db_lookup(DICT *dict, const char *name) if (dict->flags & DICT_FLAG_TRY1NULL) { db_key.data = (void *) name; db_key.size = strlen(name) + 1; - if ((status = db->get(db, &db_key, &db_value, 0)) < 0) + if ((status = DICT_DB_GET(db, &db_key, &db_value, 0)) < 0) msg_fatal("error reading %s: %m", dict_db->path); if (status == 0) { dict->flags &= ~DICT_FLAG_TRY0NULL; @@ -122,7 +179,7 @@ static const char *dict_db_lookup(DICT *dict, const char *name) if (result == 0 && (dict->flags & DICT_FLAG_TRY0NULL)) { db_key.data = (void *) name; db_key.size = strlen(name); - if ((status = db->get(db, &db_key, &db_value, 0)) < 0) + if ((status = DICT_DB_GET(db, &db_key, &db_value, 0)) < 0) msg_fatal("error reading %s: %m", dict_db->path); if (status == 0) { if (buf == 0) @@ -152,6 +209,8 @@ static void dict_db_update(DICT *dict, const char *name, const char *value) DBT db_value; int status; + memset(&db_key, 0, sizeof(db_key)); + memset(&db_value, 0, sizeof(db_value)); db_key.data = (void *) name; db_value.data = (void *) value; db_key.size = strlen(name); @@ -187,8 +246,8 @@ static void dict_db_update(DICT *dict, const char *name, const char *value) /* * Do the update. */ - if ((status = db->put(db, &db_key, &db_value, - (dict->flags & DICT_FLAG_DUP_REPLACE) ? 0 : R_NOOVERWRITE)) < 0) + if ((status = DICT_DB_PUT(db, &db_key, &db_value, + (dict->flags & DICT_FLAG_DUP_REPLACE) ? 0 : DONT_CLOBBER)) < 0) msg_fatal("error writing %s: %m", dict_db->path); if (status) { if (dict->flags & DICT_FLAG_DUP_IGNORE) @@ -199,7 +258,7 @@ static void dict_db_update(DICT *dict, const char *name, const char *value) msg_fatal("%s: duplicate entry: \"%s\"", dict_db->path, name); } if (dict->flags & DICT_FLAG_SYNC_UPDATE) - if (db->sync(db, 0) < 0) + if (DICT_DB_SYNC(db, 0) < 0) msg_fatal("%s: flush dictionary: %m", dict_db->path); /* @@ -232,7 +291,7 @@ static int dict_db_delete(DICT *dict, const char *name) if (dict->flags & DICT_FLAG_TRY1NULL) { db_key.data = (void *) name; db_key.size = strlen(name) + 1; - if ((status = db->del(db, &db_key, flags)) < 0) + if ((status = DICT_DB_DEL(db, &db_key, flags)) < 0) msg_fatal("error deleting from %s: %m", dict_db->path); if (status == 0) dict->flags &= ~DICT_FLAG_TRY0NULL; @@ -245,7 +304,7 @@ static int dict_db_delete(DICT *dict, const char *name) if (status > 0 && (dict->flags & DICT_FLAG_TRY0NULL)) { db_key.data = (void *) name; db_key.size = strlen(name); - if ((status = db->del(db, &db_key, flags)) < 0) + if ((status = DICT_DB_DEL(db, &db_key, flags)) < 0) msg_fatal("error deleting from %s: %m", dict_db->path); if (status == 0) dict->flags &= ~DICT_FLAG_TRY1NULL; @@ -265,6 +324,9 @@ static int dict_db_delete(DICT *dict, const char *name) static int dict_db_sequence(DICT *dict, const int function, const char **key, const char **value) { +#if DB_VERSION_MAJOR > 1 + msg_fatal("dict_db_sequence - operation is to be implemented"); +#else char *myname = "dict_db_sequence"; DICT_DB *dict_db = (DICT_DB *) dict; DB *db = dict_db->db; @@ -328,6 +390,7 @@ static int dict_db_sequence(DICT *dict, const int function, } } return status; +#endif } /* dict_db_close - close data base */ @@ -336,7 +399,7 @@ static void dict_db_close(DICT *dict) { DICT_DB *dict_db = (DICT_DB *) dict; - if (dict_db->db->close(dict_db->db) < 0) + if (DICT_DB_CLOSE(dict_db->db) < 0) msg_fatal("close database %s: %m", dict_db->path); myfree(dict_db->path); myfree((char *) dict_db); @@ -353,30 +416,76 @@ static DICT *dict_db_open(const char *path, int open_flags, int type, char *db_path; int lock_fd = -1; +#if DB_VERSION_MAJOR > 1 + int db_flags; + +#endif + db_path = concatenate(path, ".db", (char *) 0); - if (dict_flags & DICT_FLAG_LOCK) { - if ((lock_fd = open(db_path, open_flags, 0644)) < 0) - msg_fatal("open database %s: %m", db_path); - if (myflock(lock_fd, MYFLOCK_SHARED) < 0) - msg_fatal("shared-lock database %s for open: %m", db_path); - } + /* + * Use the DB 1.x programming interface. This is the default interface + * with 4.4BSD systems. It is also available via the db_185 compatibility + * interface, but that interface does not have the undocumented feature + * that we need to make file locking safe with POSIX fcntl() locking. + */ +#if DB_VERSION_MAJOR < 2 if ((db = dbopen(db_path, open_flags, 0644, type, tweak)) == 0) msg_fatal("open database %s: %m", db_path); + lock_fd = db->fd(db); +#endif + + /* + * Use the DB 2.x programming interface. Jump a couple extra hoops. + */ +#if DB_VERSION_MAJOR == 2 + db_flags = DB_FCNTL_LOCKING; + if (open_flags == O_RDONLY) + db_flags |= DB_RDONLY; + if (open_flags & O_CREAT) + db_flags |= DB_CREATE; + if (open_flags & O_TRUNC) + db_flags |= DB_TRUNCATE; + if ((errno = db_open(db_path, type, db_flags, 0644, 0, tweak, &db)) != 0) + msg_fatal("open database %s: %m", db_path); + if (db == 0) + msg_panic("db_open null result"); + if ((errno = db->fd(db, &lock_fd)) != 0) + msg_fatal("get database file descriptor: %m"); +#endif + + /* + * Use the DB 3.x programming interface. Jump even more hoops. + */ +#if DB_VERSION_MAJOR > 2 + db_flags = DB_FCNTL_LOCKING; + if (open_flags == O_RDONLY) + db_flags |= DB_RDONLY; + if (open_flags & O_CREAT) + db_flags |= DB_CREATE; + if (open_flags & O_TRUNC) + db_flags |= DB_TRUNCATE; + if ((errno = db_create(&db, 0, 0)) != 0) + msg_fatal("create DB database: %m"); + if (db == 0) + msg_panic("db_create null result"); + if ((errno = db->set_cachesize(db, 0, DICT_DB_CACHE_SIZE, 0)) != 0) + msg_fatal("set DB cache size %d: %m", DICT_DB_CACHE_SIZE); + if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) + msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM); + if ((errno = db->open(db, db_path, 0, type, db_flags, 0644)) != 0) + msg_fatal("open database %s: %m", db_path); + if ((errno = db->fd(db, &lock_fd)) != 0) + msg_fatal("get database file descriptor: %m"); +#endif - if (dict_flags & DICT_FLAG_LOCK) { - if (myflock(lock_fd, MYFLOCK_NONE) < 0) - msg_fatal("unlock database %s for open: %m", db_path); - if (close(lock_fd) < 0) - msg_fatal("close database %s: %m", db_path); - } dict_db = (DICT_DB *) mymalloc(sizeof(*dict_db)); dict_db->dict.lookup = dict_db_lookup; dict_db->dict.update = dict_db_update; dict_db->dict.delete = dict_db_delete; dict_db->dict.sequence = dict_db_sequence; dict_db->dict.close = dict_db_close; - dict_db->dict.fd = db->fd(db); + dict_db->dict.fd = lock_fd; if (fstat(dict_db->dict.fd, &st) < 0) msg_fatal("dict_db_open: fstat: %m"); dict_db->dict.mtime = st.st_mtime; @@ -393,11 +502,25 @@ static DICT *dict_db_open(const char *path, int open_flags, int type, DICT *dict_hash_open(const char *path, int open_flags, int dict_flags) { +#if DB_VERSION_MAJOR < 2 HASHINFO tweak; memset((char *) &tweak, 0, sizeof(tweak)); tweak.nelem = DICT_DB_NELM; tweak.cachesize = DICT_DB_CACHE_SIZE; +#endif +#if DB_VERSION_MAJOR == 2 + DB_INFO tweak; + + memset((char *) &tweak, 0, sizeof(tweak)); + tweak.h_nelem = DICT_DB_NELM; + tweak.db_cachesize = DICT_DB_CACHE_SIZE; +#endif +#if DB_VERSION_MAJOR > 2 + void *tweak; + + tweak = 0; +#endif return (dict_db_open(path, open_flags, DB_HASH, (void *) &tweak, dict_flags)); } @@ -405,10 +528,23 @@ DICT *dict_hash_open(const char *path, int open_flags, int dict_flags) DICT *dict_btree_open(const char *path, int open_flags, int dict_flags) { +#if DB_VERSION_MAJOR < 2 BTREEINFO tweak; memset((char *) &tweak, 0, sizeof(tweak)); tweak.cachesize = DICT_DB_CACHE_SIZE; +#endif +#if DB_VERSION_MAJOR == 2 + DB_INFO tweak; + + memset((char *) &tweak, 0, sizeof(tweak)); + tweak.db_cachesize = DICT_DB_CACHE_SIZE; +#endif +#if DB_VERSION_MAJOR > 2 + void *tweak; + + tweak = 0; +#endif return (dict_db_open(path, open_flags, DB_BTREE, (void *) &tweak, dict_flags)); } diff --git a/postfix/src/util/dict_dbm.c b/postfix/src/util/dict_dbm.c index ae7cb0da3..6ed13d0da 100644 --- a/postfix/src/util/dict_dbm.c +++ b/postfix/src/util/dict_dbm.c @@ -42,6 +42,10 @@ #else #include #endif +#ifdef R_FIRST +#error "Error: you are including the Berkeley DB version of ndbm.h" +#error "To build with Postfix NDBM support, delete the Berkeley DB ndbm.h file" +#endif #include #include diff --git a/postfix/src/util/dict_open.c b/postfix/src/util/dict_open.c index 1b57cfbb0..ff09aad7a 100644 --- a/postfix/src/util/dict_open.c +++ b/postfix/src/util/dict_open.c @@ -181,7 +181,7 @@ typedef struct { static DICT_OPEN_INFO dict_open_info[] = { "environ", dict_env_open, "unix", dict_unix_open, -#if 0 +#if 1 "tcp", dict_tcp_open, #endif #ifdef HAS_DBM @@ -378,6 +378,8 @@ main(int argc, char **argv) bufp = vstring_str(keybuf); if ((cmd = mystrtok(&bufp, " ")) == 0) continue; + if (dict_changed()) + msg_warn("dictionary has changed"); key = mystrtok(&bufp, " ="); value = mystrtok(&bufp, " ="); if (strcmp(cmd, "del") == 0 && key && !value) { diff --git a/postfix/src/util/dict_tcp.c b/postfix/src/util/dict_tcp.c index a862a5f2c..4abf3ba47 100644 --- a/postfix/src/util/dict_tcp.c +++ b/postfix/src/util/dict_tcp.c @@ -18,10 +18,33 @@ /* /* Map names have the form host:port. /* -/* The TCP map class implements a very simple protocol: a query is sent -/* as one line of text, and a reply is sent back in the same format. -/* % and non-printable characters are replaced by %xx, xx being the -/* corresponding hexadecimal value. +/* The TCP map class implements a very simple protocol: the client +/* sends a query, and the server sends one reply. Queries and +/* replies are sent as one line of ASCII text, terminated by the +/* ASCII newline character. Query and reply parameters (see below) +/* are separated by whitespace. +/* +/* In query and reply parameters, the character % and any non-printable +/* characters (including whitespace) are replaced by %XX, XX being the +/* corresponding ASCII hexadecimal character value. The hexadecimal codes +/* can be specified in any case (upper, lower, mixed). +/* +/* Queries are strings that serve as lookup key in the simulated +/* table. +/* .IP "get SPACE key NEWLINE" +/* Look up data under the specified key. +/* .IP "put SPACE key SPACE value NEWLINE" +/* +/* .PP +/* Replies can have the following form: +/* .IP "500 SPACE text NEWLINE" +/* The requested data does not exist. The text is ignored. +/* .IP "400 SPACE text NEWLINE" +/* This indicates an error condition. The text gives the nature of +/* the problem. +/* .IP "200 SPACE text NEWLINE" +/* The requested data was found. The text contains an encoded version +/* of the requested data. /* SEE ALSO /* dict(3) generic dictionary manager /* hex_quote(3) http-style quoting @@ -45,6 +68,7 @@ #include #include #include +#include /* Utility library. */ @@ -56,6 +80,7 @@ #include "connect.h" #include "hex_quote.h" #include "dict.h" +#include "stringops.h" #include "dict_tcp.h" /* Application-specific. */ @@ -148,13 +173,23 @@ static const char *dict_tcp_lookup(DICT *dict, const char *key) * is mostly text. */ hex_quote(dict_tcp->hex_buf, key); - vstream_fprintf(dict_tcp->fp, "%s\n", STR(dict_tcp->hex_buf)); + vstream_fprintf(dict_tcp->fp, "get %s\n", STR(dict_tcp->hex_buf)); errno = 0; if (vstring_get_nonl(dict_tcp->hex_buf, dict_tcp->fp) == VSTREAM_EOF) { msg_warn("read TCP map reply from %s: %m", dict_tcp->map); } else if (!hex_unquote(dict_tcp->raw_buf, STR(dict_tcp->hex_buf))) { msg_warn("read TCP map reply from %s: malformed reply %.100s", - dict_tcp->map, STR(dict_tcp->hex_buf)); + dict_tcp->map, + printable(STR(dict_tcp->hex_buf), '_')); + dict_errno = DICT_ERR_RETRY; + return (0); + } else if (ISSPACE(*STR(dict_tcp->raw_buf))) { + msg_warn("TCP map reply from %s failed%s%s", + dict_tcp->map, + STR(dict_tcp->raw_buf)[1] ? ":" : "", + printable(STR(dict_tcp->raw_buf), '_')); + dict_errno = DICT_ERR_RETRY; + return (0); } else { return (STR(dict_tcp->raw_buf)); } diff --git a/postfix/src/util/hex_quote.c b/postfix/src/util/hex_quote.c index 4ed0e73e0..639ff74c4 100644 --- a/postfix/src/util/hex_quote.c +++ b/postfix/src/util/hex_quote.c @@ -20,10 +20,11 @@ /* value is the hex argument. /* /* hex_unquote() performs the opposite transformation. This function -/* understands lowercase and uppercase %XX sequences. The result -/* value is the raw argument in case of success, a null pointer otherwise. +/* understands, lowercase, uppercase, and mixed case %XX sequences. The +/* result value is the raw argument in case of success, a null pointer +/* otherwise. /* BUGS -/* Cannot process null characters. +/* hex_quote() cannot process null characters in data. /* LICENSE /* .ad /* .fi