]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20000920
authorWietse Venema <wietse@porcupine.org>
Wed, 20 Sep 2000 00:00:00 +0000 (00:00 +0000)
committerWietse Venema <wietse@porcupine.org>
Thu, 17 Jan 2013 23:12:19 +0000 (18:12 -0500)
76 files changed:
postfix/.printfck
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/bounce/.printfck
postfix/bounce/bounce_notify_service.c
postfix/bounce/bounce_recip_service.c
postfix/cleanup/.printfck
postfix/cleanup/cleanup_message.c
postfix/conf/access
postfix/conf/aliases
postfix/conf/canonical
postfix/conf/relocated
postfix/conf/sample-misc.cf
postfix/conf/transport
postfix/conf/virtual
postfix/dns/.printfck
postfix/error/.printfck
postfix/fsstone/.printfck
postfix/global/.printfck
postfix/global/mail_open_ok.c
postfix/global/mail_version.h
postfix/html/faq.html
postfix/html/transport.5.html
postfix/lmtp/.printfck
postfix/local/.printfck
postfix/local/command.c
postfix/local/dotforward.c
postfix/local/file.c
postfix/local/include.c
postfix/local/mailbox.c
postfix/man/man5/transport.5
postfix/master/.printfck
postfix/nqmgr/.indent.pro
postfix/nqmgr/.printfck
postfix/nqmgr/qmgr_bounce.c
postfix/nqmgr/qmgr_entry.c
postfix/nqmgr/qmgr_job.c
postfix/nqmgr/qmgr_peer.c
postfix/pickup/.printfck
postfix/pickup/pickup.c
postfix/pipe/.printfck
postfix/pipe/pipe.c
postfix/postalias/.printfck
postfix/postcat/.printfck
postfix/postconf/.printfck
postfix/postdrop/.printfck
postfix/postdrop/postdrop.c
postfix/postfix/.printfck
postfix/postkick/.printfck
postfix/postlock/.printfck
postfix/postlog/.printfck
postfix/postmap/.printfck
postfix/postsuper/.printfck
postfix/proto/transport
postfix/qmgr/.printfck
postfix/qmgr/qmgr_message.c
postfix/sendmail/.printfck
postfix/sendmail/sendmail.c
postfix/showq/.printfck
postfix/smtp/.printfck
postfix/smtp/smtp_connect.c
postfix/smtp/smtp_sasl_glue.c
postfix/smtpd/.printfck
postfix/smtpd/smtpd_check.c
postfix/smtpd/smtpd_sasl_glue.c
postfix/smtpstone/.printfck
postfix/spawn/.printfck
postfix/spawn/spawn.c
postfix/trivial-rewrite/.printfck
postfix/util/.printfck
postfix/util/chroot_uid.c
postfix/util/dict_open.c
postfix/util/dict_unix.c
postfix/util/dup2_pass_on_exec.c
postfix/util/set_eugid.c
postfix/util/set_ugid.c

index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 31031695d3a48463a04bbf629fd6e13168751d38..f47f862e97ebc62eaf0efbaa81cf34301d39f35f 100644 (file)
@@ -4109,6 +4109,12 @@ Apologies for any names omitted.
        Robustness: make_dirs() now continues when a missing
        directory is created by another process.
 
+20000720
+
+       Feature: the queue manager now logs the number of recipients
+       when opening a queue file (a zero recipient count is logged
+       with older queue files). File: global/opened.c.
+
 20000726
 
        Robustness: added watchdog_pat() routine to keep the watchdog
@@ -4125,7 +4131,8 @@ Apologies for any names omitted.
 
 20000821
 
-       Feature: added -r (replace) option to postalias and postmap.
+       Feature: added -r (replace key+value) option to postalias
+       and postmap.
 
        Cleanup: smtpd now replies with 555 when the client sends
        unrecognized RCPT TO parameters, as required by RFC 1869
@@ -4152,6 +4159,8 @@ Apologies for any names omitted.
        client or sender until we have completed some investigation,
        after which we will either reject or accept.
 
+       However, the code is turned off because it is not finished.
+
 20000905
 
        Robustness: the dns client now rejects malformed domain
@@ -4212,5 +4221,24 @@ Apologies for any names omitted.
        Convenience: INSTALL.sh now imports default settings from
        the process environment, in order to make scripting easier.
 
+       Portability: INSTALL.sh now systematically skips over CVS,
+       RCS and SCCS cruft.
+
        Portability: another fix for NEXTSTEP (Masaki MURASE).
        File: util/spawn_command.h.
+
+20000920
+
+       Cleanup: in a transport table entry, do not ignore port
+       numbers specified as [host]:port. In fact, this is now
+       becoming the preferred form, in order to avoid parsing
+       problems with IPV6 addresses. Postfix supports both forms
+       for a while but prints a warning for the old form. Problem
+       reported by Claus Fischer @ werhats.at
+
+       Bugfix: missing initialization for state->sasl_method can
+       cause permit_sasl_authenticated to always succeed.  Report
+       and fix by Lutz Jaenicke @ aet.TU-Cottbus.DE.
+
+       FAQ: added notes about how to delete, copy or restore queue
+       files in a safe manner.
index 5a92053cfbfcbf6d7f25b56e0e4a76ce85b36860..f166e00c648b1d84d3c2f7058203a2e0ee5b4366 100644 (file)
@@ -1,14 +1,29 @@
 Incompatible changes with snapshot-20000919
 ===========================================
 
-The queue manager to delivery agent protocol has changed. This does
-not affect the format of queue files, but means that you cannot
-use this software with queue managers or delivery agents of prior
-Postfix versions.
-
-Change in address rewriting: Errors-To:, Reply-To: and Return-Receipt:
+The notation of [host:port] in transport tables etc. is going away
+but it is still supported. The preferred form is now [host]:port.
+This change is necessary to support IPV6 address forms which use
+":" as part of the numeric IP address. In a future release, Postfix
+will log a warning message when it encounters the [host:port] form.
+
+After "make install" you need to "postfix reload".  The protocol
+between queue manager and delivery agent protocol has changed. This
+does not affect the format of existing queue files, you just cannot
+mix this Postfix version with queue managers or delivery agents
+from prior Postfix versions.
+
+In mail headers, Errors-To:, Reply-To: and Return-Receipt:  addresses
 are now rewritten as a sender address (was: recipient).
 
+Postfix no longer inserts Sender: message headers.
+
+The queue manager now logs the original number of recipients when
+opening queue file.
+
+The local delivery agent no longer appends a blank line when
+delivering to command.
+
 Major changes with snapshot-20000919
 ====================================
 
@@ -16,10 +31,12 @@ Postfix now strips out the Content-Length: header to avoid confusion
 with mail user agents.
 
 The header_checks and body_checks features can now be used to strip
-out unwanted data. Specify IGNORE and the data will go disappear.
+out unwanted data. Specify IGNORE and the data will disappear.
+
+Specify "test_home_directory = yes" to prevent mail from being
+delivered to a user whose home directory is not mounted.
 
-Postfix no longer inserts a Sender: message header when the 
-From: address differs from the envelope sender address.
+The pipe mailer has a size limit (size=nnn) command-line argument.
 
 Incompatible changes with snapshot-20000625 (never released)
 ===========================================
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 5ff5475b7ba12b42552e8c3eb216ddac1873e3f4..78bcfa1a9573dd3c22a990c1dbecc6a3e9a2df41 100644 (file)
@@ -353,7 +353,7 @@ int     bounce_notify_service(char *service, char *queue_name,
      * Unique string for multi-part message boundaries.
      */
     vstring_sprintf(boundary, "%s.%ld/%s",
-                   queue_id, event_time(), var_myhostname);
+                   queue_id, (long) event_time(), var_myhostname);
 
 #define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 #define NULL_CLEANUP_FLAGS     0
index 71102e56c2ef7b796b1c4cb94a59c54c3f793e85..2ff9cc0c5f5df17140865ea18272a59314d3f00c 100644 (file)
@@ -335,7 +335,7 @@ int     bounce_recip_service(char *service, char *queue_name, char *queue_id,
      * Unique string for multi-part message boundaries.
      */
     vstring_sprintf(boundary, "%s.%ld/%s",
-                   queue_id, event_time(), var_myhostname);
+                   queue_id, (long) event_time(), var_myhostname);
 
 #define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 #define NULL_CLEANUP_FLAGS     0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 151bbb15402b7404eb6438e386f883eee2e32c1b..20a4c1cf5a2b073d8dd85a9ccc5fdb2a9e2a69e1 100644 (file)
@@ -320,7 +320,6 @@ static void cleanup_missing_headers(CLEANUP_STATE *state)
     char    time_stamp[1024];          /* XXX locale dependent? */
     struct tm *tp;
     TOK822 *token;
-    char   *from;
 
     /*
      * Add a missing (Resent-)Message-Id: header. The message ID gives the
index a596d799cee13990fd36d2b0716ad8bce0905285..37c2169ab471d989220427e44334f29b14d7a05f 100644 (file)
 # 
 #        Normally, the table serves as input to the postmap(1) com-
 #        mand.  The result, an indexed file in dbm or db format, is
-#        used for fast searching  by  the  mail  system.  After  an
-#        update  it  may  take  a  minute  or  so before the change
-#        becomes visible.  Issue a postfix reload command to elimi-
-#        nate the delay.
+#        used for fast searching by the mail  system.  Execute  the
+#        command  postmap  /etc/postfix/access  in order to rebuild
+#        the indexed file after changing the access table.
 # 
-#        When  the  table  is provided via other means such as NIS,
-#        LDAP or SQL, the same lookups are  done  as  for  ordinary
+#        When the table is provided via other means  such  as  NIS,
+#        LDAP  or  SQL,  the  same lookups are done as for ordinary
 #        indexed files.
 # 
-#        Alternatively,  the  table  can  be provided as a regular-
+#        Alternatively, the table can be  provided  as  a  regular-
 #        expression map where patterns are given as regular expres-
-#        sions.  In  that  case, the lookups are done in a slightly
+#        sions. In that case, the lookups are done  in  a  slightly
 #        different way as described below.
 # 
 # TABLE FORMAT
 #        The format of the access table is as follows:
 # 
 #        blanks and comments
-#               Blank lines are ignored,  as  are  lines  beginning
+#               Blank  lines  are  ignored,  as are lines beginning
 #               with `#'.
 # 
 #        pattern action
 # 
 # PATTERNS
 #        With lookups from indexed files such as DB or DBM, or from
-#        networked  tables  such  as NIS, LDAP or SQL, patterns are
+#        networked tables such as NIS, LDAP or  SQL,  patterns  are
 #        tried in the order as listed below:
 # 
 #        user@domain
 #               Matches the specified mail address.
 # 
 #        domain.name
-#               Matches the domain.name itself  and  any  subdomain
-#               thereof,  either in hostnames or in mail addresses.
+#               Matches  the  domain.name  itself and any subdomain
+#               thereof, either in hostnames or in mail  addresses.
 #               Top-level domains will never be matched.
 # 
-#        user@  Matches all mail addresses with the specified  user
+#        user@  Matches  all mail addresses with the specified user
 #               part.
 # 
 #                                                                 1
 # 
 #        net.work
 # 
-#        net    Matches  any host address in the specified network.
-#               A network address is a  sequence  of  one  or  more
+#        net    Matches any host address in the specified  network.
+#               A  network  address  is  a  sequence of one or more
 #               octets separated by ".".
 # 
 # ACTIONS
 #        [45]XX text
-#               Reject  the  address etc. that matches the pattern,
+#               Reject the address etc. that matches  the  pattern,
 #               and respond with the numerical code and text.
 # 
 #        REJECT Reject the address etc. that matches the pattern. A
 #               Accept the address etc. that matches the pattern.
 # 
 # REGULAR EXPRESSION TABLES
-#        This  section  describes how the table lookups change when
+#        This section describes how the table lookups  change  when
 #        the table is given in the form of regular expressions. For
-#        a  description  of regular expression lookup table syntax,
+#        a description of regular expression lookup  table  syntax,
 #        see regexp_table(5) or pcre_table(5).
 # 
-#        Each pattern is a regular expression that  is  applied  to
+#        Each  pattern  is  a regular expression that is applied to
 #        the entire string being looked up. Depending on the appli-
-#        cation, that string  is  an  entire  client  hostname,  an
+#        cation,  that  string  is  an  entire  client hostname, an
 #        entire client IP address, or an entire mail address. Thus,
-#        no parent domain or parent network  search  is  done,  and
-#        user@domain  mail  addresses  are not broken up into their
+#        no  parent  domain  or  parent network search is done, and
+#        user@domain mail addresses are not broken  up  into  their
 #        user@ and domain constituent parts.
 # 
-#        Patterns are applied in the  order  as  specified  in  the
-#        table,  until  a  pattern is found that matches the search
+#        Patterns  are  applied  in  the  order as specified in the
+#        table, until a pattern is found that  matches  the  search
 #        string.
 # 
-#        Actions are the same as with normal indexed file  lookups,
-#        with  the additional feature that parenthesized substrings
-#        from the pattern can be interpolated as $1, $2 and so  on.
+#        Actions  are the same as with normal indexed file lookups,
+#        with the additional feature that parenthesized  substrings
+#        from  the pattern can be interpolated as $1, $2 and so on.
 # 
 # BUGS
-#        The  table format does not understand quoting conventions.
+#        The table format does not understand quoting  conventions.
 # 
 # SEE ALSO
 #        postmap(1) create mapping table
 # ACCESS(5)                                               ACCESS(5)
 # 
 # LICENSE
-#        The Secure Mailer license must be  distributed  with  this
+#        The  Secure  Mailer  license must be distributed with this
 #        software.
 # 
 # AUTHOR(S)
index d5a59cbaeba9ef9357f3ced09b7748210f8a7335..cdf06c1fbdb06a0b7f13bc6c3c7b1692f11ed715 100644 (file)
@@ -39,7 +39,7 @@ decode:               root
 #        aliases - format of the Postfix alias database
 # 
 # SYNOPSIS
-#        postalias [-c config_dir] [-v] [file_type:]input_file
+#        newaliases
 # 
 # DESCRIPTION
 #        The aliases file provides a system-wide mechanism to redi-
@@ -47,9 +47,9 @@ decode:               root
 # 
 #        The file serves as input to the postalias(1) command.  The
 #        result,  an  indexed file in dbm or db format, is used for
-#        fast lookup by the mail system. After  an  update  it  may
-#        take  a  minute  or  so before the change becomes visible.
-#        Issue a postfix reload command to eliminate the delay.
+#        fast lookup  by  the  mail  system.  Execute  the  command
+#        newaliases  in  order  to  rebuild  the indexed file after
+#        changing the Postfix alias database.
 # 
 #        The input and output file formats are expected to be  com-
 #        patible  with  Sendmail  version 8, and are expected to be
index cd451828da546f37522c644e8f5225d002f6e400..fc3083cecf3fd9abde902bfc50b5f8ff634e4e78 100644 (file)
 # 
 #        Normally, the file serves as input to the postmap(1)  com-
 #        mand.  The result, an indexed file in dbm or db format, is
-#        used for fast searching  by  the  mail  system.  After  an
-#        update  it  may  take  a  minute  or  so before the change
-#        becomes visible.  Issue a postfix reload command to elimi-
-#        nate the delay.
+#        used for fast searching by the mail  system.  Execute  the
+#        command postmap /etc/postfix/canonical in order to rebuild
+#        the indexed file after changing the canonical table.
 # 
-#        When  the  table  is provided via other means such as NIS,
-#        LDAP or SQL, the same lookups are  done  as  for  ordinary
+#        When the table is provided via other means  such  as  NIS,
+#        LDAP  or  SQL,  the  same lookups are done as for ordinary
 #        indexed files.
 # 
-#        Alternatively,  the  table  can  be provided as a regular-
+#        Alternatively, the table can be  provided  as  a  regular-
 #        expression map where patterns are given as regular expres-
-#        sions.  In  that  case, the lookups are done in a slightly
+#        sions. In that case, the lookups are done  in  a  slightly
 #        different way as described below.
 # 
-#        The  canonical  mapping  affects   both   message   header
+#        The   canonical   mapping   affects  both  message  header
 #        addresses (i.e. addresses that appear inside messages) and
-#        message envelope addresses  (for  example,  the  addresses
-#        that  are  used in SMTP protocol commands). Think Sendmail
+#        message  envelope  addresses  (for  example, the addresses
+#        that are used in SMTP protocol commands).  Think  Sendmail
 #        rule set S3, if you like.
 # 
-#        Typically, one would use the canonical  table  to  replace
-#        login   names   by  Firstname.Lastname,  or  to  clean  up
+#        Typically,  one  would  use the canonical table to replace
+#        login  names  by  Firstname.Lastname,  or  to   clean   up
 #        addresses produced by legacy mail systems.
 # 
-#        The canonical mapping is not to be confused  with  virtual
+#        The  canonical  mapping is not to be confused with virtual
 #        domain support. Use the virtual(5) map for that purpose.
 # 
-#        The  canonical  mapping  is  not to be confused with local
+#        The canonical mapping is not to  be  confused  with  local
 #        aliasing.  Use the aliases(5) map for that purpose.
 # 
 # TABLE FORMAT
 #        The format of the canonical table is as follows:
 # 
 #        blanks and comments
-#               Blank lines are ignored,  as  are  lines  beginning
+#               Blank  lines  are  ignored,  as are lines beginning
 #               with `#'.
 # 
 #        pattern result
-#               When  pattern matches a mail address, replace it by
+#               When pattern matches a mail address, replace it  by
 #               the corresponding result.
 # 
+#        With lookups from indexed files such as DB or DBM, or from
+# 
 #                                                                 1
 # 
 # CANONICAL(5)                                         CANONICAL(5)
 # 
-#        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
-#        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,
+#        Results  are the same as with normal indexed file lookups,
+#        with the additional feature that parenthesized  substrings
 # 
 #                                                                 2
 # 
 # CANONICAL(5)                                         CANONICAL(5)
 # 
-#        with  the additional feature that parenthesized substrings
-#        from the pattern can be interpolated as $1, $2 and so  on.
+#        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_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
 # CANONICAL(5)                                         CANONICAL(5)
 # 
 # LICENSE
-#        The  Secure  Mailer  license must be distributed with this
+#        The Secure Mailer license must be  distributed  with  this
 #        software.
 # 
 # AUTHOR(S)
index e9be1a0ef1c8e90a176f266d4151a09c0e79e9a6..832b8c5ae7767d1e00aae669ea1f0c2f8ca7663c 100644 (file)
@@ -14,9 +14,9 @@
 # 
 #        Normally,  the file serves as input to the postmap(1) com-
 #        mand.  The result, an indexed file in dbm or db format, is
-#        used  for  fast  searching  by  the  mail system. After an
-#        update issue a postfix reload command to make  the  change
-#        visible.
+#        used  for  fast  searching by the mail system. Execute the
+#        command postmap /etc/postfix/relocated in order to rebuild
+#        the indexed file after changing the relocated table.
 # 
 #        When  the  table  is provided via other means such as NIS,
 #        LDAP or SQL, the same lookups are  done  as  for  ordinary
index 99d809c668ff030cbcc0c75915a73508452a2506..f2b5ff4a052373a1b854b7744ed635b86dcbc0dc 100644 (file)
@@ -245,9 +245,9 @@ recipient_delimiter =
 # internal DNS uses no MX records, specify the name of the intranet
 # gateway host instead.
 #
-# Specify a domain, host, host:port, [address] or [address:port].
-# Use the form [destination] to turn off MX lookups. See also the
-# default_transport parameter if you're connected via UUCP.
+# Specify a domain, host, host:port, [host]:port, [address] or
+# [address]:port.  Use the form [name] to turn off MX lookups. See
+# also the default_transport parameter if you're connected via UUCP.
 #
 # relayhost = $mydomain
 # relayhost = gateway.my.domain
index caafa50f5a70cb335cf3b8aba63b78a3d93b5cab..072efb3f03f70b7d0714136470a641278510b0f6 100644 (file)
@@ -15,9 +15,9 @@
 # 
 #        Normally, the file serves as input to the postmap(1)  com-
 #        mand.  The result, an indexed file in dbm or db format, is
-#        used for fast searching by the mail system. After updating
-#        this  table,  issue the postfix reload command to make the
-#        change visible.
+#        used for fast searching by the mail  system.  Execute  the
+#        command postmap /etc/postfix/transport in order to rebuild
+#        the indexed file after changing the transport table.
 # 
 #        When the table is provided via other means  such  as  NIS,
 #        LDAP  or  SQL,  the  same lookups are done as for ordinary
 # 
 #        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
+#        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 the uucp transport to the UUCP host named foo:
+#        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 time:
+#        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 its
-#        subdomains to host gateway.foo.org:
+#        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 machine.
+#        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
-#        hostname:service instead of just a 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 destination in order to disable MX lookups.
+#        This directs mail for user@foo.org to  host  bar.org  port
+#        2025.  Instead  of a numerical port a symbolic name may be
+#        used. Specify [] around the hostname in order  to  disable
+#        MX lookups.
 # 
 #        The error mailer can be used to bounce mail:
 # 
-#             .foo.org      error:mail for *.foo.org is not deliverable
-# 
-#        This causes all mail for user@anythingfoo.org
-#        to be bounced.
+#             .foo.org       error:mail for *.foo.org is not deliv-
+#        erable
 # 
 #                                                                 2
 # 
 # TRANSPORT(5)                                         TRANSPORT(5)
 # 
+#        This causes  all  mail  for  user@anything.foo.org  to  be
+#        bounced.
+# 
 # REGULAR EXPRESSION TABLES
-#        This section describes how the table lookups  change  when
+#        This  section  describes how the table lookups change when
 #        the table is given in the form of regular expressions. For
-#        a description of regular expression lookup  table  syntax,
+#        a  description  of regular expression lookup table syntax,
 #        see regexp_table(5) or pcre_table(5).
 # 
-#        Each  pattern  is  a regular expression that is applied to
+#        Each pattern is a regular expression that  is  applied  to
 #        the entire domain being looked up. Thus, some.domain.hier-
 #        archy is not broken up into parent domains.
 # 
-#        Patterns  are  applied  in  the  order as specified in the
-#        table, until a pattern is found that  matches  the  search
+#        Patterns are applied in the  order  as  specified  in  the
+#        table,  until  a  pattern is found that matches the search
 #        string.
 # 
-#        Results  are the same as with normal indexed file lookups,
-#        with the additional feature that parenthesized  substrings
-#        from  the pattern can be interpolated as $1, $2 and so on.
+#        Results are the same as with normal indexed file  lookups,
+#        with  the additional feature that parenthesized substrings
+#        from the pattern can be interpolated as $1, $2 and so  on.
 # 
 # CONFIGURATION PARAMETERS
-#        The following main.cf parameters are  especially  relevant
-#        to  this  topic.  See  the Postfix main.cf file for syntax
-#        details and for default values.  Use  the  postfix  reload
+#        The  following  main.cf parameters are especially relevant
+#        to this topic. See the Postfix  main.cf  file  for  syntax
+#        details  and  for  default  values. Use the postfix reload
 #        command after a configuration change.
 # 
 #        transport_maps
 #        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
 #        regexp_table(5) format of POSIX regular expression tables
 # 
 # LICENSE
-#        The  Secure  Mailer  license must be distributed with this
+#        The Secure Mailer license must be  distributed  with  this
 #        software.
 # 
 # AUTHOR(S)
 #        Wietse Venema
 #        IBM T.J. Watson Research
 #        P.O. Box 704
-#        Yorktown Heights, NY 10598, USA
 # 
 #                                                                 3
 # 
+# TRANSPORT(5)                                         TRANSPORT(5)
+# 
+#        Yorktown Heights, NY 10598, USA
+# 
+#                                                                 4
+# 
index 57b64b3cb5de875d735cead351ccaaeb32c5faec..9d3fef76dde928b757315a666b642c1f53949232 100644 (file)
 # 
 #        Normally, the file serves as input to the postmap(1)  com-
 #        mand.  The result, an indexed file in dbm or db format, is
-#        used for fast searching  by  the  mail  system.  After  an
-#        update  it  may  take  a  minute  or  so before the change
-#        becomes visible.  Issue a postfix reload command to elimi-
-#        nate the delay.
+#        used for fast searching by the mail  system.  Execute  the
+#        command  postmap  /etc/postfix/virtual in order to rebuild
+#        the indexed file after changing the virtual table.
 # 
-#        When  the  table  is provided via other means such as NIS,
-#        LDAP or SQL, the same lookups are  done  as  for  ordinary
+#        When the table is provided via other means  such  as  NIS,
+#        LDAP  or  SQL,  the  same lookups are done as for ordinary
 #        indexed files.
 # 
-#        Alternatively,  the  table  can  be provided as a regular-
+#        Alternatively, the table can be  provided  as  a  regular-
 #        expression map where patterns are given as regular expres-
-#        sions.  In  that  case, the lookups are done in a slightly
+#        sions. In that case, the lookups are done  in  a  slightly
 #        different way as described below.
 # 
 # TABLE FORMAT
-#        Typical support for a virtual domain looks like  the  fol-
+#        Typical  support  for a virtual domain looks like the fol-
 #        lowing:
 # 
 #            virtual.domain       anything (right-hand content does not matter)
+#            postmaster@virtual.domain    postmaster
 #            user1@virtual.domain address1
 #            user2@virtual.domain address2, address3
 # 
 #        With this, the SMTP server accepts mail for virtual.domain
-#        and rejects mail for unknown@virtual.domain as  undeliver-
+#        and  rejects mail for unknown@virtual.domain as undeliver-
 #        able.
 # 
-#        The  format  of  the virtual table is as follows, mappings
+#        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
+#               Blank  lines  are  ignored,  as are lines beginning
 #               with `#'.
 # 
 #                                                                 1
 # VIRTUAL(5)                                             VIRTUAL(5)
 # 
 #        pattern result
-#               When  pattern matches a mail address, replace it by
+#               When pattern matches a mail address, replace it  by
 #               the corresponding result.
 # 
 #        With lookups from indexed files such as DB or DBM, or from
-#        networked  tables  such  as NIS, LDAP or SQL, patterns are
+#        networked tables such as NIS, LDAP or  SQL,  patterns  are
 #        tried in the order as listed below:
 # 
 #        user@domain address, address, ...
-#               Mail for  user@domain  is  redirected  to  address.
+#               Mail  for  user@domain  is  redirected  to address.
 #               This form has the highest precedence.
 # 
 #        user address, address, ...
-#               Mail  for  user@site  is redirected to address when
-#               site is equal to $myorigin, when site is listed  in
+#               Mail for user@site is redirected  to  address  when
+#               site  is equal to $myorigin, when site is listed in
 #               $mydestination,   or   when   it   is   listed   in
 #               $inet_interfaces.
 # 
-#               This functionality overlaps with  functionality  of
+#               This  functionality  overlaps with functionality of
 #               the local alias(5) database. The difference is that
-#               virtual  mapping  can  be  applied   to   non-local
+#               virtual   mapping   can  be  applied  to  non-local
 #               addresses.
 # 
 #        @domain address, address, ...
-#               Mail  for  any  user  in  domain  is  redirected to
+#               Mail for  any  user  in  domain  is  redirected  to
 #               address.  This form has the lowest precedence.
 # 
-#        In all the above forms, when address has the form  @other-
-#        domain,  the result is the same user in otherdomain.  This
+#        In  all the above forms, when address has the form @other-
+#        domain, the result is the same user in otherdomain.   This
 #        works for the first address in the expansion only.
 # 
 # ADDRESS EXTENSION
-#        When the search fails, and the address localpart  contains
-#        the  optional recipient delimiter (e.g., user+foo@domain),
-#        the search is repeated for the  unextended  address  (e.g.
+#        When  the search fails, and the address localpart contains
+#        the optional recipient delimiter (e.g.,  user+foo@domain),
+#        the  search  is  repeated for the unextended address (e.g.
 #        user@domain), and the unmatched address extension is prop-
-#        agated to the result of expansion. The matching order  is:
+#        agated  to the result of expansion. The matching order is:
 #        user+foo@domain, user@domain, user+foo, user, and @domain.
 # 
 # REGULAR EXPRESSION TABLES
-#        This section describes how the table lookups  change  when
+#        This  section  describes how the table lookups change when
 #        the table is given in the form of regular expressions. For
-#        a description of regular expression lookup  table  syntax,
+#        a  description  of regular expression lookup table syntax,
 #        see regexp_table(5) or pcre_table(5).
 # 
-#        Each  pattern  is  a regular expression that is applied to
+#        Each pattern is a regular expression that  is  applied  to
 #        the entire address being looked up. Thus, user@domain mail
-#        addresses  are  not  broken up into their user and @domain
+#        addresses are not broken up into their  user  and  @domain
 #        constituent parts, nor is user+foo broken up into user and
 #        foo.
 # 
-#        Patterns  are  applied  in  the  order as specified in the
-#        table, until a pattern is found that  matches  the  search
+#        Patterns are applied in the  order  as  specified  in  the
+#        table,  until  a  pattern is found that matches the search
 #        string.
 # 
 #                                                                 2
 # 
 # VIRTUAL(5)                                             VIRTUAL(5)
 # 
-#        Results  are the same as with normal indexed file lookups,
-#        with the additional feature that parenthesized  substrings
-#        from  the pattern can be interpolated as $1, $2 and so on.
+#        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)
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 9824971a9a03a46d42c6f0d89481915cef7d7817..8f9ffb25359df67ecb579a074295d41b10d6eb80 100644 (file)
@@ -97,14 +97,14 @@ int     mail_open_ok(const char *queue_name, const char *queue_id,
        return (MAIL_OPEN_NO);
     }
     if (!S_ISREG(statp->st_mode)) {
-       msg_warn("%s: uid %d: not a regular file", *path, statp->st_uid);
+       msg_warn("%s: uid %ld: not a regular file", *path, (long) statp->st_uid);
        return (MAIL_OPEN_NO);
     }
     if ((statp->st_mode & S_IRWXU) != MAIL_QUEUE_STAT_READY)
        return (MAIL_OPEN_NO);
     if (statp->st_nlink > 1) {
-       msg_warn("%s: uid %d: file has %d links", *path,
-                statp->st_uid, (int) statp->st_nlink);
+       msg_warn("%s: uid %ld: file has %d links", *path,
+                (long) statp->st_uid, (int) statp->st_nlink);
     }
     return (MAIL_OPEN_YES);
 }
index 24ecdf6830dae12727df151c32c8ecd45f93a82e..f54d6f5681f6aac7bdcafa189d1753e0384721ec 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20000919"
+#define DEF_MAIL_VERSION       "Snapshot-20000920"
 extern char *var_mail_version;
 
 /* LICENSE
index 2d4d47e0aa1166b5c3f6e969a085fce9e361c382..afaeaefe06d972377f64ac91d11fdaf3e3192eb6 100644 (file)
@@ -46,6 +46,8 @@
 
 <li><a href="#other_transports">Other transports: UUCP, FAX, etc.</a>
 
+<li><a href="#queue_maint">Postfix queue maintenance</a>
+
 <li><a href="#compiling_installing">Compiling and installing Postfix</a>
 
 </ul>
@@ -103,6 +105,8 @@ distribution list</a>
 
 <li><a href="#incoming">Too much mail in the incoming queue</a>
 
+<li><a href="#delay">Postfix responds slowly to incoming SMTP connections</a>
+
 </ul>
 
 <a name="receiving"><h3>Receiving mail via the network</h3>
@@ -241,6 +245,16 @@ mailbox</a>
 
 </ul>
 
+<a name="queue_maint"><h3>Postfix queue maintenance</h3></a>
+
+<ul>
+
+<li><a href="#deleting">Deleting a message from the Postfix queue</a>
+
+<li><a href="#copying">Moving or restoring the Postfix queue</a>
+
+</ul>
+
 <a name="compiling_installing"><h3>Compiling and installing Postfix</h3>
 
 <ul>
@@ -805,10 +819,10 @@ clients?
 
 <p>
 
-Your problem is that the disk is saturated with I/O from receiving
-mail, so that the Postfix queue manager gets insufficient chance
-to process the requests (many SMTP server processes against one
-poor queue manager).
+Your problem could be that the disk is saturated with I/O from
+receiving mail, so that the Postfix queue manager gets insufficient
+chance to process the requests (many SMTP server processes are
+competing for disk access against one poor queue manager).
 
 <p>
 
@@ -844,6 +858,7 @@ depending on the interface that it is supposed to handle.
 <p>
 
 <pre>
+    queue_directory = /my/own/queue/directory
     myhostname = foo1.my.domain
     inet_interfaces = $myhostname
 </pre>
@@ -2433,6 +2448,82 @@ Note: be sure to not advertise <b>fax.your.domain</b> in the DNS...
 
 <hr>
 
+<a name="deleting"><h3>Deleting a message from the Postfix queue</h3></a>
+
+To delete ONE message with queue id ABCDEF from the Postfix queue,
+it is not necessary to stop Postfix.
+
+<p>
+
+<pre>
+    # cd /var/spool/postfix
+    # find incoming active deferred -name ABCDEF -print | sed 1q | xargs rm
+</pre>
+
+<p>
+
+The above command is safe because it deletes at most one file.
+There is no risk of deleting newly arrived mail that happens to get
+the same queue file name.
+
+<p>
+
+If you have to delete a large amount of mail, it is safer to stop
+Postfix first.
+
+<p>
+<pre>
+    # postfix stop
+    # cd /var/spool/postfix
+    # find incoming active deferred defer -type f -print |
+       fgrep -xf /file/with/queue-ids | xargs rm
+    # postfix start
+</pre>
+
+<p>
+
+Do not use the above command on a running Postfix system, because
+it can delete files that belong to new mail that arrives while you
+are deleting queue files.
+
+<hr>
+
+<a name="copying"><h3>Moving or restoring the Postfix queue</h3></a>
+
+It is not safe to simply copy Postfix queue files from one file
+system (or backup) to another file system. The reason for this is
+that queue file names must be unique across the Postfix <b>incoming</b>,
+<b>active</b> and <b>deferred</b> queue directories.  If two queue
+files have the same file (base) name, then one of the queue files
+may be lost as files are moved from queue directory to queue
+directory.
+
+<p>
+
+Postfix names a queue file after its inode number and after the
+microsecond part of the time of day.  Thus, if a queue file has a
+name based on someone elses inode number there is a small chance
+that the file name will collide with another queue file.
+
+<p>
+
+To avoid queue file name collisions when copying queue files,
+restore queue files in the maildrop directory instead.
+
+<p>
+<pre>
+    # postfix stop
+    ... restore queue files under the maildrop directory...
+    # postfix start
+</pre>
+
+<p>
+
+When Postfix is started, it will pick up queue files from the
+maildrop directory and will give them proper queue file names.
+
+<hr>
+
 <a name="bind"><h3>Undefined symbols: ___dn_expand, ___res_init etc.</h3></a>
 
 Question: When I build Postfix I get the following errors:
index 31c595d35377478395c63065a3b5a15aa0c6b2e2..50afd33dccd683e237caa8d1c5ba50c455da1017 100644 (file)
@@ -78,7 +78,7 @@ TRANSPORT(5)                                         TRANSPORT(5)
 
        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
+       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.
@@ -118,8 +118,8 @@ TRANSPORT(5)                                         TRANSPORT(5)
 
        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 destination in order  to  dis-
-       able MX lookups.
+       used. Specify [] around the hostname in order  to  disable
+       MX lookups.
 
        The error mailer can be used to bounce mail:
 
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index a261497b03f08c6f51c9f517fa42d2032b7e687d..6e5a215bdf71b2ab4ec94ef3bec0df0e32fd5c4f 100644 (file)
@@ -102,7 +102,7 @@ int     deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, char *command)
      * 
      * Skip this command if it was already delivered to as this user.
      */
-    if (been_here(state.dup_filter, "command %d %s", usr_attr.uid, command))
+    if (been_here(state.dup_filter, "command %ld %s", (long) usr_attr.uid, command))
        return (0);
 
     /*
index e3131d3f800e3e3b9b6e85c4595dba13da9cb202..6d0890fb2fcff9ce8510d68d60ef0174afa82005 100644 (file)
@@ -219,7 +219,8 @@ int     deliver_dotforward(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp)
            if (S_ISREG(st.st_mode) == 0) {
                msg_warn("file %s is not a regular file", STR(path));
            } else if (st.st_uid != 0 && st.st_uid != usr_attr.uid) {
-               msg_warn("file %s has bad owner uid %d", STR(path), st.st_uid);
+               msg_warn("file %s has bad owner uid %ld",
+                        STR(path), (long) st.st_uid);
            } else if (st.st_mode & 002) {
                msg_warn("file %s is world writable", STR(path));
            } else if ((fd = open_as(STR(path), O_RDONLY, 0, usr_attr.uid, usr_attr.gid)) < 0) {
index 20933a2d9dc9551c8c20b04e4a8359e027feb16d..9da354453613a581a4eb0725606c5f922367c1af 100644 (file)
@@ -106,7 +106,7 @@ int     deliver_file(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
      * 
      * Skip this file if it was already delivered to as this user.
      */
-    if (been_here(state.dup_filter, "file %d %s", usr_attr.uid, path))
+    if (been_here(state.dup_filter, "file %ld %s", (long) usr_attr.uid, path))
        return (0);
 
     /*
@@ -138,7 +138,8 @@ int     deliver_file(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
      * Deliver. From here on, no early returns or we have a memory leak.
      */
     if (msg_verbose)
-       msg_info("deliver_file (%d,%d): %s", usr_attr.uid, usr_attr.gid, path);
+       msg_info("deliver_file (%ld,%ld): %s",
+                (long) usr_attr.uid, (long) usr_attr.gid, path);
     if (vstream_fseek(state.msg_attr.fp, state.msg_attr.offset, SEEK_SET) < 0)
        msg_fatal("seek queue file %s: %m", state.msg_attr.queue_id);
     why = vstring_alloc(100);
@@ -182,7 +183,7 @@ int     deliver_file(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
                              path, STR(why));
 #endif
     } else if (mail_copy(COPY_ATTR(state.msg_attr), dst, S_ISREG(st.st_mode) ?
-                     copy_flags : (copy_flags & ~MAIL_COPY_TOFILE), "\n", why)) {
+               copy_flags : (copy_flags & ~MAIL_COPY_TOFILE), "\n", why)) {
        status = defer_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
                              "cannot append destination file %s: %s",
                              path, STR(why));
index e5ac2179894e057fbf52224c927ff12ed539b959..0bac66ef95d75d6aefef966d69f6dffc43985a7c 100644 (file)
@@ -96,7 +96,7 @@ int     deliver_include(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
      * 
      * Don't process this include file more than once as this particular user.
      */
-    if (been_here(state.dup_filter, "include %d %s", usr_attr.uid, path))
+    if (been_here(state.dup_filter, "include %ld %s", (long) usr_attr.uid, path))
        return (0);
     state.msg_attr.exp_from = state.msg_attr.local;
 
@@ -140,7 +140,7 @@ int     deliver_include(LOCAL_STATE state, USER_ATTR usr_attr, char *path)
      */
     if (usr_attr.uid == 0) {
        if ((file_pwd = mypwuid(st.st_uid)) == 0) {
-           msg_warn("cannot find username for uid %d", st.st_uid);
+           msg_warn("cannot find username for uid %ld", (long) st.st_uid);
            return (defer_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
                             "%s: cannot find :include: file owner", path));
        }
index 51e0ac437b518742d22262c8bdb9c53645cc8320..a0d29314f5f687f632499c8b4f2f9b425223a523 100644 (file)
@@ -166,8 +166,9 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
        chown_gid = usr_attr.gid;
     }
     if (msg_verbose)
-       msg_info("spool_uid/gid %d/%d chown_uid/gid %d/%d",
-                spool_uid, spool_gid, chown_uid, chown_gid);
+       msg_info("spool_uid/gid %ld/%ld chown_uid/gid %ld/%ld",
+                (long) spool_uid, (long) spool_gid,
+                (long) chown_uid, (long) chown_gid);
 
     /*
      * Lock the mailbox and open/create the mailbox file. Depending on the
index 97cafb5642e79185051c91ea187f0331f3541894..df7ffde3c922a206e8b9b9c65309af2f513d57ed 100644 (file)
@@ -63,7 +63,7 @@ for example:
 
 The interpretation of the \fInexthop\fR field is transport
 dependent. In the case of SMTP, specify \fIhost\fR:\fIservice\fR for a
-non-default server port, and use [\fIhost\fR] or [\fIhost\fR:\fIport\fR]
+non-default server port, and use [\fIhost\fR] or [\fIhost\fR]:\fIport\fR
 in order to disable MX (mail exchanger) DNS lookups. The [] form
 can also be used with IP addresses instead of hostnames.
 .SH EXAMPLES
@@ -109,7 +109,7 @@ In the case of delivery via SMTP, one may specify
 
 This directs mail for \fIuser\fR@\fBfoo.org\fR to host \fBbar.org\fR
 port \fB2025\fR. Instead of a numerical port a symbolic name may be
-used. Specify [] around the destination in order to disable MX lookups.
+used. Specify [] around the hostname in order to disable MX lookups.
 
 The error mailer can be used to bounce mail:
 
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 5fbb816dfa66fee712b7105066d31c289803f23c..77b72cd02e46849c7017b6deb845f13f53cfb35b 100644 (file)
 -TPIPE_PARAMS
 -TPLMYSQL
 -TQMGR_ENTRY
+-TQMGR_JOB
 -TQMGR_MESSAGE
+-TQMGR_PEER
 -TQMGR_QUEUE
+-TQMGR_RCPT
 -TQMGR_RCPT_LIST
 -TQMGR_RECIPIENT
 -TQMGR_SCAN
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index e96126266398602a4318a2cddc23fc6e0bc949b0..d6631c0add856c4486dfd145a00d67c9cfa9bdf6 100644 (file)
@@ -55,7 +55,7 @@
 
 /* qmgr_bounce_recipient - bounce one message recipient */
 
-void    qmgr_bounce_recipient(QMGR_MESSAGE *message, QMGR_RCPT * recipient,
+void    qmgr_bounce_recipient(QMGR_MESSAGE *message, QMGR_RCPT *recipient,
                                      const char *format,...)
 {
     va_list ap;
index 9df7e74d8fde38886ff9818d3e0d233abce30beb..3fa16b8b20d799bf16ab30d8c215b57b87e0e154 100644 (file)
@@ -94,7 +94,7 @@
 
 /* qmgr_entry_select - select queue entry for delivery */
 
-QMGR_ENTRY *qmgr_entry_select(QMGR_PEER * peer)
+QMGR_ENTRY *qmgr_entry_select(QMGR_PEER *peer)
 {
     QMGR_ENTRY *entry;
     QMGR_QUEUE *queue;
@@ -211,7 +211,7 @@ void    qmgr_entry_done(QMGR_ENTRY *entry, int which)
 
 /* qmgr_entry_create - create queue todo entry */
 
-QMGR_ENTRY *qmgr_entry_create(QMGR_PEER * peer, QMGR_MESSAGE *message)
+QMGR_ENTRY *qmgr_entry_create(QMGR_PEER *peer, QMGR_MESSAGE *message)
 {
     QMGR_ENTRY *entry;
     QMGR_QUEUE *queue = peer->queue;
index d13c949124ff74894eb8fd8c091fb850a8efda76..3be930997c9efca59cfb3c6297002f24a63ee105 100644 (file)
@@ -114,7 +114,7 @@ static QMGR_JOB *qmgr_job_create(QMGR_MESSAGE *message, QMGR_TRANSPORT *transpor
 
 /* qmgr_job_link - append the job to the job list, according to the time it was queued */
 
-static void qmgr_job_link(QMGR_JOB * job)
+static void qmgr_job_link(QMGR_JOB *job)
 {
     QMGR_TRANSPORT *transport = job->transport;
     QMGR_MESSAGE *message = job->message;
@@ -244,7 +244,7 @@ QMGR_JOB *qmgr_job_obtain(QMGR_MESSAGE *message, QMGR_TRANSPORT *transport)
 
 /* qmgr_job_move_limits - move unused recipient slots to the next job */
 
-void    qmgr_job_move_limits(QMGR_JOB * job)
+void    qmgr_job_move_limits(QMGR_JOB *job)
 {
     QMGR_TRANSPORT *transport = job->transport;
     QMGR_MESSAGE *message = job->message;
@@ -290,7 +290,7 @@ void    qmgr_job_move_limits(QMGR_JOB * job)
 
 /* qmgr_job_retire - remove the job from the job list while waiting for recipients to deliver */
 
-static void qmgr_job_retire(QMGR_JOB * job)
+static void qmgr_job_retire(QMGR_JOB *job)
 {
     char   *myname = "qmgr_job_retire";
     QMGR_TRANSPORT *transport = job->transport;
@@ -327,7 +327,7 @@ static void qmgr_job_retire(QMGR_JOB * job)
 
 /* qmgr_job_free - release the job structure */
 
-void    qmgr_job_free(QMGR_JOB * job)
+void    qmgr_job_free(QMGR_JOB *job)
 {
     char   *myname = "qmgr_job_free";
     QMGR_MESSAGE *message = job->message;
@@ -376,7 +376,7 @@ void    qmgr_job_free(QMGR_JOB * job)
 
 /* qmgr_job_count_slots - maintain the delivery slot counters */
 
-static void qmgr_job_count_slots(QMGR_JOB * current, QMGR_JOB * job)
+static void qmgr_job_count_slots(QMGR_JOB *current, QMGR_JOB *job)
 {
 
     /*
@@ -412,7 +412,7 @@ static void qmgr_job_count_slots(QMGR_JOB * current, QMGR_JOB * job)
 
 /* qmgr_job_candidate - find best job candidate for preempting given job */
 
-static QMGR_JOB *qmgr_job_candidate(QMGR_JOB * current)
+static QMGR_JOB *qmgr_job_candidate(QMGR_JOB *current)
 {
     QMGR_TRANSPORT *transport = current->transport;
     QMGR_JOB *job,
@@ -487,7 +487,7 @@ static QMGR_JOB *qmgr_job_candidate(QMGR_JOB * current)
 
 /* qmgr_job_preempt - preempt large message with smaller one */
 
-static QMGR_JOB *qmgr_job_preempt(QMGR_JOB * current)
+static QMGR_JOB *qmgr_job_preempt(QMGR_JOB *current)
 {
     char   *myname = "qmgr_job_preempt";
     QMGR_TRANSPORT *transport = current->transport;
@@ -574,7 +574,7 @@ static QMGR_JOB *qmgr_job_preempt(QMGR_JOB * current)
 
 /* qmgr_job_pop - remove the job from the job preemption stack */
 
-static void qmgr_job_pop(QMGR_JOB * job)
+static void qmgr_job_pop(QMGR_JOB *job)
 {
     QMGR_TRANSPORT *transport = job->transport;
     QMGR_JOB *parent;
@@ -620,7 +620,7 @@ static void qmgr_job_pop(QMGR_JOB * job)
 
 /* qmgr_job_peer_select - select next peer suitable for delivery */
 
-static QMGR_PEER *qmgr_job_peer_select(QMGR_JOB * job)
+static QMGR_PEER *qmgr_job_peer_select(QMGR_JOB *job)
 {
     QMGR_PEER *peer;
     QMGR_MESSAGE *message = job->message;
index b445a6793df564772c9aacfb0bc464b86a8b01bc..1de7941b2dfb5b9bbef2ccbfa9f24721643250a2 100644 (file)
@@ -68,7 +68,7 @@
 
 /* qmgr_peer_create - create and initialize message peer structure */
 
-QMGR_PEER *qmgr_peer_create(QMGR_JOB * job, QMGR_QUEUE *queue)
+QMGR_PEER *qmgr_peer_create(QMGR_JOB *job, QMGR_QUEUE *queue)
 {
     QMGR_PEER *peer;
 
@@ -84,7 +84,7 @@ QMGR_PEER *qmgr_peer_create(QMGR_JOB * job, QMGR_QUEUE *queue)
 
 /* qmgr_peer_free - release peer structure */
 
-void    qmgr_peer_free(QMGR_PEER * peer)
+void    qmgr_peer_free(QMGR_PEER *peer)
 {
     QMGR_JOB *job = peer->job;
 
@@ -95,14 +95,14 @@ void    qmgr_peer_free(QMGR_PEER * peer)
 
 /* qmgr_peer_find - lookup peer associated with given job and queue */
 
-QMGR_PEER *qmgr_peer_find(QMGR_JOB * job, QMGR_QUEUE *queue)
+QMGR_PEER *qmgr_peer_find(QMGR_JOB *job, QMGR_QUEUE *queue)
 {
     return ((QMGR_PEER *) htable_find(job->peer_byname, queue->name));
 }
 
 /* qmgr_peer_select - select next peer suitable for delivery within given job */
 
-QMGR_PEER *qmgr_peer_select(QMGR_JOB * job)
+QMGR_PEER *qmgr_peer_select(QMGR_JOB *job)
 {
     QMGR_PEER *peer;
     QMGR_QUEUE *queue;
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 6a59c242877c701a6a943ce565663b59204fa0cf..2bb748dac532e96258a88871f1bda49db3bfd3b7 100644 (file)
@@ -137,8 +137,8 @@ typedef struct {
 
 static int file_read_error(PICKUP_INFO *info, int type)
 {
-    msg_warn("uid=%d: unexpected or malformed record type %d",
-            info->st.st_uid, type);
+    msg_warn("uid=%ld: unexpected or malformed record type %d",
+            (long) info->st.st_uid, type);
     return (REMOVE_MESSAGE_FILE);
 }
 
@@ -249,7 +249,8 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
     if ((status = copy_segment(qfile, cleanup, info, buf, REC_TYPE_ENVELOPE)) != 0)
        return (status);
     if (info->sender == 0) {
-       msg_warn("%s: uid=%d: no envelope sender", info->id, info->st.st_uid);
+       msg_warn("%s: uid=%ld: no envelope sender",
+                info->id, (long) info->st.st_uid);
        return (REMOVE_MESSAGE_FILE);
     }
     msg_info("%s: uid=%d from=<%s>", info->id,
@@ -266,8 +267,8 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
      * include the message file ownership, without revealing the login name.
      */
     rec_fputs(cleanup, REC_TYPE_MESG, "");
-    rec_fprintf(cleanup, REC_TYPE_NORM, "Received: by %s (%s, from userid %d)",
-               var_myhostname, var_mail_name, info->st.st_uid);
+    rec_fprintf(cleanup, REC_TYPE_NORM, "Received: by %s (%s, from userid %ld)",
+               var_myhostname, var_mail_name, (long) info->st.st_uid);
     rec_fprintf(cleanup, REC_TYPE_NORM, "\tid %s; %s", info->id,
                mail_date(info->st.st_mtime));
 
@@ -345,7 +346,7 @@ static int pickup_file(PICKUP_INFO *info)
     if (st.st_dev != info->st.st_dev
        || st.st_ino != info->st.st_ino
        || st.st_mode != info->st.st_mode) {
-       msg_warn("%s: uid %d: file has changed", info->path, st.st_uid);
+       msg_warn("%s: uid %ld: file has changed", info->path, (long) st.st_uid);
        return (REMOVE_MESSAGE_FILE);
     }
     qfile = vstream_fdopen(fd, O_RDONLY);
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index a06552cca8c4926708866386e50cb5cf115ac24d..c26a60737a17fa2c3e0b383c2854f6fd980c2506 100644 (file)
@@ -552,17 +552,17 @@ static void get_service_attr(PIPE_ATTR *attr, char **argv)
     if (attr->uid == var_owner_uid)
        msg_fatal("request to deliver as mail system owner");
     if (attr->gid == 0)
-       msg_fatal("request to use privileged group id %d", attr->gid);
+       msg_fatal("request to use privileged group id %ld", (long) attr->gid);
     if (attr->gid == var_owner_gid)
-       msg_fatal("request to use mail system owner group id %d", attr->gid);
+       msg_fatal("request to use mail system owner group id %ld", (long) attr->gid);
 
     /*
      * Give the poor tester a clue of what is going on.
      */
     if (msg_verbose)
-       msg_info("%s: uid %d, gid %d, flags %d, size %ld",
-                myname, attr->uid, attr->gid, attr->flags,
-                (long) attr->size_limit);
+       msg_info("%s: uid %ld, gid %ld, flags %d, size %ld",
+                myname, (long) attr->uid, (long) attr->gid,
+                attr->flags, (long) attr->size_limit);
 }
 
 /* eval_command_status - do something with command completion status */
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 297f4f0407adfc48afeefc215057707f576f1216..89907d040f2b761bc6b2d79a82f6a19439c3d8fc 100644 (file)
@@ -122,7 +122,7 @@ static void postdrop_cleanup(void)
      */
     if (postdrop_path) {
        if (remove(postdrop_path))
-           msg_warn("uid=%d: remove %s: %m", getuid(), postdrop_path);
+           msg_warn("uid=%ld: remove %s: %m", (long) getuid(), postdrop_path);
        else if (msg_verbose)
            msg_info("remove %s", postdrop_path);
        postdrop_path = 0;
@@ -249,7 +249,7 @@ int     main(int argc, char **argv)
        if (rec_type == REC_TYPE_EOF) {         /* request cancelled */
            mail_stream_cleanup(dst);
            if (remove(postdrop_path))
-               msg_warn("uid=%d: remove %s: %m", getuid(), postdrop_path);
+               msg_warn("uid=%ld: remove %s: %m", (long) getuid(), postdrop_path);
            else if (msg_verbose)
                msg_info("remove %s", postdrop_path);
            myfree(postdrop_path);
@@ -257,16 +257,16 @@ int     main(int argc, char **argv)
            exit(0);
        }
        if (rec_type == REC_TYPE_ERROR)
-           msg_fatal("uid=%d: malformed input", uid);
+           msg_fatal("uid=%ld: malformed input", (long) uid);
        if (rec_type == REC_TYPE_TIME)
            rec_fprintf(dst->stream, REC_TYPE_TIME, "%ld",
                        (long) time((time_t *) 0));
        if (strchr(*expected, rec_type) == 0)
-           msg_fatal("uid=%d: unexpected record type: %d", uid, rec_type);
+           msg_fatal("uid=%ld: unexpected record type: %d", (long) uid, rec_type);
        if (rec_type == **expected)
            expected++;
        if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0)
-           msg_fatal("uid=%d: queue file write error", uid);
+           msg_fatal("uid=%ld: queue file write error", (long) uid);
        if (rec_type == REC_TYPE_END)
            break;
     }
@@ -276,7 +276,7 @@ int     main(int argc, char **argv)
      * Finish the file.
      */
     if ((status = mail_stream_finish(dst)) != 0)
-       msg_fatal("uid=%d: %s", uid, cleanup_strerror(status));
+       msg_fatal("uid=%ld: %s", (long) uid, cleanup_strerror(status));
 
     /*
      * Disable deletion on fatal error before reporting success, so the file
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 81fd357333ecbccc79120b8f2ca429e27322d53a..e8b28bfc37148d049bef3074552d0690b9e1158c 100644 (file)
@@ -55,7 +55,7 @@
 #
 #      The interpretation of the \fInexthop\fR field is transport
 #      dependent. In the case of SMTP, specify \fIhost\fR:\fIservice\fR for a
-#      non-default server port, and use [\fIhost\fR] or [\fIhost\fR:\fIport\fR]
+#      non-default server port, and use [\fIhost\fR] or [\fIhost\fR]:\fIport\fR
 #      in order to disable MX (mail exchanger) DNS lookups. The [] form
 #      can also be used with IP addresses instead of hostnames.
 # EXAMPLES
@@ -99,7 +99,7 @@
 #
 #      This directs mail for \fIuser\fR@\fBfoo.org\fR to host \fBbar.org\fR
 #      port \fB2025\fR. Instead of a numerical port a symbolic name may be
-#      used. Specify [] around the destination in order to disable MX lookups.
+#      used. Specify [] around the hostname in order to disable MX lookups.
 #
 #      The error mailer can be used to bounce mail:
 #
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index c2167ce1955f4f0c1d228c902de2820fd8004d82..31f1a0e38f7078e0453c7ed2b2d492dbf6681e3b 100644 (file)
@@ -77,6 +77,7 @@
 #include <sys_defs.h>
 #include <sys/stat.h>
 #include <stdlib.h>
+#include <stdio.h>                     /* sscanf() */
 #include <fcntl.h>
 #include <errno.h>
 #include <unistd.h>
@@ -199,7 +200,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
     long    save_offset = message->rcpt_offset;        /* save a flag */
     char   *start;
     struct stat st;
-    int     nrcpt;
+    int     nrcpt = 0;
 
     /*
      * Initialize. No early returns or we have a memory leak.
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 311350544d82865e9e74f72f9c25022b8212760c..4863cd99c8525de907a8bbe53f38ed8c472ea704 100644 (file)
@@ -369,8 +369,8 @@ static void enqueue(const int flags, const char *sender, const char *full_name,
        postdrop_command = concatenate(var_command_dir, "/postdrop",
                              msg_verbose ? " -v" : (char *) 0, (char *) 0);
        if ((handle = mail_stream_command(postdrop_command)) == 0)
-           msg_fatal("%s(%d): unable to execute %s",
-                     saved_sender, uid, postdrop_command);
+           msg_fatal("%s(%ld): unable to execute %s",
+                     saved_sender, (long) uid, postdrop_command);
        myfree(postdrop_command);
     }
     dst = handle->stream;
@@ -399,8 +399,8 @@ static void enqueue(const int flags, const char *sender, const char *full_name,
                if (tp->type == TOK822_ADDR) {
                    tok822_internalize(buf, tp->head, TOK822_STR_DEFL);
                    if (REC_PUT_BUF(dst, REC_TYPE_RCPT, buf) < 0)
-                       msg_fatal("%s(%d): error writing queue file: %m",
-                                 saved_sender, uid);
+                       msg_fatal("%s(%ld): error writing queue file: %m",
+                                 saved_sender, (long) uid);
                }
            }
            tok822_free_tree(tree);
@@ -441,7 +441,8 @@ static void enqueue(const int flags, const char *sender, const char *full_name,
        if ((flags & SM_FLAG_AEOF) && VSTRING_LEN(buf) == 1 && *STR(buf) == '.')
            break;
        if (REC_PUT_BUF(dst, type, buf) < 0)
-           msg_fatal("%s(%d): error writing queue file: %m", saved_sender, uid);
+           msg_fatal("%s(%ld): error writing queue file: %m",
+                     saved_sender, (long) uid);
     }
 
     /*
@@ -462,9 +463,11 @@ static void enqueue(const int flags, const char *sender, const char *full_name,
      * handler from removing the file.
      */
     if (vstream_ferror(VSTREAM_IN))
-       msg_fatal("%s(%d): error reading input: %m", saved_sender, uid);
+       msg_fatal("%s(%ld): error reading input: %m",
+                 saved_sender, (long) uid);
     if ((status = mail_stream_finish(handle)) != 0)
-       msg_fatal("%s(%d): %s", saved_sender, uid, cleanup_strerror(status));
+       msg_fatal("%s(%ld): %s", saved_sender,
+                 (long) uid, cleanup_strerror(status));
     if (sendmail_path) {
        myfree(sendmail_path);
        sendmail_path = 0;
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index f3b2ab7a0b919aac7bac3603eead7991cc869851..a802f6215bfa3f0c86ebd273459c8dc4403f7e56 100644 (file)
@@ -30,7 +30,7 @@
 /*     appended, separated by a colon (":").
 /*
 /*     By default, the Internet domain name service is queried for mail
-/*     exchanger hosts. Quote the destination with `[' and `]' to
+/*     exchanger hosts. Quote the domain name with `[' and `]' to
 /*     suppress mail exchanger lookups.
 /*
 /*     Numerical address information should always be quoted with `[]'.
@@ -323,6 +323,7 @@ static char *smtp_parse_destination(char *destination, char *def_service,
     struct servent *sp;
     char   *protocol = "tcp";          /* XXX configurable? */
     unsigned port;
+    char   *cruft;
 
     if (msg_verbose)
        msg_info("smtp_parse_destination: %s %s", destination, def_service);
@@ -333,17 +334,30 @@ static char *smtp_parse_destination(char *destination, char *def_service,
      */
     if (*host == '[') {
        host++;
-       host[strcspn(host, "]")] = 0;
-    }
+       cruft = split_at(host, ']');
+    } else
+       cruft = 0;
 
     /*
      * Separate host and service information, or use the default service
      * specified by the caller. XXX the ":" character is used in the IPV6
-     * address notation, so using split_at_right() is not sufficient. We'd
-     * have to count the number of ":" instances.
+     * address notation, so we will have to deprecate the use of [host:port]
+     * in favor of [host]:port.
      */
-    if ((service = split_at_right(host, ':')) == 0)
-       service = def_service;
+    if (cruft && *cruft) {
+       if ((service = split_at_right(cruft, ':')) == 0)
+           service = def_service;
+    } else {
+       if ((service = split_at_right(host, ':')) == 0)
+           service = def_service;
+#if 0
+       else if (cruft) {
+           msg_warn("old-style address form: %s", destination);
+           msg_warn("support for [host:port] forms will go away");
+           msg_warn("specify [host]:port instead");
+       }
+#endif
+    }
     if (*service == 0)
        msg_fatal("empty service name: %s", destination);
     *hostp = host;
index a5e40392f2edf416e3c51ba9a04eaed4db825c6d..c6df7d3c40cc4d52c9f6c838b0d79819cee26a59 100644 (file)
@@ -397,7 +397,8 @@ int     smtp_sasl_authenticate(SMTP_STATE *state, VSTRING *why)
     if (clientoutlen > 0) {
        if (msg_verbose)
            msg_info("%s: %s: uncoded initial reply: %.*s",
-                 myname, state->session->namaddr, clientoutlen, clientout);
+                    myname, state->session->namaddr,
+                    (int) clientoutlen, clientout);
        enc_length = ENCODE64_LENGTH(clientoutlen) + 1;
        VSTRING_SPACE(state->sasl_encoded, enc_length);
        if (sasl_encode64(clientout, clientoutlen,
@@ -432,15 +433,15 @@ int     smtp_sasl_authenticate(SMTP_STATE *state, VSTRING *why)
        if (msg_verbose)
            msg_info("%s: %s: decoded challenge: %.*s",
                     myname, state->session->namaddr,
-                    enc_length, STR(state->sasl_decoded));
+                    (int) enc_length, STR(state->sasl_decoded));
        result = sasl_client_step((sasl_conn_t *) state->sasl_conn,
                                  STR(state->sasl_decoded), enc_length,
                            NO_SASL_INTERACTION, &clientout, &clientoutlen);
        if (result != SASL_OK && result != SASL_CONTINUE)
            msg_warn("SASL authentication failed to server %s: %s",
                     state->session->namaddr,
-                       sasl_errstring(result, NO_SASL_LANGLIST,
-                                      NO_SASL_OUTLANG));
+                    sasl_errstring(result, NO_SASL_LANGLIST,
+                                   NO_SASL_OUTLANG));
 
        /*
         * Send a client response.
@@ -448,7 +449,8 @@ int     smtp_sasl_authenticate(SMTP_STATE *state, VSTRING *why)
        if (clientoutlen > 0) {
            if (msg_verbose)
                msg_info("%s: %s: uncoded client response %.*s",
-                 myname, state->session->namaddr, clientoutlen, clientout);
+                        myname, state->session->namaddr,
+                        (int) clientoutlen, clientout);
            enc_length = ENCODE64_LENGTH(clientoutlen) + 1;
            VSTRING_SPACE(state->sasl_encoded, enc_length);
            if (sasl_encode64(clientout, clientoutlen,
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index e5089b46560b874687f03f91cf12ae38a9481aaa..37402f1922a20bd8c6ade9889913aadb7c6025ca 100644 (file)
@@ -1668,7 +1668,9 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
                         cpp[1], CHECK_RELAY_DOMAINS);
 #ifdef USE_SASL_AUTH
        } else if (strcasecmp(name, PERMIT_SASL_AUTH) == 0) {
-           status = permit_sasl_auth(state, SMTPD_CHECK_OK, SMTPD_CHECK_DUNNO);
+           if (var_smtpd_sasl_enable)
+               status = permit_sasl_auth(state,
+                                         SMTPD_CHECK_OK, SMTPD_CHECK_DUNNO);
 #endif
        } else if (strcasecmp(name, REJECT_UNKNOWN_RCPTDOM) == 0) {
            if (state->recipient)
index ee2fc55acc09683bc585ae61cbd8f33baaf76d37..ad77a524051d1072f15cd491a8a4969ad6bbb190 100644 (file)
@@ -322,7 +322,7 @@ char   *smtpd_sasl_authenticate(SMTPD_STATE *state,
         */
        if (msg_verbose)
            msg_info("%s: uncoded challenge: %.*s",
-                    myname, serveroutlen, serverout);
+                    myname, (int) serveroutlen, serverout);
        enc_length = ((serveroutlen + 2) / 3) * 4 + 1;
        VSTRING_SPACE(state->sasl_encoded, enc_length);
        if (sasl_encode64(serverout, serveroutlen, STR(state->sasl_encoded),
@@ -348,7 +348,7 @@ char   *smtpd_sasl_authenticate(SMTPD_STATE *state,
            return ("501 Error: malformed authentication response");
        if (msg_verbose)
            msg_info("%s: decoded response: %.*s",
-                    myname, dec_length, STR(state->sasl_decoded));
+                    myname, (int) dec_length, STR(state->sasl_decoded));
        result = sasl_server_step(state->sasl_conn, STR(state->sasl_decoded),
                            dec_length, &serverout, &serveroutlen, &errstr);
     }
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 428ec635cd942dc18ac25a0c0958ccaf586d3632..5c60409c1e842790aa1ff04b268ae5330dbad8ba 100644 (file)
@@ -210,16 +210,16 @@ static void get_service_attr(SPAWN_ATTR *attr, char *service, char **argv)
     if (attr->uid == var_owner_uid)
        msg_fatal("request to deliver as mail system owner");
     if (attr->gid == 0)
-       msg_fatal("request to use privileged group id %d", attr->gid);
+       msg_fatal("request to use privileged group id %ld", (long) attr->gid);
     if (attr->gid == var_owner_gid)
-       msg_fatal("request to use mail system owner group id %d", attr->gid);
+       msg_fatal("request to use mail system owner group id %ld", (long) attr->gid);
 
     /*
      * Give the poor tester a clue of what is going on.
      */
     if (msg_verbose)
-       msg_info("%s: uid %d, gid %d; time %d",
-                myname, attr->uid, attr->gid, attr->time_limit);
+       msg_info("%s: uid %ld, gid %ld; time %d",
+             myname, (long) attr->uid, (long) attr->gid, attr->time_limit);
 }
 
 /* spawn_service - perform service for client */
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index 65eb6bfa6d91782435eff5057d94e7ce5f79be0f..66016ed453ca6388e44916ff5712bbc15ee1a999 100644 (file)
@@ -9,7 +9,7 @@ msg_fatal       0       0
 msg_info       0       0
 msg_panic      0       0
 msg_warn       0       0
-opened 3       0
+opened         4       0
 post_mail_fprintf      1       0
 qmgr_message_bounce    2       0
 rec_fprintf    2       0
index c64c1b491642be8e0e9d2f78ee680579705dbd13..4a7660f45ce34ee80291620303e39e7ae8d29898 100644 (file)
@@ -56,7 +56,7 @@ void    chroot_uid(const char *root_dir, const char *user_name)
        uid = pwd->pw_uid;
        gid = pwd->pw_gid;
        if (setgid(gid) < 0)
-           msg_fatal("setgid(%d): %m", gid);
+           msg_fatal("setgid(%ld): %m", (long) gid);
        if (initgroups(user_name, gid) < 0)
            msg_fatal("initgroups: %m");
     }
@@ -76,7 +76,7 @@ void    chroot_uid(const char *root_dir, const char *user_name)
      */
     if (user_name != 0)
        if (setuid(uid) < 0)
-           msg_fatal("setuid(%d): %m", uid);
+           msg_fatal("setuid(%ld): %m", (long) uid);
 
     /*
      * Give the desperate developer a clue of what is happening.
index 69a4071e8a1e30faa1a7726a5fab96cbdd3a830f..1b57cfbb0f4956b5e21fd106aa9a8caf31cd9bba 100644 (file)
@@ -181,7 +181,9 @@ typedef struct {
 static DICT_OPEN_INFO dict_open_info[] = {
     "environ", dict_env_open,
     "unix", dict_unix_open,
+#if 0
     "tcp", dict_tcp_open,
+#endif
 #ifdef HAS_DBM
     "dbm", dict_dbm_open,
 #endif
index 20d9a45403d7b0fd378399e2e24d29e2b8995ea8..0b261de199df8abf62d923cffd97f133e68ea61c 100644 (file)
@@ -74,9 +74,10 @@ static const char *dict_unix_getpwnam(DICT *unused_dict, const char *key)
     } else {
        if (buf == 0)
            buf = vstring_alloc(10);
-       vstring_sprintf(buf, "%s:%s:%d:%d:%s:%s:%s",
-                    pwd->pw_name, pwd->pw_passwd, pwd->pw_uid, pwd->pw_gid,
-                       pwd->pw_gecos, pwd->pw_dir, pwd->pw_shell);
+       vstring_sprintf(buf, "%s:%s:%ld:%ld:%s:%s:%s",
+                       pwd->pw_name, pwd->pw_passwd, (long) pwd->pw_uid,
+                       (long) pwd->pw_gid, pwd->pw_gecos, pwd->pw_dir,
+                       pwd->pw_shell);
        return (vstring_str(buf));
     }
 }
@@ -96,8 +97,8 @@ static const char *dict_unix_getgrnam(DICT *unused_dict, const char *key)
     } else {
        if (buf == 0)
            buf = vstring_alloc(10);
-       vstring_sprintf(buf, "%s:%s:%d:",
-                       grp->gr_name, grp->gr_passwd, grp->gr_gid);
+       vstring_sprintf(buf, "%s:%s:%ld:",
+                       grp->gr_name, grp->gr_passwd, (long) grp->gr_gid);
        for (cpp = grp->gr_mem; *cpp; cpp++) {
            vstring_strcat(buf, *cpp);
            if (cpp[1])
index 54bca239712fe8a929590f2bc9a838eb50679c2a..9ab982ca064d532b998f6cab8e1dd877e3bf1f12 100644 (file)
@@ -46,15 +46,17 @@ int     main(int unused_argc, char **unused_argv)
     printf("Testing if the close-on-exec flag of file-descriptor 3 is set.\n");
     DO((res = fcntl(3, F_GETFD, 0)));
     if (res & 1)
-       printf("Yes, a newly dup2()ed file-descriptor has the close-on-exec "
-              "flag cloned.\n"
-              "THIS VIOLATES Posix1003.1 section 6.2.1.2 or 6.5.2.2!\n"
-              "You should #define DUP2_DUPS_CLOSE_ON_EXEC in sys_defs.h "
-              "for your OS.\n");
+       printf(
+"Yes, a newly dup2()ed file-descriptor has the close-on-exec \
+flag cloned.\n\
+THIS VIOLATES Posix1003.1 section 6.2.1.2 or 6.5.2.2!\n\
+You should #define DUP2_DUPS_CLOSE_ON_EXEC in sys_defs.h \
+for your OS.\n");
     else
-       printf("No, a newly dup2()ed file-descriptor has the close-on-exec "
-              "flag cleared.\n"
-          "This complies with Posix1003.1 section 6.2.1.2 and 6.5.2.2!\n");
+       printf(
+"No, a newly dup2()ed file-descriptor has the close-on-exec \
+flag cleared.\n\
+This complies with Posix1003.1 section 6.2.1.2 and 6.5.2.2!\n");
 
     return 0;
 }
index b86ca4ce38f4c5a66f34f84d91eaba865504df89..d89fa0e354ca7f82ef674705a1aa809f11a4772b 100644 (file)
@@ -47,11 +47,11 @@ void    set_eugid(uid_t euid, gid_t egid)
        if (seteuid(0))
            msg_fatal("set_eugid: seteuid(0): %m");
     if (setegid(egid) < 0)
-       msg_fatal("set_eugid: setegid(%d): %m", egid);
+       msg_fatal("set_eugid: setegid(%ld): %m", (long) egid);
     if (setgroups(1, &egid) < 0)
-       msg_fatal("set_eugid: setgroups(%d): %m", egid);
+       msg_fatal("set_eugid: setgroups(%ld): %m", (long) egid);
     if (euid != 0 && seteuid(euid) < 0)
-       msg_fatal("set_eugid: seteuid(%d): %m", euid);
+       msg_fatal("set_eugid: seteuid(%ld): %m", (long) euid);
     if (msg_verbose)
-       msg_info("set_eugid: euid %d egid %d", euid, egid);
+       msg_info("set_eugid: euid %ld egid %ld", (long) euid, (long) egid);
 }
index 5d70a8627748b3c1358133a2264b97ef0b9d90b0..7aae533a96e50113a66bbdb7d55e6773d1175b1d 100644 (file)
@@ -47,12 +47,11 @@ void    set_ugid(uid_t uid, gid_t gid)
        if (seteuid(0) < 0)
            msg_fatal("seteuid(0): %m");
     if (setgid(gid) < 0)
-       msg_fatal("setgid(%d): %m", gid);
+       msg_fatal("setgid(%ld): %m", (long) gid);
     if (setgroups(1, &gid) < 0)
-       msg_fatal("setgroups(1, &%d): %m", gid);
+       msg_fatal("setgroups(1, &%ld): %m", (long) gid);
     if (setuid(uid) < 0)
-       msg_fatal("setuid(%d): %m", uid);
+       msg_fatal("setuid(%ld): %m", (long) uid);
     if (msg_verbose > 1)
-       msg_info("setugid: uid %d gid %d", uid, gid);
+       msg_info("setugid: uid %ld gid %ld", (long) uid, (long) gid);
 }
-