]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20011216
authorWietse Venema <wietse@porcupine.org>
Sun, 16 Dec 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:43 +0000 (06:27 +0000)
55 files changed:
postfix/HISTORY
postfix/NFS_README [new file with mode: 0644]
postfix/RELEASE_NOTES
postfix/conf/access
postfix/conf/aliases
postfix/conf/canonical
postfix/conf/pcre_table
postfix/conf/regexp_table
postfix/conf/relocated
postfix/conf/sample-regexp-body.cf
postfix/conf/transport
postfix/conf/virtual
postfix/html/access.5.html
postfix/html/aliases.5.html
postfix/html/canonical.5.html
postfix/html/pcre_table.5.html
postfix/html/postalias.1.html
postfix/html/postmap.1.html
postfix/html/regexp_table.5.html
postfix/html/relocated.5.html
postfix/html/transport.5.html
postfix/html/virtual.5.html
postfix/man/man1/postalias.1
postfix/man/man1/postmap.1
postfix/man/man5/access.5
postfix/man/man5/aliases.5
postfix/man/man5/canonical.5
postfix/man/man5/pcre_table.5
postfix/man/man5/regexp_table.5
postfix/man/man5/relocated.5
postfix/man/man5/transport.5
postfix/man/man5/virtual.5
postfix/proto/Makefile [new file with mode: 0644]
postfix/proto/Makefile.in
postfix/proto/access
postfix/proto/aliases
postfix/proto/canonical
postfix/proto/pcre_table
postfix/proto/regexp_table
postfix/proto/relocated
postfix/proto/transport
postfix/proto/virtual
postfix/src/global/mail_version.h
postfix/src/global/smtp_stream.c
postfix/src/master/master_ent.c
postfix/src/postalias/postalias.c
postfix/src/postconf/postconf.c
postfix/src/postdrop/postdrop.c
postfix/src/postmap/postmap.c
postfix/src/sendmail/sendmail.c
postfix/src/util/dict.c
postfix/src/util/dict_pcre.c
postfix/src/util/dict_regexp.c
postfix/src/util/readlline.c
postfix/src/util/readlline.h

index e7b96dc484715c8df68717dddd56ec1f82f10d56..54be1cf012da24e86b2922c4c041c51cfc48a27b 100644 (file)
@@ -5770,6 +5770,31 @@ Apologies for any names omitted.
        to control the delay before sending .<CR><LF> (default: 10
        seconds) when doing the PIX <CR><LF>.<CR><LF> workaround.
 
+20011210
+
+       Bugfix: the 20011128 change in sendmail and postdrop did
+       not handle the case of message_size_limit=0. Fix by Will
+       Day, Georgia Tech.
+
+20011212
+
+       Compatibility: The SMTP server now accepts <CR><CR><LF> as
+       if the client sent <CR><LF>. Reportedly, some badly written
+       windows software produces such garbage, and some badly
+       written windows anti-VIRUS software cannot handle such
+       garbage. File:  global/smtp_stream.c.
+
+20011214
+
+       Bugfix: postmap/postalias queries ignored the -f flag.
+       Reported by Hamish Marson.
+
+20011215-6
+
+       Safety: config file comments no longer span multiple lines
+       when the next line starts with whitespace; a comment that
+       is preceded by whitespace does not break multi-line input.
+
 Open problems:
 
        Low: after reorganizing configuration parameters, add flags
@@ -5781,7 +5806,8 @@ Open problems:
        maps, or else accidents are bound to happen.
 
        Medium: need in-process caching for map lookups. LDAP
-       servers seem to need this in particular.
+       servers seem to need this in particular. Need a way to
+       expire cached results that are too old.
 
        Medium: make address rewriting on/off configurable for
        envelopes and/or headers.
diff --git a/postfix/NFS_README b/postfix/NFS_README
new file mode 100644 (file)
index 0000000..807beb8
--- /dev/null
@@ -0,0 +1,33 @@
+> Also, what considerations are there for file locking or other potential
+> problems when running Postfix with a Netapp-style box for /var/mail
+> delivery?  I know that FreeBSD has broken NFS file locking (both client
+> and server?) but I'm not sure if this is something Postfix can work around
+> or not.
+
+Postfix jumps several hoops in order to deal with NFS-specific
+brain damage, however some operations can fail irrecoverably.  This
+is why Wietse makes no promises about Postfix reliability on NFS.
+
+For queue locking, NFS is not an issue because you cannot share
+Postfix queues between Postfix instances anyawy.
+
+For mailbox locking, some systems such as FreeBSD use flock() by
+default. flock() does not work over NFS. This causes loss of mail
+when multiple hosts access the same mailboxes.
+
+In order to have mailbox locking over NFS you have to configure
+everything to use fcntl() locks for mailbox access (or switch to
+maildir style).  With Postfix you'd specify:
+
+    virtual_mailbox_lock = fcntl
+    mailbox_delivery_lock = fcntl
+
+This is useful only if all mailbox access software uses fcntl()
+locks. I have no information on how well fcntl() locks work on NFS.
+
+You can also "play safe" and try to throw in username.lock files:
+
+    virtual_mailbox_lock = fcntl, dotlock
+    mailbox_delivery_lock = fcntl, dotlock
+
+this is the mix that many packages end up using.
index bd94c272380f07bf7ee67e756e00afebb6553164..c932a32cbf1eff95107c58c768f1d2fe728a5ae6 100644 (file)
@@ -1,3 +1,17 @@
+Incompatible changes with snapshot-20011216
+===========================================
+
+Postfix configuration file comments no longer span multiple lines
+when the next line starts with whitespace. This may cause unexpected
+behavior with existing, improperly formatted, configuration files.
+
+Major changes with snapshot-20011216
+====================================
+
+Postfix configuration files now support whitespace before comments.
+This allows you to comment out just one line in the middle of a
+block of multi-line input.
+
 Incompatible changes with snapshot-20011210
 ===========================================
 
@@ -11,7 +25,7 @@ Stricter checking of Postfix chroot configurations.  The Postfix
 startup procedure now warns if "system" directories (etc, bin, lib,
 usr) under the Postfix top-level queue directory are not owned by
 the super-user (usually the result of well-intended, but misguided,
-applications of "chroot -R postfix /var/spool/postfix).
+applications of "chown -R postfix /var/spool/postfix).
 
 The Postfix sendmail command no longer exits with status 1 when
 mail submission fails, but instead returns a sendmail-compatible
index 59a855eb32b6ca4636df4064043b4a7cf73c7387..56a4bedcb2f8925e7dad3135ea6f0e7a253da881 100644 (file)
 # TABLE FORMAT
 #        The format of the access table is as follows:
 # 
-#        blanks and comments
-#               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.
 # 
+#        multi-line text
+#               A  line  that starts with whitespace (space or tab)
+#               is a continuation of the previous  line.  An  empty
+#               line  terminates  the previous line, as does a line
+#               that starts with non-whitespace (text or  comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        comments
+#               The # is recognized as the start of a comment,  but
+#               only  when it is the first non-whitespace character
+#               on a line.  A comment terminates at the end of  the
+#               line,  even  when the next line starts with whites-
+#               pace.
+# 
 # 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.
-# 
-#                                                                 1
-# 
-# ACCESS(5)                                               ACCESS(5)
-# 
+#               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
+#        user@  Matches all mail addresses with the specified  user
 #               part.
 # 
 #        net.work.addr.ess
 # 
 #        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]NN 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
 #               reject_unauth_destination, and so on).
 # 
 # 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.
-# 
-#                                                                 2
-# 
-# ACCESS(5)                                               ACCESS(5)
+#        The table format does not understand quoting  conventions.
 # 
 # SEE ALSO
 #        postmap(1) create mapping table
 #        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)
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 3
+#                                                                 1
 # 
index a836b8700c5ec51c7c32b49fff1089616ef4e5f5..59bcc60dd63ab8b6ea847f032a7e4ebfccb21979 100644 (file)
@@ -68,56 +68,59 @@ decode:             root
 # 
 #                    name: value1, value2, ...
 # 
-#        o      Lines that begin with whitespace continue the  pre-
-#               vious line.
-# 
-#        o      Blank  lines  are  ignored,  as are lines beginning
-#               with `#'.
-# 
-#        The name is a local address (no domain part).  Use  double
-#        quotes  when the name contains any special characters such
-#        as whitespace, `#', `:', or `@'. The  name  is  folded  to
+#        o      A line that starts with whitespace (space  or  tab)
+#               is  a  continuation  of the previous line. An empty
+#               line terminates the previous line, as does  a  line
+#               that  starts with non-whitespace (text or comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        o      The  # is recognized as the start of a comment, but
+#               only when it is the first non-whitespace  character
+#               on  a line.  A comment terminates at the end of the
+#               line, even when the next line starts  with  whites-
+#               pace.
+# 
+#        The  name is a local address (no domain part).  Use double
+#        quotes when the name contains any special characters  such
+#        as  whitespace,  `#',  `:',  or `@'. The name is folded to
 #        lowercase, in order to make database lookups case insensi-
 #        tive.
 # 
 #        In addition, when an alias exists for owner-name, delivery
-#        diagnostics  are  directed  to that address, instead of to
+#        diagnostics are directed to that address,  instead  of  to
 #        the originator.  This is typically used to direct delivery
-#        errors  to the owner of a mailing list, who is in a better
-#        position to deal with mailing list delivery problems  than
+#        errors to the owner of a mailing list, who is in a  better
+#        position  to deal with mailing list delivery problems than
 #        the originator of the undelivered mail.
 # 
 #        The value contains one or more of the following:
 # 
-#                                                                 1
-# 
-# ALIASES(5)                                             ALIASES(5)
-# 
 #        address
-#               Mail  is  forwarded to address, which is compatible
+#               Mail is forwarded to address, which  is  compatible
 #               with the RFC 822 standard.
 # 
 #        /file/name
-#               Mail is appended to /file/name.  See  local(8)  for
-#               details  of delivery to file.  Delivery is not lim-
-#               ited to regular files.  For example, to dispose  of
+#               Mail  is  appended  to /file/name. See local(8) for
+#               details of delivery to file.  Delivery is not  lim-
+#               ited  to regular files.  For example, to dispose of
 #               unwanted mail, deflect it to /dev/null.
 # 
 #        |command
-#               Mail  is  piped into command. Commands that contain
-#               special characters, such as whitespace,  should  be
-#               enclosed  between  double  quotes. See local(8) for
+#               Mail is piped into command. Commands  that  contain
+#               special  characters,  such as whitespace, should be
+#               enclosed between double quotes.  See  local(8)  for
 #               details of delivery to command.
 # 
 #               When the command fails, a limited amount of command
-#               output  is  mailed  back  to  the sender.  The file
-#               /usr/include/sysexits.h defines the  expected  exit
-#               status  codes. For example, use |"exit 67" to simu-
-#               late a "user  unknown"  error,  and  |"exit  0"  to
+#               output is mailed back  to  the  sender.   The  file
+#               /usr/include/sysexits.h  defines  the expected exit
+#               status codes. For example, use |"exit 67" to  simu-
+#               late  a  "user  unknown"  error,  and  |"exit 0" to
 #               implement an expensive black hole.
 # 
 #        :include:/file/name
-#               Mail  is  sent  to  the  destinations listed in the
+#               Mail is sent to  the  destinations  listed  in  the
 #               named file.  Lines in :include: files have the same
 #               syntax as the right-hand side of alias entries.
 # 
@@ -129,35 +132,31 @@ decode:           root
 # 
 # ADDRESS EXTENSION
 #        When alias database search fails, and the recipient local-
-#        part contains  the  optional  recipient  delimiter  (e.g.,
-#        user+foo),  the  search  is  repeated  for  the unextended
+#        part  contains  the  optional  recipient  delimiter (e.g.,
+#        user+foo), the  search  is  repeated  for  the  unextended
 #        address (e.g., user).
 # 
 # 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.
 # 
 #        alias_maps
 #               List of alias databases.
 # 
 #        allow_mail_to_commands
-#               Restrict  the  usage  of  mail delivery to external
+#               Restrict the usage of  mail  delivery  to  external
 #               command.
 # 
-#                                                                 2
-# 
-# ALIASES(5)                                             ALIASES(5)
-# 
 #        allow_mail_to_files
-#               Restrict the usage of  mail  delivery  to  external
+#               Restrict  the  usage  of  mail delivery to external
 #               file.
 # 
 #        expand_owner_alias
 #               When delivering to an alias that has an owner- com-
-#               panion alias, set the envelope  sender  address  to
-#               the  right-hand  side  of  the owner alias, instead
+#               panion  alias,  set  the envelope sender address to
+#               the right-hand side of  the  owner  alias,  instead
 #               using of the left-hand side address.
 # 
 #        owner_request_special
@@ -165,7 +164,7 @@ decode:             root
 #               addresses.
 # 
 #        recipient_delimiter
-#               Delimiter  that  separates  recipients from address
+#               Delimiter that separates  recipients  from  address
 #               extensions.
 # 
 # STANDARDS
@@ -176,7 +175,7 @@ decode:             root
 #        postalias(1) alias database management
 # 
 # LICENSE
-#        The Secure Mailer license must be  distributed  with  this
+#        The  Secure  Mailer  license must be distributed with this
 #        software.
 # 
 # AUTHOR(S)
@@ -185,5 +184,5 @@ decode:             root
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 3
+#                                                                 1
 # 
index 34288f8ca1403f8bf331e9e63990d57d4858db16..1646465ff4ffd85c2074a4d4c15536aee99e00ab 100644 (file)
 # TABLE FORMAT
 #        The format of the canonical table is as follows:
 # 
-#        blanks and comments
-#               Blank lines are ignored,  as  are  lines  beginning
-#               with `#'.
-# 
-#        leading whitespace
-#               Lines  that begin with whitespace continue the pre-
-#               vious line.
-# 
-#                                                                 1
-# 
-# CANONICAL(5)                                         CANONICAL(5)
-# 
 #        pattern result
 #               When pattern matches a mail address, replace it  by
 #               the corresponding result.
 # 
+#        multi-line text
+#               A  line  that starts with whitespace (space or tab)
+#               is a continuation of the previous  line.  An  empty
+#               line  terminates  the previous line, as does a line
+#               that starts with non-whitespace (text or  comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        comments
+#               The # is recognized as the start of a comment,  but
+#               only  when it is the first non-whitespace character
+#               on a line.  A comment terminates at the end of  the
+#               line,  even  when the next line starts with whites-
+#               pace.
+# 
 #        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
-#               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
-# 
-#                                                                 2
-# 
-# CANONICAL(5)                                         CANONICAL(5)
-# 
-#        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.
 # 
 #        canonical_maps
 #        Other parameters of interest:
 # 
 #        inet_interfaces
-#               The network interface addresses  that  this  system
+#               The  network  interface  addresses that this system
 #               receives mail on.
 # 
 #        masquerade_classes
-#               List  of  address  classes subject to masquerading:
-#               zero or more of  envelope_sender,  envelope_recipi-
+#               List of address classes  subject  to  masquerading:
+#               zero  or  more of envelope_sender, envelope_recipi-
 #               ent, header_sender, header_recipient.
 # 
 #        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
 #               The domain that is appended to locally-posted mail.
 # 
-#                                                                 3
-# 
-# CANONICAL(5)                                         CANONICAL(5)
-# 
 #        owner_request_special
 #               Give special treatment to owner-xxx and xxx-request
 #               addresses.
 #        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)
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 4
+#                                                                 1
 # 
index b4f6326b8baad29c1296794a170d6e218e2f2197..983de3398becce2b3dc9eba9e271f90ebf910338 100644 (file)
 # 
 #        The general form of a PCRE table is:
 # 
-#        blanks and comments
-#               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
-#               space continues the preceding line.
+#               responding result.
+# 
+#        multi-line text
+#               A line that starts with whitespace (space  or  tab)
+#               is  a  continuation  of the previous line. An empty
+#               line terminates the previous line, as does  a  line
+#               that  starts with non-whitespace (text or comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        comments
+#               The  # is recognized as the start of a comment, but
+#               only when it is the first non-whitespace  character
+#               on  a line.  A comment terminates at the end of the
+#               line, even when the next line starts  with  whites-
+#               pace.
 # 
 #        Each  pattern  is  a  perl-like  regular  expression.  The
 #        expression delimiter can be any character, except  whites-
 #        table, until a pattern is found that  matches  the  search
 #        string.
 # 
-#                                                                 1
-# 
-# PCRE_TABLE(5)                                       PCRE_TABLE(5)
-# 
 #        Substitution  of  substrings  from  the matched expression
 #        into the result string is possible using the  conventional
 #        perl  syntax  ($1,  $2,  etc.).   The macros in the result
@@ -81,7 +83,7 @@
 # 
 # EXAMPLE HEADER FILTER MAP
 #        /^Subject: make money fast/     REJECT
-#        /^To: friend@public\.com/        REJECT
+#        /^To: friend@public\.com/       REJECT
 # 
 # SEE ALSO
 #        regexp_table(5) format of POSIX regular expression tables
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 2
+#                                                                 1
 # 
index cd9866d9279a57003a47c3c9bfeee4eb306fef4c..df06800bf6d96e104897628a626751c89cf6e758 100644 (file)
 # 
 #        The general form of a Postfix regular expression table is:
 # 
-#        blanks and comments
-#               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
-#               space continues the preceding line.
+#               responding result.
+# 
+#        multi-line text
+#               A line that starts with whitespace (space  or  tab)
+#               is  a  continuation  of the previous line. An empty
+#               line terminates the previous line, as does  a  line
+#               that  starts with non-whitespace (text or comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        comments
+#               The  # is recognized as the start of a comment, but
+#               only when it is the first non-whitespace  character
+#               on  a line.  A comment terminates at the end of the
+#               line, even when the next line starts  with  whites-
+#               pace.
 # 
 #        pattern1!pattern2 result
 #               Matches pattern1 but not pattern2.
 #        nor is user+foo broken up into user and foo.
 # 
 #        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.
 # 
 # EXAMPLE SMTPD ACCESS MAP
 #        # Disallow sender-specified routing. This is a must if you relay mail
 #        # for other domains.
-#        /[%!@].*[%!@]/            550 Sender-specified routing rejected
+#        /[%!@].*[%!@]/       550 Sender-specified routing rejected
 # 
 #        # Postmaster is OK, that way they can talk to us about how to fix
 #        # their problem.
-#        /^postmaster@/            OK
+#        /^postmaster@/       OK
 # 
 #        # Protect your outgoing majordomo exploders
-#        /^(.*)-outgoing@(.*)$/!/^owner-/        550 Use ${1}@${2} instead
+#        /^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
 # 
 # EXAMPLE HEADER FILTER MAP
 #        # These were once common in junk mail.
 #        /^Subject: make money fast/     REJECT
-#        /^To: friend@public\.com/        REJECT
+#        /^To: friend@public\.com/       REJECT
 # 
 # SEE ALSO
 #        pcre_table(5) format of PCRE tables
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 2
+#                                                                 1
 # 
index 37e2f29d0c53713ee0ea68841a29bd64d02efd1e..738480424d356fd9eeb206a3589982199ad53263 100644 (file)
 # TABLE FORMAT
 #        The format of the table is as follows:
 # 
-#        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
 #               address or telephone number.
 # 
+#        o      A  line  that starts with whitespace (space or tab)
+#               is a continuation of the previous  line.  An  empty
+#               line  terminates  the previous line, as does a line
+#               that starts with non-whitespace (text or  comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        o      The # is recognized as the start of a comment,  but
+#               only  when it is the first non-whitespace character
+#               on a line.  A comment terminates at the end of  the
+#               line,  even  when the next line starts with whites-
+#               pace.
+# 
 #        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
-# 
-#                                                                 1
-# 
-# RELOCATED(5)                                         RELOCATED(5)
-# 
 #               in $inet_interfaces.
 # 
 #        @domain
-#               Matches every address in domain. This form has  the
+#               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
 #        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.
 # 
-#                                                                 2
-# 
-# RELOCATED(5)                                         RELOCATED(5)
-# 
 #        myorigin
 #               The domain that is appended to locally-posted mail.
 # 
 #        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)
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 3
+#                                                                 1
 # 
index 344c1ce38045f0e8637645dc4feddf78e99a8fdc..f9d3172dab3d296ea4058662b5eab98319cbc839 100644 (file)
@@ -21,6 +21,3 @@
 #   REJECT text.... The text is sent to the originator.
 #   IGNORE          The header line is silently discarded.
 #   WARN            The header is logged (not rejected) with a warning.
-
-/^Subject: Make Money Fast/    REJECT
-/^To: friend@public.com/       REJECT
index adae6210ab54b9faba155a8b60ffccef37f78042..4c40ade17a6058cb83e77416af06f31188577686 100644 (file)
 # TABLE FORMAT
 #        The format of the transport table is as follows:
 # 
-#        blanks and comments
-#               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-
 #               sponding result.
 # 
+#        multi-line text
+#               A  line  that starts with whitespace (space or tab)
+#               is a continuation of the previous  line.  An  empty
+#               line  terminates  the previous line, as does a line
+#               that starts with non-whitespace (text or  comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        comments
+#               The # is recognized as the start of a comment,  but
+#               only  when it is the first non-whitespace character
+#               on a line.  A comment terminates at the end of  the
+#               line,  even  when the next line starts with whites-
+#               pace.
+# 
 #        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.
 # 
-#                                                                 1
-# 
-# TRANSPORT(5)                                         TRANSPORT(5)
-# 
-#        Note:  transport  map entries take precedence over domains
-#        specified in the mydestination parameter. If you  use  the
+#        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-
+#        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.
 # 
-#                                                                 2
-# 
-# TRANSPORT(5)                                         TRANSPORT(5)
-# 
 #        The error mailer can be used to bounce mail:
 # 
-#             .foo.org       error:mail for *.foo.org is not deliv-
+#             .foo.org      error:mail for *.foo.org is not  deliv-
 #        erable
 # 
-#        This causes  all  mail  for  user@anything.foo.org  to  be
+#        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.
 # 
 #        parent_domain_matches_subdomains (versions >= 20011119)
-#               List of Postfix features that use domain.name  pat-
+#               List  of Postfix features that use domain.name pat-
 #               terns  to  match  sub.domain.name  (as  opposed  to
 #               requiring .domain.name patterns).
 # 
 #        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
 #        postmap(1) create mapping table
 #        trivial-rewrite(8) rewrite and resolve addresses
 #        pcre_table(5) format of PCRE tables
-# 
-#                                                                 3
-# 
-# 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)
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 4
+#                                                                 1
 # 
index d0a3d7b8ac38cdc2c7513588f793fa5d25733776..d2ba3db905451f78d4886b54b8b0e8636efb7f92 100644 (file)
 #            user1@virtual.domain address1
 #            user2@virtual.domain address2, address3
 # 
-#        The  virtual.domain  anything  entry  is  required  for  a
-# 
-#                                                                 1
-# 
-# VIRTUAL(5)                                             VIRTUAL(5)
-# 
-#        Postfix-style virtual domain.
+#        The virtual.domain anything entry is required for a  Post-
+#        fix-style virtual domain.
 # 
 #        Do  not list a Postfix-style virtual domain in the main.cf
 #        mydestination configuration parameter.  Such an  entry  is
@@ -94,7 +89,7 @@
 #        The  main.cf  mydestination  entry is required for a Send-
 #        mail-style virtual domain.
 # 
-#        Do not specify a virtual.domain whatever virtual map entry
+#        Do not specify a virtual.domain anything virtual map entry
 #        for  a  Sendmail-style  virtual  domain.  Such an entry is
 #        required only with a Postfix-style virtual domain.
 # 
 #        The format of the virtual table is  as  follows,  mappings
 #        being tried in the order as listed in this manual page:
 # 
-#        blanks and comments
-#               Blank  lines  are  ignored,  as are lines beginning
-#               with `#'.
-# 
-#        leading whitespace
-#               Lines  that  begin  with  whitespace  continue  the
-# 
-#                                                                 2
-# 
-# VIRTUAL(5)                                             VIRTUAL(5)
-# 
-#               previous line.
-# 
 #        pattern result
 #               When  pattern matches a mail address, replace it by
 #               the corresponding result.
 # 
+#        multi-line text
+#               A line that starts with whitespace (space  or  tab)
+#               is  a  continuation  of the previous line. An empty
+#               line terminates the previous line, as does  a  line
+#               that  starts with non-whitespace (text or comment).
+#               A comment line that starts with whitespace does not
+#               terminate multi-line text.
+# 
+#        comments
+#               The  # is recognized as the start of a comment, but
+#               only when it is the first non-whitespace  character
+#               on  a line.  A comment terminates at the end of the
+#               line, even when the next line starts  with  whites-
+#               pace.
+# 
 #        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
-# 
-#                                                                 3
-# 
-# VIRTUAL(5)                                             VIRTUAL(5)
-# 
-#        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.
 # 
 #        virtual_maps
 #        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
 #        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)
 #        P.O. Box 704
 #        Yorktown Heights, NY 10598, USA
 # 
-#                                                                 4
+#                                                                 1
 # 
index 2c12de10a3393849099f601c8b3a2985e7f84101..e575307a58c7b1aadfab1afdb24eb22cbb36da8c 100644 (file)
@@ -33,32 +33,39 @@ ACCESS(5)                                               ACCESS(5)
 <b>TABLE</b> <b>FORMAT</b>
        The format of the access table is as follows:
 
-       blanks and comments
-              Blank lines are ignored,  as  are  lines  beginning
-              with `#'.
-
-       leading whitespace
-              Lines  that begin with whitespace continue the pre-
-              vious line.
-
        <i>pattern</i> <i>action</i>
               When <i>pattern</i> matches a mail address, domain or host
               address, perform the corresponding <i>action</i>.
 
+       multi-line text
+              A  line  that starts with whitespace (space or tab)
+              is a continuation of the previous  line.  An  empty
+              line  terminates  the previous line, as does a line
+              that starts with non-whitespace (text or  comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       comments
+              The <b>#</b> is recognized as the start of a comment,  but
+              only  when it is the first non-whitespace character
+              on a line.  A comment terminates at the end of  the
+              line,  even  when the next line starts with whites-
+              pace.
+
 <b>PATTERNS</b>
        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:
 
        <i>user</i>@<i>domain</i>
               Matches the specified mail address.
 
        <i>domain.name</i>
-              Matches  the  <i>domain.name</i>  itself and any subdomain
-              thereof, either in hostnames or in mail  addresses.
+              Matches the <i>domain.name</i> itself  and  any  subdomain
+              thereof,  either in hostnames or in mail addresses.
               Top-level domains will never be matched.
 
-       <i>user</i>@  Matches  all mail addresses with the specified user
+       <i>user</i>@  Matches all mail addresses with the specified  user
               part.
 
        <i>net.work.addr.ess</i>
@@ -67,13 +74,13 @@ ACCESS(5)                                               ACCESS(5)
 
        <i>net.work</i>
 
-       <i>net</i>    Matches any host address in the specified  network.
-              A  network  address  is  a  sequence of one or more
+       <i>net</i>    Matches  any host address in the specified network.
+              A network address is a  sequence  of  one  or  more
               octets separated by ".".
 
 <b>ACTIONS</b>
        [<b>45</b>]<i>NN</i> <i>text</i>
-              Reject the address etc. that matches  the  pattern,
+              Reject  the  address etc. that matches the pattern,
               and respond with the numerical code and text.
 
        <b>REJECT</b> Reject the address etc. that matches the pattern. A
@@ -86,29 +93,29 @@ ACCESS(5)                                               ACCESS(5)
               <b>reject</b><i>_</i><b>unauth</b><i>_</i><b>destination</b>, and so on).
 
 <b>REGULAR</b> <b>EXPRESSION</b> <b>TABLES</b>
-       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 <a href="regexp_table.5.html"><b>regexp</b><i>_</i><b>table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre</b><i>_</i><b>table</b>(5)</a>.
 
-       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
-       <i>user@domain</i>  mail  addresses  are not broken up into their
+       no  parent  domain  or  parent network search is done, and
+       <i>user@domain</i> mail addresses are not broken  up  into  their
        <i>user@</i> and <i>domain</i> 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 <b>$1</b>, <b>$2</b> 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 <b>$1</b>, <b>$2</b> and so on.
 
 <b>BUGS</b>
-       The  table format does not understand quoting conventions.
+       The table format does not understand quoting  conventions.
 
 <b>SEE</b> <b>ALSO</b>
        <a href="postmap.1.html">postmap(1)</a> create mapping table
@@ -117,7 +124,7 @@ ACCESS(5)                                               ACCESS(5)
        <a href="regexp_table.5.html">regexp_table(5)</a> format of POSIX regular expression tables
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index a281a75ff83ab90c0f68caff6e48b99e41f3e0fa..fd7e7703280cb06ed8c0fecb0833a912750ee9df 100644 (file)
@@ -35,52 +35,59 @@ ALIASES(5)                                             ALIASES(5)
 
                    <i>name</i>: <i>value1</i>, <i>value2</i>, <i>...</i>
 
-       <b>o</b>      Lines that begin with whitespace continue the  pre-
-              vious line.
-
-       <b>o</b>      Blank  lines  are  ignored,  as are lines beginning
-              with `#'.
-
-       The <i>name</i> is a local address (no domain part).  Use  double
-       quotes  when the name contains any special characters such
-       as whitespace, `#', `:', or `@'. The  <i>name</i>  is  folded  to
+       <b>o</b>      A line that starts with whitespace (space  or  tab)
+              is  a  continuation  of the previous line. An empty
+              line terminates the previous line, as does  a  line
+              that  starts with non-whitespace (text or comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       <b>o</b>      The  <b>#</b> is recognized as the start of a comment, but
+              only when it is the first non-whitespace  character
+              on  a line.  A comment terminates at the end of the
+              line, even when the next line starts  with  whites-
+              pace.
+
+       The  <i>name</i> is a local address (no domain part).  Use double
+       quotes when the name contains any special characters  such
+       as  whitespace,  `#',  `:',  or `@'. The <i>name</i> is folded to
        lowercase, in order to make database lookups case insensi-
        tive.
 
        In addition, when an alias exists for <b>owner-</b><i>name</i>, delivery
-       diagnostics  are  directed  to that address, instead of to
+       diagnostics are directed to that address,  instead  of  to
        the originator.  This is typically used to direct delivery
-       errors  to the owner of a mailing list, who is in a better
-       position to deal with mailing list delivery problems  than
+       errors to the owner of a mailing list, who is in a  better
+       position  to deal with mailing list delivery problems than
        the originator of the undelivered mail.
 
        The <i>value</i> contains one or more of the following:
 
        <i>address</i>
-              Mail  is  forwarded to <i>address</i>, which is compatible
+              Mail is forwarded to <i>address</i>, which  is  compatible
               with the <a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> standard.
 
        <i>/file/name</i>
-              Mail is appended to <i>/file/name</i>.  See  <a href="local.8.html"><b>local</b>(8)</a>  for
-              details  of delivery to file.  Delivery is not lim-
-              ited to regular files.  For example, to dispose  of
+              Mail  is  appended  to <i>/file/name</i>. See <a href="local.8.html"><b>local</b>(8)</a> for
+              details of delivery to file.  Delivery is not  lim-
+              ited  to regular files.  For example, to dispose of
               unwanted mail, deflect it to <b>/dev/null</b>.
 
        |<i>command</i>
-              Mail  is  piped into <i>command</i>. Commands that contain
-              special characters, such as whitespace,  should  be
-              enclosed  between  double  quotes. See <a href="local.8.html"><b>local</b>(8)</a> for
+              Mail is piped into <i>command</i>. Commands  that  contain
+              special  characters,  such as whitespace, should be
+              enclosed between double quotes.  See  <a href="local.8.html"><b>local</b>(8)</a>  for
               details of delivery to command.
 
               When the command fails, a limited amount of command
-              output  is  mailed  back  to  the sender.  The file
-              <b>/usr/include/sysexits.h</b> defines the  expected  exit
-              status  codes. For example, use <b>|"exit</b> <b>67"</b> to simu-
-              late a "user  unknown"  error,  and  <b>|"exit</b>  <b>0"</b>  to
+              output is mailed back  to  the  sender.   The  file
+              <b>/usr/include/sysexits.h</b>  defines  the expected exit
+              status codes. For example, use <b>|"exit</b> <b>67"</b> to  simu-
+              late  a  "user  unknown"  error,  and  <b>|"exit</b> <b>0"</b> to
               implement an expensive black hole.
 
        <b>:include:</b><i>/file/name</i>
-              Mail  is  sent  to  the  destinations listed in the
+              Mail is sent to  the  destinations  listed  in  the
               named file.  Lines in <b>:include:</b> files have the same
               syntax as the right-hand side of alias entries.
 
@@ -92,31 +99,31 @@ ALIASES(5)                                             ALIASES(5)
 
 <b>ADDRESS</b> <b>EXTENSION</b>
        When alias database search fails, and the recipient local-
-       part contains  the  optional  recipient  delimiter  (e.g.,
-       <i>user+foo</i>),  the  search  is  repeated  for  the unextended
+       part  contains  the  optional  recipient  delimiter (e.g.,
+       <i>user+foo</i>), the  search  is  repeated  for  the  unextended
        address (e.g., <i>user</i>).
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
-       The following <b>main.cf</b> parameters are  especially  relevant
-       to  this  topic.  See  the Postfix <b>main.cf</b> file for syntax
-       details and for default values.  Use  the  <b>postfix</b>  <b>reload</b>
+       The  following  <b>main.cf</b> parameters are especially relevant
+       to this topic. See the Postfix  <b>main.cf</b>  file  for  syntax
+       details  and  for  default  values. Use the <b>postfix</b> <b>reload</b>
        command after a configuration change.
 
        <b>alias</b><i>_</i><b>maps</b>
               List of alias databases.
 
        <b>allow</b><i>_</i><b>mail</b><i>_</i><b>to</b><i>_</i><b>commands</b>
-              Restrict  the  usage  of  mail delivery to external
+              Restrict the usage of  mail  delivery  to  external
               command.
 
        <b>allow</b><i>_</i><b>mail</b><i>_</i><b>to</b><i>_</i><b>files</b>
-              Restrict the usage of  mail  delivery  to  external
+              Restrict  the  usage  of  mail delivery to external
               file.
 
        <b>expand</b><i>_</i><b>owner</b><i>_</i><b>alias</b>
               When delivering to an alias that has an <b>owner-</b> com-
-              panion alias, set the envelope  sender  address  to
-              the  right-hand  side  of  the owner alias, instead
+              panion  alias,  set  the envelope sender address to
+              the right-hand side of  the  owner  alias,  instead
               using of the left-hand side address.
 
        <b>owner</b><i>_</i><b>request</b><i>_</i><b>special</b>
@@ -124,7 +131,7 @@ ALIASES(5)                                             ALIASES(5)
               addresses.
 
        <b>recipient</b><i>_</i><b>delimiter</b>
-              Delimiter  that  separates  recipients from address
+              Delimiter that separates  recipients  from  address
               extensions.
 
 <b>STANDARDS</b>
@@ -135,7 +142,7 @@ ALIASES(5)                                             ALIASES(5)
        <a href="postalias.1.html">postalias(1)</a> alias database management
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 53ce0960d00612bf09a1bcf958751c582ba1777f..d69e5d1f408e91f60656920fe6554b85b3c578d8 100644 (file)
@@ -48,82 +48,89 @@ CANONICAL(5)                                         CANONICAL(5)
 <b>TABLE</b> <b>FORMAT</b>
        The format of the <b>canonical</b> table is as follows:
 
-       blanks and comments
-              Blank lines are ignored,  as  are  lines  beginning
-              with `#'.
-
-       leading whitespace
-              Lines  that begin with whitespace continue the pre-
-              vious line.
-
        <i>pattern</i> <i>result</i>
               When <i>pattern</i> matches a mail address, replace it  by
               the corresponding <i>result</i>.
 
+       multi-line text
+              A  line  that starts with whitespace (space or tab)
+              is a continuation of the previous  line.  An  empty
+              line  terminates  the previous line, as does a line
+              that starts with non-whitespace (text or  comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       comments
+              The <b>#</b> is recognized as the start of a comment,  but
+              only  when it is the first non-whitespace character
+              on a line.  A comment terminates at the end of  the
+              line,  even  when the next line starts with whites-
+              pace.
+
        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:
 
        <i>user</i>@<i>domain</i> <i>address</i>
-              <i>user</i>@<i>domain</i>  is  replaced by <i>address</i>. This form has
+              <i>user</i>@<i>domain</i> is replaced by <i>address</i>. 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 <i>Firstname.Lastname</i> style  addresses,  but  see
+              This  form useful to clean up addresses produced by
+              legacy mail systems.  It can also be used  to  pro-
+              duce  <i>Firstname.Lastname</i>  style  addresses, but see
               below for a simpler solution.
 
        <i>user</i> <i>address</i>
               <i>user</i>@<i>site</i> is replaced by <i>address</i> when <i>site</i> is equal
-              to $<b>myorigin</b>, when <i>site</i> is  listed  in  $<b>mydestina-</b>
+              to  $<b>myorigin</b>,  when  <i>site</i> is listed in $<b>mydestina-</b>
               <b>tion</b>, or when it is listed in $<b>inet</b><i>_</i><b>interfaces</b>.
 
-              This  form  is  useful for replacing login names by
+              This form is useful for replacing  login  names  by
               <i>Firstname.Lastname</i>.
 
        @<i>domain</i> <i>address</i>
-              Every address in <i>domain</i>  is  replaced  by  <i>address</i>.
+              Every  address  in  <i>domain</i>  is replaced by <i>address</i>.
               This form has the lowest precedence.
 
-       In  all the above forms, when <i>address</i> has the form @<i>other-</i>
+       In all the above forms, when <i>address</i> has the form  @<i>other-</i>
        <i>domain</i>, the result is the same user in <i>otherdomain</i>.
 
 <b>ADDRESS</b> <b>EXTENSION</b>
-       When table lookup fails, and the  address  localpart  con-
-       tains    the    optional    recipient   delimiter   (e.g.,
-       <i>user+foo</i>@<i>domain</i>), the search is  repeated  for  the  unex-
-       tended  address  (e.g.   <i>user</i>@<i>domain</i>),  and  the unmatched
+       When  table  lookup  fails, and the address localpart con-
+       tains   the   optional    recipient    delimiter    (e.g.,
+       <i>user+foo</i>@<i>domain</i>),  the  search  is  repeated for the unex-
+       tended address  (e.g.   <i>user</i>@<i>domain</i>),  and  the  unmatched
        extension is propagated to the result of table lookup. The
        matching order is: <i>user+foo</i>@<i>domain</i>, <i>user</i>@<i>domain</i>, <i>user+foo</i>,
        <i>user</i>, and @<i>domain</i>.
 
 <b>REGULAR</b> <b>EXPRESSION</b> <b>TABLES</b>
-       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 <a href="regexp_table.5.html"><b>regexp</b><i>_</i><b>table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre</b><i>_</i><b>table</b>(5)</a>.
 
-       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, <i>user@domain</i> mail
-       addresses  are  not  broken up into their <i>user</i> and <i>@domain</i>
+       addresses are not broken up into their  <i>user</i>  and  <i>@domain</i>
        constituent parts, nor is <i>user+foo</i> broken up into <i>user</i> and
        <i>foo</i>.
 
-       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 <b>$1</b>, <b>$2</b> 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 <b>$1</b>, <b>$2</b> and so  on.
 
 <b>BUGS</b>
-       The table format does not understand quoting  conventions.
+       The  table format does not understand quoting conventions.
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
-       The  following  <b>main.cf</b> parameters are especially relevant
-       to this topic. See the Postfix  <b>main.cf</b>  file  for  syntax
-       details  and  for  default  values. Use the <b>postfix</b> <b>reload</b>
+       The following <b>main.cf</b> parameters are  especially  relevant
+       to  this  topic.  See  the Postfix <b>main.cf</b> file for syntax
+       details and for default values.  Use  the  <b>postfix</b>  <b>reload</b>
        command after a configuration change.
 
        <b>canonical</b><i>_</i><b>maps</b>
@@ -140,24 +147,24 @@ CANONICAL(5)                                         CANONICAL(5)
        Other parameters of interest:
 
        <b>inet</b><i>_</i><b>interfaces</b>
-              The network interface addresses  that  this  system
+              The  network  interface  addresses that this system
               receives mail on.
 
        <b>masquerade</b><i>_</i><b>classes</b>
-              List  of  address  classes subject to masquerading:
-              zero or more of  <b>envelope</b><i>_</i><b>sender</b>,  <b>envelope</b><i>_</i><b>recipi-</b>
+              List of address classes  subject  to  masquerading:
+              zero  or  more of <b>envelope</b><i>_</i><b>sender</b>, <b>envelope</b><i>_</i><b>recipi-</b>
               <b>ent</b>, <b>header</b><i>_</i><b>sender</b>, <b>header</b><i>_</i><b>recipient</b>.
 
        <b>masquerade</b><i>_</i><b>domains</b>
-              List  of  domains  that hide their subdomain struc-
+              List of domains that hide  their  subdomain  struc-
               ture.
 
        <b>masquerade</b><i>_</i><b>exceptions</b>
-              List of user names that are not subject to  address
+              List  of user names that are not subject to address
               masquerading.
 
        <b>mydestination</b>
-              List  of  domains  that  this mail system considers
+              List of domains that  this  mail  system  considers
               local.
 
        <b>myorigin</b>
@@ -175,7 +182,7 @@ CANONICAL(5)                                         CANONICAL(5)
        <a href="regexp_table.5.html">regexp_table(5)</a> format of POSIX regular expression tables
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index dcb944bd431cdf69043022a76f78ba0a80998203..09e869fc6a32d52eee512cb7ed1993bc1ccd98b2 100644 (file)
@@ -19,18 +19,24 @@ PCRE_TABLE(5)                                       PCRE_TABLE(5)
 
        The general form of a PCRE table is:
 
-       blanks and comments
-              Blank  lines  are  ignored,  as are lines beginning
-              with `#'.
-
-       leading whitespace
-              Lines that begin with whitespace continue the  pre-
-              vious line.
-
        <i>pattern</i> <i>result</i>
               When  <i>pattern</i> matches a search string, use the cor-
-              responding <i>result</i>. A line that  starts  with  white
-              space continues the preceding line.
+              responding <i>result</i>.
+
+       multi-line text
+              A line that starts with whitespace (space  or  tab)
+              is  a  continuation  of the previous line. An empty
+              line terminates the previous line, as does  a  line
+              that  starts with non-whitespace (text or comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       comments
+              The  <b>#</b> is recognized as the start of a comment, but
+              only when it is the first non-whitespace  character
+              on  a line.  A comment terminates at the end of the
+              line, even when the next line starts  with  whites-
+              pace.
 
        Each  pattern  is  a  perl-like  regular  expression.  The
        expression delimiter can be any character, except  whites-
@@ -68,7 +74,7 @@ PCRE_TABLE(5)                                       PCRE_TABLE(5)
 
        # Bounce friend@whatever, except when whatever is our domain (you would
        # be better just bouncing all friend@ mail - this is just an example).
-       /^friend@(?!my\.domain).*$/     550 Stick this in your pipe $0
+       /^friend@(?!my\.domain)/        550 Stick this in your pipe $0
 
        # A multi-line entry. The text is sent as one line.
        #
@@ -78,7 +84,7 @@ PCRE_TABLE(5)                                       PCRE_TABLE(5)
 
 <b>EXAMPLE</b> <b>HEADER</b> <b>FILTER</b> <b>MAP</b>
        /^Subject: make money fast/     REJECT
-       /^To: friend@public\.com/        REJECT
+       /^To: friend@public\.com/       REJECT
 
 <b>SEE</b> <b>ALSO</b>
        <a href="regexp_table.5.html">regexp_table(5)</a> format of POSIX regular expression tables
index b1d6cf7d3acd7f7f5fbb598ebf995921d35004fa..75168f09ff90e07b0ef8f3fb5ebefb235b24301b 100644 (file)
@@ -43,7 +43,7 @@ POSTALIAS(1)                                         POSTALIAS(1)
               keys was found.
 
        <b>-f</b>     Do not fold the lookup key to lower case while cre-
-              ating a map.
+              ating or querying a map.
 
        <b>-i</b>     Incremental mode. Read entries from standard  input
               and  do  not  truncate  an  existing  database.  By
index 711f5d38b95c51d1b0965ec62c2e2b02bb0409cf..6129892013dd5c99fe571ee5d02598c33a030925 100644 (file)
@@ -23,76 +23,83 @@ POSTMAP(1)                                             POSTMAP(1)
 
        The format of a lookup table input file is as follows:
 
-       <b>o</b>      Blank  lines  are  ignored.  So are lines beginning
-              with `#'.
-
        <b>o</b>      A table entry has the form
 
                    <i>key</i> whitespace <i>value</i>
 
-       <b>o</b>      A line that starts with  whitespace  continues  the
-              preceding line.
-
-       The  <i>key</i>  and  <i>value</i> are processed as is, except that sur-
-       rounding white space is stripped off. Unlike with  Postfix
-       alias  databases,  quotes cannot be used to protect lookup
-       keys that  contain  special  characters  such  as  `#'  or
+       <b>o</b>      A  line  that starts with whitespace (space or tab)
+              is a continuation of the previous  line.  An  empty
+              line  terminates  the previous line, as does a line
+              that starts with non-whitespace (text or  comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       <b>o</b>      The <b>#</b> is recognized as the start of a comment,  but
+              only  when it is the first non-whitespace character
+              on a line.  A comment terminates at the end of  the
+              line,  even  when the next line starts with whites-
+              pace.
+
+       The <i>key</i> and <i>value</i> are processed as is,  except  that  sur-
+       rounding  white space is stripped off. Unlike with Postfix
+       alias databases, quotes cannot be used to  protect  lookup
+       keys  that  contain  special  characters  such  as  `#' or
        whitespace. The <i>key</i> is mapped to lowercase to make mapping
        lookups case insensitive.
 
        Options:
 
-       <b>-N</b>     Include the terminating null character that  termi-
-              nates  lookup  keys and values. By default, Postfix
+       <b>-N</b>     Include  the terminating null character that termi-
+              nates lookup keys and values. By  default,  Postfix
               does whatever is the default for the host operating
               system.
 
        <b>-c</b> <i>config_dir</i>
-              Read  the  <b>main.cf</b>  configuration file in the named
+              Read the <b>main.cf</b> configuration file  in  the  named
               directory  instead  of  the  default  configuration
               directory.
 
-       <b>-d</b> <i>key</i> Search  the  specified  maps for <i>key</i> and remove one
-              entry per map.  The exit status is  zero  when  the
+       <b>-d</b> <i>key</i> Search the specified maps for <i>key</i>  and  remove  one
+              entry  per  map.   The exit status is zero when the
               requested information was found.
 
               If a key value of <b>-</b> is specified, the program reads
               key values from the standard input stream. The exit
-              status  is  zero when at least one of the requested
+              status is zero when at least one of  the  requested
               keys was found.
 
        <b>-f</b>     Do not fold the lookup key to lower case while cre-
-              ating a map.
+              ating or querying a map.
 
-       <b>-i</b>     Incremental  mode. Read entries from standard input
+       <b>-i</b>     Incremental mode. Read entries from standard  input
               and  do  not  truncate  an  existing  database.  By
-              default,  <b>postmap</b>  creates  a new database from the
+              default, <b>postmap</b> creates a new  database  from  the
               entries in <b>file</b><i>_</i><b>name</b>.
 
-       <b>-n</b>     Don't include the terminating null  character  that
-              terminates  lookup  keys  and  values.  By default,
-              Postfix does whatever is the default for  the  host
+       <b>-n</b>     Don't  include  the terminating null character that
+              terminates lookup  keys  and  values.  By  default,
+              Postfix  does  whatever is the default for the host
               operating system.
 
-       <b>-q</b> <i>key</i> Search  the  specified  maps  for <i>key</i> and print the
-              first value found on the  standard  output  stream.
+       <b>-q</b> <i>key</i> Search the specified maps for  <i>key</i>  and  print  the
+              first  value  found  on the standard output stream.
               The exit status is zero when the requested informa-
               tion was found.
 
               If a key value of <b>-</b> is specified, the program reads
-              key  values  from  the  standard  input  stream and
-              prints one line of <i>key</i> <i>value</i> output  for  each  key
-              that  was  found.  The  exit status is zero when at
+              key values  from  the  standard  input  stream  and
+              prints  one  line  of <i>key</i> <i>value</i> output for each key
+              that was found. The exit status  is  zero  when  at
               least one of the requested keys was found.
 
-       <b>-r</b>     When updating a table, do not warn about  duplicate
+       <b>-r</b>     When  updating a table, do not warn about duplicate
               entries; silently replace them.
 
        <b>-v</b>     Enable verbose logging for debugging purposes. Mul-
-              tiple <b>-v</b> options  make  the  software  increasingly
+              tiple  <b>-v</b>  options  make  the software increasingly
               verbose.
 
-       <b>-w</b>     When  updating a table, do not warn about duplicate
+       <b>-w</b>     When updating a table, do not warn about  duplicate
               entries; silently ignore them.
 
        Arguments:
@@ -100,25 +107,25 @@ POSTMAP(1)                                             POSTMAP(1)
        <i>file_type</i>
               The type of database to be produced.
 
-              <b>btree</b>  The output  file  is  a  btree  file,  named
-                     <i>file_name</i><b>.db</b>.   This  is  available  only on
+              <b>btree</b>  The  output  file  is  a  btree  file, named
+                     <i>file_name</i><b>.db</b>.  This  is  available  only  on
                      systems with support for <b>db</b> databases.
 
-              <b>dbm</b>    The output  consists  of  two  files,  named
-                     <i>file_name</i><b>.pag</b>  and  <i>file_name</i><b>.dir</b>.   This is
-                     available only on systems with  support  for
+              <b>dbm</b>    The  output  consists  of  two  files, named
+                     <i>file_name</i><b>.pag</b> and  <i>file_name</i><b>.dir</b>.   This  is
+                     available  only  on systems with support for
                      <b>dbm</b> databases.
 
-              <b>hash</b>   The  output  file  is  a  hashed file, named
-                     <i>file_name</i><b>.db</b>.  This  is  available  only  on
+              <b>hash</b>   The output file  is  a  hashed  file,  named
+                     <i>file_name</i><b>.db</b>.   This  is  available  only on
                      systems with support for <b>db</b> databases.
 
-              When  no  <i>file_type</i> is specified, the software uses
-              the database type specified via  the  <b>database</b><i>_</i><b>type</b>
+              When no <i>file_type</i> is specified, the  software  uses
+              the  database  type specified via the <b>database</b><i>_</i><b>type</b>
               configuration parameter.
 
        <i>file_name</i>
-              The  name  of  the  lookup  table  source file when
+              The name of  the  lookup  table  source  file  when
               rebuilding a database.
 
 <b>DIAGNOSTICS</b>
@@ -126,8 +133,8 @@ POSTMAP(1)                                             POSTMAP(1)
        stream. No output means no problems. Duplicate entries are
        skipped and are flagged with a warning.
 
-       <b>postmap</b> terminates with zero exit status in case  of  suc-
-       cess  (including  successful <b>postmap</b> <b>-q</b> lookup) and termi-
+       <b>postmap</b>  terminates  with zero exit status in case of suc-
+       cess (including successful <b>postmap</b> <b>-q</b> lookup)  and  termi-
        nates with non-zero exit status in case of failure.
 
 <b>ENVIRONMENT</b>
@@ -139,12 +146,12 @@ POSTMAP(1)                                             POSTMAP(1)
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
        <b>database</b><i>_</i><b>type</b>
-              Default output database type.  On  many  UNIX  sys-
-              tems,  the  default database type is either <b>hash</b> or
+              Default  output  database  type.  On many UNIX sys-
+              tems, the default database type is either  <b>hash</b>  or
               <b>dbm</b>.
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index cae7abe849a090d9306558a56b691862742f7e64..11273391a89ddd0974dc29841d829874cf8203bf 100644 (file)
@@ -19,18 +19,24 @@ REGEXP_TABLE(5)                                   REGEXP_TABLE(5)
 
        The general form of a Postfix regular expression table is:
 
-       blanks and comments
-              Blank  lines  are  ignored,  as are lines beginning
-              with `#'.
-
-       leading whitespace
-              Lines that begin with whitespace continue the  pre-
-              vious line.
-
        <i>pattern</i> <i>result</i>
               When  <i>pattern</i> matches a search string, use the cor-
-              responding <i>result</i>. A line that  starts  with  white
-              space continues the preceding line.
+              responding <i>result</i>.
+
+       multi-line text
+              A line that starts with whitespace (space  or  tab)
+              is  a  continuation  of the previous line. An empty
+              line terminates the previous line, as does  a  line
+              that  starts with non-whitespace (text or comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       comments
+              The  <b>#</b> is recognized as the start of a comment, but
+              only when it is the first non-whitespace  character
+              on  a line.  A comment terminates at the end of the
+              line, even when the next line starts  with  whites-
+              pace.
 
        <i>pattern1!pattern2</i> <i>result</i>
               Matches <i>pattern1</i> but not <i>pattern2</i>.
@@ -67,19 +73,19 @@ REGEXP_TABLE(5)                                   REGEXP_TABLE(5)
 <b>EXAMPLE</b> <b>SMTPD</b> <b>ACCESS</b> <b>MAP</b>
        # Disallow sender-specified routing. This is a must if you relay mail
        # for other domains.
-       /[%!@].*[%!@]/            550 Sender-specified routing rejected
+       /[%!@].*[%!@]/       550 Sender-specified routing rejected
 
        # Postmaster is OK, that way they can talk to us about how to fix
        # their problem.
-       /^postmaster@.*$/         OK
+       /^postmaster@/       OK
 
        # Protect your outgoing majordomo exploders
-       /^(.*)-outgoing@(.*)$/!/^owner-.*/      550 Use ${1}@${2} instead
+       /^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
 
 <b>EXAMPLE</b> <b>HEADER</b> <b>FILTER</b> <b>MAP</b>
        # These were once common in junk mail.
        /^Subject: make money fast/     REJECT
-       /^To: friend@public\.com/        REJECT
+       /^To: friend@public\.com/       REJECT
 
 <b>SEE</b> <b>ALSO</b>
        <a href="pcre_table.5.html">pcre_table(5)</a> format of PCRE tables
index f5b1e8fb9ccc65882d5e120bef12d282024d199d..5ef72fed6cfa685945943ebe3d3aee4a9bee012f 100644 (file)
@@ -34,24 +34,31 @@ RELOCATED(5)                                         RELOCATED(5)
 <b>TABLE</b> <b>FORMAT</b>
        The format of the table is as follows:
 
-       <b>o</b>      Blank  lines  are  ignored,  as are lines beginning
-              with `#'.
-
-       <b>o</b>      Lines that begin with whitespace continue the  pre-
-              vious line.
-
        <b>o</b>      An entry has one of the following form:
                    <i>key</i>  <i>new_location</i>
               Where  <i>new_location</i>  specifies  contact information
               such as an  email  address,  or  perhaps  a  street
               address or telephone number.
 
+       <b>o</b>      A  line  that starts with whitespace (space or tab)
+              is a continuation of the previous  line.  An  empty
+              line  terminates  the previous line, as does a line
+              that starts with non-whitespace (text or  comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       <b>o</b>      The <b>#</b> is recognized as the start of a comment,  but
+              only  when it is the first non-whitespace character
+              on a line.  A comment terminates at the end of  the
+              line,  even  when the next line starts with whites-
+              pace.
+
        With lookups from indexed files such as DB or DBM, or from
-       networked tables such as NIS, LDAP or SQL, the  <i>key</i>  field
+       networked  tables  such as NIS, LDAP or SQL, the <i>key</i> field
        is one of the following:
 
        <i>user</i>@<i>domain</i>
-              Matches  <i>user</i>@<i>domain</i>. This form has precedence over
+              Matches <i>user</i>@<i>domain</i>. This form has precedence  over
               all other forms.
 
        <i>user</i>   Matches <i>user</i>@<i>site</i> when <i>site</i> is $<b>myorigin</b>, when <i>site</i>
@@ -59,42 +66,42 @@ RELOCATED(5)                                         RELOCATED(5)
               in $<b>inet</b><i>_</i><b>interfaces</b>.
 
        @<i>domain</i>
-              Matches every address in <i>domain</i>. This form has  the
+              Matches  every address in <i>domain</i>. This form has the
               lowest precedence.
 
 <b>ADDRESS</b> <b>EXTENSION</b>
-       When  the search fails, and the address localpart contains
-       the optional recipient delimiter (e.g.,  <i>user+foo</i>@<i>domain</i>),
-       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., <i>user+foo</i>@<i>domain</i>),
+       the search is repeated for the  unextended  address  (e.g.
        <i>user</i>@<i>domain</i>).
 
 <b>REGULAR</b> <b>EXPRESSION</b> <b>TABLES</b>
-       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 <a href="regexp_table.5.html"><b>regexp</b><i>_</i><b>table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre</b><i>_</i><b>table</b>(5)</a>.
 
-       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, <i>user@domain</i> mail
-       addresses  are  not  broken up into their <i>user</i> and <i>@domain</i>
+       addresses are not broken up into their  <i>user</i>  and  <i>@domain</i>
        constituent parts, nor is <i>user+foo</i> broken up into <i>user</i> and
        <i>foo</i>.
 
-       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 <b>$1</b>, <b>$2</b> 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 <b>$1</b>, <b>$2</b> and so  on.
 
 <b>BUGS</b>
-       The table format does not understand quoting  conventions.
+       The  table format does not understand quoting conventions.
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
-       The  following  <b>main.cf</b> parameters are especially relevant
-       to this topic. See the Postfix  <b>main.cf</b>  file  for  syntax
-       details  and  for  default  values. Use the <b>postfix</b> <b>reload</b>
+       The following <b>main.cf</b> parameters are  especially  relevant
+       to  this  topic.  See  the Postfix <b>main.cf</b> file for syntax
+       details and for default values.  Use  the  <b>postfix</b>  <b>reload</b>
        command after a configuration change.
 
        <b>relocated</b><i>_</i><b>maps</b>
@@ -103,11 +110,11 @@ RELOCATED(5)                                         RELOCATED(5)
        Other parameters of interest:
 
        <b>inet</b><i>_</i><b>interfaces</b>
-              The  network  interface  addresses that this system
+              The network interface addresses  that  this  system
               receives mail on.
 
        <b>mydestination</b>
-              List of domains that  this  mail  system  considers
+              List  of  domains  that  this mail system considers
               local.
 
        <b>myorigin</b>
@@ -119,7 +126,7 @@ RELOCATED(5)                                         RELOCATED(5)
        <a href="regexp_table.5.html">regexp_table(5)</a> format of POSIX regular expression tables
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 14a5367f3f7ea778e1d544c363cce3ff6d0cab34..7cedd665b0d2a30c39129c8b8a8a29321a180fce 100644 (file)
@@ -33,118 +33,125 @@ TRANSPORT(5)                                         TRANSPORT(5)
 <b>TABLE</b> <b>FORMAT</b>
        The format of the transport table is as follows:
 
-       blanks and comments
-              Blank lines are ignored,  as  are  lines  beginning
-              with `#'.
-
-       leading whitespace
-              Lines  that begin with whitespace continue the pre-
-              vious line.
-
        <i>pattern</i> <i>result</i>
               When <i>pattern</i> matches the  domain,  use  the  corre-
               sponding <i>result</i>.
 
+       multi-line text
+              A  line  that starts with whitespace (space or tab)
+              is a continuation of the previous  line.  An  empty
+              line  terminates  the previous line, as does a line
+              that starts with non-whitespace (text or  comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       comments
+              The <b>#</b> is recognized as the start of a comment,  but
+              only  when it is the first non-whitespace character
+              on a line.  A comment terminates at the end of  the
+              line,  even  when the next line starts with whites-
+              pace.
+
        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:
 
        <i>domain</i> <i>transport</i>:<i>nexthop</i>
-              Mail  for  <i>domain</i> is delivered through <i>transport</i> to
+              Mail for <i>domain</i> is delivered through  <i>transport</i>  to
               <i>nexthop</i>.
 
        <i>.domain</i> <i>transport</i>:<i>nexthop</i>
-              Mail for  any  subdomain  of  <i>domain</i>  is  delivered
+              Mail  for  any  subdomain  of  <i>domain</i>  is delivered
               through <i>transport</i> to <i>nexthop</i>.
 
-       Note:  transport  map entries take precedence over domains
-       specified in the <b>mydestination</b> parameter. If you  use  the
+       Note: transport map entries take precedence  over  domains
+       specified  in  the <b>mydestination</b> parameter. If you use the
        optional  transport  map,  it  may  be  safer  to  specify
-       explicit entries for all domains specified  in  <b>mydestina-</b>
+       explicit  entries  for all domains specified in <b>mydestina-</b>
        <b>tion</b>, for example:
 
             <b>hostname.my.domain</b>   <b>local:</b>
             <b>localhost.my.domain</b>      <b>local:</b>
 
-       The  interpretation  of  the  <i>nexthop</i>  field  is transport
+       The interpretation  of  the  <i>nexthop</i>  field  is  transport
        dependent. In the case of SMTP, specify <i>host</i>:<i>service</i> for a
-       non-default  server port, and use [<i>host</i>] or [<i>host</i>]:<i>port</i> 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 [<i>host</i>] or [<i>host</i>]:<i>port</i>  in
+       order  to  disable MX (mail exchanger) DNS lookups. The []
+       form can also be used with IP addresses instead  of  host-
        names.
 
 <b>EXAMPLES</b>
-       In order to send mail for <b>foo.org</b> and its  subdomains  via
+       In  order  to send mail for <b>foo.org</b> and its subdomains via
        the <b>uucp</b> transport to the UUCP host named <b>foo</b>:
 
             <b>foo.org</b>      <b>uucp:foo</b>
             <b>.foo.org</b>     <b>uucp:foo</b>
 
-       When  no  <i>nexthop</i>  host name is specified, the destination
-       domain name is used instead. For  example,  the  following
-       directs  mail for <i>user</i>@<b>foo.org</b> via the <b>slow</b> transport to a
-       mail exchanger for <b>foo.org</b>.  The <b>slow</b> transport  could  be
-       something  that  runs  at  most  one delivery process at a
+       When no <i>nexthop</i> host name is  specified,  the  destination
+       domain  name  is  used instead. For example, the following
+       directs mail for <i>user</i>@<b>foo.org</b> via the <b>slow</b> transport to  a
+       mail  exchanger  for <b>foo.org</b>.  The <b>slow</b> transport could be
+       something that runs at most  one  delivery  process  at  a
        time:
 
             <b>foo.org</b>      <b>slow:</b>
 
-       When no <i>transport</i> is specified, the default  transport  is
+       When  no  <i>transport</i> is specified, the default transport is
        used, as specified via the <b>default</b><i>_</i><b>transport</b> configuration
-       parameter. The following sends all mail  for  <b>foo.org</b>  and
+       parameter.  The  following  sends all mail for <b>foo.org</b> and
        its subdomains to host <b>gateway.foo.org</b>:
 
             <b>foo.org</b>      <b>:[gateway.foo.org]</b>
             <b>.foo.org</b>     <b>:[gateway.foo.org]</b>
 
-       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 <i>host-</i>
+       In the case of delivery via SMTP, one  may  specify  <i>host-</i>
        <i>name</i>:<i>service</i> instead of just a host:
 
             <b>foo.org</b>      <b>smtp:bar.org:2025</b>
 
-       This directs mail for <i>user</i>@<b>foo.org</b> to  host  <b>bar.org</b>  port
-       <b>2025</b>.  Instead  of a numerical port a symbolic name may be
-       used. Specify [] around the hostname in order  to  disable
+       This  directs  mail  for <i>user</i>@<b>foo.org</b> to host <b>bar.org</b> port
+       <b>2025</b>. 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:
 
-            <b>.foo.org</b>       <b>error:mail</b> <b>for</b> <b>*.foo.org</b> <b>is</b> <b>not</b> <b>deliv-</b>
+            <b>.foo.org</b>      <b>error:mail</b> <b>for</b> <b>*.foo.org</b> <b>is</b> <b>not</b>  <b>deliv-</b>
        <b>erable</b>
 
-       This causes  all  mail  for  <i>user</i>@<i>anything</i><b>.foo.org</b>  to  be
+       This  causes  all  mail  for  <i>user</i>@<i>anything</i><b>.foo.org</b>  to be
        bounced.
 
 <b>REGULAR</b> <b>EXPRESSION</b> <b>TABLES</b>
-       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 <a href="regexp_table.5.html"><b>regexp</b><i>_</i><b>table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre</b><i>_</i><b>table</b>(5)</a>.
 
-       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, <i>some.domain.hier-</i>
        <i>archy</i> 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 <b>$1</b>, <b>$2</b> 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 <b>$1</b>, <b>$2</b> and so on.
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
-       The  following  <b>main.cf</b> parameters are especially relevant
-       to this topic. See the Postfix  <b>main.cf</b>  file  for  syntax
-       details  and  for  default  values. Use the <b>postfix</b> <b>reload</b>
+       The following <b>main.cf</b> parameters are  especially  relevant
+       to  this  topic.  See  the Postfix <b>main.cf</b> file for syntax
+       details and for default values.  Use  the  <b>postfix</b>  <b>reload</b>
        command after a configuration change.
 
        <b>parent</b><i>_</i><b>domain</b><i>_</i><b>matches</b><i>_</i><b>subdomains</b> (versions &gt;= 20011119)
-              List of Postfix features that use <i>domain.name</i>  pat-
+              List  of Postfix features that use <i>domain.name</i> pat-
               terns  to  match  <i>sub.domain.name</i>  (as  opposed  to
               requiring <i>.domain.name</i> patterns).
 
@@ -154,7 +161,7 @@ TRANSPORT(5)                                         TRANSPORT(5)
        Other parameters of interest:
 
        <b>default</b><i>_</i><b>transport</b>
-              The transport to use when no transport  is  explic-
+              The  transport  to use when no transport is explic-
               itly specified.
 
        <b>relayhost</b>
@@ -168,7 +175,7 @@ TRANSPORT(5)                                         TRANSPORT(5)
        <a href="regexp_table.5.html">regexp_table(5)</a> format of POSIX regular expression tables
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 65659bcaf99e608f3e7d337a6a05b62cb963ea73..9304514b94e5783d4f1bddf35966f08f447c66c0 100644 (file)
@@ -90,7 +90,7 @@ VIRTUAL(5)                                             VIRTUAL(5)
        The  <b>main.cf</b>  <b>mydestination</b>  entry is required for a Send-
        mail-style virtual domain.
 
-       Do not specify a <i>virtual.domain</i> <i>whatever</i> virtual map entry
+       Do not specify a <i>virtual.domain</i> <i>anything</i> virtual map entry
        for  a  Sendmail-style  virtual  domain.  Such an entry is
        required only with a Postfix-style virtual domain.
 
@@ -104,80 +104,87 @@ VIRTUAL(5)                                             VIRTUAL(5)
        The format of the virtual table is  as  follows,  mappings
        being tried in the order as listed in this manual page:
 
-       blanks and comments
-              Blank  lines  are  ignored,  as are lines beginning
-              with `#'.
-
-       leading whitespace
-              Lines that begin with whitespace continue the  pre-
-              vious line.
-
        <i>pattern</i> <i>result</i>
               When  <i>pattern</i> matches a mail address, replace it by
               the corresponding <i>result</i>.
 
+       multi-line text
+              A line that starts with whitespace (space  or  tab)
+              is  a  continuation  of the previous line. An empty
+              line terminates the previous line, as does  a  line
+              that  starts with non-whitespace (text or comment).
+              A comment line that starts with whitespace does not
+              terminate multi-line text.
+
+       comments
+              The  <b>#</b> is recognized as the start of a comment, but
+              only when it is the first non-whitespace  character
+              on  a line.  A comment terminates at the end of the
+              line, even when the next line starts  with  whites-
+              pace.
+
        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:
 
        <i>user</i>@<i>domain</i> <i>address,</i> <i>address,</i> <i>...</i>
-              Mail for  <i>user</i>@<i>domain</i>  is  redirected  to  <i>address</i>.
+              Mail  for  <i>user</i>@<i>domain</i>  is  redirected  to <i>address</i>.
               This form has the highest precedence.
 
        <i>user</i> <i>address,</i> <i>address,</i> <i>...</i>
-              Mail  for  <i>user</i>@<i>site</i>  is redirected to <i>address</i> when
-              <i>site</i> is equal to $<b>myorigin</b>, when <i>site</i> is listed  in
+              Mail for <i>user</i>@<i>site</i> is redirected  to  <i>address</i>  when
+              <i>site</i>  is equal to $<b>myorigin</b>, when <i>site</i> is listed in
               $mydestination,   or   when   it   is   listed   in
               $<i>inet_interfaces</i>.
 
-              This functionality overlaps with  functionality  of
+              This  functionality  overlaps with functionality of
               the local <i>alias</i>(5) database. The difference is that
-              <b>virtual</b>  mapping  can  be  applied   to   non-local
+              <b>virtual</b>   mapping   can  be  applied  to  non-local
               addresses.
 
        @<i>domain</i> <i>address,</i> <i>address,</i> <i>...</i>
-              Mail  for  any  user  in  <i>domain</i>  is  redirected to
+              Mail for  any  user  in  <i>domain</i>  is  redirected  to
               <i>address</i>.  This form has the lowest precedence.
 
-       In all the above forms, when <i>address</i> has the form  @<i>other-</i>
-       <i>domain</i>,  the result is the same user in <i>otherdomain</i>.  This
+       In  all the above forms, when <i>address</i> has the form @<i>other-</i>
+       <i>domain</i>, the result is the same user in <i>otherdomain</i>.   This
        works for the first address in the expansion only.
 
 <b>ADDRESS</b> <b>EXTENSION</b>
-       When the search fails, and the address localpart  contains
-       the  optional recipient delimiter (e.g., <i>user+foo</i>@<i>domain</i>),
-       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.,  <i>user+foo</i>@<i>domain</i>),
+       the  search  is  repeated for the unextended address (e.g.
        <i>user</i>@<i>domain</i>), 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:
        <i>user+foo</i>@<i>domain</i>, <i>user</i>@<i>domain</i>, <i>user+foo</i>, <i>user</i>, and @<i>domain</i>.
 
 <b>REGULAR</b> <b>EXPRESSION</b> <b>TABLES</b>
-       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 <a href="regexp_table.5.html"><b>regexp</b><i>_</i><b>table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre</b><i>_</i><b>table</b>(5)</a>.
 
-       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, <i>user@domain</i> mail
-       addresses  are  not  broken up into their <i>user</i> and <i>@domain</i>
+       addresses are not broken up into their  <i>user</i>  and  <i>@domain</i>
        constituent parts, nor is <i>user+foo</i> broken up into <i>user</i> and
        <i>foo</i>.
 
-       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 <b>$1</b>, <b>$2</b> 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 <b>$1</b>, <b>$2</b> and so  on.
 
 <b>BUGS</b>
-       The table format does not understand quoting  conventions.
+       The  table format does not understand quoting conventions.
 
 <b>CONFIGURATION</b> <b>PARAMETERS</b>
-       The  following  <b>main.cf</b> parameters are especially relevant
-       to this topic. See the Postfix  <b>main.cf</b>  file  for  syntax
-       details  and  for  default  values. Use the <b>postfix</b> <b>reload</b>
+       The following <b>main.cf</b> parameters are  especially  relevant
+       to  this  topic.  See  the Postfix <b>main.cf</b> file for syntax
+       details and for default values.  Use  the  <b>postfix</b>  <b>reload</b>
        command after a configuration change.
 
        <b>virtual</b><i>_</i><b>maps</b>
@@ -186,11 +193,11 @@ VIRTUAL(5)                                             VIRTUAL(5)
        Other parameters of interest:
 
        <b>inet</b><i>_</i><b>interfaces</b>
-              The network interface addresses  that  this  system
+              The  network  interface  addresses that this system
               receives mail on.
 
        <b>mydestination</b>
-              List  of  domains  that  this mail system considers
+              List of domains that  this  mail  system  considers
               local.
 
        <b>myorigin</b>
@@ -207,7 +214,7 @@ VIRTUAL(5)                                             VIRTUAL(5)
        <a href="regexp_table.5.html">regexp_table(5)</a> format of POSIX regular expression tables
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index c7ec54dd6d6c3de9b39e6aa26a5bcf108f0e89c3..0917606ff6b840ec51f81d8222e577fee3e23bf0 100644 (file)
@@ -41,7 +41,8 @@ If a key value of \fB-\fR is specified, the program reads key
 values from the standard input stream. The exit status is zero
 when at least one of the requested keys was found.
 .IP \fB-f\fR
-Do not fold the lookup key to lower case while creating a map.
+Do not fold the lookup key to lower case while creating or querying
+a map.
 .IP \fB-i\fR
 Incremental mode. Read entries from standard input and do not
 truncate an existing database. By default, \fBpostalias\fR creates
index b3d1e791f8f22d0299d4d8aca6ba4871414df63f..1ff4e606269d6b09ef2a15a05477f08ad01082a4 100644 (file)
@@ -29,14 +29,20 @@ programs.
 
 The format of a lookup table input file is as follows:
 .IP \(bu
-Blank lines are ignored. So are lines beginning with `#'.
-.IP \(bu
 A table entry has the form
 .sp
 .ti +5
 \fIkey\fR whitespace \fIvalue\fR
 .IP \(bu
-A line that starts with whitespace continues the preceding line.
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP \(bu
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 The \fIkey\fR and \fIvalue\fR are processed as is, except that
 surrounding white space is stripped off. Unlike with Postfix alias
@@ -60,7 +66,8 @@ If a key value of \fB-\fR is specified, the program reads key
 values from the standard input stream. The exit status is zero
 when at least one of the requested keys was found.
 .IP \fB-f\fR
-Do not fold the lookup key to lower case while creating a map.
+Do not fold the lookup key to lower case while creating or querying
+a map.
 .IP \fB-i\fR
 Incremental mode. Read entries from standard input and do not
 truncate an existing database. By default, \fBpostmap\fR creates
index 6488c0b7911e3eb4e7e2783ae72fa3dbd1025c10..80ce2af17f4ba33957ca301b602b89341a2ae567 100644 (file)
@@ -35,13 +35,19 @@ the lookups are done in a slightly different way as described below.
 .ad
 .fi
 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.
+.IP "multi-line text"
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP "comments"
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .SH PATTERNS
 .na
 .nf
index 8eab116ac018d4a683a70d26833bd511129cab48..89ef2bdee873dc3441db74652453cec96636db8c 100644 (file)
@@ -40,9 +40,15 @@ An alias definition has the form
 .ti +5
 \fIname\fR: \fIvalue1\fR, \fIvalue2\fR, \fI...\fR
 .IP \(bu
-Lines that begin with whitespace continue the previous line.
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
 .IP \(bu
-Blank lines are ignored, as are lines beginning with `#'.
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 The \fIname\fR is a local address (no domain part).
 Use double quotes when the name contains any special characters
index 1bddf88ffec2c310677451bdecb35ff4715a8162..6cee20288788afb2d1c6cd63cccefac829ca8cc1 100644 (file)
@@ -50,13 +50,19 @@ Use the \fBaliases\fR(5) map for that purpose.
 .ad
 .fi
 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.
+.IP "multi-line text"
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP "comments"
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 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
index dde2dcf423c6368ba88867e03e1bf4f60e3aacc0..cb4b51aba9a926e6c9cc83c822e7af43de36524e 100644 (file)
@@ -21,14 +21,19 @@ To find out what types of lookup tables your Postfix system
 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
-preceding line.
+\fIresult\fR.
+.IP "multi-line text"
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP "comments"
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 Each pattern is a perl-like regular expression. The expression
 delimiter can be any character, except whitespace or characters
@@ -75,7 +80,7 @@ or $(n) if they aren't followed by whitespace.
 .na
 .nf
 /^Subject: make money fast/     REJECT
-/^To: friend@public\\.com/        REJECT
+/^To: friend@public\\.com/       REJECT
 .SH SEE ALSO
 .na
 .nf
index 36ddf9f93324a6ea2a13f2d57013e4af9fc786c7..43a84fb1aa6edf2b66390dcfc671f936eebc591e 100644 (file)
@@ -21,14 +21,19 @@ To find out what types of lookup tables your Postfix system
 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
-preceding line.
+\fIresult\fR.
+.IP "multi-line text"
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP "comments"
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .IP "\fIpattern1!pattern2 result\fR"
 Matches \fIpattern1\fR but not \fIpattern2\fR.
 .PP
@@ -63,20 +68,20 @@ by whitespace.
 .nf
 # Disallow sender-specified routing. This is a must if you relay mail
 # for other domains.
-/[%!@].*[%!@]/            550 Sender-specified routing rejected
+/[%!@].*[%!@]/       550 Sender-specified routing rejected
 
 # Postmaster is OK, that way they can talk to us about how to fix
 # their problem.
-/^postmaster@/            OK
+/^postmaster@/       OK
 
 # Protect your outgoing majordomo exploders
-/^(.*)-outgoing@(.*)$/!/^owner-/        550 Use ${1}@${2} instead
+/^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
 .SH EXAMPLE HEADER FILTER MAP
 .na
 .nf
 # These were once common in junk mail.
 /^Subject: make money fast/     REJECT
-/^To: friend@public\\.com/        REJECT
+/^To: friend@public\\.com/       REJECT
 .SH SEE ALSO
 .na
 .nf
index 727a732f63d5630125942b19f11601b0c35613c1..c3cb8de6b8e5ea966cf64ab3e565c704c8fad303 100644 (file)
@@ -37,16 +37,22 @@ Table lookups are case insensitive.
 .fi
 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
 .br
 Where \fInew_location\fR specifies contact information such as
 an email address, or perhaps a street address or telephone number.
+.IP \(bu
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP \(bu
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 With lookups from indexed files such as DB or DBM, or from networked
 tables such as NIS, LDAP or SQL, the \fIkey\fR field is one of the
index d45ec5ba48bcf06f99d8015cb5483669cd0e174c..0d467b96459a70e1785cf955cff3aee7d89d6ff6 100644 (file)
@@ -35,13 +35,19 @@ the lookups are done in a slightly different way as described below.
 .ad
 .fi
 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.
+.IP "multi-line text"
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP "comments"
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 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
index ef75b179de6b42ca7a10ea75ac958eb810ccb2b3..8ac87c937f1c9394b5509591b99e2e29b21cf47b 100644 (file)
@@ -106,7 +106,7 @@ mydestination = $myhostname localhost.$mydomain $mydomain
 The \fBmain.cf mydestination\fR entry is required for a Sendmail-style
 virtual domain.
 
-Do not specify a \fIvirtual.domain whatever\fR virtual map entry
+Do not specify a \fIvirtual.domain anything\fR virtual map entry
 for a Sendmail-style virtual domain.
 Such an entry is required only with a Postfix-style virtual domain.
 
@@ -122,13 +122,19 @@ mail to the sender.
 .fi
 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.
+.IP "multi-line text"
+A line that starts with whitespace (space or tab) is a continuation
+of the previous line. An empty line terminates the previous line,
+as does a line that starts with non-whitespace (text or comment). A
+comment line that starts with whitespace does not terminate multi-line
+text.
+.IP "comments"
+The \fB#\fR is recognized as the start of a comment, but only when it is
+the first non-whitespace character on a line.  A comment terminates
+at the end of the line, even when the next line starts with whitespace.
 .PP
 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
diff --git a/postfix/proto/Makefile b/postfix/proto/Makefile
new file mode 100644 (file)
index 0000000..e69de29
index 02397426deb71dacdb7cb53d2359a2e5ed57e19d..fadc1467865b5098b0bd8b9591e982e40f01b604 100644 (file)
@@ -6,6 +6,8 @@ CONFIG  = ../conf/access ../conf/aliases ../conf/canonical ../conf/relocated \
        ../conf/transport ../conf/virtual ../conf/pcre_table \
        ../conf/regexp_table
 
+AWK    = awk '{ print; if (NR == 1) print ".pl 9999" }'
+
 update:        $(CONFIG)
 
 Makefile: Makefile.in
@@ -20,25 +22,25 @@ clobber:
        rm -f $(CONFIG)
 
 ../conf/access: access
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/aliases: aliases0 aliases
-       (cat aliases0; srctoman - aliases | nroff -man | col -bx | uniq | sed 's/^/# /') >$@
+       (cat aliases0; srctoman - aliases | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /') >$@
 
 ../conf/canonical: canonical
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/pcre_table: pcre_table
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/regexp_table: regexp_table
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/relocated: relocated
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/transport: transport
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/virtual: virtual
-       srctoman - $? | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       srctoman - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
index a319352cd567549f2e7a9e5573a7334f50ba85e4..55842b6eb908d4cd2e90ae40eeeb274c02bfbb23 100644 (file)
 # .ad
 # .fi
 #      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.
+# .IP "multi-line text"
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP "comments"
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # PATTERNS
 # .ad
 # .fi
index a8b4209589a5a165220fcc9c4ea12d6fd99f815d..8922c01f519edea84922391ae5727a4528619265 100644 (file)
 # .ti +5
 #      \fIname\fR: \fIvalue1\fR, \fIvalue2\fR, \fI...\fR
 # .IP \(bu
-#      Lines that begin with whitespace continue the previous line.
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
 # .IP \(bu
-#      Blank lines are ignored, as are lines beginning with `#'.
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .PP
 #      The \fIname\fR is a local address (no domain part).
 #      Use double quotes when the name contains any special characters
index 74346dd18729a414e606c3f4752549b1accb7cb0..c803429c7f7226a2e446cb2412ba03f39e04659b 100644 (file)
 # .ad
 # .fi
 #      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.
+# .IP "multi-line text"
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP "comments"
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .PP
 #      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
index 249e9ed9867ee09ce53dd85cb202f8170497df27..8579f897487f2818dd66ca9efb370e225a3ceec4 100644 (file)
 #      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
-#      preceding line.
+#      \fIresult\fR.
+# .IP "multi-line text"
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP "comments"
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .PP
 #      Each pattern is a perl-like regular expression. The expression
 #      delimiter can be any character, except whitespace or characters
@@ -56,7 +61,7 @@
 #
 #      # Bounce friend@whatever, except when whatever is our domain (you would
 #      # be better just bouncing all friend@ mail - this is just an example).
-#      /^friend@(?!my\\.domain)/        550 Stick this in your pipe $0
+#      /^friend@(?!my\\.domain)/        550 Stick this in your pipe $0
 #
 #      # A multi-line entry. The text is sent as one line.
 #      #
@@ -65,7 +70,7 @@
 #      \ them as it only makes their head spin.
 # EXAMPLE HEADER FILTER MAP
 #      /^Subject: make money fast/     REJECT
-#      /^To: friend@public\\.com/        REJECT
+#      /^To: friend@public\\.com/       REJECT
 # SEE ALSO
 #      regexp_table(5) format of POSIX regular expression tables
 # AUTHOR(S)
index cb388ab23f1812a8d2735a1236e0975458f33e04..be13704e34056524b4fb7d61a1ffd60e51e5f7b9 100644 (file)
 #      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
-#      preceding line.
+#      \fIresult\fR.
+# .IP "multi-line text"
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP "comments"
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .IP "\fIpattern1!pattern2 result\fR"
 #      Matches \fIpattern1\fR but not \fIpattern2\fR.
 # .PP
 # EXAMPLE SMTPD ACCESS MAP
 #      # Disallow sender-specified routing. This is a must if you relay mail
 #      # for other domains.
-#      /[%!@].*[%!@]/            550 Sender-specified routing rejected
+#      /[%!@].*[%!@]/       550 Sender-specified routing rejected
 #
 #      # Postmaster is OK, that way they can talk to us about how to fix
 #      # their problem.
-#      /^postmaster@/            OK
+#      /^postmaster@/       OK
 #
 #      # Protect your outgoing majordomo exploders
-#      /^(.*)-outgoing@(.*)$/!/^owner-/        550 Use ${1}@${2} instead
+#      /^(.*)-outgoing@(.*)$/!/^owner-/         550 Use ${1}@${2} instead
 # EXAMPLE HEADER FILTER MAP
 #      # These were once common in junk mail.
 #      /^Subject: make money fast/     REJECT
-#      /^To: friend@public\\.com/        REJECT
+#      /^To: friend@public\\.com/       REJECT
 # SEE ALSO
 #      pcre_table(5) format of PCRE tables
 # AUTHOR(S)
index 9a272b80cfd26b8d73579be097cd39dc1500affc..6b916223e44b49869ddc6dffe3c6a652efe82047 100644 (file)
 # .fi
 #      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
 # .br
 #      Where \fInew_location\fR specifies contact information such as
 #      an email address, or perhaps a street address or telephone number.
+# .IP \(bu
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP \(bu
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .PP
 #      With lookups from indexed files such as DB or DBM, or from networked
 #      tables such as NIS, LDAP or SQL, the \fIkey\fR field is one of the
index ff2c109d1f428d3ccdca2c00c1ce002627655eb1..4e95106c5f94fb2915b8a27669dec1f25d7196aa 100644 (file)
 # .ad
 # .fi
 #      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.
+# .IP "multi-line text"
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP "comments"
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .PP
 #      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
index a42646c7eb12da572df3fa3eef730027e3b5aa60..84c65b685115a6ca1f5d9b8bc9f0d764a5e77d40 100644 (file)
@@ -96,7 +96,7 @@
 #      The \fBmain.cf mydestination\fR entry is required for a Sendmail-style
 #      virtual domain.
 #
-#      Do not specify a \fIvirtual.domain whatever\fR virtual map entry
+#      Do not specify a \fIvirtual.domain anything\fR virtual map entry
 #      for a Sendmail-style virtual domain.
 #      Such an entry is required only with a Postfix-style virtual domain.
 #
 # .fi
 #      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.
+# .IP "multi-line text"
+#      A line that starts with whitespace (space or tab) is a continuation
+#      of the previous line. An empty line terminates the previous line,
+#      as does a line that starts with non-whitespace (text or comment). A
+#      comment line that starts with whitespace does not terminate multi-line
+#      text.
+# .IP "comments"
+#      The \fB#\fR is recognized as the start of a comment, but only when it is
+#      the first non-whitespace character on a line.  A comment terminates
+#      at the end of the line, even when the next line starts with whitespace.
 # .PP
 #      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
index 6db2bf4407dcb2433478df32b8c6d42ef42ca1ca..1fc8ab211503b13b608cbaaeb69452fc26f6a6eb 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20011209"
+#define DEF_MAIL_VERSION       "Snapshot-20011216"
 extern char *var_mail_version;
 
 /* LICENSE
index b919cfaa89a13d8473d45a562cb759e24a1799f3..751e92aa6ae5591539f92f1957490010ef1feecf 100644 (file)
@@ -227,11 +227,13 @@ int     smtp_get(VSTRING *vp, VSTREAM *stream, int bound)
 
        /*
         * Strip off the record terminator: either CRLF or just bare LF.
+        * 
+        * XXX RFC 2821 disallows sending bare CR everywhere. We remove bare CR
+        * if received before CRLF, and leave it alone otherwise.
         */
     case '\n':
-       if (VSTRING_LEN(vp) > 1 && vstring_end(vp)[-2] == '\r')
-           vstring_truncate(vp, VSTRING_LEN(vp) - 2);
-       else
+       vstring_truncate(vp, VSTRING_LEN(vp) - 1);
+       while (VSTRING_LEN(vp) > 0 && vstring_end(vp)[-1] == '\r')
            vstring_truncate(vp, VSTRING_LEN(vp) - 1);
        VSTRING_TERMINATE(vp);
 
index 3eb824c97513c5cd5b35d7ca40c7625a6bb298a9..b8e0bff2804b83f6aa548cb229ac0aef56c557a7 100644 (file)
@@ -242,13 +242,13 @@ MASTER_SERV *get_master_ent()
      * Skip blank lines and comment lines.
      */
     do {
-       if (readlline(buf, master_fp, &master_line, READLL_STRIPNL) == 0) {
+       if (readlline(buf, master_fp, &master_line, READLL_STRIP_NOISE) == 0) {
            vstring_free(buf);
            vstring_free(junk);
            return (0);
        }
        bufp = vstring_str(buf);
-    } while ((cp = mystrtok(&bufp, master_blanks)) == 0 || *cp == '#');
+    } while ((cp = mystrtok(&bufp, master_blanks)) == 0);
 
     /*
      * Parse one logical line from the configuration file. Initialize service
index d4429958c80c2f3433c81d67e8fa8895147b7cc0..08c1fb5a7c2b4baf29b5c48a376019002d1d4801 100644 (file)
@@ -35,7 +35,8 @@
 /*     values from the standard input stream. The exit status is zero
 /*     when at least one of the requested keys was found.
 /* .IP \fB-f\fR
-/*     Do not fold the lookup key to lower case while creating a map.
+/*     Do not fold the lookup key to lower case while creating or querying
+/*     a map.
 /* .IP \fB-i\fR
 /*     Incremental mode. Read entries from standard input and do not
 /*     truncate an existing database. By default, \fBpostalias\fR creates
@@ -197,13 +198,7 @@ static void postalias(char *map_type, char *path_name,
      * Add records to the database.
      */
     lineno = 0;
-    while (readlline(line_buffer, source_fp, &lineno, READLL_STRIPNL)) {
-
-       /*
-        * Skip comments.
-        */
-       if (*STR(line_buffer) == '#')
-           continue;
+    while (readlline(line_buffer, source_fp, &lineno, READLL_STRIP_NOISE)) {
 
        /*
         * Weird stuff. Normally, a line that begins with whitespace is a
@@ -318,7 +313,8 @@ static void postalias(char *map_type, char *path_name,
 
 /* postalias_queries - apply multiple requests from stdin */
 
-static int postalias_queries(VSTREAM *in, char **maps, const int map_count)
+static int postalias_queries(VSTREAM *in, char **maps, const int map_count,
+                                    const int dict_flags)
 {
     int     found = 0;
     VSTRING *keybuf = vstring_alloc(100);
@@ -345,6 +341,8 @@ static int postalias_queries(VSTREAM *in, char **maps, const int map_count)
      * maps.
      */
     while (vstring_get_nonl(keybuf, in) != VSTREAM_EOF) {
+       if (dict_flags & DICT_FLAG_FOLD_KEY)
+           lowercase(STR(keybuf));
        for (n = 0; n < map_count; n++) {
            if (dicts[n] == 0)
                dicts[n] = ((map_name = split_at(maps[n], ':')) != 0 ?
@@ -572,7 +570,10 @@ int     main(int argc, char **argv)
        if (optind + 1 > argc)
            usage(argv[0]);
        if (strcmp(query, "-") == 0)
-           exit(postalias_queries(VSTREAM_IN, argv + optind, argc - optind) == 0);
+           exit(postalias_queries(VSTREAM_IN, argv + optind, argc - optind,
+                                  dict_flags) == 0);
+       if (dict_flags & DICT_FLAG_FOLD_KEY)
+           lowercase(query);
        while (optind < argc) {
            if ((path_name = split_at(argv[optind], ':')) != 0) {
                found = postalias_query(argv[optind], path_name, query);
index 59433d4fc038f2ae1ee7c56344ef4f298f907ef2..2998b23de7929d2dec2dd9729cb35387be478425 100644 (file)
@@ -342,7 +342,7 @@ static void edit_parameters(int argc, char **argv)
      */
 #define STR(x) vstring_str(x)
 
-    while (readlline(buf, src, (int *) 0, READLL_KEEPNL)) {
+    while (readlline(buf, src, (int *) 0, READLL_KEEP_NOISE)) {
        cp = STR(buf);
        if (first) {
            first = 0;
index 51f95cfdbab28e41ff975231d0ea5794665aa752..c329bc167b8e3b374a12a6843c80299e2ba91d17 100644 (file)
@@ -203,7 +203,7 @@ int     main(int argc, char **argv)
      * Stop run-away process accidents by limiting the queue file size. This
      * is not a defense against DOS attack.
      */
-    if (get_file_limit() > var_message_limit)
+    if (var_message_limit > 0 && get_file_limit() > var_message_limit)
        set_file_limit((off_t) var_message_limit);
 
     /*
index 70ee670aab18a0605c457e7e7ab0c7f05321844d..c269549cf283cb1a9aea4c886ffd4c91817dc88b 100644 (file)
 /*
 /*     The format of a lookup table input file is as follows:
 /* .IP \(bu
-/*     Blank lines are ignored. So are lines beginning with `#'.
-/* .IP \(bu
 /*     A table entry has the form
 /* .sp
 /* .ti +5
 /*     \fIkey\fR whitespace \fIvalue\fR
 /* .IP \(bu
-/*     A line that starts with whitespace continues the preceding line.
+/*     A line that starts with whitespace (space or tab) is a continuation
+/*     of the previous line. An empty line terminates the previous line,
+/*     as does a line that starts with non-whitespace (text or comment). A
+/*     comment line that starts with whitespace does not terminate multi-line
+/*     text.
+/* .IP \(bu
+/*     The \fB#\fR is recognized as the start of a comment, but only when it is
+/*     the first non-whitespace character on a line.  A comment terminates
+/*     at the end of the line, even when the next line starts with whitespace.
 /* .PP
 /*     The \fIkey\fR and \fIvalue\fR are processed as is, except that
 /*     surrounding white space is stripped off. Unlike with Postfix alias
@@ -54,7 +60,8 @@
 /*     values from the standard input stream. The exit status is zero
 /*     when at least one of the requested keys was found.
 /* .IP \fB-f\fR
-/*     Do not fold the lookup key to lower case while creating a map.
+/*     Do not fold the lookup key to lower case while creating or querying
+/*     a map.
 /* .IP \fB-i\fR
 /*     Incremental mode. Read entries from standard input and do not
 /*     truncate an existing database. By default, \fBpostmap\fR creates
@@ -201,7 +208,7 @@ static void postmap(char *map_type, char *path_name,
      * Add records to the database.
      */
     lineno = 0;
-    while (readlline(line_buffer, source_fp, &lineno, READLL_STRIPNL)) {
+    while (readlline(line_buffer, source_fp, &lineno, READLL_STRIP_NOISE)) {
 
        /*
         * Skip comments.
@@ -266,7 +273,8 @@ static void postmap(char *map_type, char *path_name,
 
 /* postmap_queries - apply multiple requests from stdin */
 
-static int postmap_queries(VSTREAM *in, char **maps, const int map_count)
+static int postmap_queries(VSTREAM *in, char **maps, const int map_count,
+                                  const int dict_flags)
 {
     int     found = 0;
     VSTRING *keybuf = vstring_alloc(100);
@@ -293,6 +301,8 @@ static int postmap_queries(VSTREAM *in, char **maps, const int map_count)
      * maps.
      */
     while (vstring_get_nonl(keybuf, in) != VSTREAM_EOF) {
+       if (dict_flags & DICT_FLAG_FOLD_KEY)
+           lowercase(STR(keybuf));
        for (n = 0; n < map_count; n++) {
            if (dicts[n] == 0)
                dicts[n] = ((map_name = split_at(maps[n], ':')) != 0 ?
@@ -520,7 +530,10 @@ int     main(int argc, char **argv)
        if (optind + 1 > argc)
            usage(argv[0]);
        if (strcmp(query, "-") == 0)
-           exit(postmap_queries(VSTREAM_IN, argv + optind, argc - optind) == 0);
+           exit(postmap_queries(VSTREAM_IN, argv + optind, argc - optind,
+                                dict_flags) == 0);
+       if (dict_flags & DICT_FLAG_FOLD_KEY)
+           lowercase(query);
        while (optind < argc) {
            if ((path_name = split_at(argv[optind], ':')) != 0) {
                found = postmap_query(argv[optind], path_name, query);
index b87416a976ce6de95d8539bc8404764f487d5b94..c18c9e6794cf86ec995d7e172d398bbb6d38727f 100644 (file)
@@ -804,7 +804,7 @@ int     main(int argc, char **argv)
      * Stop run-away process accidents by limiting the queue file size. This
      * is not a defense against DOS attack.
      */
-    if (get_file_limit() > var_message_limit)
+    if (var_message_limit > 0 && get_file_limit() > var_message_limit)
        set_file_limit((off_t) var_message_limit);
 
     signal(SIGPIPE, SIG_IGN);
index 7d07d3be0be538baaaf2805a0af6670db67e68bb..62163909f6f13aa45f962a2a94bf76c6ab6d5a6d 100644 (file)
@@ -394,11 +394,9 @@ void    dict_load_fp(const char *dict_name, VSTREAM *fp)
     buf = vstring_alloc(100);
     lineno = 0;
 
-    while (readlline(buf, fp, &lineno, READLL_STRIPNL)) {
+    while (readlline(buf, fp, &lineno, READLL_STRIP_NOISE)) {
        start = STR(buf);
        SKIP(start, member, ISSPACE(*member));  /* find member begin */
-       if (*member == 0 || *member == '#')
-           continue;                           /* comment or blank line */
        SKIP(member, ep, !ISSPACE(*ep) && *ep != '=');  /* find member end */
        SKIP(ep, cp, ISSPACE(*cp));             /* skip blanks before '=' */
        if (*cp && *cp != '=')                  /* need '=' or end of string */
index 6d3c6f5239321630f2aafc7e05b23bd22577f5a4..15482013f451ed577866642170ec902728111c3c 100644 (file)
@@ -257,13 +257,7 @@ DICT   *dict_pcre_open(const char *map, int unused_flags, int dict_flags)
     if ((map_fp = vstream_fopen(map, O_RDONLY, 0)) == 0) {
        msg_fatal("open %s: %m", map);
     }
-    while (readlline(line_buffer, map_fp, &lineno, READLL_STRIPNL)) {
-
-       if (*vstring_str(line_buffer) == '#')   /* Skip comments */
-           continue;
-
-       if (*vstring_str(line_buffer) == 0)     /* Skip blank lines */
-           continue;
+    while (readlline(line_buffer, map_fp, &lineno, READLL_STRIP_NOISE)) {
 
        p = vstring_str(line_buffer);
        trimblanks(p, 0)[0] = 0;                /* Trim space at end */
index 1debbe96ff2c99cbaa620b52413f5e0a3f628215..3c0c7a3bb42d3d65c5cf488f0fdb6a6e72f69875 100644 (file)
@@ -356,15 +356,9 @@ DICT   *dict_regexp_open(const char *map, int unused_flags, int dict_flags)
     if ((map_fp = vstream_fopen(map, O_RDONLY, 0)) == 0) {
        msg_fatal("open %s: %m", map);
     }
-    while (readlline(line_buffer, map_fp, &lineno, READLL_STRIPNL)) {
+    while (readlline(line_buffer, map_fp, &lineno, READLL_STRIP_NOISE)) {
        p = vstring_str(line_buffer);
 
-       if (*p == '#')                          /* Skip comments */
-           continue;
-
-       if (*p == 0)                            /* Skip blank lines */
-           continue;
-
        trimblanks(p, 0)[0] = 0;                /* Trim space at end */
 
        rule = dict_regexp_parseline(lineno, p, &nsub, map_fp);
index 314d6962bf083b3a8c4b8d978ecb4e025120c717..977db3ed949d02be2ca71753677a52cba86d5a53 100644 (file)
@@ -6,18 +6,26 @@
 /* SYNOPSIS
 /*     #include <readlline.h>
 /*
-/*     VSTRING *readlline(buf, fp, lineno, stripnl)
+/*     VSTRING *readlline(buf, fp, lineno, strip_noise)
 /*     VSTRING *buf;
 /*     VSTREAM *fp;
 /*     int     *lineno;
-/*     int     stripnl;
+/*     int     strip_noise;
 /* DESCRIPTION
 /*     readlline() reads one logical line from the named stream.
-/*     A line that starts with whitespace is a continuation of
-/*     the previous line. When the stripnl argument is non-zero,
-/*     the newline between continued lines
-/*     is deleted from the input. The result value is the input
-/*     buffer argument or a null pointer when no input is found.
+/*
+/*     A line that starts with whitespace (space or tab) is a continuation
+/*     of the previous line. An empty line terminates the previous line,
+/*     as does a line that starts with non-whitespace (text or comment). A
+/*     comment line that starts with whitespace does not terminate multi-line
+/*     text.
+/*
+/*     The # is recognized as the start of a comment, but only when it is
+/*     the first non-whitespace character on a line.  A comment terminates
+/*     at the end of the line, even when the next line starts with whitespace.
+/*
+/*     The result value is the input buffer argument or a null pointer
+/*     when no input is found.
 /*
 /*     Arguments:
 /* .IP buf
 /* .IP lineno
 /*     A null pointer, or a pointer to an integer that is incremented
 /*     after reading a newline.
-/* .IP stripnl
-/*     Non-zero to strip newlines. readlline.h provides the symbolic
-/*     constants READLL_STRIPNL and READLL_KEEPNL for convenience.
+/* .IP strip_noise
+/*     Non-zero to strip newlines, empty lines and comments from the result.
+/*     For convenience, READLL_STRIP_NOISE requests stripping while
+/*     READLL_KEEP_NOISE disables stripping.
+/* .RE
 /* LICENSE
 /* .ad
 /* .fi
 #include "vstring.h"
 #include "readlline.h"
 
+ /*
+  * Comment stripper states. States are (1)->(2) or (1)->(3) as we proceed
+  * through a line of text.
+  */
+#define READLL_STATE_WANT_LWSP 1       /* expecting leading whitespace */
+#define READLL_STATE_IN_COMMENT        2       /* inside comment */
+#define READLL_STATE_IN_TEXT   3       /* inside other text */
+
+#define LWSP_CHARACTER(ch) ((ch) == ' ' || (ch) == '\t')
+
+#define STR(x) vstring_str(x)
+
 /* readlline - read one logical line */
 
-VSTRING *readlline(VSTRING *buf, VSTREAM *fp, int *lineno, int stripnl)
+VSTRING *readlline(VSTRING *buf, VSTREAM *fp, int *lineno, int strip_noise)
 {
     int     ch;
     int     next;
+    int     state;
 
     /*
-     * Lines that start with whitespace continue the preceding line.
+     * Lines that start with whitespace continue the preceding line. Comments
+     * always terminate at the first newline.
      */
     VSTRING_RESET(buf);
+    if (strip_noise)
+       state = READLL_STATE_WANT_LWSP;
+
     while ((ch = VSTREAM_GETC(fp)) != VSTREAM_EOF) {
+       /* Skip leading whitespace that doesn't continue a previous line. */
+       if (VSTRING_LEN(buf) == 0 && LWSP_CHARACTER(ch))
+           continue;
        if (ch == '\n') {
-           if (stripnl == 0)
-               VSTRING_ADDCH(buf, ch);
            if (lineno)
                *lineno += 1;
-           if ((next = VSTREAM_GETC(fp)) == ' ' || next == '\t') {
+           if (strip_noise) {
+               state = READLL_STATE_WANT_LWSP;
+               /* Skip empty, whitespace, or comment line before text. */
+               if (VSTRING_LEN(buf) == 0)
+                   continue;
+           } else {
+               VSTRING_ADDCH(buf, ch);
+               /* Terminate empty, whitespace, or comment line before text. */
+               if (VSTRING_LEN(buf) == 1 || STR(buf)[0] == '#')
+                   break;
+           }
+           next = VSTREAM_GETC(fp);
+           /* Continue this line if the next line starts with whitespace. */
+           if (LWSP_CHARACTER(next)) {
                ch = next;
            } else {
                if (next != VSTREAM_EOF)
@@ -76,6 +117,18 @@ VSTRING *readlline(VSTRING *buf, VSTREAM *fp, int *lineno, int stripnl)
                break;
            }
        }
+       /* Update the comment stripping state machine. */
+       if (strip_noise) {
+           if (state == READLL_STATE_WANT_LWSP) {
+               if (ch == '#') {
+                   state = READLL_STATE_IN_COMMENT;
+               } else if (!LWSP_CHARACTER(ch)) {
+                   state = READLL_STATE_IN_TEXT;
+               }
+           }
+           if (state == READLL_STATE_IN_COMMENT)
+               continue;
+       }
        VSTRING_ADDCH(buf, ch);
     }
     VSTRING_TERMINATE(buf);
index 00658433cc2a5bdaa1f88b58dbd0a7d97384fb06..dbeb95e4afd9da07924e7040e6be102713fbcd5f 100644 (file)
@@ -22,8 +22,8 @@
   */
 extern VSTRING *readlline(VSTRING *, VSTREAM *, int *, int);
 
-#define READLL_STRIPNL 1
-#define READLL_KEEPNL  0
+#define READLL_STRIP_NOISE     1
+#define READLL_KEEP_NOISE      0
 
 /* LICENSE
 /* .ad