Automatic change detection of DBM files was slightly broken (incremental changes would no longer be detected). The fix is to use separate file handles for locking and for change detection. The trivial-rewrite server could dereference a dangling pointer after stripping a source route (@domain,domain:) from an address while append_at_myorigin was turned off (which is not supported). It should not SIGSEGV anyway. The SMTP server replied with 552 (too much mail) when rejecting mail content. No reply code is defined for this, but one could argue that 550 is more appropriate. And so it shall be. Prereq: "1.1.4" diff -cr /tmp/postfix-1.1.4/src/global/mail_version.h ./src/global/mail_version.h *** /tmp/postfix-1.1.4/src/global/mail_version.h Fri Feb 22 19:38:56 2002 --- ./src/global/mail_version.h Mon Mar 11 21:10:12 2002 *************** *** 22,30 **** */ #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT ! #define DEF_MAIL_VERSION "1.1.4-$mail_release_date" #else ! #define DEF_MAIL_VERSION "1.1.4" #endif extern char *var_mail_version; --- 22,30 ---- */ #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT ! #define DEF_MAIL_VERSION "1.1.5-$mail_release_date" #else ! #define DEF_MAIL_VERSION "1.1.5" #endif extern char *var_mail_version; *************** *** 32,38 **** * Release date. */ #define VAR_MAIL_RELEASE "mail_release_date" ! #define DEF_MAIL_RELEASE "20020222" extern char *var_mail_release; /* LICENSE --- 32,38 ---- * Release date. */ #define VAR_MAIL_RELEASE "mail_release_date" ! #define DEF_MAIL_RELEASE "20020311" extern char *var_mail_release; /* LICENSE diff -cr /tmp/postfix-1.1.4/HISTORY ./HISTORY *** /tmp/postfix-1.1.4/HISTORY Sat Feb 23 19:31:55 2002 --- ./HISTORY Mon Mar 11 20:51:39 2002 *************** *** 6095,6100 **** --- 6095,6130 ---- Solaris qsort() causes SIGSEGV errors otherwise. Victor Duchovny, Morgan Stanley. File: *qmgr/qmgr_message.c. + 20020302 + + Bugfix: don't strip source route (@domain...:) when the + result would be an empty address. This avoids problems when + append_at_myorigin is set to "no" (which is not supported). + Problem reported by Charles McColgan, Big Fish Communications. + File: trivial-rewrite/rewrite.c. + + 20020304 + + Cleanup: postqueue should not not complain when output + fails with "broken pipe". + + 20020308 + + Bugfix? reply with 550 not 552 when content is rejected. + 552 is reserved for "too much mail". + + Documentation: add note to sendmail manual page that running + "sendmail -bs" as $mail_owner enables SMTP server UCE and + access control checks. This is meant for use from inetd etc. + Matthias Andree. + + 20020311 + + Bugfix: DBM maps should use different files for locking + and for change detection. Problem reported by Victor + Duchovny, Morgan Stanley. Files: util/dict.h util/dict.c + util/dict_db.c util/dict_dbm.c global/mkmap.c local/alias.c. + Open problems: Low: don't do user@domain and @domain lookups in diff -cr /tmp/postfix-1.1.4/conf/main.cf ./conf/main.cf *** /tmp/postfix-1.1.4/conf/main.cf Thu Jan 31 21:12:04 2002 --- ./conf/main.cf Sun Mar 3 11:58:06 2002 *************** *** 225,233 **** # REJECTING UNKNOWN LOCAL USERS # # The local_recipient_maps parameter specifies optional lookup tables ! # with all users that are local with respect to $mydestination and ! # $inet_interfaces. If this parameter is defined, then the SMTP server ! # will reject mail for unknown local users. # # If you use the default Postfix local delivery agent for local # delivery, uncomment the definition below. --- 225,234 ---- # REJECTING UNKNOWN LOCAL USERS # # The local_recipient_maps parameter specifies optional lookup tables ! # with all names (not addresses) of users that are local with respect ! # to $mydestination and $inet_interfaces. If this parameter is ! # defined, then the SMTP server will reject mail for unknown local ! # users. # # If you use the default Postfix local delivery agent for local # delivery, uncomment the definition below. diff -cr /tmp/postfix-1.1.4/conf/master.cf ./conf/master.cf *** /tmp/postfix-1.1.4/conf/master.cf Thu Jan 10 15:24:59 2002 --- ./conf/master.cf Sat Mar 2 18:13:56 2002 *************** *** 24,32 **** # Chroot: whether or not the service runs chrooted to the mail queue # directory (pathname is controlled by the queue_directory configuration # variable in the main.cf file). Presently, all Postfix daemons can run ! # chrooted, except for the pipe and local daemons. The files in the ! # examples/chroot-setup subdirectory describe how to set up a Postfix ! # chroot environment for your type of machine. # # Wakeup time: automatically wake up the named service after the # specified number of seconds. A ? at the end of the wakeup time --- 24,32 ---- # Chroot: whether or not the service runs chrooted to the mail queue # directory (pathname is controlled by the queue_directory configuration # variable in the main.cf file). Presently, all Postfix daemons can run ! # chrooted, except for the pipe, virtual and local delivery daemons. ! # The files in the examples/chroot-setup subdirectory describe how ! # to set up a Postfix chroot environment for your type of machine. # # Wakeup time: automatically wake up the named service after the # specified number of seconds. A ? at the end of the wakeup time diff -cr /tmp/postfix-1.1.4/conf/sample-smtpd.cf ./conf/sample-smtpd.cf *** /tmp/postfix-1.1.4/conf/sample-smtpd.cf Wed Dec 26 17:11:37 2001 --- ./conf/sample-smtpd.cf Fri Mar 8 09:42:29 2002 *************** *** 440,446 **** # The access_map_reject_code parameter specifies the SMTP server # response code when a client violates an access map restriction. # ! # Do not change this unless you have a complete understanding of RFC 822. # access_map_reject_code = 550 --- 440,446 ---- # The access_map_reject_code parameter specifies the SMTP server # response code when a client violates an access map restriction. # ! # Do not change this unless you have a complete understanding of RFC 821. # access_map_reject_code = 550 *************** *** 448,475 **** # response when a client violates the reject_invalid_hostname anti-UCE # restriction. # ! # Do not change this unless you have a complete understanding of RFC 822. # invalid_hostname_reject_code = 501 # The maps_rbl_reject_code parameter specifies the SMTP server response # when a client violates the maps_rbl_domains restriction. # ! # Do not change this unless you have a complete understanding of RFC 822. # maps_rbl_reject_code = 550 # The reject_code parameter specifies the SMTP server response code # when an SMTP client matches a reject restriction. # ! # Do not change this unless you have a complete understanding of RFC 822. # reject_code = 550 # The relay_domains_reject_code parameter specifies the SMTP server # response when a client attempts to violate the mail relay policy. # ! # Do not change this unless you have a complete understanding of RFC 822. # relay_domains_reject_code = 550 --- 448,475 ---- # response when a client violates the reject_invalid_hostname anti-UCE # restriction. # ! # Do not change this unless you have a complete understanding of RFC 821. # invalid_hostname_reject_code = 501 # The maps_rbl_reject_code parameter specifies the SMTP server response # when a client violates the maps_rbl_domains restriction. # ! # Do not change this unless you have a complete understanding of RFC 821. # maps_rbl_reject_code = 550 # The reject_code parameter specifies the SMTP server response code # when an SMTP client matches a reject restriction. # ! # Do not change this unless you have a complete understanding of RFC 821. # reject_code = 550 # The relay_domains_reject_code parameter specifies the SMTP server # response when a client attempts to violate the mail relay policy. # ! # Do not change this unless you have a complete understanding of RFC 821. # relay_domains_reject_code = 550 *************** *** 477,483 **** # response when a client violates the reject_unknown_sender_domain # or reject_unknown_recipient_domain restrictions. # ! # Do not change this unless you have a complete understanding of RFC 822. # unknown_address_reject_code = 450 --- 477,483 ---- # response when a client violates the reject_unknown_sender_domain # or reject_unknown_recipient_domain restrictions. # ! # Do not change this unless you have a complete understanding of RFC 821. # unknown_address_reject_code = 450 *************** *** 485,491 **** # response when a client without address to name mapping violates # the reject_unknown_clients restriction. # ! # Do not change this unless you have a complete understanding of RFC 822. # unknown_client_reject_code = 450 --- 485,491 ---- # response when a client without address to name mapping violates # the reject_unknown_clients restriction. # ! # Do not change this unless you have a complete understanding of RFC 821. # unknown_client_reject_code = 450 *************** *** 493,498 **** # response when a client violates the reject_unknown_hostname # restriction. # ! # Do not change this unless you have a complete understanding of RFC 822. # unknown_hostname_reject_code = 450 --- 493,498 ---- # response when a client violates the reject_unknown_hostname # restriction. # ! # Do not change this unless you have a complete understanding of RFC 821. # unknown_hostname_reject_code = 450 diff -cr /tmp/postfix-1.1.4/html/mailq.1.html ./html/mailq.1.html *** /tmp/postfix-1.1.4/html/mailq.1.html Fri Feb 1 09:17:24 2002 --- ./html/mailq.1.html Mon Mar 11 19:55:43 2002 *************** *** 124,143 **** -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to stan- ! dard output. This mode of operation is implemented ! by running the smtpd(8) daemon. -f sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. -h hop_count (ignored) ! Hop count limit. Use the hopcount_limit configura- tion parameter instead. ! -i When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -m (ignored) --- 124,148 ---- -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to stan- ! dard output. In stand-alone SMTP server mode, UCE ! restrictions and access controls are disabled by ! default. To enable them, run the process as the ! mail_owner user. ! ! This mode of operation is implemented by running ! the smtpd(8) daemon. -f sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. -h hop_count (ignored) ! Hop count limit. Use the hopcount_limit configura- tion parameter instead. ! -i When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -m (ignored) *************** *** 147,213 **** Backwards compatibility. -oAalias_database ! Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -o7 (ignored) -o8 (ignored) ! The message body type. Currently, Postfix imple- ments just-send-eight. ! -oi When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -om (ignored) ! The sender is never eliminated from alias etc. expansions. -o x value (ignored) ! Set option x to value. Use the equivalent configu- ration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. ! -q Attempt to deliver all queued mail. This is imple- mented by executing the postqueue(1) command. -qinterval (ignored) ! The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qRsite ! Schedule immediate delivery of all mail that is queued for the named site. This option accepts only ! site names that are eligible for the "fast flush" ! service, and is implemented by executing the postqueue(1) command. See flush(8) for more infor- mation about the "fast flush" service. -qSsite ! This command is not implemented. Use the slower sendmail -q command instead. ! -t Extract recipients from message headers. This ! requires that no recipients be specified on the command line. -v Enable verbose logging for debugging purposes. Mul- ! tiple -v options make the software increasingly verbose. SECURITY ! By design, this program is not set-user (or group) id. ! However, it must handle data from untrusted users or ! untrusted machines. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS ! Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT --- 152,218 ---- Backwards compatibility. -oAalias_database ! Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -o7 (ignored) -o8 (ignored) ! The message body type. Currently, Postfix imple- ments just-send-eight. ! -oi When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -om (ignored) ! The sender is never eliminated from alias etc. expansions. -o x value (ignored) ! Set option x to value. Use the equivalent configu- ration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. ! -q Attempt to deliver all queued mail. This is imple- mented by executing the postqueue(1) command. -qinterval (ignored) ! The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qRsite ! Schedule immediate delivery of all mail that is queued for the named site. This option accepts only ! site names that are eligible for the "fast flush" ! service, and is implemented by executing the postqueue(1) command. See flush(8) for more infor- mation about the "fast flush" service. -qSsite ! This command is not implemented. Use the slower sendmail -q command instead. ! -t Extract recipients from message headers. This ! requires that no recipients be specified on the command line. -v Enable verbose logging for debugging purposes. Mul- ! tiple -v options make the software increasingly verbose. SECURITY ! By design, this program is not set-user (or group) id. ! However, it must handle data from untrusted users or ! untrusted machines. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS ! Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT *************** *** 219,225 **** MAIL_DEBUG Enable debugging with an external command, as spec- ! ified with the debugger_command configuration parameter. FILES --- 224,230 ---- MAIL_DEBUG Enable debugging with an external command, as spec- ! ified with the debugger_command configuration parameter. FILES *************** *** 227,239 **** /etc/postfix, configuration files CONFIGURATION PARAMETERS ! See the Postfix main.cf file for syntax details and for ! default values. Use the postfix reload command after a configuration change. alias_database ! Default alias database(s) for newaliases. The ! default value for this parameter is system-spe- cific. bounce_size_limit --- 232,244 ---- /etc/postfix, configuration files CONFIGURATION PARAMETERS ! See the Postfix main.cf file for syntax details and for ! default values. Use the postfix reload command after a configuration change. alias_database ! Default alias database(s) for newaliases. The ! default value for this parameter is system-spe- cific. bounce_size_limit *************** *** 249,310 **** initialized. debug_peer_level ! Increment in verbose logging level when a remote host matches a pattern in the debug_peer_list parameter. debug_peer_list ! List of domain or network patterns. When a remote ! host matches a pattern, increase the verbose log- ! ging level by the amount specified in the debug_peer_level parameter. default_verp_delimiters ! The VERP delimiter characters that are used when ! the -V command line option is specified without delimiter characters. fast_flush_domains List of domains that will receive "fast flush" ser- ! vice (default: all domains that this system is ! willing to relay mail to). This list specifies the ! domains that Postfix accepts in the SMTP ETRN request and in the sendmail -qR command. fork_attempts ! Number of attempts to fork() a process before giv- ing up. fork_delay ! Delay in seconds between successive fork() attempts. hopcount_limit Limit the number of Received: message headers. mail_owner ! The owner of the mail queue and of most Postfix processes. command_directory ! Directory with Postfix support commands (default: $program_directory). daemon_directory ! Directory with Postfix daemon programs (default: $program_directory). queue_directory ! Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. queue_run_delay ! The time between successive scans of the deferred queue. verp_delimiter_filter ! The characters that Postfix accepts as VERP delim- iter characters. SEE ALSO --- 254,315 ---- initialized. debug_peer_level ! Increment in verbose logging level when a remote host matches a pattern in the debug_peer_list parameter. debug_peer_list ! List of domain or network patterns. When a remote ! host matches a pattern, increase the verbose log- ! ging level by the amount specified in the debug_peer_level parameter. default_verp_delimiters ! The VERP delimiter characters that are used when ! the -V command line option is specified without delimiter characters. fast_flush_domains List of domains that will receive "fast flush" ser- ! vice (default: all domains that this system is ! willing to relay mail to). This list specifies the ! domains that Postfix accepts in the SMTP ETRN request and in the sendmail -qR command. fork_attempts ! Number of attempts to fork() a process before giv- ing up. fork_delay ! Delay in seconds between successive fork() attempts. hopcount_limit Limit the number of Received: message headers. mail_owner ! The owner of the mail queue and of most Postfix processes. command_directory ! Directory with Postfix support commands (default: $program_directory). daemon_directory ! Directory with Postfix daemon programs (default: $program_directory). queue_directory ! Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. queue_run_delay ! The time between successive scans of the deferred queue. verp_delimiter_filter ! The characters that Postfix accepts as VERP delim- iter characters. SEE ALSO *************** *** 319,325 **** syslogd(8) system logging LICENSE ! The Secure Mailer license must be distributed with this software. AUTHOR(S) --- 324,330 ---- syslogd(8) system logging LICENSE ! The Secure Mailer license must be distributed with this software. AUTHOR(S) diff -cr /tmp/postfix-1.1.4/html/newaliases.1.html ./html/newaliases.1.html *** /tmp/postfix-1.1.4/html/newaliases.1.html Fri Feb 1 09:17:24 2002 --- ./html/newaliases.1.html Mon Mar 11 19:55:43 2002 *************** *** 124,143 **** -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to stan- ! dard output. This mode of operation is implemented ! by running the smtpd(8) daemon. -f sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. -h hop_count (ignored) ! Hop count limit. Use the hopcount_limit configura- tion parameter instead. ! -i When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -m (ignored) --- 124,148 ---- -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to stan- ! dard output. In stand-alone SMTP server mode, UCE ! restrictions and access controls are disabled by ! default. To enable them, run the process as the ! mail_owner user. ! ! This mode of operation is implemented by running ! the smtpd(8) daemon. -f sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. -h hop_count (ignored) ! Hop count limit. Use the hopcount_limit configura- tion parameter instead. ! -i When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -m (ignored) *************** *** 147,213 **** Backwards compatibility. -oAalias_database ! Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -o7 (ignored) -o8 (ignored) ! The message body type. Currently, Postfix imple- ments just-send-eight. ! -oi When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -om (ignored) ! The sender is never eliminated from alias etc. expansions. -o x value (ignored) ! Set option x to value. Use the equivalent configu- ration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. ! -q Attempt to deliver all queued mail. This is imple- mented by executing the postqueue(1) command. -qinterval (ignored) ! The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qRsite ! Schedule immediate delivery of all mail that is queued for the named site. This option accepts only ! site names that are eligible for the "fast flush" ! service, and is implemented by executing the postqueue(1) command. See flush(8) for more infor- mation about the "fast flush" service. -qSsite ! This command is not implemented. Use the slower sendmail -q command instead. ! -t Extract recipients from message headers. This ! requires that no recipients be specified on the command line. -v Enable verbose logging for debugging purposes. Mul- ! tiple -v options make the software increasingly verbose. SECURITY ! By design, this program is not set-user (or group) id. ! However, it must handle data from untrusted users or ! untrusted machines. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS ! Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT --- 152,218 ---- Backwards compatibility. -oAalias_database ! Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -o7 (ignored) -o8 (ignored) ! The message body type. Currently, Postfix imple- ments just-send-eight. ! -oi When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -om (ignored) ! The sender is never eliminated from alias etc. expansions. -o x value (ignored) ! Set option x to value. Use the equivalent configu- ration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. ! -q Attempt to deliver all queued mail. This is imple- mented by executing the postqueue(1) command. -qinterval (ignored) ! The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qRsite ! Schedule immediate delivery of all mail that is queued for the named site. This option accepts only ! site names that are eligible for the "fast flush" ! service, and is implemented by executing the postqueue(1) command. See flush(8) for more infor- mation about the "fast flush" service. -qSsite ! This command is not implemented. Use the slower sendmail -q command instead. ! -t Extract recipients from message headers. This ! requires that no recipients be specified on the command line. -v Enable verbose logging for debugging purposes. Mul- ! tiple -v options make the software increasingly verbose. SECURITY ! By design, this program is not set-user (or group) id. ! However, it must handle data from untrusted users or ! untrusted machines. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS ! Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT *************** *** 219,225 **** MAIL_DEBUG Enable debugging with an external command, as spec- ! ified with the debugger_command configuration parameter. FILES --- 224,230 ---- MAIL_DEBUG Enable debugging with an external command, as spec- ! ified with the debugger_command configuration parameter. FILES *************** *** 227,239 **** /etc/postfix, configuration files CONFIGURATION PARAMETERS ! See the Postfix main.cf file for syntax details and for ! default values. Use the postfix reload command after a configuration change. alias_database ! Default alias database(s) for newaliases. The ! default value for this parameter is system-spe- cific. bounce_size_limit --- 232,244 ---- /etc/postfix, configuration files CONFIGURATION PARAMETERS ! See the Postfix main.cf file for syntax details and for ! default values. Use the postfix reload command after a configuration change. alias_database ! Default alias database(s) for newaliases. The ! default value for this parameter is system-spe- cific. bounce_size_limit *************** *** 249,310 **** initialized. debug_peer_level ! Increment in verbose logging level when a remote host matches a pattern in the debug_peer_list parameter. debug_peer_list ! List of domain or network patterns. When a remote ! host matches a pattern, increase the verbose log- ! ging level by the amount specified in the debug_peer_level parameter. default_verp_delimiters ! The VERP delimiter characters that are used when ! the -V command line option is specified without delimiter characters. fast_flush_domains List of domains that will receive "fast flush" ser- ! vice (default: all domains that this system is ! willing to relay mail to). This list specifies the ! domains that Postfix accepts in the SMTP ETRN request and in the sendmail -qR command. fork_attempts ! Number of attempts to fork() a process before giv- ing up. fork_delay ! Delay in seconds between successive fork() attempts. hopcount_limit Limit the number of Received: message headers. mail_owner ! The owner of the mail queue and of most Postfix processes. command_directory ! Directory with Postfix support commands (default: $program_directory). daemon_directory ! Directory with Postfix daemon programs (default: $program_directory). queue_directory ! Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. queue_run_delay ! The time between successive scans of the deferred queue. verp_delimiter_filter ! The characters that Postfix accepts as VERP delim- iter characters. SEE ALSO --- 254,315 ---- initialized. debug_peer_level ! Increment in verbose logging level when a remote host matches a pattern in the debug_peer_list parameter. debug_peer_list ! List of domain or network patterns. When a remote ! host matches a pattern, increase the verbose log- ! ging level by the amount specified in the debug_peer_level parameter. default_verp_delimiters ! The VERP delimiter characters that are used when ! the -V command line option is specified without delimiter characters. fast_flush_domains List of domains that will receive "fast flush" ser- ! vice (default: all domains that this system is ! willing to relay mail to). This list specifies the ! domains that Postfix accepts in the SMTP ETRN request and in the sendmail -qR command. fork_attempts ! Number of attempts to fork() a process before giv- ing up. fork_delay ! Delay in seconds between successive fork() attempts. hopcount_limit Limit the number of Received: message headers. mail_owner ! The owner of the mail queue and of most Postfix processes. command_directory ! Directory with Postfix support commands (default: $program_directory). daemon_directory ! Directory with Postfix daemon programs (default: $program_directory). queue_directory ! Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. queue_run_delay ! The time between successive scans of the deferred queue. verp_delimiter_filter ! The characters that Postfix accepts as VERP delim- iter characters. SEE ALSO *************** *** 319,325 **** syslogd(8) system logging LICENSE ! The Secure Mailer license must be distributed with this software. AUTHOR(S) --- 324,330 ---- syslogd(8) system logging LICENSE ! The Secure Mailer license must be distributed with this software. AUTHOR(S) diff -cr /tmp/postfix-1.1.4/html/postqueue.1.html ./html/postqueue.1.html *** /tmp/postfix-1.1.4/html/postqueue.1.html Tue Jan 22 11:04:43 2002 --- ./html/postqueue.1.html Mon Mar 11 19:55:43 2002 *************** *** 1,5 ****
- 
  POSTQUEUE(1)                                         POSTQUEUE(1)
  
  NAME
--- 1,4 ----
***************
*** 110,115 ****
         P.O. Box 704
         Yorktown Heights, NY 10598, USA
  
!                                                                 1
! 
  
--- 109,113 ---- P.O. Box 704 Yorktown Heights, NY 10598, USA ! POSTQUEUE(1) diff -cr /tmp/postfix-1.1.4/html/sendmail.1.html ./html/sendmail.1.html *** /tmp/postfix-1.1.4/html/sendmail.1.html Fri Feb 1 09:17:24 2002 --- ./html/sendmail.1.html Mon Mar 11 19:55:43 2002 *************** *** 124,143 **** -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to stan- ! dard output. This mode of operation is implemented ! by running the smtpd(8) daemon. -f sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. -h hop_count (ignored) ! Hop count limit. Use the hopcount_limit configura- tion parameter instead. ! -i When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -m (ignored) --- 124,148 ---- -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to stan- ! dard output. In stand-alone SMTP server mode, UCE ! restrictions and access controls are disabled by ! default. To enable them, run the process as the ! mail_owner user. ! ! This mode of operation is implemented by running ! the smtpd(8) daemon. -f sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. -h hop_count (ignored) ! Hop count limit. Use the hopcount_limit configura- tion parameter instead. ! -i When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -m (ignored) *************** *** 147,213 **** Backwards compatibility. -oAalias_database ! Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -o7 (ignored) -o8 (ignored) ! The message body type. Currently, Postfix imple- ments just-send-eight. ! -oi When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -om (ignored) ! The sender is never eliminated from alias etc. expansions. -o x value (ignored) ! Set option x to value. Use the equivalent configu- ration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. ! -q Attempt to deliver all queued mail. This is imple- mented by executing the postqueue(1) command. -qinterval (ignored) ! The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qRsite ! Schedule immediate delivery of all mail that is queued for the named site. This option accepts only ! site names that are eligible for the "fast flush" ! service, and is implemented by executing the postqueue(1) command. See flush(8) for more infor- mation about the "fast flush" service. -qSsite ! This command is not implemented. Use the slower sendmail -q command instead. ! -t Extract recipients from message headers. This ! requires that no recipients be specified on the command line. -v Enable verbose logging for debugging purposes. Mul- ! tiple -v options make the software increasingly verbose. SECURITY ! By design, this program is not set-user (or group) id. ! However, it must handle data from untrusted users or ! untrusted machines. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS ! Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT --- 152,218 ---- Backwards compatibility. -oAalias_database ! Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -o7 (ignored) -o8 (ignored) ! The message body type. Currently, Postfix imple- ments just-send-eight. ! -oi When reading a message from standard input, don't ! treat a line with only a . character as the end of input. -om (ignored) ! The sender is never eliminated from alias etc. expansions. -o x value (ignored) ! Set option x to value. Use the equivalent configu- ration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to, unless ! the message contains an Errors-To: message header. ! -q Attempt to deliver all queued mail. This is imple- mented by executing the postqueue(1) command. -qinterval (ignored) ! The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qRsite ! Schedule immediate delivery of all mail that is queued for the named site. This option accepts only ! site names that are eligible for the "fast flush" ! service, and is implemented by executing the postqueue(1) command. See flush(8) for more infor- mation about the "fast flush" service. -qSsite ! This command is not implemented. Use the slower sendmail -q command instead. ! -t Extract recipients from message headers. This ! requires that no recipients be specified on the command line. -v Enable verbose logging for debugging purposes. Mul- ! tiple -v options make the software increasingly verbose. SECURITY ! By design, this program is not set-user (or group) id. ! However, it must handle data from untrusted users or ! untrusted machines. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS ! Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT *************** *** 219,225 **** MAIL_DEBUG Enable debugging with an external command, as spec- ! ified with the debugger_command configuration parameter. FILES --- 224,230 ---- MAIL_DEBUG Enable debugging with an external command, as spec- ! ified with the debugger_command configuration parameter. FILES *************** *** 227,239 **** /etc/postfix, configuration files CONFIGURATION PARAMETERS ! See the Postfix main.cf file for syntax details and for ! default values. Use the postfix reload command after a configuration change. alias_database ! Default alias database(s) for newaliases. The ! default value for this parameter is system-spe- cific. bounce_size_limit --- 232,244 ---- /etc/postfix, configuration files CONFIGURATION PARAMETERS ! See the Postfix main.cf file for syntax details and for ! default values. Use the postfix reload command after a configuration change. alias_database ! Default alias database(s) for newaliases. The ! default value for this parameter is system-spe- cific. bounce_size_limit *************** *** 249,310 **** initialized. debug_peer_level ! Increment in verbose logging level when a remote host matches a pattern in the debug_peer_list parameter. debug_peer_list ! List of domain or network patterns. When a remote ! host matches a pattern, increase the verbose log- ! ging level by the amount specified in the debug_peer_level parameter. default_verp_delimiters ! The VERP delimiter characters that are used when ! the -V command line option is specified without delimiter characters. fast_flush_domains List of domains that will receive "fast flush" ser- ! vice (default: all domains that this system is ! willing to relay mail to). This list specifies the ! domains that Postfix accepts in the SMTP ETRN request and in the sendmail -qR command. fork_attempts ! Number of attempts to fork() a process before giv- ing up. fork_delay ! Delay in seconds between successive fork() attempts. hopcount_limit Limit the number of Received: message headers. mail_owner ! The owner of the mail queue and of most Postfix processes. command_directory ! Directory with Postfix support commands (default: $program_directory). daemon_directory ! Directory with Postfix daemon programs (default: $program_directory). queue_directory ! Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. queue_run_delay ! The time between successive scans of the deferred queue. verp_delimiter_filter ! The characters that Postfix accepts as VERP delim- iter characters. SEE ALSO --- 254,315 ---- initialized. debug_peer_level ! Increment in verbose logging level when a remote host matches a pattern in the debug_peer_list parameter. debug_peer_list ! List of domain or network patterns. When a remote ! host matches a pattern, increase the verbose log- ! ging level by the amount specified in the debug_peer_level parameter. default_verp_delimiters ! The VERP delimiter characters that are used when ! the -V command line option is specified without delimiter characters. fast_flush_domains List of domains that will receive "fast flush" ser- ! vice (default: all domains that this system is ! willing to relay mail to). This list specifies the ! domains that Postfix accepts in the SMTP ETRN request and in the sendmail -qR command. fork_attempts ! Number of attempts to fork() a process before giv- ing up. fork_delay ! Delay in seconds between successive fork() attempts. hopcount_limit Limit the number of Received: message headers. mail_owner ! The owner of the mail queue and of most Postfix processes. command_directory ! Directory with Postfix support commands (default: $program_directory). daemon_directory ! Directory with Postfix daemon programs (default: $program_directory). queue_directory ! Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. queue_run_delay ! The time between successive scans of the deferred queue. verp_delimiter_filter ! The characters that Postfix accepts as VERP delim- iter characters. SEE ALSO *************** *** 319,325 **** syslogd(8) system logging LICENSE ! The Secure Mailer license must be distributed with this software. AUTHOR(S) --- 324,330 ---- syslogd(8) system logging LICENSE ! The Secure Mailer license must be distributed with this software. AUTHOR(S) diff -cr /tmp/postfix-1.1.4/html/smtp.8.html ./html/smtp.8.html *** /tmp/postfix-1.1.4/html/smtp.8.html Mon Dec 10 20:24:29 2001 --- ./html/smtp.8.html Mon Mar 11 19:55:43 2002 *************** *** 1,5 ****
- 
  SMTP(8)                                                   SMTP(8)
  
  NAME
--- 1,4 ----
***************
*** 147,153 ****
                turned on.
  
  Authentication controls
!        smtp_enable_sasl_auth
                Enable per-session authentication as per  RFC  2554
                (SASL).   By default, Postfix is built without SASL
                support.
--- 146,152 ----
                turned on.
  
  Authentication controls
!        smtp_sasl_auth_enable
                Enable per-session authentication as per  RFC  2554
                (SASL).   By default, Postfix is built without SASL
                support.
***************
*** 250,255 ****
         P.O. Box 704
         Yorktown Heights, NY 10598, USA
  
!                                                                 1
! 
  
--- 249,253 ---- P.O. Box 704 Yorktown Heights, NY 10598, USA ! SMTP(8) diff -cr /tmp/postfix-1.1.4/man/man1/sendmail.1 ./man/man1/sendmail.1 *** /tmp/postfix-1.1.4/man/man1/sendmail.1 Fri Feb 1 09:17:23 2002 --- ./man/man1/sendmail.1 Mon Mar 11 19:55:42 2002 *************** *** 111,116 **** --- 111,120 ---- .IP \fB-bs\fR Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to standard output. + In stand-alone SMTP server mode, UCE restrictions and + access controls are disabled by default. To enable them, + run the process as the \fBmail_owner\fR user. + .sp This mode of operation is implemented by running the \fBsmtpd\fR(8) daemon. .IP "\fB-f \fIsender\fR" diff -cr /tmp/postfix-1.1.4/man/man8/smtp.8 ./man/man8/smtp.8 *** /tmp/postfix-1.1.4/man/man8/smtp.8 Mon Dec 10 20:24:25 2001 --- ./man/man8/smtp.8 Mon Mar 11 19:55:42 2002 *************** *** 129,135 **** The time a message must be queued before the CISCO PIX firewall . bug workaround is turned on. .SH "Authentication controls" ! .IP \fBsmtp_enable_sasl_auth\fR Enable per-session authentication as per RFC 2554 (SASL). By default, Postfix is built without SASL support. .IP \fBsmtp_sasl_password_maps\fR --- 129,135 ---- The time a message must be queued before the CISCO PIX firewall . bug workaround is turned on. .SH "Authentication controls" ! .IP \fBsmtp_sasl_auth_enable\fR Enable per-session authentication as per RFC 2554 (SASL). By default, Postfix is built without SASL support. .IP \fBsmtp_sasl_password_maps\fR diff -cr /tmp/postfix-1.1.4/src/global/mkmap_open.c ./src/global/mkmap_open.c *** /tmp/postfix-1.1.4/src/global/mkmap_open.c Thu Jan 25 15:53:00 2001 --- ./src/global/mkmap_open.c Mon Mar 11 19:50:27 2002 *************** *** 124,130 **** /* mkmap_open - create or truncate database */ MKMAP *mkmap_open(const char *type, const char *path, ! int open_flags, int dict_flags) { MKMAP *mkmap; MKMAP_OPEN_INFO *mp; --- 124,130 ---- /* mkmap_open - create or truncate database */ MKMAP *mkmap_open(const char *type, const char *path, ! int open_flags, int dict_flags) { MKMAP *mkmap; MKMAP_OPEN_INFO *mp; *************** *** 164,170 **** * needed because the underlying routines read as well as write. */ mkmap->dict = mkmap->open(path, open_flags, dict_flags); ! mkmap->dict->fd = -1; /* XXX just in case */ mkmap->dict->flags |= DICT_FLAG_DUP_WARN; return (mkmap); } --- 164,171 ---- * needed because the underlying routines read as well as write. */ mkmap->dict = mkmap->open(path, open_flags, dict_flags); ! mkmap->dict->lock_fd = -1; /* XXX just in case */ ! mkmap->dict->stat_fd = -1; /* XXX just in case */ mkmap->dict->flags |= DICT_FLAG_DUP_WARN; return (mkmap); } diff -cr /tmp/postfix-1.1.4/src/local/alias.c ./src/local/alias.c *** /tmp/postfix-1.1.4/src/local/alias.c Tue May 1 13:49:48 2001 --- ./src/local/alias.c Mon Mar 11 19:15:11 2002 *************** *** 113,121 **** */ if ((dict = dict_handle(table)) == 0) msg_panic("%s: can't find dictionary: %s", myname, table); ! if (dict->fd < 0) return (0); ! if (fstat(dict->fd, &st) < 0) msg_fatal("%s: fstat dictionary %s: %m", myname, table); return (st.st_uid); } --- 113,121 ---- */ if ((dict = dict_handle(table)) == 0) msg_panic("%s: can't find dictionary: %s", myname, table); ! if (dict->stat_fd < 0) return (0); ! if (fstat(dict->stat_fd, &st) < 0) msg_fatal("%s: fstat dictionary %s: %m", myname, table); return (st.st_uid); } diff -cr /tmp/postfix-1.1.4/src/postqueue/postqueue.c ./src/postqueue/postqueue.c *** /tmp/postfix-1.1.4/src/postqueue/postqueue.c Tue Jan 22 09:23:43 2002 --- ./src/postqueue/postqueue.c Mon Mar 11 19:15:56 2002 *************** *** 104,109 **** --- 104,110 ---- #include #include #include + #include /* Utility library. */ *************** *** 171,182 **** * a program that terminates early. */ if ((showq = mail_connect(MAIL_CLASS_PUBLIC, MAIL_SERVICE_SHOWQ, BLOCKING)) != 0) { ! while ((n = vstream_fread(showq, buf, sizeof(buf))) > 0) if (vstream_fwrite(VSTREAM_OUT, buf, n) != n ! || vstream_fflush(VSTREAM_OUT) != 0) msg_fatal("write error: %m"); ! ! if (vstream_fclose(showq)) msg_warn("close: %m"); } --- 172,186 ---- * a program that terminates early. */ if ((showq = mail_connect(MAIL_CLASS_PUBLIC, MAIL_SERVICE_SHOWQ, BLOCKING)) != 0) { ! while ((n = vstream_fread(showq, buf, sizeof(buf))) > 0) { if (vstream_fwrite(VSTREAM_OUT, buf, n) != n ! || vstream_fflush(VSTREAM_OUT) != 0) { ! if (errno == EPIPE) ! break; msg_fatal("write error: %m"); ! } ! } ! if (vstream_fclose(showq) && errno != EPIPE) msg_warn("close: %m"); } diff -cr /tmp/postfix-1.1.4/src/sendmail/sendmail.c ./src/sendmail/sendmail.c *** /tmp/postfix-1.1.4/src/sendmail/sendmail.c Mon Jan 28 13:32:37 2002 --- ./src/sendmail/sendmail.c Fri Mar 8 14:12:33 2002 *************** *** 105,110 **** --- 105,114 ---- /* .IP \fB-bs\fR /* Stand-alone SMTP server mode. Read SMTP commands from /* standard input, and write responses to standard output. + /* In stand-alone SMTP server mode, UCE restrictions and + /* access controls are disabled by default. To enable them, + /* run the process as the \fBmail_owner\fR user. + /* .sp /* This mode of operation is implemented by running the /* \fBsmtpd\fR(8) daemon. /* .IP "\fB-f \fIsender\fR" diff -cr /tmp/postfix-1.1.4/src/smtp/smtp.c ./src/smtp/smtp.c *** /tmp/postfix-1.1.4/src/smtp/smtp.c Mon Dec 10 19:49:22 2001 --- ./src/smtp/smtp.c Tue Mar 5 20:04:30 2002 *************** *** 113,119 **** /* The time a message must be queued before the CISCO PIX firewall /* . bug workaround is turned on. /* .SH "Authentication controls" ! /* .IP \fBsmtp_enable_sasl_auth\fR /* Enable per-session authentication as per RFC 2554 (SASL). /* By default, Postfix is built without SASL support. /* .IP \fBsmtp_sasl_password_maps\fR --- 113,119 ---- /* The time a message must be queued before the CISCO PIX firewall /* . bug workaround is turned on. /* .SH "Authentication controls" ! /* .IP \fBsmtp_sasl_auth_enable\fR /* Enable per-session authentication as per RFC 2554 (SASL). /* By default, Postfix is built without SASL support. /* .IP \fBsmtp_sasl_password_maps\fR diff -cr /tmp/postfix-1.1.4/src/smtpd/smtpd.c ./src/smtpd/smtpd.c *** /tmp/postfix-1.1.4/src/smtpd/smtpd.c Sat Feb 23 18:41:36 2002 --- ./src/smtpd/smtpd.c Fri Mar 8 09:41:09 2002 *************** *** 1038,1044 **** smtpd_chat_reply(state, "554 Error: too many hops"); } else if ((state->err & CLEANUP_STAT_CONT) != 0) { state->error_mask |= MAIL_ERROR_POLICY; ! smtpd_chat_reply(state, "552 Error: %s", LEN(why) ? STR(why) : "content rejected"); } else if ((state->err & CLEANUP_STAT_WRITE) != 0) { state->error_mask |= MAIL_ERROR_RESOURCE; --- 1038,1044 ---- smtpd_chat_reply(state, "554 Error: too many hops"); } else if ((state->err & CLEANUP_STAT_CONT) != 0) { state->error_mask |= MAIL_ERROR_POLICY; ! smtpd_chat_reply(state, "550 Error: %s", LEN(why) ? STR(why) : "content rejected"); } else if ((state->err & CLEANUP_STAT_WRITE) != 0) { state->error_mask |= MAIL_ERROR_RESOURCE; diff -cr /tmp/postfix-1.1.4/src/trivial-rewrite/rewrite.c ./src/trivial-rewrite/rewrite.c *** /tmp/postfix-1.1.4/src/trivial-rewrite/rewrite.c Fri Nov 2 19:51:24 2001 --- ./src/trivial-rewrite/rewrite.c Sat Mar 2 14:59:41 2002 *************** *** 118,124 **** * Strip source route. */ if (tree->head->type == '@' ! && (colon = tok822_find_type(tree->head, ':')) != 0) tok822_free_tree(tok822_sub_keep_after(tree, colon)); /* --- 118,125 ---- * Strip source route. */ if (tree->head->type == '@' ! && (colon = tok822_find_type(tree->head, ':')) != 0 ! && colon != tree->tail) tok822_free_tree(tok822_sub_keep_after(tree, colon)); /* diff -cr /tmp/postfix-1.1.4/src/util/dict.c ./src/util/dict.c *** /tmp/postfix-1.1.4/src/util/dict.c Tue Jan 1 19:08:12 2002 --- ./src/util/dict.c Mon Mar 11 18:52:48 2002 *************** *** 508,518 **** ht_info_list = htable_list(dict_table); for (status = 0, ht = ht_info_list; status == 0 && (h = *ht) != 0; ht++) { dict = ((DICT_NODE *) h->value)->dict; ! if (dict->fd < 0) /* not file-based */ continue; if (dict->mtime == 0) /* not bloody likely */ msg_warn("%s: table %s: null time stamp", myname, h->key); ! if (fstat(dict->fd, &st) < 0) msg_fatal("%s: fstat: %m", myname); status = (st.st_mtime != dict->mtime || st.st_nlink == 0); } --- 508,518 ---- ht_info_list = htable_list(dict_table); for (status = 0, ht = ht_info_list; status == 0 && (h = *ht) != 0; ht++) { dict = ((DICT_NODE *) h->value)->dict; ! if (dict->stat_fd < 0) /* not file-based */ continue; if (dict->mtime == 0) /* not bloody likely */ msg_warn("%s: table %s: null time stamp", myname, h->key); ! if (fstat(dict->stat_fd, &st) < 0) msg_fatal("%s: fstat: %m", myname); status = (st.st_mtime != dict->mtime || st.st_nlink == 0); } diff -cr /tmp/postfix-1.1.4/src/util/dict.h ./src/util/dict.h *** /tmp/postfix-1.1.4/src/util/dict.h Fri Nov 2 10:28:22 2001 --- ./src/util/dict.h Mon Mar 11 19:35:04 2002 *************** *** 35,41 **** int (*delete) (struct DICT *, const char *); int (*sequence) (struct DICT *, int, const char **, const char **); void (*close) (struct DICT *); ! int fd; /* for dict_update() lock */ time_t mtime; /* mod time at open */ } DICT; --- 35,42 ---- int (*delete) (struct DICT *, const char *); int (*sequence) (struct DICT *, int, const char **, const char **); void (*close) (struct DICT *); ! int lock_fd; /* for dict_update() lock */ ! int stat_fd; /* change detection */ time_t mtime; /* mod time at open */ } DICT; diff -cr /tmp/postfix-1.1.4/src/util/dict_alloc.c ./src/util/dict_alloc.c *** /tmp/postfix-1.1.4/src/util/dict_alloc.c Fri Jan 26 10:21:45 2001 --- ./src/util/dict_alloc.c Mon Mar 11 18:53:13 2002 *************** *** 116,122 **** dict->delete = dict_default_delete; dict->sequence = dict_default_sequence; dict->close = dict_default_close; ! dict->fd = -1; dict->mtime = 0; return dict; } --- 116,123 ---- dict->delete = dict_default_delete; dict->sequence = dict_default_sequence; dict->close = dict_default_close; ! dict->lock_fd = -1; ! dict->stat_fd = -1; dict->mtime = 0; return dict; } diff -cr /tmp/postfix-1.1.4/src/util/dict_db.c ./src/util/dict_db.c *** /tmp/postfix-1.1.4/src/util/dict_db.c Fri Jan 25 10:27:03 2002 --- ./src/util/dict_db.c Mon Mar 11 18:55:06 2002 *************** *** 158,164 **** * Acquire a shared lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_SHARED) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); /* --- 158,164 ---- * Acquire a shared lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_SHARED) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); /* *************** *** 198,204 **** * Release the shared lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); return (result); --- 198,204 ---- * Release the shared lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); return (result); *************** *** 246,252 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); /* --- 246,252 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); /* *************** *** 271,277 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); } --- 271,277 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); } *************** *** 289,295 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); /* --- 289,295 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); /* *************** *** 325,331 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); return status; --- 325,331 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); return status; *************** *** 367,373 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); if ((status = db->seq(db, &db_key, &db_value, db_function)) < 0) --- 367,373 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_db->dict.name); if ((status = db->seq(db, &db_key, &db_value, db_function)) < 0) *************** *** 377,383 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); if (status == 0) { --- 377,383 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_db->dict.name); if (status == 0) { *************** *** 537,544 **** dict_db->dict.delete = dict_db_delete; dict_db->dict.sequence = dict_db_sequence; dict_db->dict.close = dict_db_close; ! dict_db->dict.fd = dbfd; ! if (fstat(dict_db->dict.fd, &st) < 0) msg_fatal("dict_db_open: fstat: %m"); dict_db->dict.mtime = st.st_mtime; --- 537,545 ---- dict_db->dict.delete = dict_db_delete; dict_db->dict.sequence = dict_db_sequence; dict_db->dict.close = dict_db_close; ! dict_db->dict.lock_fd = dbfd; ! dict_db->dict.stat_fd = dbfd; ! if (fstat(dict_db->dict.stat_fd, &st) < 0) msg_fatal("dict_db_open: fstat: %m"); dict_db->dict.mtime = st.st_mtime; *************** *** 552,558 **** && st.st_mtime < time((time_t *) 0) - 100) msg_warn("database %s is older than source file %s", db_path, path); ! close_on_exec(dict_db->dict.fd, CLOSE_ON_EXEC); dict_db->dict.flags = dict_flags | DICT_FLAG_FIXED; if ((dict_flags & (DICT_FLAG_TRY1NULL | DICT_FLAG_TRY0NULL)) == 0) dict_db->dict.flags |= (DICT_FLAG_TRY1NULL | DICT_FLAG_TRY0NULL); --- 553,560 ---- && st.st_mtime < time((time_t *) 0) - 100) msg_warn("database %s is older than source file %s", db_path, path); ! close_on_exec(dict_db->dict.lock_fd, CLOSE_ON_EXEC); ! close_on_exec(dict_db->dict.stat_fd, CLOSE_ON_EXEC); dict_db->dict.flags = dict_flags | DICT_FLAG_FIXED; if ((dict_flags & (DICT_FLAG_TRY1NULL | DICT_FLAG_TRY0NULL)) == 0) dict_db->dict.flags |= (DICT_FLAG_TRY1NULL | DICT_FLAG_TRY0NULL); diff -cr /tmp/postfix-1.1.4/src/util/dict_dbm.c ./src/util/dict_dbm.c *** /tmp/postfix-1.1.4/src/util/dict_dbm.c Wed Feb 20 10:40:30 2002 --- ./src/util/dict_dbm.c Mon Mar 11 19:29:15 2002 *************** *** 84,90 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_SHARED) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* --- 84,90 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_SHARED) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* *************** *** 122,128 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); return (result); --- 122,128 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); return (result); *************** *** 167,173 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* --- 167,173 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* *************** *** 189,195 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); } --- 189,195 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); } *************** *** 206,212 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* --- 206,212 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* *************** *** 247,253 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); return (status); --- 247,253 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); return (status); *************** *** 270,276 **** * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* --- 270,276 ---- * Acquire an exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_EXCLUSIVE) < 0) msg_fatal("%s: lock dictionary: %m", dict_dbm->dict.name); /* *************** *** 291,297 **** * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); if (dbm_key.dptr != 0 && dbm_key.dsize > 0) { --- 291,297 ---- * Release the exclusive lock. */ if ((dict->flags & DICT_FLAG_LOCK) ! && myflock(dict->lock_fd, INTERNAL_LOCK, MYFLOCK_OP_NONE) < 0) msg_fatal("%s: unlock dictionary: %m", dict_dbm->dict.name); if (dbm_key.dptr != 0 && dbm_key.dsize > 0) { *************** *** 404,411 **** dict_dbm->dict.delete = dict_dbm_delete; dict_dbm->dict.sequence = dict_dbm_sequence; dict_dbm->dict.close = dict_dbm_close; ! dict_dbm->dict.fd = dbm_pagfno(dbm); ! if (fstat(dict_dbm->dict.fd, &st) < 0) msg_fatal("dict_dbm_open: fstat: %m"); dict_dbm->dict.mtime = st.st_mtime; --- 404,412 ---- dict_dbm->dict.delete = dict_dbm_delete; dict_dbm->dict.sequence = dict_dbm_sequence; dict_dbm->dict.close = dict_dbm_close; ! dict_dbm->dict.lock_fd = dbm_dirfno(dbm); ! dict_dbm->dict.stat_fd = dbm_pagfno(dbm); ! if (fstat(dict_dbm->dict.stat_fd, &st) < 0) msg_fatal("dict_dbm_open: fstat: %m"); dict_dbm->dict.mtime = st.st_mtime;