From 9fc0db5ed5973684691c4cf91dabe66cd432519c Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Sun, 5 Sep 1999 00:00:00 -0500 Subject: [PATCH] snapshot-19990905 --- postfix/HISTORY | 25 +- postfix/LDAP_README | 7 + postfix/PCRE_README | 6 +- postfix/RELEASE_NOTES | 39 +- postfix/cleanup/Makefile.in | 1 + postfix/cleanup/cleanup_skip.c | 4 +- postfix/conf/canonical | 2 + postfix/conf/relocated | 2 + postfix/conf/transport | 2 + postfix/conf/virtual | 2 + postfix/global/mail_params.h | 2 + postfix/global/mail_version.h | 2 +- postfix/html/faq.html | 97 +++- postfix/html/local.8.html | 2 +- postfix/html/master.8.html | 26 +- postfix/html/postalias.1.html | 2 +- postfix/html/postcat.1.html | 6 +- postfix/html/postconf.1.html | 14 +- postfix/html/postfix.1.html | 12 +- postfix/html/postkick.1.html | 2 +- postfix/html/postlock.1.html | 8 +- postfix/html/postmap.1.html | 2 +- postfix/html/postsuper.1.html | 6 +- postfix/html/relocated.5.html | 4 +- postfix/html/sendmail.1.html | 2 +- postfix/include/argv.h | 44 -- postfix/include/attr.h | 33 -- postfix/include/binhash.h | 58 --- postfix/include/chroot_uid.h | 29 -- postfix/include/connect.h | 37 -- postfix/include/dict.h | 100 ---- postfix/include/dict_db.h | 36 -- postfix/include/dict_dbm.h | 35 -- postfix/include/dict_env.h | 35 -- postfix/include/dict_ht.h | 36 -- postfix/include/dict_ldap.h | 31 -- postfix/include/dict_mysql.h | 46 -- postfix/include/dict_ni.h | 32 -- postfix/include/dict_nis.h | 35 -- postfix/include/dict_nisplus.h | 35 -- postfix/include/dir_forest.h | 35 -- postfix/include/events.h | 62 --- postfix/include/exec_command.h | 30 -- postfix/include/find_inet.h | 33 -- postfix/include/fsspace.h | 33 -- postfix/include/fullname.h | 29 -- postfix/include/get_domainname.h | 29 -- postfix/include/get_hostname.h | 29 -- postfix/include/htable.h | 57 --- postfix/include/inet_addr_host.h | 35 -- postfix/include/inet_addr_list.h | 43 -- postfix/include/inet_addr_local.h | 35 -- postfix/include/inet_util.h | 29 -- postfix/include/iostuff.h | 48 -- postfix/include/line_wrap.h | 31 -- postfix/include/listen.h | 42 -- postfix/include/lstat_as.h | 30 -- postfix/include/mac_parse.h | 44 -- postfix/include/make_dirs.h | 30 -- postfix/include/match_list.h | 35 -- postfix/include/match_ops.h | 31 -- postfix/include/msg.h | 42 -- postfix/include/msg_output.h | 47 -- postfix/include/msg_syslog.h | 34 -- postfix/include/msg_vstream.h | 34 -- postfix/include/mvect.h | 42 -- postfix/include/myflock.h | 38 -- postfix/include/mymalloc.h | 35 -- postfix/include/name_mask.h | 35 -- postfix/include/open_as.h | 30 -- postfix/include/open_lock.h | 41 -- postfix/include/percentm.h | 35 -- postfix/include/posix_signals.h | 59 --- postfix/include/readlline.h | 36 -- postfix/include/ring.h | 45 -- postfix/include/safe.h | 30 -- postfix/include/safe_open.h | 41 -- postfix/include/sane_accept.h | 29 -- postfix/include/scan_dir.h | 37 -- postfix/include/set_eugid.h | 29 -- postfix/include/set_ugid.h | 29 -- postfix/include/sigdelay.h | 31 -- postfix/include/split_at.h | 35 -- postfix/include/stat_as.h | 30 -- postfix/include/stringops.h | 38 -- postfix/include/sys_defs.h | 772 ------------------------------ postfix/include/timed_connect.h | 31 -- postfix/include/timed_wait.h | 30 -- postfix/include/trigger.h | 33 -- postfix/include/username.h | 29 -- postfix/include/valid_hostname.h | 33 -- postfix/include/vbuf.h | 98 ---- postfix/include/vbuf_print.h | 40 -- postfix/include/vstream.h | 135 ------ postfix/include/vstring.h | 98 ---- postfix/include/vstring_vstream.h | 54 --- postfix/lib/.pure | 0 postfix/local/feature.c | 91 ---- postfix/man/man1/postalias.1 | 2 +- postfix/man/man1/postcat.1 | 2 +- postfix/man/man1/postconf.1 | 6 +- postfix/man/man1/postfix.1 | 8 +- postfix/man/man1/postkick.1 | 2 +- postfix/man/man1/postlock.1 | 4 +- postfix/man/man1/postmap.1 | 2 +- postfix/man/man1/postsuper.1 | 2 +- postfix/man/man1/sendmail.1 | 2 +- postfix/man/man8/local.8 | 1 + postfix/man/man8/master.8 | 10 +- postfix/master/master.c | 10 +- postfix/postalias/postalias.c | 2 +- postfix/postcat/postcat.c | 2 +- postfix/postconf/extract.sh | 24 - postfix/postconf/postconf.c | 2 +- postfix/postfix/postfix.c | 8 +- postfix/postkick/postkick.c | 2 +- postfix/postlock/postlock.c | 4 +- postfix/postmap/postmap.c | 2 +- postfix/postsuper/postsuper.c | 2 +- postfix/qmgr/Makefile.in | 1 + postfix/sendmail/Makefile.in | 1 + postfix/sendmail/sendmail.c | 2 +- postfix/smtp/smtp_addr.c | 4 +- postfix/smtpd/smtpd_check.c | 28 +- postfix/util/Makefile.in | 1 - postfix/util/compat.c | 0 postfix/util/dict.c | 6 +- postfix/util/dict_ldap.c | 82 +++- postfix/util/dict_mysql.c | 15 +- postfix/util/dict_pcre.c | 2 +- postfix/util/dup2_pass_on_exec.c | 60 --- postfix/util/match_ops.c | 4 +- 132 files changed, 368 insertions(+), 3932 deletions(-) delete mode 100644 postfix/include/argv.h delete mode 100644 postfix/include/attr.h delete mode 100644 postfix/include/binhash.h delete mode 100644 postfix/include/chroot_uid.h delete mode 100644 postfix/include/connect.h delete mode 100644 postfix/include/dict.h delete mode 100644 postfix/include/dict_db.h delete mode 100644 postfix/include/dict_dbm.h delete mode 100644 postfix/include/dict_env.h delete mode 100644 postfix/include/dict_ht.h delete mode 100644 postfix/include/dict_ldap.h delete mode 100644 postfix/include/dict_mysql.h delete mode 100644 postfix/include/dict_ni.h delete mode 100644 postfix/include/dict_nis.h delete mode 100644 postfix/include/dict_nisplus.h delete mode 100644 postfix/include/dir_forest.h delete mode 100644 postfix/include/events.h delete mode 100644 postfix/include/exec_command.h delete mode 100644 postfix/include/find_inet.h delete mode 100644 postfix/include/fsspace.h delete mode 100644 postfix/include/fullname.h delete mode 100644 postfix/include/get_domainname.h delete mode 100644 postfix/include/get_hostname.h delete mode 100644 postfix/include/htable.h delete mode 100644 postfix/include/inet_addr_host.h delete mode 100644 postfix/include/inet_addr_list.h delete mode 100644 postfix/include/inet_addr_local.h delete mode 100644 postfix/include/inet_util.h delete mode 100644 postfix/include/iostuff.h delete mode 100644 postfix/include/line_wrap.h delete mode 100644 postfix/include/listen.h delete mode 100644 postfix/include/lstat_as.h delete mode 100644 postfix/include/mac_parse.h delete mode 100644 postfix/include/make_dirs.h delete mode 100644 postfix/include/match_list.h delete mode 100644 postfix/include/match_ops.h delete mode 100644 postfix/include/msg.h delete mode 100644 postfix/include/msg_output.h delete mode 100644 postfix/include/msg_syslog.h delete mode 100644 postfix/include/msg_vstream.h delete mode 100644 postfix/include/mvect.h delete mode 100644 postfix/include/myflock.h delete mode 100644 postfix/include/mymalloc.h delete mode 100644 postfix/include/name_mask.h delete mode 100644 postfix/include/open_as.h delete mode 100644 postfix/include/open_lock.h delete mode 100644 postfix/include/percentm.h delete mode 100644 postfix/include/posix_signals.h delete mode 100644 postfix/include/readlline.h delete mode 100644 postfix/include/ring.h delete mode 100644 postfix/include/safe.h delete mode 100644 postfix/include/safe_open.h delete mode 100644 postfix/include/sane_accept.h delete mode 100644 postfix/include/scan_dir.h delete mode 100644 postfix/include/set_eugid.h delete mode 100644 postfix/include/set_ugid.h delete mode 100644 postfix/include/sigdelay.h delete mode 100644 postfix/include/split_at.h delete mode 100644 postfix/include/stat_as.h delete mode 100644 postfix/include/stringops.h delete mode 100644 postfix/include/sys_defs.h delete mode 100644 postfix/include/timed_connect.h delete mode 100644 postfix/include/timed_wait.h delete mode 100644 postfix/include/trigger.h delete mode 100644 postfix/include/username.h delete mode 100644 postfix/include/valid_hostname.h delete mode 100644 postfix/include/vbuf.h delete mode 100644 postfix/include/vbuf_print.h delete mode 100644 postfix/include/vstream.h delete mode 100644 postfix/include/vstring.h delete mode 100644 postfix/include/vstring_vstream.h delete mode 100644 postfix/lib/.pure delete mode 100644 postfix/local/feature.c delete mode 100644 postfix/postconf/extract.sh delete mode 100644 postfix/util/compat.c delete mode 100644 postfix/util/dup2_pass_on_exec.c diff --git a/postfix/HISTORY b/postfix/HISTORY index e248fed1a..b193ae6b7 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -2928,7 +2928,7 @@ Apologies for any names omitted. 19990810 - Feature: added "-c config_directory" support to the postconf + Feature: added "-c config_dir" support to the postconf command. This probably means that "-f file" will never be implemented. @@ -3008,3 +3008,26 @@ Apologies for any names omitted. Bugfix: in case of some error conditions the pickup daemon could leak small amounts of memory. + +19990905 + + Bugfix: no more "skipping further client input" warnings + when a message header is rejected. + + Feature: reject_unauth_pipelining SMTP restriction that + rejects mail from clients that improperly use SMTP command + pipelining. + + Robustness: the LDAP client by default no longer looks up + names containing "*". See the lookup_wildcards feature in + LDAP_README. Update by John Hensley. + + Documentation: address masquerading with exceptions FAQ by + Jim Seymour @ jimsun.LinxNet.com. + + Bugfix: mysql reconnect after disconnect by Scott Cotton + Internet Consultants Group, Inc. File: util/dict_myqsl.c. + + Portability: the Postfix to PCRE interface now expects + version 2.08. Postfix is no longer compatible with PCRE + versions before 2.6. diff --git a/postfix/LDAP_README b/postfix/LDAP_README index 76d26eb05..77a0989d1 100644 --- a/postfix/LDAP_README +++ b/postfix/LDAP_README @@ -67,6 +67,13 @@ Defaults are given in parentheses: substitute for the address Postfix is trying to resolve, e.g. ldapsource_query_filter = (&(mail=%s)(paid_up=true)) + lookup_wildcards (no) + Whether to search for addresses containing '*'. This has huge + potential for spammers, so by default, any address containing + '*' will cause the lookup to return nothing. Unless another + dictionary returns a valid lookup for it, the mail will bounce + with an 'unknown user' message. + result_attribute (maildrop) The attribute Postfix will read from any directory entries returned by the lookup, to be resolved to an email address. diff --git a/postfix/PCRE_README b/postfix/PCRE_README index 3e4d21250..d3b4fc9fa 100644 --- a/postfix/PCRE_README +++ b/postfix/PCRE_README @@ -19,10 +19,10 @@ from: You will need to add -DHAS_PCRE and a -I for the PCRE header to CCARGS, and add the path to the PCRE library to AUXLIBS, for example: - make -f Makefile.init makefiles 'CCARGS=-DHAS_PCRE -I../../pcre-2.05' \ - 'AUXLIBS=../../pcre-2.05/libpcre.a' + make -f Makefile.init makefiles 'CCARGS=-DHAS_PCRE -I../../pcre-2.08' \ + 'AUXLIBS=../../pcre-2.08/libpcre.a' -[note: earlier pcre versions have problems -- Wietse] +[note: pcre versions before 2.06 are no longer compatible -- Wietse] One possible use is to add a line to main.cf: diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index cfa6d220f..23bdccade 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -1,5 +1,5 @@ -Incompatible changes with snapshot-19990627: -============================================ +Incompatible changes with postfix-19990904 +========================================== - On systems that use user.lock files to protect system mailboxes against simultaneous updates, Postfix now uses /file/name.lock @@ -7,16 +7,23 @@ files while delivering to files specified in aliases/forward/include files. This is a no-op when the recipient lacks directory write permission. -Major changes with snapshot-19990627: -===================================== +- The LDAP client code no longer looks up name containing "*" +because it could be abused. See the LDAP_README file for how to +restore previous behavior. + +- The Postfix to PCRE interface now expects PCRE version 2.08. +Postfix is no longer compatible with PCRE versions prior to 2.06. + +Major changes with postfix-19990904 +=================================== Several bugfixes, none related to security. See the HISTORY file for a complete list of changes. - Postfix is now distributed under IBM Public License Version 1.0 -(June 14, 1999), which does not carry the controversial termination -clause. The new license does have a requirement that contributors -make source code available. +which does not carry the controversial termination clause. The new +license does have a requirement that contributors make source code +available. - The ugly Delivered-To: header can now be turned off selectively. The default setting is: "prepend_delivered_header = command, file, @@ -26,6 +33,24 @@ mail is not recommended. - mysql client support by Scott Cotton and Joshua Marcus, Internet Consultants Group, Inc. See the file MYSQL_README for instructions. +- reject_unauth_destination SMTP recipient restriction that rejects +destinations not in $relay_domains. Unlike the check_relay_domains +restriction, reject_unauth_destination ignores the client hostname. +By Lamont Jones of Hewlett-Packard. + +- reject_unauth_pipelining SMTP *anything* restriction to stop mail +from spammers that improperly use SMTP command pipelining to speed +up their deliveries. + +- Postfix "sendmail" now issues a warning and drops privileges if +installed set-uid root. + +- No more duplicate delivery when "postfix reload" is immediately +followed by "sendmail -q". + +- No more "invalid argument" errors when a Postfix daemon opens a +DB/DBM file while some other process is changing the file. + - Portability to the Mac OS X Server, Reliant Unix, AIX 3.2.5 and Ultrix 4.3. diff --git a/postfix/cleanup/Makefile.in b/postfix/cleanup/Makefile.in index 717854cec..23eaa2913 100644 --- a/postfix/cleanup/Makefile.in +++ b/postfix/cleanup/Makefile.in @@ -261,6 +261,7 @@ cleanup_skip.o: ../include/sys_defs.h cleanup_skip.o: ../include/msg.h cleanup_skip.o: ../include/vstream.h cleanup_skip.o: ../include/vbuf.h +cleanup_skip.o: ../include/cleanup_user.h cleanup_skip.o: ../include/record.h cleanup_skip.o: ../include/vstring.h cleanup_skip.o: ../include/rec_type.h diff --git a/postfix/cleanup/cleanup_skip.c b/postfix/cleanup/cleanup_skip.c index d9d22ed5c..a5ace4964 100644 --- a/postfix/cleanup/cleanup_skip.c +++ b/postfix/cleanup/cleanup_skip.c @@ -33,6 +33,7 @@ /* Global library. */ +#include #include #include @@ -46,7 +47,8 @@ void cleanup_skip(void) { int type; - msg_warn("%s: skipping further client input", cleanup_queue_id); + if ((cleanup_errs & CLEANUP_STAT_CONT) == 0) + msg_warn("%s: skipping further client input", cleanup_queue_id); /* * XXX Rely on the front-end programs to enforce record size limits. diff --git a/postfix/conf/canonical b/postfix/conf/canonical index 9ac1bc0fb..1f464bb60 100644 --- a/postfix/conf/canonical +++ b/postfix/conf/canonical @@ -111,3 +111,5 @@ # P.O. Box 704 # Yorktown Heights, NY 10598, USA #-- + +# By default, this file is not used. See sample-canonical.cf diff --git a/postfix/conf/relocated b/postfix/conf/relocated index ed1a40c66..1c3c216cf 100644 --- a/postfix/conf/relocated +++ b/postfix/conf/relocated @@ -76,3 +76,5 @@ # P.O. Box 704 # Yorktown Heights, NY 10598, USA #-- + +# By default, this file is not used. See sample-relocated.cf diff --git a/postfix/conf/transport b/postfix/conf/transport index 2a1333e0c..cfcb2659b 100644 --- a/postfix/conf/transport +++ b/postfix/conf/transport @@ -107,3 +107,5 @@ # P.O. Box 704 # Yorktown Heights, NY 10598, USA #-- + +# By default, this file is not used. See sample-transport.cf diff --git a/postfix/conf/virtual b/postfix/conf/virtual index 01c0aab8a..8d8405af0 100644 --- a/postfix/conf/virtual +++ b/postfix/conf/virtual @@ -103,3 +103,5 @@ # P.O. Box 704 # Yorktown Heights, NY 10598, USA #-- + +# By default, this file is not used. See sample-virtual.cf diff --git a/postfix/global/mail_params.h b/postfix/global/mail_params.h index 876f82e32..204fb0140 100644 --- a/postfix/global/mail_params.h +++ b/postfix/global/mail_params.h @@ -793,6 +793,8 @@ extern char *var_maps_rbl_domains; #define DEF_SMTPD_DELAY_REJECT 1 extern int var_smtpd_delay_reject; +#define REJECT_UNAUTH_PIPE "reject_unauth_pipelining" + /* * Other. */ diff --git a/postfix/global/mail_version.h b/postfix/global/mail_version.h index 0af7f54fc..4526e758c 100644 --- a/postfix/global/mail_version.h +++ b/postfix/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-19990904" +#define DEF_MAIL_VERSION "Snapshot-19990905" extern char *var_mail_version; /* LICENSE diff --git a/postfix/html/faq.html b/postfix/html/faq.html index 634c56079..087b577df 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -30,6 +30,8 @@
  • Delivering some users locally while sending mail as user@domain +
  • Address masquerading with exceptions +
  • Support for virus scanning
  • Support for maildir-style mailboxes @@ -421,6 +423,95 @@ effective.
    +

    Address masquerading with exceptions

    + +For people outside your organization it can be desirable to only +see addresses of the form user@company.com rather than +addresses with individual internal host names. This can be achieved +with address masquerading. + +

    + +Address masquerading is intended for use only on mail gateways. + +

      + +
    • In order to have all mail through the gateway host appear as +coming from user@my.domain, edit /etc/postfix/main.cf +and specify: + +

      + +

      + +
      masquerade_domains = $mydomain + +
      + +

      + +Note that the gateway should have append_dot_domain and +append_myorigin turned on (which is the default setting) so +that all addresses are fully qualified before they are subjected +to address masquerading. + +

    + +

    + +In some cases, you may wish to have certain users or hosts exempted +from masquerading. + +

      + +
    • To exempt certain users from masquerading, +such as root, add: + +

      + +

      + +
      masquerade_exceptions = root + +
      + +

      + +

    • To exempt certain hosts from masquerading, write +masquerade_domains as: + +

      + +

      + +
      masquerade_domains = somehost.my.domain otherhost.my.domain +$mydomain + +
      + +

      + +Note that the order above is crucial: exemptions such as +somehost.my.domain must precede $mydomain in the +statement. + +

      + +It should go without saying that if a particular host you wish to +exempt this way is originating mail as user@my.domain in +the first place, you can hardly exempt it. + +

      + +

    + +As usual, execute the command postfix reload to make the changes +effective. + +

    + +


    +

    Support for virus scanning

    Would not it be great if operating systems and applications actually @@ -531,7 +622,7 @@ shell are replaced by underscores.
    EXTENSION
    Optional address extension part. -
    HOME
    The recpient's home directory. +
    HOME
    The recipient's home directory.
    LOCAL
    The text to the left-hand side of the @ in the recipient address, for example, $USER+$EXTENSION. @@ -975,8 +1066,8 @@ version which has a db-1.85 compatible interface.

    Use the following commands in the Postfix top-level directory. -The LD_LIBRARY_PATH unsets may be required to avoid linking in the -wrong libraries. +The LD_LIBRARY_PATH unset commands may be required to avoid linking +in the wrong libraries.

    diff --git a/postfix/html/local.8.html b/postfix/html/local.8.html index 2711c48ee..26e48689e 100644 --- a/postfix/html/local.8.html +++ b/postfix/html/local.8.html @@ -48,7 +48,7 @@ LOCAL(8) LOCAL(8) Characters that may have special meaning to the shell or file system are replaced by underscores. The list of acceptable characters is specified with the forward_expan- - sion_filter configuration + sion_filter configuration parameter. An alias or ~/.forward file may list any combination of external commands, destination file names, :include: diff --git a/postfix/html/master.8.html b/postfix/html/master.8.html index c93f0ce9c..723dad55c 100644 --- a/postfix/html/master.8.html +++ b/postfix/html/master.8.html @@ -92,7 +92,7 @@ MASTER(8) MASTER(8) in the main.cf configuration file. MAIL_CONFIG - Directory with configuration files. + Directory with Postfix configuration files. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant @@ -105,26 +105,26 @@ MASTER(8) MASTER(8) The owner of the mail queue and of most Postfix processes. - program_directory - Directory with Postfix support programs and dae- - mons. + command_directory + Directory with Postfix support programs. + + daemon_directory + Directory with Postfix daemon programs. queue_directory - Top-level directory of the Postfix queue. This is + Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. Resource controls default_process_limit - Default limit for the number of simultaneous child + Default limit for the number of simultaneous child processes that provide a given service. max_idle - Limit the time in seconds that a child process + Limit the time in seconds that a child process waits between service requests. - max_use - Limit the number of service requests handled by a @@ -137,10 +137,12 @@ MASTER(8) MASTER(8) MASTER(8) MASTER(8) + max_use + Limit the number of service requests handled by a child process. service_throttle_time - Time to avoid forking a server that appears to be + Time to avoid forking a server that appears to be broken. FILES @@ -154,7 +156,7 @@ MASTER(8) MASTER(8) syslogd(8) system logging LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -189,8 +191,6 @@ MASTER(8) MASTER(8) - - diff --git a/postfix/html/postalias.1.html b/postfix/html/postalias.1.html index 76db05a8f..051f475e8 100644 --- a/postfix/html/postalias.1.html +++ b/postfix/html/postalias.1.html @@ -87,7 +87,7 @@ POSTALIAS(1) POSTALIAS(1) ENVIRONMENT MAIL_CONFIG - Mail configuration database. + Directory with Postfix configuration files. MAIL_VERBOSE Enable verbose logging for debugging purposes. diff --git a/postfix/html/postcat.1.html b/postfix/html/postcat.1.html index 692b9c843..57d03a854 100644 --- a/postfix/html/postcat.1.html +++ b/postfix/html/postcat.1.html @@ -19,9 +19,9 @@ POSTCAT(1) POSTCAT(1) Options: - -v Enable verbose mode for debugging purposes. Multi- - ple -v options make the software increasingly ver- - bose. + -v Enable verbose logging for debugging purposes. Mul- + tiple -v options make the software increasingly + verbose. DIAGNOSTICS Problems are reported to the standard error stream. diff --git a/postfix/html/postconf.1.html b/postfix/html/postconf.1.html index a9351d848..72b218602 100644 --- a/postfix/html/postconf.1.html +++ b/postfix/html/postconf.1.html @@ -25,19 +25,17 @@ POSTCONF(1) POSTCONF(1) -d Print default parameter settings instead of actual settings. - -h Show parameter values only, not the ``name ='' + -h Show parameter values only, not the ``name = '' label that normally precedes the value. -n Print non-default parameter settings only. - -v Enable verbose mode for debugging purposes. Multi- - ple -v options make the software increasingly ver- - bose. + -v Enable verbose logging for debugging purposes. Mul- + tiple -v options make the software increasingly + verbose. DIAGNOSTICS - Problems are reported to the standard error stream. Fatal - error: out of memory, file not found, invalid main.cf - parameter syntax. + Problems are reported to the standard error stream. LICENSE The Secure Mailer license must be distributed with this @@ -62,6 +60,8 @@ POSTCONF(1) POSTCONF(1) + + 1 diff --git a/postfix/html/postfix.1.html b/postfix/html/postfix.1.html index a91f9577b..6b4a3578a 100644 --- a/postfix/html/postfix.1.html +++ b/postfix/html/postfix.1.html @@ -80,7 +80,7 @@ POSTFIX(1) POSTFIX(1) ables: MAIL_CONFIG - The Postfix configuration directory. + Directory with Postfix configuration files. MAIL_VERBOSE This is set when the -v command-line option is pre- @@ -94,15 +94,15 @@ POSTFIX(1) POSTFIX(1) as process environment variables with the same names: command_directory - The directory with Postfix support commands - (default: $program_directory). + Directory with Postfix support commands (default: + $program_directory). daemon_directory - The directory with Postfix daemon programs - (default: $program_directory). + Directory with Postfix daemon programs (default: + $program_directory). config_directory - The directory with configuration files and with + Directory with Postfix configuration files and with administrative shell scripts. queue_directory diff --git a/postfix/html/postkick.1.html b/postfix/html/postkick.1.html index 0a23c3b70..639eea0a0 100644 --- a/postfix/html/postkick.1.html +++ b/postfix/html/postkick.1.html @@ -50,7 +50,7 @@ POSTKICK(1) POSTKICK(1) Directory with Postfix configuration files. MAIL_VERBOSE - Enable verbose logging. + Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant diff --git a/postfix/html/postlock.1.html b/postfix/html/postlock.1.html index d87928ff5..b061bc96f 100644 --- a/postfix/html/postlock.1.html +++ b/postfix/html/postlock.1.html @@ -22,9 +22,9 @@ POSTLOCK(1) POSTLOCK(1) Read configuration information from main.cf in the named configuration directory. - -v Enable verbose mode for debugging purposes. Multi- - ple -v options make the software increasingly ver- - bose. + -v Enable verbose logging for debugging purposes. Mul- + tiple -v options make the software increasingly + verbose. Arguments: @@ -54,7 +54,7 @@ POSTLOCK(1) POSTLOCK(1) Directory with Postfix configuration files. MAIL_VERBOSE - Enable verbose logging. + Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant diff --git a/postfix/html/postmap.1.html b/postfix/html/postmap.1.html index 7855930a3..34f88ded0 100644 --- a/postfix/html/postmap.1.html +++ b/postfix/html/postmap.1.html @@ -106,7 +106,7 @@ POSTMAP(1) POSTMAP(1) ENVIRONMENT MAIL_CONFIG - Mail configuration database + Directory with Postfix configuration files. MAIL_VERBOSE Enable verbose logging for debugging purposes. diff --git a/postfix/html/postsuper.1.html b/postfix/html/postsuper.1.html index feddac517..15aa92cc5 100644 --- a/postfix/html/postsuper.1.html +++ b/postfix/html/postsuper.1.html @@ -36,9 +36,9 @@ POSTSUPER(1) POSTSUPER(1) -p Purge stale files (files that are left over after system or software crashes). - -v Enable verbose mode for debugging purposes. Multi- - ple -v options make the software increasingly ver- - bose. + -v Enable verbose logging for debugging purposes. Mul- + tiple -v options make the software increasingly + verbose. DIAGNOSTICS Problems are reported to the standard error stream and to diff --git a/postfix/html/relocated.5.html b/postfix/html/relocated.5.html index 99ba43c5a..a7788b8a4 100644 --- a/postfix/html/relocated.5.html +++ b/postfix/html/relocated.5.html @@ -95,8 +95,8 @@ RELOCATED(5) RELOCATED(5) postmap(1) create lookup table LICENSE - The Secure Mailer license must be distributed with - this software. + The Secure Mailer license must be distributed with this + software. AUTHOR(S) Wietse Venema diff --git a/postfix/html/sendmail.1.html b/postfix/html/sendmail.1.html index 421cb3141..77c41d3c6 100644 --- a/postfix/html/sendmail.1.html +++ b/postfix/html/sendmail.1.html @@ -212,7 +212,7 @@ SENDMAIL(1) SENDMAIL(1) Directory with Postfix configuration files. MAIL_VERBOSE - Enable verbose logging + Enable verbose logging for debugging purposes. MAIL_DEBUG Enable debugging with an external command, as spec- diff --git a/postfix/include/argv.h b/postfix/include/argv.h deleted file mode 100644 index 0d5562310..000000000 --- a/postfix/include/argv.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _ARGV_H_INCLUDED_ -#define _ARGV_H_INCLUDED_ - -/*++ -/* NAME -/* argv 3h -/* SUMMARY -/* string array utilities -/* SYNOPSIS -/* #include "argv.h" - DESCRIPTION - .nf - - /* - * External interface. - */ -typedef struct ARGV { - int len; /* number of array elements */ - int argc; /* array elements in use */ - char **argv; /* string array */ -} ARGV; - -extern ARGV *argv_alloc(int); -extern void argv_add(ARGV *,...); -extern void argv_terminate(ARGV *); -extern ARGV *argv_free(ARGV *); - -extern ARGV *argv_split(const char *, const char *); -extern ARGV *argv_split_append(ARGV *, const char *, const char *); - -#define ARGV_END ((char *) 0) - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/attr.h b/postfix/include/attr.h deleted file mode 100644 index e81381ed3..000000000 --- a/postfix/include/attr.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _ATTR_H_INCLUDED_ -#define _ATTR_H_INCLUDED_ - -/*++ -/* NAME -/* attr 3h -/* SUMMARY -/* attribute list manager -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern void attr_enter(HTABLE *, const char *, const char *); -extern void attr_free(HTABLE *); - -#define attr_find(table, name) htable_find((table), (name)) - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/binhash.h b/postfix/include/binhash.h deleted file mode 100644 index f94e35bee..000000000 --- a/postfix/include/binhash.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _BINHASH_H_INCLUDED_ -#define _BINHASH_H_INCLUDED_ - -/*++ -/* NAME -/* binhash 3h -/* SUMMARY -/* hash table manager -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* Structure of one hash table entry. */ - -typedef struct BINHASH_INFO { - char *key; /* lookup key */ - int key_len; /* key length */ - char *value; /* associated value */ - struct BINHASH_INFO *next; /* colliding entry */ - struct BINHASH_INFO *prev; /* colliding entry */ -} BINHASH_INFO; - - /* Structure of one hash table. */ - -typedef struct BINHASH { - int size; /* length of entries array */ - int used; /* number of entries in table */ - BINHASH_INFO **data; /* entries array, auto-resized */ -} BINHASH; - -extern BINHASH *binhash_create(int); -extern BINHASH_INFO *binhash_enter(BINHASH *, const char *, int, char *); -extern BINHASH_INFO *binhash_locate(BINHASH *, const char *, int); -extern char *binhash_find(BINHASH *, const char *, int); -extern void binhash_delete(BINHASH *, const char *, int, void (*) (char *)); -extern void binhash_free(BINHASH *, void (*) (char *)); -extern void binhash_walk(BINHASH *, void (*) (BINHASH_INFO *, char *), char *); -extern BINHASH_INFO **binhash_list(BINHASH *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/* CREATION DATE -/* Thu Feb 20 16:54:29 EST 1997 -/* LAST MODIFICATION -/* %E% %U% -/* VERSION/RELEASE -/* %I% -/*--*/ - -#endif diff --git a/postfix/include/chroot_uid.h b/postfix/include/chroot_uid.h deleted file mode 100644 index f2a839920..000000000 --- a/postfix/include/chroot_uid.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _CHROOT_UID_H_INCLUDED_ -#define _CHROOT_UID_H_INCLUDED_ - -/*++ -/* NAME -/* chroot_uid 3h -/* SUMMARY -/* limit possible damage a process can do -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern void chroot_uid(const char *, const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/connect.h b/postfix/include/connect.h deleted file mode 100644 index 080b99c06..000000000 --- a/postfix/include/connect.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _CONNECT_H_INCLUDED_ -#define _CONNECT_H_INCLUDED_ - -/*++ -/* NAME -/* connect 3h -/* SUMMARY -/* client interface file -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * Client external interface. - */ -extern int unix_connect(const char *, int, int); -extern int inet_connect(const char *, int, int); -extern int stream_connect(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict.h b/postfix/include/dict.h deleted file mode 100644 index 3ec4e93fe..000000000 --- a/postfix/include/dict.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef _DICT_H_INCLUDED_ -#define _DICT_H_INCLUDED_ - -/*++ -/* NAME -/* dict 3h -/* SUMMARY -/* dictionary manager -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * Utility library. - */ -#include - - /* - * Generic dictionary interface - in reality, a dictionary extends this - * structure with private members to maintain internal state. - */ -typedef struct DICT { - int flags; /* see below */ - const char *(*lookup) (struct DICT *, const char *); - void (*update) (struct DICT *, const char *, const char *); - 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; - -#define DICT_FLAG_DUP_WARN (1<<0) /* if file, warn about dups */ -#define DICT_FLAG_DUP_IGNORE (1<<1) /* if file, ignore dups */ -#define DICT_FLAG_TRY0NULL (1<<2) /* do not append 0 to key/value */ -#define DICT_FLAG_TRY1NULL (1<<3) /* append 0 to key/value */ -#define DICT_FLAG_FIXED (1<<4) /* fixed key map */ -#define DICT_FLAG_PATTERN (1<<5) /* keys are patterns */ -#define DICT_FLAG_LOCK (1<<6) /* lock before access */ -#define DICT_FLAG_DUP_REPLACE (1<<7) /* if file, replace dups */ - -extern int dict_unknown_allowed; -extern int dict_errno; - -#define DICT_ERR_RETRY 1 /* soft error */ - - /* - * Sequence function types. - */ -#define DICT_SEQ_FUN_FIRST 0 /* set cursor to first record */ -#define DICT_SEQ_FUN_NEXT 1 /* set cursor to next record */ - - /* - * High-level interface, with logical dictionary names. - */ -extern void dict_register(const char *, DICT *); -extern DICT *dict_handle(const char *); -extern void dict_unregister(const char *); -extern void dict_update(const char *, const char *, const char *); -extern const char *dict_lookup(const char *, const char *); -extern int dict_delete(const char *, const char *); -extern int dict_sequence(const char *, const int, const char **, const char **); -extern void dict_load_file(const char *, const char *); -extern void dict_load_fp(const char *, VSTREAM *); -extern const char *dict_eval(const char *, const char *, int); - - /* - * Low-level interface, with physical dictionary handles. - */ -extern DICT *dict_open(const char *, int, int); -extern DICT *dict_open3(const char *, const char *, int, int); -extern void dict_open_register(const char *, DICT *(*) (const char *, int, int)); - -#define dict_get(dp, key) (dp)->lookup((dp), (key)) -#define dict_put(dp, key, val) (dp)->update((dp), (key), (val)) -#define dict_del(dp, key) (dp)->delete((dp), (key)) -#define dict_seq(dp, f, key, val) (dp)->sequence((dp), (f), (key), (val)) -#define dict_close(dp) (dp)->close(dp) -typedef void (*DICT_WALK_ACTION) (const char *, DICT *, char *); -extern void dict_walk(DICT_WALK_ACTION, char *); -extern int dict_changed(void); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict_db.h b/postfix/include/dict_db.h deleted file mode 100644 index 43d7e35ab..000000000 --- a/postfix/include/dict_db.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _DICT_DB_H_INCLUDED_ -#define _DICT_DB_H_INCLUDED_ - -/*++ -/* NAME -/* dict_db 3h -/* SUMMARY -/* dictionary manager interface to DB files -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_hash_open(const char *, int, int); -extern DICT *dict_btree_open(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict_dbm.h b/postfix/include/dict_dbm.h deleted file mode 100644 index e15e8fb72..000000000 --- a/postfix/include/dict_dbm.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _DICT_DBN_H_INCLUDED_ -#define _DICT_DBN_H_INCLUDED_ - -/*++ -/* NAME -/* dict_dbm 3h -/* SUMMARY -/* dictionary manager interface to DBM files -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_dbm_open(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict_env.h b/postfix/include/dict_env.h deleted file mode 100644 index f49e10551..000000000 --- a/postfix/include/dict_env.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _DICT_ENV_H_INCLUDED_ -#define _DICT_ENV_H_INCLUDED_ - -/*++ -/* NAME -/* dict_env 3h -/* SUMMARY -/* dictionary manager interface to environment variables -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_env_open(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict_ht.h b/postfix/include/dict_ht.h deleted file mode 100644 index 4f408bc97..000000000 --- a/postfix/include/dict_ht.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _DICT_HT_H_INCLUDED_ -#define _DICT_HT_H_INCLUDED_ - -/*++ -/* NAME -/* dict_ht 3h -/* SUMMARY -/* dictionary manager interface to hash tables -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include -#include - - /* - * External interface. - */ -extern DICT *dict_ht_open(HTABLE *, void (*) (char *)); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict_ldap.h b/postfix/include/dict_ldap.h deleted file mode 100644 index 818835df0..000000000 --- a/postfix/include/dict_ldap.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _DICT_LDAP_H_INCLUDED_ -#define _DICT_LDAP_H_INCLUDED_ - -/*++ -/* NAME -/* dict_ldap 3h -/* SUMMARY -/* dictionary manager interface to LDAP maps -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_ldap_open(const char *, int, int); - -/* AUTHOR(S) -/* Wietse Venema -/* IBM T.J. Watson Research -/* P.O. Box 704 -/* Yorktown Heights, NY 10532, USA -/*--*/ - -#endif diff --git a/postfix/include/dict_mysql.h b/postfix/include/dict_mysql.h deleted file mode 100644 index 601ccda34..000000000 --- a/postfix/include/dict_mysql.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifdef HAS_MYSQL - -#include -#include "mysql.h" - -#define STATACTIVE 0 -#define STATFAIL 1 -#define STATUNTRIED 2 -#define RETRY_CONN_INTV 300 /* 5 minutes */ - -extern DICT *dict_mysql_open(const char *name, int unused_flags, int dict_flags); - -typedef struct { - char *hostname; - int stat; /* STATUNTRIED | STATFAIL | STATCUR */ - time_t ts; /* used for attempting reconnection - * every so often if a host is down */ - MYSQL db; -} HOST; - - -typedef struct { - char *username; /* login for database */ - char *password; /* password for database */ - char *dbname; /* the name of the database on all - * the servers */ - HOST *db_hosts; /* the hosts on which the databases - * reside */ - int len_hosts; /* number of hosts */ -} PLMYSQL; - -extern PLMYSQL *plmysql_init(char *dbname, char *hostnames[], int len_hosts); - -extern int plmysql_connect(PLMYSQL *PLDB, char *username, char *password); - -MYSQL_RES *plmysql_query(PLMYSQL *PLDB, const char *query); - -void plmysql_dealloc(PLMYSQL *PLDB); - -inline void plmysql_down_host(HOST *host); - -int plmysql_connect_single(PLMYSQL *PLDB, int host); - -int plmysql_ready_reconn(HOST host); - -#endif diff --git a/postfix/include/dict_ni.h b/postfix/include/dict_ni.h deleted file mode 100644 index b0221a4b6..000000000 --- a/postfix/include/dict_ni.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _DICT_NI_H_INCLUDED_ -#define _DICT_NI_H_INCLUDED_ - -/*++ -/* NAME -/* dict_ni 3h -/* SUMMARY -/* dictionary manager interface to NetInfo maps -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_ni_open(const char *, int, int); - -/* AUTHOR(S) -/* Pieter Schoenmakers -/* Eindhoven University of Technology -/* P.O. Box 513 -/* 5600 MB Eindhoven -/* The Netherlands -/*--*/ - -#endif diff --git a/postfix/include/dict_nis.h b/postfix/include/dict_nis.h deleted file mode 100644 index ff2759b7c..000000000 --- a/postfix/include/dict_nis.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _DIST_NIS_H_INCLUDED_ -#define _DIST_NIS_H_INCLUDED_ - -/*++ -/* NAME -/* dict_nis 3h -/* SUMMARY -/* dictionary manager interface to NIS maps -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_nis_open(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dict_nisplus.h b/postfix/include/dict_nisplus.h deleted file mode 100644 index f43b3141b..000000000 --- a/postfix/include/dict_nisplus.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _DICT_NISPLUS_H_INCLUDED_ -#define _DICT_NISPLUS_H_INCLUDED_ - -/*++ -/* NAME -/* dict_nisplus 3h -/* SUMMARY -/* dictionary manager interface to NIS+ maps -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern DICT *dict_nisplus_open(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/dir_forest.h b/postfix/include/dir_forest.h deleted file mode 100644 index 2c4c3639e..000000000 --- a/postfix/include/dir_forest.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _DIR_FOREST_H_INCLUDED_ -#define _DIR_FOREST_H_INCLUDED_ - -/*++ -/* NAME -/* dir_forest 3h -/* SUMMARY -/* file name to directory forest -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern char *dir_forest(VSTRING *, const char *, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/events.h b/postfix/include/events.h deleted file mode 100644 index bc39b4787..000000000 --- a/postfix/include/events.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef _EVENTS_H_INCLUDED_ -#define _EVENTS_H_INCLUDED_ - -/*++ -/* NAME -/* events 3h -/* SUMMARY -/* event manager -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * External interface. - */ -typedef void (*EVENT_NOTIFY_RDWR) (int, char *); -typedef void (*EVENT_NOTIFY_TIME) (int, char *); - -extern time_t event_time(void); -extern void event_enable_read(int, EVENT_NOTIFY_RDWR, char *); -extern void event_enable_write(int, EVENT_NOTIFY_RDWR, char *); -extern void event_disable_readwrite(int); -extern time_t event_request_timer(EVENT_NOTIFY_TIME, char *, int); -extern int event_cancel_timer(EVENT_NOTIFY_TIME, char *); -extern void event_loop(int); - - /* - * Event codes. - */ -#define EVENT_READ (1<<0) /* read event */ -#define EVENT_WRITE (1<<1) /* write event */ -#define EVENT_XCPT (1<<2) /* exception */ -#define EVENT_TIME (1<<3) /* timer event */ - -#define EVENT_ERROR EVENT_XCPT - - /* - * Dummies. - */ -#define EVENT_NULL_TYPE 0 -#define EVENT_NULL_CONTEXT ((char *) 0) - -/* LICENSE -/* .ad -/* .fi -/* 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 -/* CREATION DATE -/* Wed Jan 29 17:00:03 EST 1997 -/*--*/ - -#endif diff --git a/postfix/include/exec_command.h b/postfix/include/exec_command.h deleted file mode 100644 index 4e77211de..000000000 --- a/postfix/include/exec_command.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _EXEC_COMMAND_H_INCLUDED_ -#define _EXEC_COMMAND_H_INCLUDED_ - -/*++ -/* NAME -/* exec_command 3h -/* SUMMARY -/* execute command -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern NORETURN exec_command(const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/find_inet.h b/postfix/include/find_inet.h deleted file mode 100644 index 0e5ce7271..000000000 --- a/postfix/include/find_inet.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _FIND_INET_H_INCLUDED_ -#define _FIND_INET_H_INCLUDED_ - -/*++ -/* NAME -/* find_inet 3h -/* SUMMARY -/* inet-domain name services -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern unsigned find_inet_addr(const char *); -extern int find_inet_port(const char *, const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/* LAST MODIFICATION -/* Thu Feb 6 12:46:36 EST 1997 -/*--*/ - -#endif diff --git a/postfix/include/fsspace.h b/postfix/include/fsspace.h deleted file mode 100644 index c118e50cf..000000000 --- a/postfix/include/fsspace.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _FSSPACE_H_INCLUDED_ -#define _FSSPACE_H_INCLUDED_ - -/*++ -/* NAME -/* fsspace 3h -/* SUMMARY -/* determine available file system space -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ -struct fsspace { - unsigned long block_size; /* block size */ - unsigned long block_free; /* free space */ -}; - -extern void fsspace(const char *, struct fsspace *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/fullname.h b/postfix/include/fullname.h deleted file mode 100644 index f24492ae7..000000000 --- a/postfix/include/fullname.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _FULLNAME_H_INCLUDED_ -#define _FULLNAME_H_INCLUDED_ - -/*++ -/* NAME -/* fullname 3h -/* SUMMARY -/* lookup personal name of invoking user -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern const char *fullname(void); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/get_domainname.h b/postfix/include/get_domainname.h deleted file mode 100644 index 177e3fdbd..000000000 --- a/postfix/include/get_domainname.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _GET_DOMAINNAME_H_INCLUDED_ -#define _GET_DOMAINNAME_H_INCLUDED_ - -/*++ -/* NAME -/* get_domainname 3h -/* SUMMARY -/* network domain name lookup -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface */ - -extern const char *get_domainname(void); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/get_hostname.h b/postfix/include/get_hostname.h deleted file mode 100644 index 32d2ab2fa..000000000 --- a/postfix/include/get_hostname.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _GET_HOSTNAME_H_INCLUDED_ -#define _GET_HOSTNAME_H_INCLUDED_ - -/*++ -/* NAME -/* get_hostname 3h -/* SUMMARY -/* network name lookup -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface */ - -extern const char *get_hostname(void); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/htable.h b/postfix/include/htable.h deleted file mode 100644 index 72eaa98f1..000000000 --- a/postfix/include/htable.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _HTABLE_H_INCLUDED_ -#define _HTABLE_H_INCLUDED_ - -/*++ -/* NAME -/* htable 3h -/* SUMMARY -/* hash table manager -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* Structure of one hash table entry. */ - -typedef struct HTABLE_INFO { - char *key; /* lookup key */ - char *value; /* associated value */ - struct HTABLE_INFO *next; /* colliding entry */ - struct HTABLE_INFO *prev; /* colliding entry */ -} HTABLE_INFO; - - /* Structure of one hash table. */ - -typedef struct HTABLE { - int size; /* length of entries array */ - int used; /* number of entries in table */ - HTABLE_INFO **data; /* entries array, auto-resized */ -} HTABLE; - -extern HTABLE *htable_create(int); -extern HTABLE_INFO *htable_enter(HTABLE *, const char *, char *); -extern HTABLE_INFO *htable_locate(HTABLE *, const char *); -extern char *htable_find(HTABLE *, const char *); -extern void htable_delete(HTABLE *, const char *, void (*) (char *)); -extern void htable_free(HTABLE *, void (*) (char *)); -extern void htable_walk(HTABLE *, void (*) (HTABLE_INFO *, char *), char *); -extern HTABLE_INFO **htable_list(HTABLE *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/* CREATION DATE -/* Fri Feb 14 13:43:19 EST 1997 -/* LAST MODIFICATION -/* %E% %U% -/* VERSION/RELEASE -/* %I% -/*--*/ - -#endif diff --git a/postfix/include/inet_addr_host.h b/postfix/include/inet_addr_host.h deleted file mode 100644 index 39d150a5a..000000000 --- a/postfix/include/inet_addr_host.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef INET_ADDR_HOST_H_INCLUDED_ -#define INET_ADDR_HOST_H_INCLUDED_ - -/*++ -/* NAME -/* inet_addr_host 3h -/* SUMMARY -/* determine all host internet interface addresses -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern int inet_addr_host(INET_ADDR_LIST *, const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/inet_addr_list.h b/postfix/include/inet_addr_list.h deleted file mode 100644 index 48a4c9712..000000000 --- a/postfix/include/inet_addr_list.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _INET_ADDR_LIST_H_INCLUDED_ -#define _INET_ADDR_LIST_H_INCLUDED_ - -/*++ -/* NAME -/* inet_addr_list 3h -/* SUMMARY -/* internet address list manager -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * External interface. - */ -typedef struct INET_ADDR_LIST { - int used; /* nr of elements in use */ - int size; /* actual list size */ - struct in_addr *addrs; /* payload */ -} INET_ADDR_LIST; - -extern void inet_addr_list_init(INET_ADDR_LIST *); -extern void inet_addr_list_free(INET_ADDR_LIST *); -extern void inet_addr_list_append(INET_ADDR_LIST *, struct in_addr *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/inet_addr_local.h b/postfix/include/inet_addr_local.h deleted file mode 100644 index f48ca1eb0..000000000 --- a/postfix/include/inet_addr_local.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _INET_ADDR_LOCAL_H_INCLUDED_ -#define _INET_ADDR_LOCAL_H_INCLUDED_ - -/*++ -/* NAME -/* inet_addr_local 3h -/* SUMMARY -/* determine if IP address is local -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern int inet_addr_local(INET_ADDR_LIST *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/inet_util.h b/postfix/include/inet_util.h deleted file mode 100644 index 7eea60279..000000000 --- a/postfix/include/inet_util.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _INET_UTIL_H_INCLUDED_ -#define _INET_UTIL_H_INCLUDED_ - -/*++ -/* NAME -/* inet_util 3h -/* SUMMARY -/* INET-domain utilities -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern char *inet_parse(const char *, char **, char **); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/iostuff.h b/postfix/include/iostuff.h deleted file mode 100644 index 909bffb5e..000000000 --- a/postfix/include/iostuff.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _IOSTUFF_H_INCLUDED_ -#define _IOSTUFF_H_INCLUDED_ - -/*++ -/* NAME -/* iostuff 3h -/* SUMMARY -/* miscellaneous I/O primitives -/* SYNOPSIS -/* #include -/* DESCRIPTION - - /* - * External interface. - */ -extern int non_blocking(int, int); -extern int close_on_exec(int, int); -extern int open_limit(int); -extern int readable(int); -extern int writable(int); -extern off_t get_file_limit(void); -extern void set_file_limit(off_t); -extern int peekfd(int); -extern int read_wait(int, int); -extern int write_wait(int, int); -extern int write_buf(int, const char *, int, int); -extern void doze(unsigned); - -#define BLOCKING 0 -#define NON_BLOCKING 1 - -#define CLOSE_ON_EXEC 1 -#define PASS_ON_EXEC 0 - -/* LICENSE -/* .ad -/* .fi -/* 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 -/* CREATION DATE -/* Sat Jan 25 16:54:13 EST 1997 -/*--*/ - -#endif diff --git a/postfix/include/line_wrap.h b/postfix/include/line_wrap.h deleted file mode 100644 index b901c1f3d..000000000 --- a/postfix/include/line_wrap.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _LINE_WRAP_H_INCLUDED_ -#define _LINE_WRAP_H_INCLUDED_ - -/*++ -/* NAME -/* line_wrap 3h -/* SUMMARY -/* wrap long lines upon output -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -typedef void (*LINE_WRAP_FN) (const char *, int, int, char *); -extern void line_wrap(const char *, int, int, LINE_WRAP_FN, char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/listen.h b/postfix/include/listen.h deleted file mode 100644 index 81c5389c0..000000000 --- a/postfix/include/listen.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _LISTEN_H_INCLUDED_ -#define _LISTEN_H_INCLUDED_ - -/*++ -/* NAME -/* listen 3h -/* SUMMARY -/* listener interface file -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include - - /* - * Listener external interface. - */ -extern int unix_listen(const char *, int, int); -extern int inet_listen(const char *, int, int); -extern int fifo_listen(const char *, int, int); -extern int stream_listen(const char *, int, int); - -extern int inet_accept(int); -extern int unix_accept(int); -extern int stream_accept(int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/lstat_as.h b/postfix/include/lstat_as.h deleted file mode 100644 index 824b32115..000000000 --- a/postfix/include/lstat_as.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _LSTAT_AS_H_INCLUDED_ -#define _LSTAT_AS_H_INCLUDED_ - -/*++ -/* NAME -/* lstat_as 3h -/* SUMMARY -/* lstat file as user -/* SYNOPSIS -/* #include -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern int lstat_as(const char *, struct stat *, uid_t, gid_t); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/mac_parse.h b/postfix/include/mac_parse.h deleted file mode 100644 index 1acbb60d5..000000000 --- a/postfix/include/mac_parse.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _MAC_PARSE_H_INCLUDED_ -#define _MAC_PARSE_H_INCLUDED_ - -/*++ -/* NAME -/* mac_parse 3h -/* SUMMARY -/* locate macro references in string -/* SYNOPSIS -/* #include - DESCRIPTION - .nf - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -#define MAC_PARSE_LITERAL 1 -#define MAC_PARSE_VARNAME 2 - -#define MAC_PARSE_ERROR (1<<0) -#define MAC_PARSE_UNDEF (1<<1) -#define MAC_PARSE_USER 2 /* start user definitions */ - -typedef int (*MAC_PARSE_FN)(int, VSTRING *, char *); - -extern int mac_parse(const char *, MAC_PARSE_FN, char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/make_dirs.h b/postfix/include/make_dirs.h deleted file mode 100644 index 0df6117d8..000000000 --- a/postfix/include/make_dirs.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef MAKE_DIRS_H_INCLUDED_ -#define MAKE_DIRS_H_INCLUDED_ - -/*++ -/* NAME -/* make_dirs 3h -/* SUMMARY -/* create directory hierarchy -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern int make_dirs(const char *, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/match_list.h b/postfix/include/match_list.h deleted file mode 100644 index aba88b8f6..000000000 --- a/postfix/include/match_list.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _MATCH_LIST_H_INCLUDED_ -#define _MATCH_LIST_H_INCLUDED_ - -/*++ -/* NAME -/* match_list 3h -/* SUMMARY -/* generic list-based pattern matching -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -typedef struct MATCH_LIST MATCH_LIST; -typedef int (*MATCH_LIST_FN) (const char *, const char *); - -extern MATCH_LIST *match_list_init(const char *, int,...); -extern int match_list_match(MATCH_LIST *,...); -extern void match_list_free(MATCH_LIST *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/match_ops.h b/postfix/include/match_ops.h deleted file mode 100644 index a938c04fb..000000000 --- a/postfix/include/match_ops.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _MATCH_OPS_H_INCLUDED_ -#define _MATCH_OPS_H_INCLUDED_ - -/*++ -/* NAME -/* match_ops 3h -/* SUMMARY -/* simple string or host pattern matching -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern int match_string(const char *, const char *); -extern int match_hostname(const char *, const char *); -extern int match_hostaddr(const char *, const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/msg.h b/postfix/include/msg.h deleted file mode 100644 index 2b62dec5e..000000000 --- a/postfix/include/msg.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _MSG_H_INCLUDED_ -#define _MSG_H_INCLUDED_ - -/*++ -/* NAME -/* msg 3h -/* SUMMARY -/* diagnostics interface -/* SYNOPSIS -/* #include "msg.h" -/* DESCRIPTION -/* .nf - -/* - * External interface. - */ -typedef void (*MSG_CLEANUP_FN) (void); - -extern int msg_verbose; - -extern void msg_info(const char *,...); -extern void msg_warn(const char *,...); -extern void msg_error(const char *,...); -extern NORETURN msg_fatal(const char *,...); -extern NORETURN msg_panic(const char *,...); - -extern int msg_error_limit(int); -extern void msg_error_clear(void); -extern MSG_CLEANUP_FN msg_cleanup(MSG_CLEANUP_FN); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/msg_output.h b/postfix/include/msg_output.h deleted file mode 100644 index b409e9518..000000000 --- a/postfix/include/msg_output.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _MSG_OUTPUT_FN_ -#define _MSG_OUTPUT_FN_ - -/*++ -/* NAME -/* msg_output 3h -/* SUMMARY -/* diagnostics output management -/* SYNOPSIS -/* #include -/* DESCRIPTION - - /* - * System library. - */ -#include - - /* - * External interface. Severity levels are documented to be monotonically - * increasing from 0 up to MSG_LAST. - */ -typedef void (*MSG_OUTPUT_FN) (int, const char *); -extern void msg_output(MSG_OUTPUT_FN); -extern void msg_printf(int, const char *,...); -extern void msg_vprintf(int, const char *, va_list); -extern void msg_text(int, const char *); - -#define MSG_INFO 0 /* informative */ -#define MSG_WARN 1 /* warning (non-fatal) */ -#define MSG_ERROR 2 /* error (fatal) */ -#define MSG_FATAL 3 /* software error (fatal) */ -#define MSG_PANIC 4 /* software error (fatal) */ - -#define MSG_LAST 4 /* highest-numbered severity level */ - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/msg_syslog.h b/postfix/include/msg_syslog.h deleted file mode 100644 index 94e1ea3ff..000000000 --- a/postfix/include/msg_syslog.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSG_SYSLOG_H_INCLUDED_ -#define _MSG_SYSLOG_H_INCLUDED_ - -/*++ -/* NAME -/* msg_syslog 3h -/* SUMMARY -/* direct diagnostics to syslog daemon -/* SYNOPSIS -/* #include -/* DESCRIPTION - - /* - * System library. - */ -#include - - /* - * External interface. - */ -extern void msg_syslog_init(const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/msg_vstream.h b/postfix/include/msg_vstream.h deleted file mode 100644 index a0dfc7048..000000000 --- a/postfix/include/msg_vstream.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSG_VSTREAM_H_INCLUDED_ -#define _MSG_VSTREAM_H_INCLUDED_ - -/*++ -/* NAME -/* msg_vstream 3h -/* SUMMARY -/* direct diagnostics to VSTREAM -/* SYNOPSIS -/* #include -/* DESCRIPTION - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern void msg_vstream_init(const char *, VSTREAM *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/mvect.h b/postfix/include/mvect.h deleted file mode 100644 index 23214d547..000000000 --- a/postfix/include/mvect.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _MVECT_H_INCLUDED_ -#define _MVECT_H_INCLUDED_ - -/*++ -/* NAME -/* mvect 3h -/* SUMMARY -/* memory vector management -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Generic memory vector interface. - */ -typedef void (*MVECT_FN) (char *, int); - -typedef struct { - char *ptr; - int elsize; - int nelm; - MVECT_FN init_fn; - MVECT_FN wipe_fn; -} MVECT; - -extern char *mvect_alloc(MVECT *, int, int, MVECT_FN, MVECT_FN); -extern char *mvect_realloc(MVECT *, int); -extern char *mvect_free(MVECT *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/myflock.h b/postfix/include/myflock.h deleted file mode 100644 index 7d43efeae..000000000 --- a/postfix/include/myflock.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _MYFLOCK_H_INCLUDED_ -#define _MYFLOCK_H_INCLUDED_ - -/*++ -/* NAME -/* myflock 3h -/* SUMMARY -/* lock open file -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern int myflock(int, int); -extern int myflock_locked(int); - -#define MYFLOCK_NONE 0 -#define MYFLOCK_SHARED 1 -#define MYFLOCK_EXCLUSIVE 2 -#define MYFLOCK_LOCK_MASK (MYFLOCK_SHARED | MYFLOCK_EXCLUSIVE) -#define MYFLOCK_NOWAIT 4 -#define MYFLOCK_BITS (MYFLOCK_LOCK_MASK | MYFLOCK_NOWAIT) - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/mymalloc.h b/postfix/include/mymalloc.h deleted file mode 100644 index 9503bcd17..000000000 --- a/postfix/include/mymalloc.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _MALLOC_H_INCLUDED_ -#define _MALLOC_H_INCLUDED_ - -/*++ -/* NAME -/* mymalloc 3h -/* SUMMARY -/* memory management wrappers -/* SYNOPSIS -/* #include "mymalloc.h" - DESCRIPTION - .nf - - /* - * External interface. - */ -extern char *mymalloc(int); -extern char *myrealloc(char *, int); -extern void myfree(char *); -extern char *mystrdup(const char *); -extern char *mystrndup(const char *, int len); -extern char *mymemdup(const char *, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/name_mask.h b/postfix/include/name_mask.h deleted file mode 100644 index 2387f3921..000000000 --- a/postfix/include/name_mask.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _NAME_MASK_H_INCLUDED_ -#define _NAME_MASK_H_INCLUDED_ - -/*++ -/* NAME -/* name_mask 3h -/* SUMMARY -/* map names to bit mask -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -typedef struct { - const char *name; - int mask; -} NAME_MASK; - -extern int name_mask(NAME_MASK *, const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/open_as.h b/postfix/include/open_as.h deleted file mode 100644 index 308e0094f..000000000 --- a/postfix/include/open_as.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _OPEN_H_INCLUDED_ -#define _OPEN_H_INCLUDED_ - -/*++ -/* NAME -/* open_as 3h -/* SUMMARY -/* open file as user -/* SYNOPSIS -/* #include -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern int open_as(const char *, int, int, uid_t, gid_t); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/open_lock.h b/postfix/include/open_lock.h deleted file mode 100644 index 869233f95..000000000 --- a/postfix/include/open_lock.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _OPEN_LOCK_H_INCLUDED_ -#define _OPEN_LOCK_H_INCLUDED_ - -/*++ -/* NAME -/* open_lock 3h -/* SUMMARY -/* open or create file and lock it for exclusive access -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * Utility library. - */ -#include -#include - - /* - * External interface. - */ -extern VSTREAM *open_lock(const char *, int, int, VSTRING *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/percentm.h b/postfix/include/percentm.h deleted file mode 100644 index d170e9586..000000000 --- a/postfix/include/percentm.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _PERCENT_H_INCLUDED_ -#define _PERCENT_H_INCLUDED_ - -/*++ -/* NAME -/* percentm 3h -/* SUMMARY -/* expand %m embedded in string to system error text -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern char *percentm(const char *, int); - -/* HISTORY -/* .ad -/* .fi -/* A percentm() routine appears in the TCP Wrapper software -/* by Wietse Venema. -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/posix_signals.h b/postfix/include/posix_signals.h deleted file mode 100644 index 12c1664db..000000000 --- a/postfix/include/posix_signals.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _POSIX_SIGNALS_H_INCLUDED_ -#define _POSIX_SIGNALS_H_INCLUDED_ -/*++ -/* NAME -/* posix_signals 3h -/* SUMMARY -/* POSIX signal handling compatibility -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Compatibility interface. - */ - -#ifdef MISSING_SIGSET_T - -typedef int sigset_t; - -enum { - SIG_BLOCK, - SIG_UNBLOCK, - SIG_SETMASK -}; - -extern int sigemptyset(sigset_t *); -extern int sigaddset(sigset_t *, int); -extern int sigprocmask(int, sigset_t *, sigset_t *); - -#endif - -#ifdef MISSING_SIGACTION - -struct sigaction { - void (*sa_handler) (); - sigset_t sa_mask; - int sa_flags; -}; - - /* Possible values for sa_flags. Or them to set multiple. */ -enum { - SA_RESTART, - SA_NOCLDSTOP = 4 /* drop the = 4. */ -}; - -extern int sigaction(int, struct sigaction *, struct sigaction *); - -#endif - -/* AUTHOR(S) -/* Pieter Schoenmakers -/* Eindhoven University of Technology -/* P.O. Box 513 -/* 5600 MB Eindhoven -/* The Netherlands -/*--*/ - -#endif diff --git a/postfix/include/readlline.h b/postfix/include/readlline.h deleted file mode 100644 index 8a8bd5487..000000000 --- a/postfix/include/readlline.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _READLINE_H_INCLUDED_ -#define _READLINE_H_INCLUDED_ - -/*++ -/* NAME -/* readlline 3h -/* SUMMARY -/* read logical line -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Utility library. - */ -#include -#include - - /* - * External interface. - */ -extern VSTRING *readlline(VSTRING *, VSTREAM *, int *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/ring.h b/postfix/include/ring.h deleted file mode 100644 index a96fe2696..000000000 --- a/postfix/include/ring.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _RING_H_INCLUDED_ -#define _RING_H_INCLUDED_ - -/*++ -/* NAME -/* ring 3h -/* SUMMARY -/* circular list management -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -typedef struct RING RING; - -struct RING { - RING *succ; /* successor */ - RING *pred; /* predecessor */ -}; - -extern void ring_init(RING *); -extern void ring_prepend(RING *, RING *); -extern void ring_append(RING *, RING *); -extern void ring_detach(RING *); - -#define ring_succ(c) ((c)->succ) -#define ring_pred(c) ((c)->pred) - -/* LICENSE -/* .ad -/* .fi -/* 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 -/* LAST MODIFICATION -/* Tue Jan 28 16:50:20 EST 1997 -/*--*/ - -#endif diff --git a/postfix/include/safe.h b/postfix/include/safe.h deleted file mode 100644 index 8b75bf43e..000000000 --- a/postfix/include/safe.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _SAFE_H_INCLUDED_ -#define _SAFE_H_INCLUDED_ - -/*++ -/* NAME -/* safe 3h -/* SUMMARY -/* miscellaneous taint checks -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern int unsafe(void); -extern char *safe_getenv(const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/safe_open.h b/postfix/include/safe_open.h deleted file mode 100644 index 02964f8ba..000000000 --- a/postfix/include/safe_open.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _SAFE_OPEN_H_INCLUDED_ -#define _SAFE_OPEN_H_INCLUDED_ - -/*++ -/* NAME -/* safe_open 3h -/* SUMMARY -/* safely open or create regular file -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * Utility library. - */ -#include -#include - - /* - * External interface. - */ -extern VSTREAM *safe_open(const char *, int, int, uid_t, gid_t, VSTRING *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/sane_accept.h b/postfix/include/sane_accept.h deleted file mode 100644 index 84cc36034..000000000 --- a/postfix/include/sane_accept.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _SANE_ACCEPT_H_ -#define _SANE_ACCEPT_H_ - -/*++ -/* NAME -/* sane_accept 3h -/* SUMMARY -/* sanitize accept() error returns -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern int sane_accept(int, struct sockaddr *, SOCKADDR_SIZE *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/scan_dir.h b/postfix/include/scan_dir.h deleted file mode 100644 index 8f3bf8b98..000000000 --- a/postfix/include/scan_dir.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _SCAN_DIR_H_INCLUDED_ -#define _SCAN_DIR_H_INCLUDED_ - -/*++ -/* NAME -/* scan_dir 3h -/* SUMMARY -/* directory scanner -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * The directory scanner interface. - */ -typedef struct SCAN_DIR SCAN_DIR; - -extern SCAN_DIR *scan_dir_open(const char *); -extern char *scan_dir_next(SCAN_DIR *); -extern char *scan_dir_path(SCAN_DIR *); -extern void scan_dir_push(SCAN_DIR *, const char *); -extern SCAN_DIR *scan_dir_pop(SCAN_DIR *); -extern SCAN_DIR *scan_dir_close(SCAN_DIR *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/set_eugid.h b/postfix/include/set_eugid.h deleted file mode 100644 index e461cbfed..000000000 --- a/postfix/include/set_eugid.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _SET_EUGID_H_INCLUDED_ -#define _SET_EUGID_H_INCLUDED_ - -/*++ -/* NAME -/* set_eugid 3h -/* SUMMARY -/* set effective user and group attributes -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern void set_eugid(uid_t, gid_t); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/set_ugid.h b/postfix/include/set_ugid.h deleted file mode 100644 index e752beb92..000000000 --- a/postfix/include/set_ugid.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _SET_UGID_H_INCLUDED_ -#define _SET_UGID_H_INCLUDED_ - -/*++ -/* NAME -/* set_ugid 3h -/* SUMMARY -/* set real, effective and saved user and group attributes -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern void set_ugid(uid_t, gid_t); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/sigdelay.h b/postfix/include/sigdelay.h deleted file mode 100644 index d3b4ea33b..000000000 --- a/postfix/include/sigdelay.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _SIGDELAY_H_INCLUDED_ -#define _SIGDELAY_H_INCLUDED_ - -/*++ -/* NAME -/* sigdelay 3h -/* SUMMARY -/* delay/resume signal delivery -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern void sigdelay(void); -extern void sigresume(void); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/split_at.h b/postfix/include/split_at.h deleted file mode 100644 index 2d03ebb2c..000000000 --- a/postfix/include/split_at.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _SPLIT_AT_H_INCLUDED_ -#define _SPLIT_AT_H_INCLUDED_ - -/*++ -/* NAME -/* split_at 3h -/* SUMMARY -/* trivial token splitter -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern char *split_at(char *, int); -extern char *split_at_right(char *, int); - -/* HISTORY -/* .ad -/* .fi -/* A split_at() routine appears in the TCP Wrapper software -/* by Wietse Venema. -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/stat_as.h b/postfix/include/stat_as.h deleted file mode 100644 index aad37d30a..000000000 --- a/postfix/include/stat_as.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _STAT_AS_H_INCLUDED_ -#define _STAT_AS_H_INCLUDED_ - -/*++ -/* NAME -/* stat_as 3h -/* SUMMARY -/* stat file as user -/* SYNOPSIS -/* #include -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern int stat_as(const char *, struct stat *, uid_t, gid_t); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/stringops.h b/postfix/include/stringops.h deleted file mode 100644 index 854c02923..000000000 --- a/postfix/include/stringops.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _STRINGOPS_H_INCLUDED_ -#define _STRINGOPS_H_INCLUDED_ - -/*++ -/* NAME -/* stringops 3h -/* SUMMARY -/* string operations -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern char *printable(char *, int); -extern char *lowercase(char *); -extern char *skipblanks(const char *); -extern char *trimblanks(char *, int); -extern char *concatenate(const char *,...); -extern char *mystrtok(char **, const char *); -extern char *translit(char *, const char *, const char *); -#ifndef HAVE_BASENAME -extern char *basename(const char *); -#endif - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/sys_defs.h b/postfix/include/sys_defs.h deleted file mode 100644 index 6665f8d39..000000000 --- a/postfix/include/sys_defs.h +++ /dev/null @@ -1,772 +0,0 @@ -#ifndef _SYS_DEFS_H_INCLUDED_ -#define _SYS_DEFS_H_INCLUDED_ - -/*++ -/* NAME -/* sys_defs 3h -/* SUMMARY -/* portability header -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * Specific platforms. Major release numbers differ for a good reason. So be - * a good girl, plan for the future, and at least include the major release - * number in the system type (for example, SUNOS5 or FREEBSD2). The system - * type is determined by the makedefs shell script in the top-level - * directory. Adding support for a new system type means updating the - * makedefs script, and adding a section below for the new system. - */ -#if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ - || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \ - || defined(OPENBSD2) || defined(NETBSD1) || defined(RHAPSODY5) -#define SUPPORTED -#include -#define USE_PATHS_H -#define USE_FLOCK_LOCK -#define HAS_SUN_LEN -#define HAS_FSYNC -#define HAS_DB -#define HAS_SA_LEN -#define DEF_DB_TYPE "hash" -#define ALIAS_DB_MAP "hash:/etc/aliases" -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" -#define USE_STATFS -#define STATFS_IN_SYS_MOUNT_H -#define HAS_POSIX_REGEXP -#endif - -#if defined(OPENBSD2) -#define HAS_ISSETUGID -#endif - -#if defined(NETBSD1) -#define USE_DOT_LOCK -#endif - -#if defined(RHAPSODY5) -#define NORETURN void -#define HAS_NETINFO -#endif - -#ifdef ULTRIX4 -#define SUPPORTED -/* Ultrix by default has only 64 descriptors per process */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 96 -#endif -#include -#define UNSAFE_CTYPE /* XXX verify */ -#define _PATH_MAILDIR "/var/spool/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/etc:/usr/ucb" -#define USE_FLOCK_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -/* might be set by makedef */ -#ifdef HAS_DB -#define DEF_DB_TYPE "hash" -#define ALIAS_DB_MAP "hash:/etc/aliases" -#else -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/aliases" -#endif -extern int optind; -extern char *optarg; -extern int opterr; - -#define MISSING_STRFTIME_E -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define ROOT_PATH "/bin:/usr/bin:/etc:/usr/etc:/usr/ucb" -#define USE_STATFS -#define USE_STRUCT_FS_DATA -#define STATFS_IN_SYS_MOUNT_H -/* Ultrix misses just S_ISSOCK, the others are there */ -#define S_ISSOCK(mode) (((mode) & (S_IFMT)) == (S_IFSOCK)) -#define DUP2_DUPS_CLOSE_ON_EXEC -#define MISSING_USLEEP -#endif - -#ifdef OSF1 -#define SUPPORTED -#include -#define MISSING_SETENV -#define USE_PATHS_H -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define USE_FLOCK_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAVE_BASENAME -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/var/adm/sendmail/aliases" -extern int optind; /* XXX use */ -extern char *optarg; /* XXX use */ -extern int opterr; /* XXX use */ - -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define USE_STATFS -#define STATFS_IN_SYS_MOUNT_H -#define HAS_POSIX_REGEXP -#endif - -#ifdef SUNOS4 -#define SUPPORTED -#include -#define UNSAFE_CTYPE -#define fpos_t long -#define MISSING_SETENV -#define MISSING_STRERROR -#define _PATH_MAILDIR "/var/spool/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/etc:/usr/ucb" -#define USE_FLOCK_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/aliases" -extern int optind; -extern char *optarg; -extern int opterr; - -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define ROOT_PATH "/bin:/usr/bin:/etc:/usr/etc:/usr/ucb" -#define USE_STATFS -#define STATFS_IN_SYS_VFS_H -#define memmove(d,s,l) bcopy(s,d,l) -#endif - -#ifdef SUNOS5 -#define SUPPORTED -#define _SVID_GETTOD /* Solaris 2.5, XSH4.2 versus SVID */ -#include -#define MISSING_SETENV -#define _PATH_MAILDIR "/var/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" -#define HAS_NIS -#define USE_SYS_SOCKIO_H /* Solaris 2.5, changed sys/ioctl.h */ -#define GETTIMEOFDAY(t) gettimeofday(t) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define FIONREAD_IN_SYS_FILIO_H -#define USE_STATVFS -#define STATVFS_IN_SYS_STATVFS_H -#define STREAM_CONNECTIONS /* avoid UNIX-domain sockets */ -#define LOCAL_LISTEN stream_listen -#define LOCAL_ACCEPT stream_accept -#define LOCAL_CONNECT stream_connect -#define LOCAL_TRIGGER stream_trigger -#define HAS_VOLATILE_LOCKS -#endif - -#ifdef UW7 /* UnixWare 7 */ -#define SUPPORTED -#include -#define _PATH_MAILDIR "/var/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" -#define MISSING_SETENV -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" -#define HAS_NIS -#define USE_SYS_SOCKIO_H -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define FIONREAD_IN_SYS_FILIO_H -#define DBM_NO_TRAILING_NULL -#define USE_STATVFS -#define STATVFS_IN_SYS_STATVFS_H -#define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT -#endif - -#ifdef UW21 /* UnixWare 2.1.x */ -#define SUPPORTED -#include -#define _PATH_MAILDIR "/var/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" -#define MISSING_SETENV -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" -/* Uncomment the following line if you have NIS package installed -#define HAS_NIS */ -#define USE_SYS_SOCKIO_H -#define GETTIMEOFDAY(t) gettimeofday(t,NULL) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define FIONREAD_IN_SYS_FILIO_H -#define DBM_NO_TRAILING_NULL -#define USE_STATVFS -#define STATVFS_IN_SYS_STATVFS_H -#define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT -#endif - -#ifdef AIX4 -#define SUPPORTED -#include -#define MISSING_SETENV -#define _PATH_BSHELL "/bin/sh" -#define _PATH_MAILDIR "/var/spool/mail" /* paths.h lies */ -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define USE_SYS_SELECT_H -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/aliases" -#define HAS_NIS -#define HAS_SA_LEN -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define RESOLVE_H_NEEDS_STDIO_H -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define SOCKADDR_SIZE size_t -#define SOCKOPT_SIZE size_t -#define USE_STATVFS -#define STATVFS_IN_SYS_STATVFS_H -#define STRCASECMP_IN_STRINGS_H -extern time_t time(time_t *); -extern int seteuid(uid_t); -extern int setegid(gid_t); -extern int initgroups(const char *, int); - -#endif - -#ifdef AIX3 -#define SUPPORTED -#include -#define MISSING_SETENV -#define _PATH_BSHELL "/bin/sh" -#define _PATH_MAILDIR "/var/spool/mail" /* paths.h lies */ -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define USE_SYS_SELECT_H -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/aliases" -#define HAS_NIS -#define HAS_SA_LEN -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define RESOLVE_H_NEEDS_STDIO_H -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define SOCKADDR_SIZE size_t -#define SOCKOPT_SIZE size_t -#define USE_STATFS -#define STATFS_IN_SYS_STATFS_H -#define STRCASECMP_IN_STRINGS_H -extern time_t time(time_t *); -extern int seteuid(uid_t); -extern int setegid(gid_t); -extern int initgroups(const char *, int); - -#endif - -#if defined(IRIX5) || defined(IRIX6) -#define SUPPORTED -#include -#define MISSING_SETENV -#define _PATH_MAILDIR "/var/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/usr/bin:/usr/bsd" -#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/bsd" -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/aliases" -#define HAS_NIS -#define USE_SYS_SOCKIO_H /* XXX check */ -#define GETTIMEOFDAY(t) gettimeofday(t) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/bsd" -#define FIONREAD_IN_SYS_FILIO_H /* XXX check */ -#define DBM_NO_TRAILING_NULL /* XXX check */ -#define USE_STATVFS -#define STATVFS_IN_SYS_STATVFS_H -#endif - -#if defined(IRIX5) -#define MISSING_USLEEP -#endif - -#ifdef LINUX2 -#define SUPPORTED -#include -#define USE_PATHS_H -#define USE_FLOCK_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define HAS_DB -#define DEF_DB_TYPE "hash" -#define ALIAS_DB_MAP "hash:/etc/aliases" -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" -#define FIONREAD_IN_TERMIOS_H -#define USE_STATFS -#define STATFS_IN_SYS_VFS_H -#define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT -#define PREPEND_PLUS_TO_OPTSTRING -#define HAS_POSIX_REGEXP -#endif - - /* - * HPUX11 was copied from HPUX10, but can perhaps be trimmed down a bit. - */ -#ifdef HPUX11 -#define SUPPORTED -#define USE_SIG_RETURN -#include -#define HAS_DBM -#define USE_FCNTL_LOCK -#define HAS_FSYNC -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" -#define ROOT_PATH "/usr/bin:/sbin:/usr/sbin" -#define MISSING_SETENV -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define _PATH_BSHELL "/bin/sh" -#define _PATH_MAILDIR "/var/mail" -#define _PATH_DEFPATH "/usr/bin" -#define _PATH_STDPATH "/usr/bin:/sbin:/usr/sbin" -#define MISSING_SETEUID -#define HAVE_SETRESUID -#define MISSING_SETEGID -#define HAVE_SETRESGID -extern int h_errno; /* imports too much stuff */ - -#define USE_STATFS -#define STATFS_IN_SYS_VFS_H -#define HAS_POSIX_REGEXP -#endif - -#ifdef HPUX10 -#define SUPPORTED -#define USE_SIG_RETURN -#include -#define HAS_DBM -#define USE_FCNTL_LOCK -#define HAS_FSYNC -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" -#define ROOT_PATH "/usr/bin:/sbin:/usr/sbin" -#define MISSING_SETENV -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define _PATH_BSHELL "/bin/sh" -#define _PATH_MAILDIR "/var/mail" -#define _PATH_DEFPATH "/usr/bin" -#define _PATH_STDPATH "/usr/bin:/sbin:/usr/sbin" -#define MISSING_SETEUID -#define HAVE_SETRESUID -#define MISSING_SETEGID -#define HAVE_SETRESGID -extern int h_errno; /* imports too much stuff */ - -#define USE_STATFS -#define STATFS_IN_SYS_VFS_H -#define HAS_POSIX_REGEXP -#endif - -#ifdef HPUX9 -#define SUPPORTED -#define USE_SIG_RETURN -#include -#define HAS_DBM -#define USE_FCNTL_LOCK -#define HAS_FSYNC -#define HAS_NIS -#define MISSING_SETENV -#define MISSING_RLIMIT_FSIZE -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/usr/lib/aliases" -#define ROOT_PATH "/bin:/usr/bin:/etc" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_MAILDIR "/usr/mail" -#define _PATH_DEFPATH "/bin:/usr/bin" -#define _PATH_STDPATH "/bin:/usr/bin:/etc" -#define MISSING_SETEUID -#define HAVE_SETRESUID -#define MISSING_SETEGID -#define HAVE_SETRESGID -extern int h_errno; - -#define USE_ULIMIT /* no setrlimit() */ -#define USE_STATFS -#define STATFS_IN_SYS_VFS_H -#define HAS_POSIX_REGEXP -#endif - - /* - * NEXTSTEP3, without -lposix, because its naming service is broken. - */ -#ifdef NEXTSTEP3 -#define SUPPORTED -#include -#define HAS_DBM -#define USE_FLOCK_LOCK -#define USE_STATFS -#define HAVE_SYS_DIR_H -#define STATFS_IN_SYS_VFS_H -#define HAS_FSYNC -#define HAS_NIS -#define HAS_NETINFO -#define MISSING_SETENV_PUTENV -#define MISSING_MKFIFO -#define MISSING_SIGSET_T -#define MISSING_SIGACTION -#define MISSING_STD_FILENOS -#define MISSING_SETSID -#define MISSING_WAITPID -#define MISSING_UTIMBUF -#define HAS_WAIT4 -#define WAIT_STATUS_T union wait -#define NORMAL_EXIT_STATUS(x) (WIFEXITED(x) && !WEXITSTATUS (x)) -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define _PATH_MAILDIR "/usr/spool/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/bin:/usr/bin:/usr/ucb" -#define ROOT_PATH "/bin:/usr/bin:/usr/etc:/usr/ucb" -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "netinfo:/aliases" -#include -#define MISSING_POSIX_S_IS -#define MISSING_POSIX_S_MODES -/* It's amazing what is all missing... */ -#define isascii(c) ((unsigned)(c)<=0177) -extern int opterr; - -#define MISSING_PID_T -#define MISSING_STRFTIME_E -#define FD_CLOEXEC 1 -#define O_NONBLOCK O_NDELAY -#define WEXITSTATUS(x) ((x).w_retcode) -#define WTERMSIG(x) ((x).w_termsig) -#endif - - /* - * OPENSTEP does not have posix (some fix...) - */ -#ifdef OPENSTEP4 -#define SUPPORTED -#include -#define HAS_DBM -#define USE_FLOCK_LOCK -#define USE_STATFS -#define HAVE_SYS_DIR_H -#define STATFS_IN_SYS_VFS_H -#define HAS_FSYNC -#define HAS_NIS -#define HAS_NETINFO -#define MISSING_SETENV_PUTENV -#define MISSING_MKFIFO -#define MISSING_SIGSET_T -#define MISSING_SIGACTION -#define MISSING_STD_FILENOS -#define MISSING_SETSID -#define MISSING_WAITPID -#define MISSING_UTIMBUF -#define HAS_WAIT4 -#define WAIT_STATUS_T union wait -#define NORMAL_EXIT_STATUS(x) (WIFEXITED(x) && !WEXITSTATUS (x)) -#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) -#define _PATH_MAILDIR "/usr/spool/mail" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb" -#define _PATH_STDPATH "/bin:/usr/bin:/usr/ucb" -#define ROOT_PATH "/bin:/usr/bin:/usr/etc:/usr/ucb" -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "netinfo:/aliases" -#include -#define MISSING_POSIX_S_IS -#define MISSING_POSIX_S_MODES -/* It's amazing what is all missing... */ -#define isascii(c) ((unsigned)(c)<=0177) -extern int opterr; - -#define MISSING_PID_T -#define MISSING_STRFTIME_E -#define FD_CLOEXEC 1 -#define O_NONBLOCK O_NDELAY -#define WEXITSTATUS(x) ((x).w_retcode) -#define WTERMSIG(x) ((x).w_termsig) -#define NORETURN /* the native compiler */ -#endif - -#ifdef ReliantUnix543 -#define SUPPORTED -#include -#define MISSING_SETENV -#define _PATH_DEFPATH "/usr/bin:/usr/ucb" -#define _PATH_BSHELL "/bin/sh" -#define _PATH_MAILDIR "/var/spool/mail" -#define USE_FCNTL_LOCK -#define USE_DOT_LOCK -#define HAS_FSYNC -#define FIONREAD_IN_SYS_FILIO_H -#define USE_SYS_SOCKIO_H -#define HAS_DBM -#define DEF_DB_TYPE "dbm" -#define ALIAS_DB_MAP "dbm:/var/adm/sendmail/aliases" -extern int optind; /* XXX use */ -extern char *optarg; /* XXX use */ -extern int opterr; /* XXX use */ - -#define HAS_NIS -#define GETTIMEOFDAY(t) gettimeofday(t) -#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" -#define USE_STATVFS -#define STATVFS_IN_SYS_STATVFS_H -#define MISSING_USLEEP -#endif - - /* - * We're not going to try to guess like configure does. - */ -#ifndef SUPPORTED -#error "unsupported platform" -#endif - -#ifdef DUP2_DUPS_CLOSE_ON_EXEC -/* dup2_pass_on_exec() can be found in util/sys_compat.c */ -extern int dup2_pass_on_exec(int oldd, int newd); - -#define DUP2 dup2_pass_on_exec -#else -#define DUP2 dup2 -#endif - -#ifdef PREPEND_PLUS_TO_OPTSTRING -#define GETOPT(argc, argv, str) getopt((argc), (argv), "+" str) -#else -#define GETOPT(argc, argv, str) getopt((argc), (argv), (str)) -#endif -#define OPTIND (optind > 0 ? optind : 1) - -#if defined(USE_FCNTL_LOCK) && defined(USE_FLOCK_LOCK) -#error "define USE_FCNTL_LOCK or USE_FLOCK_LOCK, not both" -#endif - -#if !defined(USE_FCNTL_LOCK) && !defined(USE_FLOCK_LOCK) -#error "define USE_FCNTL_LOCK or USE_FLOCK_LOCK" -#endif - -#if defined(USE_STATFS) && defined(USE_STATVFS) -#error "define USE_STATFS or USE_STATVFS, not both" -#endif - -#if !defined(USE_STATFS) && !defined(USE_STATVFS) -#error "define USE_STATFS or USE_STATVFS" -#endif - - /* - * Defaults for normal systems. - */ -#ifndef SOCKADDR_SIZE -#define SOCKADDR_SIZE int -#endif - -#ifndef SOCKOPT_SIZE -#define SOCKOPT_SIZE int -#endif - -#ifndef LOCAL_LISTEN -#define LOCAL_LISTEN unix_listen -#define LOCAL_ACCEPT unix_accept -#define LOCAL_CONNECT unix_connect -#define LOCAL_TRIGGER unix_trigger -#endif - -#if !defined (HAVE_SYS_NDIR_H) && !defined (HAVE_SYS_DIR_H) \ - && !defined (HAVE_NDIR_H) -#define HAVE_DIRENT_H -#endif - -#ifndef WAIT_STATUS_T -typedef int WAIT_STATUS_T; - -#define NORMAL_EXIT_STATUS(status) ((status) == 0) -#endif - - /* - * Turn on the compatibility stuff. - */ -#ifdef MISSING_UTIMBUF -struct utimbuf { - time_t actime; - time_t modtime; -}; - -#endif - -#ifdef MISSING_STRERROR -extern const char *strerror(int); - -#endif - -#if defined (MISSING_SETENV) || defined (MISSING_SETENV_PUTENV) -extern int setenv(const char *, const char *, int); - -#endif - -#ifdef MISSING_SETEUID -extern int seteuid(uid_t euid); - -#endif - -#ifdef MISSING_SETEGID -extern int setegid(gid_t egid); - -#endif - -#ifdef MISSING_MKFIFO -extern int mkfifo(char *, int); - -#endif - -#ifdef MISSING_WAITPID -extern int waitpid(int, WAIT_STATUS_T *status, int options); - -#endif - -#ifdef MISSING_SETSID -extern int setsid(void); - -#endif - -#ifdef MISSING_STD_FILENOS -#define STDIN_FILENO 0 -#define STDOUT_FILENO 1 -#define STDERR_FILENO 2 -#endif - -#ifdef MISSING_PID_T -typedef int pid_t; - -#endif - -#ifdef MISSING_POSIX_S_IS -#define S_ISBLK(mode) (((mode) & (_S_IFMT)) == (_S_IFBLK)) -#define S_ISCHR(mode) (((mode) & (_S_IFMT)) == (_S_IFCHR)) -#define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) -#define S_ISSOCK(mode) (((mode) & (_S_IFMT)) == (_S_IFSOCK)) -#define S_ISFIFO(mode) (((mode) & (_S_IFMT)) == (_S_IFIFO)) -#define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG)) -#endif - -#ifdef MISSING_POSIX_S_MODES -#define S_IRUSR _S_IRUSR -#define S_IRGRP 0000040 -#define S_IROTH 0000004 -#define S_IWUSR _S_IWUSR -#define S_IWGRP 0000020 -#define S_IWOTH 0000002 -#define S_IXUSR _S_IXUSR -#define S_IXGRP 0000010 -#define S_IXOTH 0000001 -#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) -#endif - - /* - * Need to specify what functions never return, so that the compiler can - * warn for missing initializations and other trouble. However, OPENSTEP4 - * gcc 2.7.x cannot handle this so we define this only if NORETURN isn't - * already defined above. - */ -#ifndef NORETURN -#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 || __GNUC__ >= 3 -#define NORETURN void __attribute__((__noreturn__)) -#endif -#endif - -#ifndef NORETURN -#define NORETURN void -#endif - - /* - * Making the ctype.h macros not more expensive than necessary. On some - * systems, ctype.h misbehaves badly with signed characters. - */ -#define _UCHAR_(c) ((unsigned char)(c)) -#ifdef UNSAFE_CTYPE -#define ISASCII(c) isascii(_UCHAR_(c)) -#define ISALNUM(c) (ISASCII(c) && isalnum(c)) -#define ISALPHA(c) (ISASCII(c) && isalpha(c)) -#define ISCNTRL(c) (ISASCII(c) && iscntrl(c)) -#define ISDIGIT(c) (ISASCII(c) && isdigit(c)) -#define ISGRAPH(c) (ISASCII(c) && isgraph(c)) -#define ISLOWER(c) (ISASCII(c) && islower(c)) -#define ISPRINT(c) (ISASCII(c) && isprint(c)) -#define ISPUNCT(c) (ISASCII(c) && ispunct(c)) -#define ISSPACE(c) (ISASCII(c) && isspace(c)) -#define ISUPPER(c) (ISASCII(c) && isupper(c)) -#define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c)) -#define TOUPPER(c) (ISLOWER(c) ? toupper(c) : (c)) -#else -#define ISASCII(c) isascii(_UCHAR_(c)) -#define ISALNUM(c) isalnum(_UCHAR_(c)) -#define ISALPHA(c) isalpha(_UCHAR_(c)) -#define ISCNTRL(c) iscntrl(_UCHAR_(c)) -#define ISDIGIT(c) isdigit(_UCHAR_(c)) -#define ISGRAPH(c) isgraph(_UCHAR_(c)) -#define ISLOWER(c) islower(_UCHAR_(c)) -#define ISPRINT(c) isprint(_UCHAR_(c)) -#define ISPUNCT(c) ispunct(_UCHAR_(c)) -#define ISSPACE(c) isspace(_UCHAR_(c)) -#define ISUPPER(c) isupper(_UCHAR_(c)) -#define TOLOWER(c) tolower(_UCHAR_(c)) -#define TOUPPER(c) toupper(_UCHAR_(c)) -#endif - - /* - * Scaffolding. I don't want to lose messages while the program is under - * development. - */ -extern int REMOVE(const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/timed_connect.h b/postfix/include/timed_connect.h deleted file mode 100644 index 76ac7159c..000000000 --- a/postfix/include/timed_connect.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _TIMED_CONNECT_H_INCLUDED_ -#define _TIMED_CONNECT_H_INCLUDED_ - -/*++ -/* NAME -/* timed_connect 3h -/* SUMMARY -/* connect operation with timeout -/* SYNOPSIS -/* #include -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern int timed_connect(int, struct sockaddr *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/timed_wait.h b/postfix/include/timed_wait.h deleted file mode 100644 index bdbc270c6..000000000 --- a/postfix/include/timed_wait.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _TIMED_WAIT_H_INCLUDED_ -#define _TIMED_WAIT_H_INCLUDED_ - -/*++ -/* NAME -/* timed_wait 3h -/* SUMMARY -/* wait operations with timeout -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern int timed_waitpid(pid_t, WAIT_STATUS_T *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/trigger.h b/postfix/include/trigger.h deleted file mode 100644 index ffcf63c52..000000000 --- a/postfix/include/trigger.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _TRIGGER_H_INCLUDED_ -#define _TRIGGER_H_INCLUDED_ - -/*++ -/* NAME -/* trigger 3h -/* SUMMARY -/* client interface file -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * External interface. - */ -extern int unix_trigger(const char *, const char *, int, int); -extern int inet_trigger(const char *, const char *, int, int); -extern int fifo_trigger(const char *, const char *, int, int); -extern int stream_trigger(const char *, const char *, int, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/username.h b/postfix/include/username.h deleted file mode 100644 index 648be45e6..000000000 --- a/postfix/include/username.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _USERNAME_H_INCLUDED_ -#define _USERNAME_H_INCLUDED_ - -/*++ -/* NAME -/* username 3h -/* SUMMARY -/* lookup name of real user -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface. */ - -extern const char *username(void); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/valid_hostname.h b/postfix/include/valid_hostname.h deleted file mode 100644 index 69db14056..000000000 --- a/postfix/include/valid_hostname.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _VALID_HOSTNAME_H_INCLUDED_ -#define _VALID_HOSTNAME_H_INCLUDED_ - -/*++ -/* NAME -/* valid_hostname 3h -/* SUMMARY -/* validate hostname -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* External interface */ - -#define VALID_HOSTNAME_LEN 255 /* RFC 1035 */ -#define VALID_LABEL_LEN 63 /* RFC 1035 */ - -extern int valid_hostname(const char *); -extern int valid_hostaddr(const char *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/vbuf.h b/postfix/include/vbuf.h deleted file mode 100644 index 57aa6f6f9..000000000 --- a/postfix/include/vbuf.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef _VBUF_H_INCLUDED_ -#define _VBUF_H_INCLUDED_ - -/*++ -/* NAME -/* vbuf 3h -/* SUMMARY -/* generic buffer -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * The VBUF buffer is defined by 1) its structure, by 2) the VBUF_GET() and - * 3) VBUF_PUT() operations that automatically handle buffer empty and - * buffer full conditions, and 4) by the VBUF_SPACE() operation that allows - * the user to reserve buffer space ahead of time, to allow for situations - * where calling VBUF_PUT() is not possible or desirable. - * - * The VBUF buffer does not specify primitives for memory allocation or - * deallocation. The purpose is to allow different applications to have - * different strategies: a memory-resident buffer; a memory-mapped file; or - * a stdio-like window to an open file. Each application provides its own - * get(), put() and space() methods that perform the necessary magic. - * - * This interface is pretty normal. With one exception: the number of bytes - * left to read is negated. This is done so that we can change direction - * between reading and writing on the fly. - */ -typedef struct VBUF VBUF; -typedef int (*VBUF_GET_READY_FN) (VBUF *); -typedef int (*VBUF_PUT_READY_FN) (VBUF *); -typedef int (*VBUF_SPACE_FN) (VBUF *, int); - -struct VBUF { - int flags; /* status, see below */ - unsigned char *data; /* variable-length buffer */ - int len; /* buffer length */ - int cnt; /* bytes left to read/write */ - unsigned char *ptr; /* read/write position */ - VBUF_GET_READY_FN get_ready; /* read buffer empty action */ - VBUF_PUT_READY_FN put_ready; /* write buffer full action */ - VBUF_SPACE_FN space; /* request for buffer space */ -}; - - /* - * Typically, an application will embed a VBUF structure into a larger - * structure that also contains application-specific members. This approach - * gives us the best of both worlds. The application can still use the - * generic VBUF primitives for reading and writing VBUFs. The macro below - * transforms a pointer from VBUF structure to the structure that contains - * it. - */ -#define VBUF_TO_APPL(vbuf_ptr,app_type,vbuf_member) \ - ((app_type *) (((char *) (vbuf_ptr)) - offsetof(app_type,vbuf_member))) - - /* - * Buffer status management. - */ -#define VBUF_FLAG_ERR (1<<0) /* some I/O error */ -#define VBUF_FLAG_EOF (1<<1) /* end of data */ -#define VBUF_FLAG_BAD (VBUF_FLAG_ERR | VBUF_FLAG_EOF) -#define VBUF_FLAG_FIXED (1<<2) /* fixed-size buffer */ - -#define vbuf_error(v) ((v)->flags & VBUF_FLAG_ERR) -#define vbuf_eof(v) ((v)->flags & VBUF_FLAG_EOF) -#define vbuf_clearerr(v) ((v)->flags &= ~VBUF_FLAG_BAD) - - /* - * Buffer I/O-like operations and results. - */ -#define VBUF_GET(v) ((v)->cnt < 0 ? ++(v)->cnt, \ - (int) *(v)->ptr++ : vbuf_get(v)) -#define VBUF_PUT(v,c) ((v)->cnt > 0 ? --(v)->cnt, \ - (int) (*(v)->ptr++ = (c)) : vbuf_put((v),(c))) -#define VBUF_SPACE(v,n) ((v)->space((v),(n))) - -#define VBUF_EOF (-1) /* no more space or data */ - -extern int vbuf_get(VBUF *); -extern int vbuf_put(VBUF *, int); -extern int vbuf_unget(VBUF *, int); -extern int vbuf_read(VBUF *, char *, int); -extern int vbuf_write(VBUF *, const char *, int); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/vbuf_print.h b/postfix/include/vbuf_print.h deleted file mode 100644 index 32549c142..000000000 --- a/postfix/include/vbuf_print.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _VBUF_PRINT_H_INCLUDED_ -#define _VBUF_PRINT_H_INCLUDED_ - -/*++ -/* NAME -/* vbuf_print 3h -/* SUMMARY -/* formatted print to generic buffer -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * Utility library. - */ -#include - - /* - * External interface. - */ -extern VBUF *vbuf_print(VBUF *, const char *, va_list); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/vstream.h b/postfix/include/vstream.h deleted file mode 100644 index d67ee2377..000000000 --- a/postfix/include/vstream.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef _VSTREAM_H_INCLUDED_ -#define _VSTREAM_H_INCLUDED_ - -/*++ -/* NAME -/* vstream 3h -/* SUMMARY -/* simple buffered I/O package -/* SYNOPSIS -/* #include -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include -#include - - /* - * Utility library. - */ -#include - - /* - * Simple buffered stream. The members of this structure are not part of the - * official interface and can change without prior notice. - */ -typedef int (*VSTREAM_FN) (int, void *, unsigned); -typedef int (*VSTREAM_WAITPID_FN) (pid_t, WAIT_STATUS_T *, int); - -typedef struct VSTREAM { - VBUF buf; /* generic intelligent buffer */ - int fd; /* file handle, no 256 limit */ - VSTREAM_FN read_fn; /* buffer fill action */ - VSTREAM_FN write_fn; /* buffer fill action */ - long offset; /* cached seek info */ - char *path; /* give it at least try */ - int read_fd; /* read channel (double-buffered) */ - int write_fd; /* write channel (double-buffered) */ - VBUF read_buf; /* read buffer (double-buffered) */ - VBUF write_buf; /* write buffer (double-buffered) */ - pid_t pid; /* vstream_popen/close() */ - VSTREAM_WAITPID_FN waitpid_fn; /* vstream_popen/close() */ -} VSTREAM; - -extern VSTREAM vstream_fstd[]; /* pre-defined streams */ - -#define VSTREAM_IN (&vstream_fstd[0]) -#define VSTREAM_OUT (&vstream_fstd[1]) -#define VSTREAM_ERR (&vstream_fstd[2]) - -#define VSTREAM_FLAG_ERR VBUF_FLAG_ERR /* some I/O error */ -#define VSTREAM_FLAG_EOF VBUF_FLAG_EOF /* end of file */ -#define VSTREAM_FLAG_FIXED VBUF_FLAG_FIXED /* fixed-size buffer */ -#define VSTREAM_FLAG_BAD VBUF_FLAG_BAD - -#define VSTREAM_FLAG_READ (1<<8) /* read buffer */ -#define VSTREAM_FLAG_WRITE (1<<9) /* write buffer */ -#define VSTREAM_FLAG_SEEK (1<<10) /* seek info valid */ -#define VSTREAM_FLAG_NSEEK (1<<11) /* can't seek this file */ -#define VSTREAM_FLAG_DOUBLE (1<<12) /* double buffer */ - -#define VSTREAM_BUFSIZE 4096 - -extern VSTREAM *vstream_fopen(const char *, int, int); -extern int vstream_fclose(VSTREAM *); -extern long vstream_fseek(VSTREAM *, long, int); -extern long vstream_ftell(VSTREAM *); -extern int vstream_fflush(VSTREAM *); -extern int vstream_fputs(const char *, VSTREAM *); -extern VSTREAM *vstream_fdopen(int, int); - -#define vstream_fread(v, b, n) vbuf_read(&(v)->buf, (b), (n)) -#define vstream_fwrite(v, b, n) vbuf_write(&(v)->buf, (b), (n)) - -#define VSTREAM_PUTC(ch, vp) VBUF_PUT(&(vp)->buf, (ch)) -#define VSTREAM_GETC(vp) VBUF_GET(&(vp)->buf) -#define vstream_ungetc(vp, ch) vbuf_unget(&(vp)->buf, (ch)) -#define VSTREAM_EOF VBUF_EOF - -#define VSTREAM_PUTCHAR(ch) VSTREAM_PUTC((ch), VSTREAM_OUT) -#define VSTREAM_GETCHAR() VSTREAM_GETC(VSTREAM_IN) - -#define vstream_fileno(vp) ((vp)->fd) -#define vstream_ferror(vp) vbuf_error(&(vp)->buf) -#define vstream_feof(vp) vbuf_eof(&(vp)->buf) -#define vstream_clearerr(vp) vbuf_clearerr(&(vp)->buf) -#define VSTREAM_PATH(vp) ((vp)->path ? (vp)->path : "unknown_stream") - -extern void vstream_control(VSTREAM *, int,...); - -#define VSTREAM_CTL_END 0 -#define VSTREAM_CTL_READ_FN 1 -#define VSTREAM_CTL_WRITE_FN 2 -#define VSTREAM_CTL_PATH 3 -#define VSTREAM_CTL_DOUBLE 4 -#define VSTREAM_CTL_READ_FD 5 -#define VSTREAM_CTL_WRITE_FD 6 -#define VSTREAM_CTL_WAITPID_FN 7 - -extern VSTREAM *vstream_printf(const char *,...); -extern VSTREAM *vstream_fprintf(VSTREAM *, const char *,...); - -extern VSTREAM *vstream_popen(const char *, int); -extern VSTREAM *vstream_popen_vargs(int,...); -extern int vstream_pclose(VSTREAM *); - -#define vstream_ispipe(vp) ((vp)->pid != 0) - -#define VSTREAM_POPEN_END 0 /* terminator */ -#define VSTREAM_POPEN_COMMAND 1 /* command is string */ -#define VSTREAM_POPEN_ARGV 2 /* command is array */ -#define VSTREAM_POPEN_UID 3 /* privileges */ -#define VSTREAM_POPEN_GID 4 /* privileges */ -#define VSTREAM_POPEN_ENV 5 /* extra environment */ -#define VSTREAM_POPEN_SHELL 6 /* alternative shell */ -#define VSTREAM_POPEN_WAITPID_FN 7 /* child catcher, waitpid() compat. */ - -extern VSTREAM *vstream_vfprintf(VSTREAM *, const char *, va_list); - -extern int vstream_peek(VSTREAM *); - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/vstring.h b/postfix/include/vstring.h deleted file mode 100644 index 4d4a972bf..000000000 --- a/postfix/include/vstring.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef _VSTRING_H_INCLUDED_ -#define _VSTRING_H_INCLUDED_ - -/*++ -/* NAME -/* vstring 3h -/* SUMMARY -/* arbitrary-length string manager -/* SYNOPSIS -/* #include "vstring.h" -/* DESCRIPTION -/* .nf - - /* - * System library. - */ -#include - - /* - * Utility library. - */ -#include - - /* - * We can't allow bare VBUFs in the interface, because VSTRINGs have a - * specific initialization and destruction sequence. - */ -typedef struct VSTRING { - VBUF vbuf; - int maxlen; -} VSTRING; - -extern void vstring_init(VSTRING *, int); -extern void vstring_wipe(VSTRING *); -extern VSTRING *vstring_alloc(int); -extern void vstring_ctl(VSTRING *,...); -extern VSTRING *vstring_truncate(VSTRING *, int); -extern VSTRING *vstring_free(VSTRING *); -extern VSTRING *vstring_strcpy(VSTRING *, const char *); -extern VSTRING *vstring_strncpy(VSTRING *, const char *, int); -extern VSTRING *vstring_strcat(VSTRING *, const char *); -extern VSTRING *vstring_strncat(VSTRING *, const char *, int); -extern VSTRING *vstring_sprintf(VSTRING *, const char *,...); -extern VSTRING *vstring_sprintf_append(VSTRING *, const char *,...); -extern char *vstring_export(VSTRING *); -extern VSTRING *vstring_import(char *); - -#define VSTRING_CTL_MAXLEN 1 -#define VSTRING_CTL_END 0 - - /* - * Macros. Unsafe macros have UPPERCASE names. - */ -#define VSTRING_SPACE(vp, len) ((vp)->vbuf.space(&(vp)->vbuf, len)) -#define vstring_str(vp) ((char *) (vp)->vbuf.data) -#define VSTRING_LEN(vp) ((vp)->vbuf.ptr - (vp)->vbuf.data) -#define vstring_end(vp) ((char *) (vp)->vbuf.ptr) -#define VSTRING_TERMINATE(vp) { if ((vp)->vbuf.cnt <= 0) \ - VSTRING_SPACE((vp),1); \ - *(vp)->vbuf.ptr = 0; } -#define VSTRING_RESET(vp) { (vp)->vbuf.ptr = (vp)->vbuf.data; \ - (vp)->vbuf.cnt = (vp)->vbuf.len; } -#define VSTRING_ADDCH(vp, ch) VBUF_PUT(&(vp)->vbuf, ch) -#define VSTRING_SKIP(vp) { while ((vp)->vbuf.cnt > 0 && *(vp)->vbuf.ptr) \ - (vp)->vbuf.ptr++, (vp)->vbuf.cnt--; } -#define vstring_avail(vp) ((vp)->vbuf.cnt) - - /* - * The following macro is not part of the public interface, because it can - * really screw up a buffer by positioning past allocated memory. - */ -#define VSTRING_AT_OFFSET(vp, offset) { \ - (vp)->vbuf.ptr = (vp)->vbuf.data + (offset); \ - (vp)->vbuf.cnt = (vp)->vbuf.len - (offset); \ - } - -extern VSTRING *vstring_vsprintf(VSTRING *, const char *, va_list); -extern VSTRING *vstring_vsprintf_append(VSTRING *, const char *, va_list); - -/* BUGS -/* Auto-resizing may change the address of the string data in -/* a vstring structure. Beware of dangling pointers. -/* HISTORY -/* .ad -/* .fi -/* A vstring module appears in the UNPROTO software by Wietse Venema. -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/include/vstring_vstream.h b/postfix/include/vstring_vstream.h deleted file mode 100644 index 897167ca6..000000000 --- a/postfix/include/vstring_vstream.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _VSTRING_VSTREAM_H_INCLUDED_ -#define _VSTRING_VSTREAM_H_INCLUDED_ - -/*++ -/* NAME -/* vstring_vstream 3h -/* SUMMARY -/* auto-resizing string library -/* SYNOPSIS -/* #include -/* DESCRIPTION - - /* - * Utility library. - */ -#include -#include - - /* - * External interface. - */ -extern int vstring_get(VSTRING *, VSTREAM *); -extern int vstring_get_nonl(VSTRING *, VSTREAM *); -extern int vstring_get_null(VSTRING *, VSTREAM *); -extern int vstring_get_bound(VSTRING *, VSTREAM *, int); -extern int vstring_get_nonl_bound(VSTRING *, VSTREAM *, int); - - /* - * Backwards compatibility for code that still uses the vstring_fgets() - * interface. Unfortunately we can't change the macro name to upper case. - */ -#define vstring_fgets(s, p) \ - (vstring_get((s), (p)) == VSTREAM_EOF ? 0 : (s)) -#define vstring_fgets_nonl(s, p) \ - (vstring_get_nonl((s), (p)) == VSTREAM_EOF ? 0 : (s)) -#define vstring_fgets_null(s, p) \ - (vstring_get_null((s), (p)) == VSTREAM_EOF ? 0 : (s)) -#define vstring_fgets_bound(s, p, l) \ - (vstring_get_bound((s), (p), (l)) == VSTREAM_EOF ? 0 : (s)) -#define vstring_fgets_nonl_bound(s, p, l) \ - (vstring_get_nonl_bound((s), (p), (l)) == VSTREAM_EOF ? 0 : (s)) - -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -#endif diff --git a/postfix/lib/.pure b/postfix/lib/.pure deleted file mode 100644 index e69de29bb..000000000 diff --git a/postfix/local/feature.c b/postfix/local/feature.c deleted file mode 100644 index 1a1db60f4..000000000 --- a/postfix/local/feature.c +++ /dev/null @@ -1,91 +0,0 @@ -/*++ -/* NAME -/* feature 3 -/* SUMMARY -/* toggle features depending on address -/* SYNOPSIS -/* #include "local.h" -/* -/* int feature_control(state) -/* LOCAL_STATE state; -/* DESCRIPTION -/* feature_control() breaks the localpart of the recipient -/* address up into fields, according to the recipient feature -/* delimiter, and turns on/off the features as encountered. -/* -/* Arguments: -/* .IP state -/* The attributes that specify the message, recipient and more. -/* Attributes describing the alias, include or forward expansion. -/* A table with the results from expanding aliases or lists. -/* LICENSE -/* .ad -/* .fi -/* 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 -/*--*/ - -/* System library. */ - -#include -#include - -#ifdef STRCASECMP_IN_STRINGS_H -#include -#endif - -/* Utility library. */ - -#include -#include -#include - -/* Global library. */ - -#include - -/* Application-specific. */ - -#include "local.h" - -struct feature_map { - char *name; - int mask; -}; - -static struct feature_map feature_map[] = { - "nodelivered", FEATURE_NODELIVERED, - 0, -}; - -/* feature_control - extract delivery options from recipient localpart */ - -int feature_control(const char *localpart) -{ - struct feature_map *mp; - char *saved_localpart; - char *ptr; - int mask = 0; - char *cp; - - if (*var_rcpt_fdelim) { - ptr = saved_localpart = mystrdup(localpart); - while ((cp = mystrtok(&ptr, var_rcpt_fdelim)) != 0) { - for (mp = feature_map; mp->name; mp++) - if (strcasecmp(mp->name, cp) == 0) { - if (msg_verbose) - msg_info("feature: %s", mp->name); - mask |= mp->mask; - break; - } - } - myfree(saved_localpart); - } - if (msg_verbose) - msg_info("features: 0x%x", mask); - return (mask); -} diff --git a/postfix/man/man1/postalias.1 b/postfix/man/man1/postalias.1 index 147d899e4..63c092ea0 100644 --- a/postfix/man/man1/postalias.1 +++ b/postfix/man/man1/postalias.1 @@ -70,7 +70,7 @@ flagged with a warning. .ad .fi .IP \fBMAIL_CONFIG\fR -Mail configuration database. +Directory with Postfix configuration files. .IP \fBMAIL_VERBOSE\fR Enable verbose logging for debugging purposes. .SH CONFIGURATION PARAMETERS diff --git a/postfix/man/man1/postcat.1 b/postfix/man/man1/postcat.1 index a343e5a31..2ab5fe048 100644 --- a/postfix/man/man1/postcat.1 +++ b/postfix/man/man1/postcat.1 @@ -19,7 +19,7 @@ reads from standard input. Options: .IP \fB-v\fR -Enable verbose mode for debugging purposes. Multiple \fB-v\fR +Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. .SH DIAGNOSTICS .ad diff --git a/postfix/man/man1/postconf.1 b/postfix/man/man1/postconf.1 index e5d97f221..2e5bb2e0b 100644 --- a/postfix/man/man1/postconf.1 +++ b/postfix/man/man1/postconf.1 @@ -24,19 +24,17 @@ The \fBmain.cf\fR configuration file is in the named directory. .IP \fB-d\fR Print default parameter settings instead of actual settings. .IP \fB-h\fR -Show parameter values only, not the ``name ='' label +Show parameter values only, not the ``name = '' label that normally precedes the value. .IP \fB-n\fR Print non-default parameter settings only. .IP \fB-v\fR -Enable verbose mode for debugging purposes. Multiple \fB-v\fR +Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. .SH DIAGNOSTICS .ad .fi Problems are reported to the standard error stream. -Fatal error: out of memory, file not found, invalid \fBmain.cf\fR -parameter syntax. .SH LICENSE .na .nf diff --git a/postfix/man/man1/postfix.1 b/postfix/man/man1/postfix.1 index da42149eb..8ea3a8999 100644 --- a/postfix/man/man1/postfix.1 +++ b/postfix/man/man1/postfix.1 @@ -65,7 +65,7 @@ options make the software increasingly verbose. The \fBpostfix\fR command sets the following environment variables: .IP \fBMAIL_CONFIG\fR -The Postfix configuration directory. +Directory with Postfix configuration files. .IP \fBMAIL_VERBOSE\fR This is set when the -v command-line option is present. .IP \fBMAIL_DEBUG\fR @@ -74,13 +74,13 @@ This is set when the -D command-line option is present. The following configuration parameters are made available as process environment variables with the same names: .IP \fBcommand_directory\fR -The directory with Postfix support commands (default: +Directory with Postfix support commands (default: \fB$program_directory\fR). .IP \fBdaemon_directory\fR -The directory with Postfix daemon programs (default: +Directory with Postfix daemon programs (default: \fB$program_directory\fR). .IP \fBconfig_directory\fR -The directory with configuration files and with administrative +Directory with Postfix configuration files and with administrative shell scripts. .IP \fBqueue_directory\fR The directory with the Postfix queue directory (and with some diff --git a/postfix/man/man1/postkick.1 b/postfix/man/man1/postkick.1 index 6ff0220cd..3b48ef77f 100644 --- a/postfix/man/man1/postkick.1 +++ b/postfix/man/man1/postkick.1 @@ -49,7 +49,7 @@ stream. .IP \fBMAIL_CONFIG\fR Directory with Postfix configuration files. .IP \fBMAIL_VERBOSE\fR -Enable verbose logging. +Enable verbose logging for debugging purposes. .SH CONFIGURATION PARAMETERS .na .nf diff --git a/postfix/man/man1/postlock.1 b/postfix/man/man1/postlock.1 index 4f7022029..586eca3ea 100644 --- a/postfix/man/man1/postlock.1 +++ b/postfix/man/man1/postlock.1 @@ -23,7 +23,7 @@ Options: Read configuration information from \fBmain.cf\fR in the named configuration directory. .IP \fB-v\fR -Enable verbose mode for debugging purposes. Multiple \fB-v\fR +Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. .PP Arguments: @@ -54,7 +54,7 @@ processes running on different machines. .IP \fBMAIL_CONFIG\fR Directory with Postfix configuration files. .IP \fBMAIL_VERBOSE\fR -Enable verbose logging. +Enable verbose logging for debugging purposes. .SH CONFIGURATION PARAMETERS .na .nf diff --git a/postfix/man/man1/postmap.1 b/postfix/man/man1/postmap.1 index 205d4b98a..45f95d7f0 100644 --- a/postfix/man/man1/postmap.1 +++ b/postfix/man/man1/postmap.1 @@ -88,7 +88,7 @@ skipped and are flagged with a warning. .ad .fi .IP \fBMAIL_CONFIG\fR -Mail configuration database +Directory with Postfix configuration files. .IP \fBMAIL_VERBOSE\fR Enable verbose logging for debugging purposes. .SH CONFIGURATION PARAMETERS diff --git a/postfix/man/man1/postsuper.1 b/postfix/man/man1/postsuper.1 index 996a0a9cc..07fada8e8 100644 --- a/postfix/man/man1/postsuper.1 +++ b/postfix/man/man1/postsuper.1 @@ -34,7 +34,7 @@ check once before Postfix startup. Purge stale files (files that are left over after system or software crashes). .IP \fB-v\fR -Enable verbose mode for debugging purposes. Multiple \fB-v\fR +Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. .SH DIAGNOSTICS .ad diff --git a/postfix/man/man1/sendmail.1 b/postfix/man/man1/sendmail.1 index 1c60645a9..9c57eb740 100644 --- a/postfix/man/man1/sendmail.1 +++ b/postfix/man/man1/sendmail.1 @@ -156,7 +156,7 @@ stream. .IP \fBMAIL_CONFIG\fR Directory with Postfix configuration files. .IP \fBMAIL_VERBOSE\fR -Enable verbose logging +Enable verbose logging for debugging purposes. .IP \fBMAIL_DEBUG\fR Enable debugging with an external command, as specified with the \fBdebugger_command\fR configuration parameter. diff --git a/postfix/man/man8/local.8 b/postfix/man/man8/local.8 index f6b73db65..29a3c3b26 100644 --- a/postfix/man/man8/local.8 +++ b/postfix/man/man8/local.8 @@ -51,6 +51,7 @@ extension), \fB$domain\fR (recipient domain), \fBlocal\fR Characters that may have special meaning to the shell or file system are replaced by underscores. The list of acceptable characters is specified with the \fBforward_expansion_filter\fR configuration +parameter. An alias or ~/.\fBforward\fR file may list any combination of external commands, destination file names, \fB:include:\fR directives, or diff --git a/postfix/man/man8/master.8 b/postfix/man/man8/master.8 index eaf281c4c..8293ef493 100644 --- a/postfix/man/man8/master.8 +++ b/postfix/man/man8/master.8 @@ -73,14 +73,14 @@ Problems are reported to \fBsyslogd\fR(8). .SH ENVIRONMENT .na .nf -.IP \fBMAIL_DEBUG\fR .ad .fi +.IP \fBMAIL_DEBUG\fR After initialization, start a debugger as specified with the \fBdebugger_command\fR configuration parameter in the \fBmain.cf\fR configuration file. .IP \fBMAIL_CONFIG\fR -Directory with configuration files. +Directory with Postfix configuration files. .SH CONFIGURATION PARAMETERS .na .nf @@ -95,8 +95,10 @@ a configuration change. .fi .IP \fBmail_owner\fR The owner of the mail queue and of most Postfix processes. -.IP \fBprogram_directory\fR -Directory with Postfix support programs and daemons. +.IP \fBcommand_directory\fR +Directory with Postfix support programs. +.IP \fBdaemon_directory\fR +Directory with Postfix daemon programs. .IP \fBqueue_directory\fR Top-level directory of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. diff --git a/postfix/master/master.c b/postfix/master/master.c index 463d324ae..c245fc460 100644 --- a/postfix/master/master.c +++ b/postfix/master/master.c @@ -61,14 +61,14 @@ /* Problems are reported to \fBsyslogd\fR(8). /* BUGS /* ENVIRONMENT -/* .IP \fBMAIL_DEBUG\fR /* .ad /* .fi +/* .IP \fBMAIL_DEBUG\fR /* After initialization, start a debugger as specified with the /* \fBdebugger_command\fR configuration parameter in the \fBmain.cf\fR /* configuration file. /* .IP \fBMAIL_CONFIG\fR -/* Directory with configuration files. +/* Directory with Postfix configuration files. /* CONFIGURATION PARAMETERS /* .ad /* .fi @@ -81,8 +81,10 @@ /* .fi /* .IP \fBmail_owner\fR /* The owner of the mail queue and of most Postfix processes. -/* .IP \fBprogram_directory\fR -/* Directory with Postfix support programs and daemons. +/* .IP \fBcommand_directory\fR +/* Directory with Postfix support programs. +/* .IP \fBdaemon_directory\fR +/* Directory with Postfix daemon programs. /* .IP \fBqueue_directory\fR /* Top-level directory of the Postfix queue. This is also the root /* directory of Postfix daemons that run chrooted. diff --git a/postfix/postalias/postalias.c b/postfix/postalias/postalias.c index 5a305453f..96de6a610 100644 --- a/postfix/postalias/postalias.c +++ b/postfix/postalias/postalias.c @@ -60,7 +60,7 @@ /* .ad /* .fi /* .IP \fBMAIL_CONFIG\fR -/* Mail configuration database. +/* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR /* Enable verbose logging for debugging purposes. /* CONFIGURATION PARAMETERS diff --git a/postfix/postcat/postcat.c b/postfix/postcat/postcat.c index c86e3f622..dc76c8a09 100644 --- a/postfix/postcat/postcat.c +++ b/postfix/postcat/postcat.c @@ -13,7 +13,7 @@ /* /* Options: /* .IP \fB-v\fR -/* Enable verbose mode for debugging purposes. Multiple \fB-v\fR +/* Enable verbose logging for debugging purposes. Multiple \fB-v\fR /* options make the software increasingly verbose. /* DIAGNOSTICS /* Problems are reported to the standard error stream. diff --git a/postfix/postconf/extract.sh b/postfix/postconf/extract.sh deleted file mode 100644 index 69323b484..000000000 --- a/postfix/postconf/extract.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# Extract initialization tables from actual source code. - -awk ' -/static CONFIG_INT_TABLE/,/};/ { - if ($1 ~ /VAR/) { - print "int " substr($3,2,length($3)-2) ";" > "int_vars.h" - print | "sort -u >int_table.h" - } -} -/static CONFIG_STR_TABLE/,/};/ { - if ($1 ~ /VAR/) { - print "char *" substr($3,2,length($3)-2) ";" > "str_vars.h" - print | "sort -u >str_table.h" - } -} -/static CONFIG_BOOL_TABLE/,/};/ { - if ($1 ~ /VAR/) { - print "int " substr($3,2,length($3)-2) ";" > "bool_vars.h" - print | "sort -u >bool_table.h" - } -} -' $* diff --git a/postfix/postconf/postconf.c b/postfix/postconf/postconf.c index b8cb48fa9..d7d44c871 100644 --- a/postfix/postconf/postconf.c +++ b/postfix/postconf/postconf.c @@ -23,7 +23,7 @@ /* .IP \fB-n\fR /* Print non-default parameter settings only. /* .IP \fB-v\fR -/* Enable verbose mode for debugging purposes. Multiple \fB-v\fR +/* Enable verbose logging for debugging purposes. Multiple \fB-v\fR /* options make the software increasingly verbose. /* DIAGNOSTICS /* Problems are reported to the standard error stream. diff --git a/postfix/postfix/postfix.c b/postfix/postfix/postfix.c index d9850c2e3..80ca7dca8 100644 --- a/postfix/postfix/postfix.c +++ b/postfix/postfix/postfix.c @@ -57,7 +57,7 @@ /* The \fBpostfix\fR command sets the following environment /* variables: /* .IP \fBMAIL_CONFIG\fR -/* The Postfix configuration directory. +/* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR /* This is set when the -v command-line option is present. /* .IP \fBMAIL_DEBUG\fR @@ -66,13 +66,13 @@ /* The following configuration parameters are made available /* as process environment variables with the same names: /* .IP \fBcommand_directory\fR -/* The directory with Postfix support commands (default: +/* Directory with Postfix support commands (default: /* \fB$program_directory\fR). /* .IP \fBdaemon_directory\fR -/* The directory with Postfix daemon programs (default: +/* Directory with Postfix daemon programs (default: /* \fB$program_directory\fR). /* .IP \fBconfig_directory\fR -/* The directory with configuration files and with administrative +/* Directory with Postfix configuration files and with administrative /* shell scripts. /* .IP \fBqueue_directory\fR /* The directory with the Postfix queue directory (and with some diff --git a/postfix/postkick/postkick.c b/postfix/postkick/postkick.c index ee67a4cf3..453277a00 100644 --- a/postfix/postkick/postkick.c +++ b/postfix/postkick/postkick.c @@ -39,7 +39,7 @@ /* .IP \fBMAIL_CONFIG\fR /* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR -/* Enable verbose logging. +/* Enable verbose logging for debugging purposes. /* CONFIGURATION PARAMETERS /* .ad /* .fi diff --git a/postfix/postlock/postlock.c b/postfix/postlock/postlock.c index a4ac5ff7b..0caa2b0cc 100644 --- a/postfix/postlock/postlock.c +++ b/postfix/postlock/postlock.c @@ -17,7 +17,7 @@ /* Read configuration information from \fBmain.cf\fR in the named /* configuration directory. /* .IP \fB-v\fR -/* Enable verbose mode for debugging purposes. Multiple \fB-v\fR +/* Enable verbose logging for debugging purposes. Multiple \fB-v\fR /* options make the software increasingly verbose. /* .PP /* Arguments: @@ -42,7 +42,7 @@ /* .IP \fBMAIL_CONFIG\fR /* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR -/* Enable verbose logging. +/* Enable verbose logging for debugging purposes. /* CONFIGURATION PARAMETERS /* .ad /* .fi diff --git a/postfix/postmap/postmap.c b/postfix/postmap/postmap.c index 72ddfa44a..f44c232ab 100644 --- a/postfix/postmap/postmap.c +++ b/postfix/postmap/postmap.c @@ -78,7 +78,7 @@ /* .ad /* .fi /* .IP \fBMAIL_CONFIG\fR -/* Mail configuration database +/* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR /* Enable verbose logging for debugging purposes. /* CONFIGURATION PARAMETERS diff --git a/postfix/postsuper/postsuper.c b/postfix/postsuper/postsuper.c index 6453b3023..eb238ee47 100644 --- a/postfix/postsuper/postsuper.c +++ b/postfix/postsuper/postsuper.c @@ -28,7 +28,7 @@ /* Purge stale files (files that are left over after system or /* software crashes). /* .IP \fB-v\fR -/* Enable verbose mode for debugging purposes. Multiple \fB-v\fR +/* Enable verbose logging for debugging purposes. Multiple \fB-v\fR /* options make the software increasingly verbose. /* DIAGNOSTICS /* Problems are reported to the standard error stream and to diff --git a/postfix/qmgr/Makefile.in b/postfix/qmgr/Makefile.in index 41c570bc2..4175c9468 100644 --- a/postfix/qmgr/Makefile.in +++ b/postfix/qmgr/Makefile.in @@ -166,6 +166,7 @@ qmgr_message.o: ../include/split_at.h qmgr_message.o: ../include/valid_hostname.h qmgr_message.o: ../include/argv.h qmgr_message.o: ../include/stringops.h +qmgr_message.o: ../include/myflock.h qmgr_message.o: ../include/dict.h qmgr_message.o: ../include/mail_queue.h qmgr_message.o: ../include/mail_params.h diff --git a/postfix/sendmail/Makefile.in b/postfix/sendmail/Makefile.in index 54ba8d538..9a71d3422 100644 --- a/postfix/sendmail/Makefile.in +++ b/postfix/sendmail/Makefile.in @@ -69,6 +69,7 @@ sendmail.o: ../include/argv.h sendmail.o: ../include/safe.h sendmail.o: ../include/iostuff.h sendmail.o: ../include/stringops.h +sendmail.o: ../include/set_ugid.h sendmail.o: ../include/mail_queue.h sendmail.o: ../include/mail_proto.h sendmail.o: ../include/mail_params.h diff --git a/postfix/sendmail/sendmail.c b/postfix/sendmail/sendmail.c index 865483f82..dc100b778 100644 --- a/postfix/sendmail/sendmail.c +++ b/postfix/sendmail/sendmail.c @@ -144,7 +144,7 @@ /* .IP \fBMAIL_CONFIG\fR /* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR -/* Enable verbose logging +/* Enable verbose logging for debugging purposes. /* .IP \fBMAIL_DEBUG\fR /* Enable debugging with an external command, as specified with the /* \fBdebugger_command\fR configuration parameter. diff --git a/postfix/smtp/smtp_addr.c b/postfix/smtp/smtp_addr.c index 08a88b483..4e3ae5938 100644 --- a/postfix/smtp/smtp_addr.c +++ b/postfix/smtp/smtp_addr.c @@ -324,7 +324,7 @@ static DNS_RR *smtp_find_self(DNS_RR *addr_list) /* smtp_truncate_self - truncate address list at self and equivalents */ -static DNS_RR *smtp_truncate_self(DNS_RR *addr_list, unsigned pref, char *name) +static DNS_RR *smtp_truncate_self(DNS_RR *addr_list, unsigned pref) { DNS_RR *addr; DNS_RR *last; @@ -416,7 +416,7 @@ DNS_RR *smtp_domain_addr(char *name, VSTRING *why) if (msg_verbose) smtp_print_addr(name, addr_list); if ((self = smtp_find_self(addr_list)) != 0) { - addr_list = smtp_truncate_self(addr_list, self->pref, name); + addr_list = smtp_truncate_self(addr_list, self->pref); if (addr_list == 0) { if (best_pref != best_found) { vstring_sprintf(why, "unable to find primary relay for %s", diff --git a/postfix/smtpd/smtpd_check.c b/postfix/smtpd/smtpd_check.c index 7f101a5a8..3460f3843 100644 --- a/postfix/smtpd/smtpd_check.c +++ b/postfix/smtpd/smtpd_check.c @@ -128,6 +128,9 @@ /* Reject the request when the resolved recipient domain does not match /* the \fIrelay_domains\fR configuration parameter. Same error code as /* check_relay_domains. +/* .IP reject_unauth_pipelining +/* Reject the request when the client has already sent the next request +/* without being told that the server implements SMTP command pipelining. /* .IP permit_mx_backup /* Allow the request when the local mail system is mail exchanger /* for the recipient domain (this includes the case where the local @@ -222,6 +225,7 @@ #include #include #include +#include #ifdef STRCASECMP_IN_STRINGS_H #include @@ -710,6 +714,25 @@ static int reject_unauth_destination(SMTPD_STATE *state, char *recipient) var_relay_code, recipient)); } +/* reject_unauth_pipelining - reject improper use of SMTP command pipelining */ + +static int reject_unauth_pipelining(SMTPD_STATE *state) +{ + char *myname = "reject_unauth_pipelining"; + + if (msg_verbose) + msg_info("%s: %s", myname, state->where); + + if (state->client != 0 + && SMTPD_STAND_ALONE(state) == 0 + && vstream_peek(state->client) > 0 + && strcasecmp(state->protocol, "ESMTP") != 0) { + return (smtpd_check_reject(state, MAIL_ERROR_PROTOCOL, + "503 Improper use of SMTP command pipelining")); + } + return (SMTPD_CHECK_DUNNO); +} + /* has_my_addr - see if this host name lists one of my network addresses */ static int has_my_addr(char *host) @@ -1268,6 +1291,10 @@ static int generic_checks(SMTPD_STATE *state, char *name, (*cpp)[1], REJECT_ALL); return (1); } + if (strcasecmp(name, REJECT_UNAUTH_PIPE) == 0) { + *status = reject_unauth_pipelining(state); + return (1); + } /* * Client name/address restrictions. @@ -1659,7 +1686,6 @@ char *smtpd_check_size(SMTPD_STATE *state, off_t size) * rewrite/resolve service. This is just for testing code, not for debugging * configuration files. */ -#include #include #include diff --git a/postfix/util/Makefile.in b/postfix/util/Makefile.in index 1c8b7dc68..22a134351 100644 --- a/postfix/util/Makefile.in +++ b/postfix/util/Makefile.in @@ -424,7 +424,6 @@ doze.o: doze.c doze.o: sys_defs.h doze.o: msg.h doze.o: iostuff.h -dup2_pass_on_exec.o: dup2_pass_on_exec.c environ.o: environ.c environ.o: sys_defs.h events.o: events.c diff --git a/postfix/util/compat.c b/postfix/util/compat.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/postfix/util/dict.c b/postfix/util/dict.c index 292dab003..d14a5fb6f 100644 --- a/postfix/util/dict.c +++ b/postfix/util/dict.c @@ -148,9 +148,9 @@ /* malformed macro name. /* /* The lookup routines may set the \fIdict_errno\fR variable when -/* they were unable to find the requested result. The variable -/* is reset before each lookup operation. \fIdict_errno\fR can -/* have the following values: +/* they were unable to find the requested result. The lookup +/* routines must reset \fIdict_errno\fR before each lookup operation. +/* \fIdict_errno\fR can have the following values: /* .IP DICT_ERR_RETRY /* The dictionary was temporarily unavailable. This can happen /* with network-based services. diff --git a/postfix/util/dict_ldap.c b/postfix/util/dict_ldap.c index 52185d274..069bcf723 100644 --- a/postfix/util/dict_ldap.c +++ b/postfix/util/dict_ldap.c @@ -36,6 +36,8 @@ /* .IP \fIldapsource_\fRquery_filter /* The filter used to search for directory entries, for example /* \fI(mailacceptinggeneralid=%s)\fR. +/* .IP \fIldapsource_\fRlookup_wildcards +/* Whether to allow '*' in addresses to be looked up. /* .IP \fIldapsource_\fRresult_attribute /* The attribute returned by the search, in which we expect to find /* RFC822 addresses, for example \fImaildrop\fR. @@ -108,6 +110,7 @@ typedef struct { int server_port; char *search_base; char *query_filter; + int lookup_wildcards; char *result_attribute; int bind; char *bind_dn; @@ -141,9 +144,22 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name) long i = 0; int rc = 0; void (*saved_alarm) (int); + char *sub, + *end; dict_errno = 0; + /* + * Unless configured to allow them, refuse to search for a name + * containing wildcards. + */ + if (!dict_ldap->lookup_wildcards) { + if (strstr(name, "*") != NULL) { + msg_warn("%s: Address (%s) contains a wildcard; refusing to search. See the lookup_wildcards attribute in LDAP_README for more information.", myname, name); + return (0); + } + } + /* * Initialize. */ @@ -187,16 +203,16 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name) */ if (dict_ldap->bind) { if (msg_verbose) - msg_info("%s: about to bind: server %s, base %s", myname, - dict_ldap->server_host, dict_ldap->search_base); + msg_info("%s: about to bind to server %s as dn %s", myname, + dict_ldap->server_host, dict_ldap->bind_dn); - rc = ldap_bind_s(dict_ldap->ld, dict_ldap->search_base, NULL, - LDAP_AUTH_SIMPLE); + rc = ldap_bind_s(dict_ldap->ld, dict_ldap->bind_dn, + dict_ldap->bind_pw, LDAP_AUTH_SIMPLE); if (rc != LDAP_SUCCESS) { - msg_fatal("%s: Unable to bind with search base %s at server %s (%d -- %s): ", myname, dict_ldap->search_base, dict_ldap->server_host, rc, ldap_err2string(rc)); + msg_fatal("%s: Unable to bind to server %s as %s (%d -- %s): ", myname, dict_ldap->server_host, dict_ldap->bind_dn, rc, ldap_err2string(rc)); } else { if (msg_verbose) - msg_info("%s: Successful bind to server %s with search base %s(%d -- %s): ", myname, dict_ldap->search_base, dict_ldap->server_host, rc, ldap_err2string(rc)); + msg_info("%s: Successful bind to server %s as %s (%d -- %s): ", myname, dict_ldap->server_host, dict_ldap->bind_dn, rc, ldap_err2string(rc)); } } if (msg_verbose) @@ -211,7 +227,36 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name) tv.tv_sec = dict_ldap->timeout; tv.tv_usec = 0; filter_buf = vstring_alloc(30); - vstring_sprintf(filter_buf, dict_ldap->query_filter, name); + + /* Does the supplied query_filter even include a substitution? */ + if (strstr(dict_ldap->query_filter, "%s") == NULL) { + msg_warn("%s: fixed query_filter %s is probably useless", myname, + dict_ldap->query_filter); + vstring_strcpy(filter_buf, dict_ldap->query_filter); + } else { + + /* + * OK, let's replace all the instances of %s with the address to look + * up. + */ + sub = dict_ldap->query_filter; + end = sub + strlen(dict_ldap->query_filter); + while (sub < end) { + + /* + * Make sure it's %s and not something else, though it wouldn't + * really matter; we could skip any single character. + */ + if (*(sub) == '%') { + if ((sub + 1) != end && *(sub + 1) != 's') + msg_fatal("%s: invalid lookup substitution format '%%%c'!", myname, *(sub + 1)); + vstring_strcat(filter_buf, name); + sub++; + } else + vstring_strncat(filter_buf, sub, 1); + sub++; + } + } if (msg_verbose) msg_info("%s: searching with filter %s", myname, @@ -367,6 +412,17 @@ DICT *dict_ldap_open(const char *ldapsource, int dummy, int dict_flags) msg_info("%s: %s is %s", myname, vstring_str(config_param), dict_ldap->query_filter); + /* + * get configured value of "ldapsource_lookup_wildcards"; default to + * false + */ + vstring_sprintf(config_param, "%s_lookup_wildcards", ldapsource); + dict_ldap->lookup_wildcards = + get_mail_conf_bool(vstring_str(config_param), 0); + if (msg_verbose) + msg_info("%s: %s is %d", myname, vstring_str(config_param), + dict_ldap->lookup_wildcards); + vstring_sprintf(config_param, "%s_result_attribute", ldapsource); dict_ldap->result_attribute = mystrdup((char *) get_mail_conf_str(vstring_str(config_param), @@ -431,16 +487,16 @@ DICT *dict_ldap_open(const char *ldapsource, int dummy, int dict_flags) */ if (dict_ldap->bind) { if (msg_verbose) - msg_info("%s: about to bind: server %s, base %s", myname, - dict_ldap->server_host, dict_ldap->search_base); + msg_info("%s: about to bind to server %s as dn %s", myname, + dict_ldap->server_host, dict_ldap->bind_dn); - rc = ldap_bind_s(dict_ldap->ld, dict_ldap->search_base, NULL, - LDAP_AUTH_SIMPLE); + rc = ldap_bind_s(dict_ldap->ld, dict_ldap->bind_dn, + dict_ldap->bind_pw, LDAP_AUTH_SIMPLE); if (rc != LDAP_SUCCESS) { - msg_fatal("%s: Unable to bind with search base %s at server %s (%d -- %s): ", myname, dict_ldap->search_base, dict_ldap->server_host, rc, ldap_err2string(rc)); + msg_fatal("%s: Unable to bind to server %s as %s (%d -- %s): ", myname, dict_ldap->server_host, dict_ldap->bind_dn, rc, ldap_err2string(rc)); } else { if (msg_verbose) - msg_info("%s: Successful bind to server %s with search base %s(%d -- %s): ", myname, dict_ldap->search_base, dict_ldap->server_host, rc, ldap_err2string(rc)); + msg_info("%s: Successful bind to server %s as %s (%d -- %s): ", myname, dict_ldap->server_host, dict_ldap->bind_dn, rc, ldap_err2string(rc)); } } if (msg_verbose) diff --git a/postfix/util/dict_mysql.c b/postfix/util/dict_mysql.c index c4f488700..0da7e4880 100644 --- a/postfix/util/dict_mysql.c +++ b/postfix/util/dict_mysql.c @@ -7,7 +7,6 @@ /* #include /* #include /* -/* /* DICT *dict_mysql_open(name, dummy, unused_dict_flags) /* const char *name; /* int dummy; @@ -53,7 +52,6 @@ /* josh@icgroup.com /*--*/ - /* System library. */ #include "sys_defs.h" @@ -72,7 +70,6 @@ #include "argv.h" #include "vstring.h" - extern int dict_errno; typedef struct { @@ -87,7 +84,6 @@ typedef struct { int len_hosts; } MYSQL_NAME; - typedef struct { DICT dict; PLMYSQL *pldb; @@ -104,7 +100,6 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) MYSQL_NAME *name = (MYSQL_NAME *) mymalloc(sizeof(MYSQL_NAME)); ARGV *hosts_argv; - dict_load_file("mysql_options", mysqlcf_path); /* mysql username lookup */ if ((nameval = (char *) dict_lookup("mysql_options", "user")) == NULL) @@ -191,7 +186,6 @@ static MYSQL_NAME *mysqlname_parse(const char *mysqlcf_path) return name; } - /* dict_mysql_lookup - find database entry return 0 if no alias found */ static const char *dict_mysql_lookup(DICT *dict, const char *name) { @@ -228,6 +222,7 @@ static const char *dict_mysql_lookup(DICT *dict, const char *name) vstring_free(query); return 0; } + dict_errno = 0; /* free the vstring query */ vstring_free(query); numrows = mysql_num_rows(query_res); @@ -252,7 +247,6 @@ static const char *dict_mysql_lookup(DICT *dict, const char *name) return vstring_str(result); } - /* dict_mysql_close - unregister, disassociate from database */ static void dict_mysql_close(DICT *dict) { @@ -273,7 +267,6 @@ static void dict_mysql_close(DICT *dict) myfree((char *) dict_mysql->name); } - /* dict_mysql_update - add or update table entry */ static void dict_mysql_update(DICT *dict, const char *unused_name, const char *unused_value) { @@ -327,7 +320,6 @@ static HOST host_init(char *hostname) return host; } - /* * plmysql_init - initalize a MYSQL database. * Return NULL on failure, or a PLMYSQL * on success. @@ -370,11 +362,11 @@ void plmysql_dealloc(PLMYSQL *PLDB) /* plmysql_down_host - down a HOST * */ inline void plmysql_down_host(HOST *host) { + if (host->stat != STATFAIL) + host->ts = time(&(host->ts)); host->stat = STATFAIL; - host->ts = time(&(host->ts)); } - /* plmysql_connect_single - * used to reconnect to a single database when one is down and as a helper for * plmysql_connect @@ -397,7 +389,6 @@ int plmysql_connect_single(PLMYSQL *PLDB, int host) return 0; } - /* * plmysql_connect - * given a PLMYSQL struct PLDB *, connect it and select db. diff --git a/postfix/util/dict_pcre.c b/postfix/util/dict_pcre.c index 98ba78a10..c19c8c5ff 100644 --- a/postfix/util/dict_pcre.c +++ b/postfix/util/dict_pcre.c @@ -162,7 +162,7 @@ static const char *dict_pcre_lookup(DICT *dict, const char *name) for (pcre_list = dict_pcre->head; pcre_list; pcre_list = pcre_list->next) { if (pcre_list->pattern) { ctxt.matches = pcre_exec(pcre_list->pattern, pcre_list->hints, - name, name_len, 0, ctxt.offsets, PCRE_MAX_CAPTURE * 3); + name, name_len, 0, 0, ctxt.offsets, PCRE_MAX_CAPTURE * 3); if (ctxt.matches != PCRE_ERROR_NOMATCH) { if (ctxt.matches > 0) break; /* Got a match! */ diff --git a/postfix/util/dup2_pass_on_exec.c b/postfix/util/dup2_pass_on_exec.c deleted file mode 100644 index 54bca2397..000000000 --- a/postfix/util/dup2_pass_on_exec.c +++ /dev/null @@ -1,60 +0,0 @@ -/*++ -/* NAME -/* dup2_pass_on_exec 1 -/* SUMMARY -/* dup2 close-on-exec behaviour test program -/* SYNOPSIS -/* dup2_pass_on_exec -/* DESCRIPTION -/* dup2_pass_on_exec sets the close-on-exec flag on its -/* standard input and then dup2() to duplicate it. -/* Posix-1003.1 specifies in section 6.2.1.2 that dup2(o,n) should behave -/* as: close(n); n = fcntl(o, F_DUPFD, n); as long as o is a valid -/* file-descriptor, n!=o, and 0<=n<=[OPEN_MAX]. -/* Section 6.5.2.2 states that the close-on-exec flag of the result of a -/* successful fcntl(o, F_DUPFD, n) is cleared. -/* -/* At least Ultrix4.3a does not clear the close-on-exec flag of n on -/* dup2(o, n). -/* DIAGNOSTICS -/* Problems are reported to the standard error stream. -/* LICENSE -/* .ad -/* .fi -/* The Secure Mailer license must be distributed with this software. -/* AUTHOR(S) -/* Christian von Roques -/* Forststrasse 71 -/* 76131 Karlsruhe, GERMANY -/*--*/ - -#include -#include - -#define DO(s) if (s < 0) { perror(#s); exit(1); } - -int main(int unused_argc, char **unused_argv) -{ - int res; - - printf("Setting the close-on-exec flag of file-descriptor 0.\n"); - DO(fcntl(0, F_SETFD, 1)); - - printf("Duplicating file-descriptor 0 to 3.\n"); - DO(dup2(0, 3)); - - 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"); - 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"); - - return 0; -} diff --git a/postfix/util/match_ops.c b/postfix/util/match_ops.c index 564d579c1..764866bbc 100644 --- a/postfix/util/match_ops.c +++ b/postfix/util/match_ops.c @@ -128,11 +128,13 @@ int match_hostname(const char *name, const char *pattern) if (strchr(pattern, ':') != 0) { temp = lowercase(mystrdup(name)); match = 0; - for (entry = temp; (next = strchr(entry, '.')) != 0; entry = next + 1) { + for (entry = temp; /* void */ ; entry = next + 1) { if ((match = (dict_lookup(pattern, entry) != 0)) != 0) break; if (dict_errno != 0) msg_fatal("%s: table lookup problem", pattern); + if ((next = strchr(entry, '.')) == 0) + break; } myfree(temp); return (match); -- 2.47.3