]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.12-20141221
authorWietse Venema <wietse@porcupine.org>
Sun, 21 Dec 2014 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Tue, 23 Dec 2014 20:37:23 +0000 (15:37 -0500)
108 files changed:
postfix/HISTORY
postfix/WISHLIST
postfix/html/postconf.5.html
postfix/html/smtp-sink.1.html
postfix/makedefs
postfix/man/man1/smtp-sink.1
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/anvil/Makefile.in
postfix/src/anvil/anvil.c
postfix/src/bounce/Makefile.in
postfix/src/bounce/bounce.c
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup.c
postfix/src/discard/Makefile.in
postfix/src/dnsblog/Makefile.in
postfix/src/dnsblog/dnsblog.c
postfix/src/error/Makefile.in
postfix/src/flush/Makefile.in
postfix/src/flush/flush.c
postfix/src/global/Makefile.in
postfix/src/global/abounce.c
postfix/src/global/anvil_clnt.c
postfix/src/global/bounce.c
postfix/src/global/defer.c
postfix/src/global/deliver_pass.c
postfix/src/global/deliver_request.c
postfix/src/global/dict_proxy.c
postfix/src/global/dsb_scan.c
postfix/src/global/dsn_print.c
postfix/src/global/flush_clnt.c
postfix/src/global/mail_command_client.c
postfix/src/global/mail_stream.c
postfix/src/global/mail_version.h
postfix/src/global/msg_stats_print.c
postfix/src/global/msg_stats_scan.c
postfix/src/global/post_mail.c
postfix/src/global/rcpt_buf.c
postfix/src/global/rcpt_print.c
postfix/src/global/resolve_clnt.c
postfix/src/global/rewrite_clnt.c
postfix/src/global/scache_clnt.c
postfix/src/global/trace.c
postfix/src/global/verify_clnt.c
postfix/src/local/Makefile.in
postfix/src/local/forward.c
postfix/src/master/Makefile.in
postfix/src/milter/Makefile.in
postfix/src/milter/milter.c
postfix/src/milter/milter8.c
postfix/src/milter/milter_macros.c
postfix/src/oqmgr/Makefile.in
postfix/src/oqmgr/qmgr_deliver.c
postfix/src/pickup/Makefile.in
postfix/src/pickup/pickup.c
postfix/src/pipe/Makefile.in
postfix/src/postcat/Makefile.in
postfix/src/postconf/Makefile.in
postfix/src/postdrop/Makefile.in
postfix/src/postdrop/postdrop.c
postfix/src/postkick/Makefile.in
postfix/src/postqueue/Makefile.in
postfix/src/postscreen/Makefile.in
postfix/src/postscreen/postscreen_dnsbl.c
postfix/src/postscreen/postscreen_send.c
postfix/src/postscreen/postscreen_starttls.c
postfix/src/proxymap/Makefile.in
postfix/src/proxymap/proxymap.c
postfix/src/qmgr/Makefile.in
postfix/src/qmgr/qmgr_deliver.c
postfix/src/qmqpd/Makefile.in
postfix/src/qmqpd/qmqpd.c
postfix/src/scache/Makefile.in
postfix/src/scache/scache.c
postfix/src/sendmail/Makefile.in
postfix/src/showq/Makefile.in
postfix/src/smtp/Makefile.in
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpstone/smtp-sink.c
postfix/src/tls/Makefile.in
postfix/src/tls/tls_mgr.c
postfix/src/tls/tls_proxy_clnt.c
postfix/src/tls/tls_proxy_print.c
postfix/src/tls/tls_proxy_scan.c
postfix/src/tlsmgr/Makefile.in
postfix/src/tlsmgr/tlsmgr.c
postfix/src/tlsproxy/Makefile.in
postfix/src/tlsproxy/tlsproxy.c
postfix/src/trivial-rewrite/Makefile.in
postfix/src/trivial-rewrite/resolve.c
postfix/src/trivial-rewrite/rewrite.c
postfix/src/trivial-rewrite/trivial-rewrite.c
postfix/src/util/Makefile.in
postfix/src/util/attr.c [new file with mode: 0644]
postfix/src/util/attr.h
postfix/src/util/attr_print0.c
postfix/src/util/attr_print64.c
postfix/src/util/attr_print_plain.c
postfix/src/util/attr_scan0.c
postfix/src/util/attr_scan64.c
postfix/src/util/attr_scan_plain.c
postfix/src/util/check_arg.h [new file with mode: 0644]
postfix/src/util/sys_defs.h
postfix/src/verify/Makefile.in
postfix/src/verify/verify.c
postfix/src/virtual/Makefile.in

index cd8d5d5a36d73c8e88a680a5d9000a934d6a6089..a415b9d0a76c8bdaf3e3339e10f19f2af2fdcf2b 100644 (file)
@@ -21090,6 +21090,43 @@ Apologies for any names omitted.
 
 20141214
 
-        Bugfix (introduced: 20141212): typo in Clang function pointer
-        format check, making it a noop. Viktor Dukhovni. File: 
-        util/sys_defs.h.
+       Bugfix (introduced: 20141212): typo in Clang function pointer
+       format check, making it a noop. Viktor Dukhovni. File:
+       util/sys_defs.h.
+
+       Maintainability: argument typechecking for the variadic
+       attribute-value read/write functions. Files: anvil/anvil.c,
+       bounce/bounce.c, cleanup/cleanup.c, dnsblog/dnsblog.c,
+       flush/flush.c, global/abounce.c, global/anvil_clnt.c,
+       global/bounce.c, global/defer.c, global/deliver_pass.c,
+       global/deliver_request.c, global/dict_proxy.c, global/dsb_scan.c,
+       global/dsn_print.c, global/flush_clnt.c,
+       global/mail_command_client.c, global/mail_stream.c,
+       global/msg_stats_print.c, global/msg_stats_scan.c,
+       global/post_mail.c, global/rcpt_buf.c, global/rcpt_print.c,
+       global/resolve_clnt.c, global/rewrite_clnt.c, global/scache_clnt.c,
+       global/trace.c, global/verify_clnt.c, local/forward.c,
+       milter/milter.c, milter/milter8.c, milter/milter_macros.c,
+       oqmgr/qmgr_deliver.c, pickup/pickup.c, postdrop/postdrop.c,
+       postscreen/postscreen_dnsbl.c, postscreen/postscreen_send.c,
+       postscreen/postscreen_starttls.c, proxymap/proxymap.c,
+       qmgr/qmgr_deliver.c, qmqpd/qmqpd.c, scache/scache.c,
+       smtpd/smtpd.c, smtpd/smtpd_check.c, tls/tls_mgr.c,
+       tls/tls_proxy_clnt.c, tls/tls_proxy_print.c, tls/tls_proxy_scan.c,
+       tlsmgr/tlsmgr.c, tlsproxy/tlsproxy.c, trivial-rewrite/resolve.c,
+       trivial-rewrite/rewrite.c, trivial-rewrite/trivial-rewrite.c,
+       util/attr.h.
+
+20141217
+
+       Replaced argment typechecking based on inline functions
+       with an implementation based on ternary expressions with
+       unreachable assignments to dummy variables.   This should
+       produce the exact same result as the approach based on
+       inline functions (which were standardized with C99). Files:
+       util/check_arg.h, util/attr.h, util/attr.c.
+
+20141221
+
+       Portability: proof-of-concept template for OpenBSD build
+       with shared libpostfix etc. libraries. File: makedefs.
index 76d3939bf7d49547158e4d39ad9096c09bc1b18a..6da5d5c7338d118f0e2d173fce1344b9bbf0bd60 100644 (file)
@@ -12,6 +12,14 @@ Wish list:
        support for regexp: and cidr: tables. Factor out and reuse
        code that already exists in inline: and other tables.
 
+       Solaris poll() does not work as expected. With Solaris10,
+       write_wait() hangs until timeout when invoked after peekfd()
+       has received an ECONNRESET error indication. This happens
+       when a client sends QUIT and closes the connection immediately.
+       Apparently the ECONNRESET error condition is not persistent.
+
+       Fix "postfix-install: daemon_directory: not found' on Solaris.
+
        Log command=good/bad statistics in postscreen?
 
        Implement smtpd_client_auth_rate limit?
index 95d65ef1424c03bf982706e5729704107fd42e71..b3d7e8b5fe01383934a5fecb543d530800a80d86 100644 (file)
@@ -781,7 +781,9 @@ and <a href="postdrop.1.html">postdrop(1)</a>.
 when not present.  Postfix 2.6 and later add these headers only
 when clients match the <a href="postconf.5.html#local_header_rewrite_clients">local_header_rewrite_clients</a> parameter
 setting.  Earlier Postfix versions always add these headers; this
-may break DKIM signatures that cover non-existent headers. </p>
+may break DKIM signatures that cover non-existent headers.
+The <a href="postconf.5.html#undisclosed_recipients_header">undisclosed_recipients_header</a> parameter setting determines
+whether a To: header will be added. </p>
 
 
 </DD>
index e58394ec3fd5f2b3f867e0de431d30845e4f8ca6..b9424202c11d517389b9902b0fe1e609762a840c 100644 (file)
@@ -102,12 +102,18 @@ SMTP-SINK(1)                                                      SMTP-SINK(1)
               Use <i>hostname</i> in the SMTP greeting, in the HELO response, and  in
               the EHLO response. The default hostname is "smtp-sink".
 
+       <b>-H</b> <i>delay</i>
+              Delay  the  first  read  operation after receiving DATA (time in
+              seconds). Combine with a large test message and a small TCP win-
+              dow  size  (see  the  <b>-T</b>  option)  to  test  the  Postfix client
+              write_wait() implementation.
+
        <b>-L</b>     Enable LMTP instead of SMTP.
 
        <b>-m</b> <i>count</i> (default: 256)
               An upper bound on the maximal number of simultaneous connections
-              that <b>smtp-sink</b> will handle. This prevents the process from  run-
-              ning  out  of  file  descriptors.  Excess  connections will stay
+              that  <b>smtp-sink</b> will handle. This prevents the process from run-
+              ning out of  file  descriptors.  Excess  connections  will  stay
               queued in the TCP/IP stack.
 
        <b>-M</b> <i>count</i>
@@ -120,69 +126,69 @@ SMTP-SINK(1)                                                      SMTP-SINK(1)
 
        <b>-p</b>     Do not announce support for ESMTP command pipelining.
 
-       <b>-P</b>     Change the server greeting so that it appears to come through  a
+       <b>-P</b>     Change  the server greeting so that it appears to come through a
               CISCO PIX system. Implies <b>-e</b>.
 
        <b>-q</b> <i>command,command,...</i>
-              Disconnect  (without replying) after receiving one of the speci-
+              Disconnect (without replying) after receiving one of the  speci-
               fied commands.
 
-              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
-              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
-              white space or commas, and use quotes  to  protect  white  space
+              Examples  of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
+              VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command  names  by
+              white  space  or  commas,  and use quotes to protect white space
               from the shell. Command names are case-insensitive.
 
        <b>-Q</b> <i>command,command,...</i>
               Send a 421 reply and disconnect after receiving one of the spec-
               ified commands.
 
-              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
-              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
-              white space or commas, and use quotes  to  protect  white  space
+              Examples  of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
+              VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command  names  by
+              white  space  or  commas,  and use quotes to protect white space
               from the shell. Command names are case-insensitive.
 
        <b>-r</b> <i>command,command,...</i>
-              Reject  the  specified  commands  with  a soft (4xx) error code.
+              Reject the specified commands with  a  soft  (4xx)  error  code.
               This option implies <b>-p</b>.
 
-              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
-              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
-              white space or commas, and use quotes  to  protect  white  space
+              Examples  of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
+              VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command  names  by
+              white  space  or  commas,  and use quotes to protect white space
               from the shell. Command names are case-insensitive.
 
        <b>-R</b> <i>root-directory</i>
-              Change  the  process  root  directory to the specified location.
-              This option requires super-user  privileges.  See  also  the  <b>-u</b>
+              Change the process root directory  to  the  specified  location.
+              This  option  requires  super-user  privileges.  See also the <b>-u</b>
               option.
 
        <b>-s</b> <i>command,command,...</i>
               Log the named commands to syslogd.
 
-              Examples  of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
-              VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command  names  by
-              white  space  or  commas,  and use quotes to protect white space
+              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
+              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
+              white space or commas, and use quotes  to  protect  white  space
               from the shell. Command names are case-insensitive.
 
        <b>-S start-string</b>
-              An optional string that is prepended to  each  message  that  is
-              written  to  a  dump  file (see the dump file format description
-              below). The following  C  escape  sequences  are  supported:  \a
-              (bell),  \b  (backslace),  \f (formfeed), \n (newline), \r (car-
-              riage return), \t (horizontal tab), \v (vertical tab), \<i>ddd</i>  (up
+              An  optional  string  that  is prepended to each message that is
+              written to a dump file (see the  dump  file  format  description
+              below).  The  following  C  escape  sequences  are supported: \a
+              (bell), \b (backslace), \f (formfeed), \n  (newline),  \r  (car-
+              riage  return), \t (horizontal tab), \v (vertical tab), \<i>ddd</i> (up
               to three octal digits) and \\ (the backslash character).
 
        <b>-t</b> <i>timeout</i> (default: 100)
-              Limit  the  time  for receiving a command or sending a response.
+              Limit the time for receiving a command or  sending  a  response.
               The time limit is specified in seconds.
 
        <b>-T</b> <i>windowsize</i>
-              Override the default TCP window size. To work around broken  TCP
+              Override  the default TCP window size. To work around broken TCP
               window scaling implementations, specify a value &gt; 0 and &lt; 65536.
 
        <b>-u</b> <i>username</i>
-              Switch to the specified user privileges after opening  the  net-
-              work  socket and optionally changing the process root directory.
-              This option is required when the process  runs  with  super-user
+              Switch  to  the specified user privileges after opening the net-
+              work socket and optionally changing the process root  directory.
+              This  option  is  required when the process runs with super-user
               privileges. See also the <b>-R</b> option.
 
        <b>-v</b>     Show the SMTP conversations.
@@ -191,27 +197,27 @@ SMTP-SINK(1)                                                      SMTP-SINK(1)
               Wait <i>delay</i> seconds before responding to a DATA command.
 
        <b>-W</b> <i>command:delay[:odds]</i>
-              Wait  <i>delay</i>  seconds  before  responding to <i>command</i>.  If <i>odds</i> is
-              also specified (a number between 1-99  inclusive),  wait  for  a
-              random  multiple of <i>delay</i>. The random multiplier is equal to the
+              Wait <i>delay</i> seconds before responding to  <i>command</i>.   If  <i>odds</i>  is
+              also  specified  (a  number  between 1-99 inclusive), wait for a
+              random multiple of <i>delay</i>. The random multiplier is equal to  the
               number of times the program needs to roll a dice with a range of
-              0..99  inclusive, before the dice produces a result greater than
+              0..99 inclusive, before the dice produces a result greater  than
               or equal to <i>odds</i>.
 
        [<b>inet:</b>][<i>host</i>]:<i>port</i>
-              Listen on network interface <i>host</i> (default:  any  interface)  TCP
-              port  <i>port</i>.  Both  <i>host</i>  and <i>port</i> may be specified in numeric or
+              Listen  on  network  interface <i>host</i> (default: any interface) TCP
+              port <i>port</i>. Both <i>host</i> and <i>port</i> may be  specified  in  numeric  or
               symbolic form.
 
        <b>unix:</b><i>pathname</i>
               Listen on the UNIX-domain socket at <i>pathname</i>.
 
        <i>backlog</i>
-              The maximum length the queue of pending connections, as  defined
+              The  maximum length the queue of pending connections, as defined
               by the <b>listen</b>(2) system call.
 
 <b>DUMP FILE FORMAT</b>
-       Each  dumped message contains a sequence of text lines, terminated with
+       Each dumped message contains a sequence of text lines, terminated  with
        the newline character. The sequence of information is as follows:
 
        <b>o</b>      The optional string specified with the <b>-S</b> option.
@@ -225,41 +231,41 @@ SMTP-SINK(1)                                                      SMTP-SINK(1)
        The format of the <b>smtp-sink</b> generated headers is as follows:
 
        <b>X-Client-Addr:</b> <i>text</i>
-              The client IP address without enclosing []. An IPv6  address  is
+              The  client  IP address without enclosing []. An IPv6 address is
               prefixed with "ipv6:". This record is always present.
 
        <b>X-Client-Proto:</b> <i>text</i>
-              The  client protocol: SMTP, ESMTP or LMTP. This record is always
+              The client protocol: SMTP, ESMTP or LMTP. This record is  always
               present.
 
        <b>X-Helo-Args:</b> <i>text</i>
-              The arguments of the last HELO or EHLO command before this  mail
-              delivery  transaction. This record is present only if the client
-              sent a recognizable HELO or EHLO command before  the  DATA  com-
+              The  arguments of the last HELO or EHLO command before this mail
+              delivery transaction. This record is present only if the  client
+              sent  a  recognizable  HELO or EHLO command before the DATA com-
               mand.
 
        <b>X-Mail-Args:</b> <i>text</i>
-              The  arguments of the MAIL command that started this mail deliv-
+              The arguments of the MAIL command that started this mail  deliv-
               ery transaction. This record is present exactly once.
 
        <b>X-Rcpt-Args:</b> <i>text</i>
-              The arguments of an  RCPT  command  within  this  mail  delivery
+              The  arguments  of  an  RCPT  command  within this mail delivery
               transaction. There is one record for each RCPT command, and they
               are in the order as sent by the client.
 
        <b>Received:</b> <i>text</i>
-              A message header for compatibility with  mail  processing  soft-
-              ware.  This  three-line header marks the end of the headers pro-
+              A  message  header  for compatibility with mail processing soft-
+              ware. This three-line header marks the end of the  headers  pro-
               vided by <b>smtp-sink</b>, and is formatted as follows:
 
               <b>from</b> <i>helo</i> <b>([</b><i>addr</i><b>])</b>
-                     The HELO or EHLO command argument and client IP  address.
-                     If  the  client  did not send HELO or EHLO, the client IP
+                     The  HELO or EHLO command argument and client IP address.
+                     If the client did not send HELO or EHLO,  the  client  IP
                      address is used instead.
 
               <b>by</b> <i>host</i> <b>(smtp-sink) with</b> <i>proto</i> <b>id</b> <i>random</i><b>;</b>
-                     The hostname specified with the  <b>-h</b>  option,  the  client
-                     protocol  (see <b>X-Client-Proto</b> above), and the pseudo-ran-
+                     The  hostname  specified  with  the <b>-h</b> option, the client
+                     protocol (see <b>X-Client-Proto</b> above), and the  pseudo-ran-
                      dom portion of the per-message capture file name.
 
               <i>time-stamp</i>
index 6d69bb545c1af70ec157d87a05e3b5f8d1410bed..975c072a586dbf8c11f2f7298b70f840aadf8325 100644 (file)
@@ -240,6 +240,13 @@ case "$SYSTEM.$RELEASE" in
   OpenBSD.4*)  SYSTYPE=OPENBSD4
                ;;
   OpenBSD.5*)  SYSTYPE=OPENBSD5
+               : ${CC=cc}
+               : ${SHLIB_SUFFIX=.so.1.0}
+               : ${SHLIB_CFLAGS=-fPIC}
+               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
+               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
+               : ${PLUGIN_LD="${CC} -shared"}
                ;;
   ekkoBSD.1*)  SYSTYPE=EKKOBSD1
                ;;
index da45ae7fdb44f4616164cb816ee3c37befe53eee..136475b7c19d44e42359309d81a63363ac0d1901 100644 (file)
@@ -101,6 +101,11 @@ Disable XFORWARD support.
 .IP "\fB-h\fI hostname\fR"
 Use \fIhostname\fR in the SMTP greeting, in the HELO response,
 and in the EHLO response. The default hostname is "smtp-sink".
+.IP "\fB-H\fI delay\fR"
+Delay the first read operation after receiving DATA (time
+in seconds). Combine with a large test message and a small
+TCP window size (see the \fB-T\fR option) to test the Postfix
+client write_wait() implementation.
 .IP \fB-L\fR
 Enable LMTP instead of SMTP.
 .IP "\fB-m \fIcount\fR (default: 256)"
index c06e544dfc16d3b8ee3e27d62a9aa2b90b1d2fb2..69603ad35c4378461ed8e67a1ded19d197975eb0 100644 (file)
@@ -458,6 +458,8 @@ when not present.  Postfix 2.6 and later add these headers only
 when clients match the local_header_rewrite_clients parameter
 setting.  Earlier Postfix versions always add these headers; this
 may break DKIM signatures that cover non-existent headers.
+The undisclosed_recipients_header parameter setting determines
+whether a To: header will be added.
 .SH always_bcc (default: empty)
 Optional address that receives a "blind carbon copy" of each message
 that is received by the Postfix mail system.
index 9341208dbbee2bd59ab03e0e68fee2e1f47d3063..eb6633cabe327f9d65573ef883233e3f100cfcf2 100644 (file)
@@ -13563,7 +13563,9 @@ existing LMTP-based content filters. </p>
 when not present.  Postfix 2.6 and later add these headers only
 when clients match the local_header_rewrite_clients parameter
 setting.  Earlier Postfix versions always add these headers; this
-may break DKIM signatures that cover non-existent headers. </p>
+may break DKIM signatures that cover non-existent headers. 
+The undisclosed_recipients_header parameter setting determines
+whether a To: header will be added. </p>
 
 %PARAM lmtp_header_checks
 
index 3d6539bb7c205a712aad848bad5a8a7d4111caf2..f06ccd9466a27eae6a80e940e7d17cdaf31787e1 100644 (file)
@@ -62,6 +62,7 @@ depend: $(MAKES)
 anvil.o: ../../include/anvil_clnt.h
 anvil.o: ../../include/attr.h
 anvil.o: ../../include/attr_clnt.h
+anvil.o: ../../include/check_arg.h
 anvil.o: ../../include/events.h
 anvil.o: ../../include/htable.h
 anvil.o: ../../include/iostuff.h
@@ -72,6 +73,7 @@ anvil.o: ../../include/mail_server.h
 anvil.o: ../../include/mail_version.h
 anvil.o: ../../include/msg.h
 anvil.o: ../../include/mymalloc.h
+anvil.o: ../../include/nvtable.h
 anvil.o: ../../include/stringops.h
 anvil.o: ../../include/sys_defs.h
 anvil.o: ../../include/vbuf.h
index 07e4bb01336d9a5d1d33f4fc43b0f70f12cc64b7..59549e878bac50db4d24fea54ef2a6d0eb9c00d8 100644 (file)
@@ -525,12 +525,12 @@ static void anvil_remote_lookup(VSTREAM *client_stream, const char *ident)
     if ((anvil_remote =
         (ANVIL_REMOTE *) htable_find(anvil_remote_map, ident)) == 0) {
        attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                        ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                        ATTR_TYPE_INT, ANVIL_ATTR_COUNT, 0,
-                        ATTR_TYPE_INT, ANVIL_ATTR_RATE, 0,
-                        ATTR_TYPE_INT, ANVIL_ATTR_MAIL, 0,
-                        ATTR_TYPE_INT, ANVIL_ATTR_RCPT, 0,
-                        ATTR_TYPE_INT, ANVIL_ATTR_NTLS, 0,
+                        SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                        SEND_ATTR_INT(ANVIL_ATTR_COUNT, 0),
+                        SEND_ATTR_INT(ANVIL_ATTR_RATE, 0),
+                        SEND_ATTR_INT(ANVIL_ATTR_MAIL, 0),
+                        SEND_ATTR_INT(ANVIL_ATTR_RCPT, 0),
+                        SEND_ATTR_INT(ANVIL_ATTR_NTLS, 0),
                         ATTR_TYPE_END);
     } else {
 
@@ -541,12 +541,12 @@ static void anvil_remote_lookup(VSTREAM *client_stream, const char *ident)
            && anvil_remote->start + var_anvil_time_unit < event_time())
            ANVIL_REMOTE_RSET_RATE(anvil_remote, 0);
        attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                        ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                      ATTR_TYPE_INT, ANVIL_ATTR_COUNT, anvil_remote->count,
-                        ATTR_TYPE_INT, ANVIL_ATTR_RATE, anvil_remote->rate,
-                        ATTR_TYPE_INT, ANVIL_ATTR_MAIL, anvil_remote->mail,
-                        ATTR_TYPE_INT, ANVIL_ATTR_RCPT, anvil_remote->rcpt,
-                        ATTR_TYPE_INT, ANVIL_ATTR_NTLS, anvil_remote->ntls,
+                        SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                      SEND_ATTR_INT(ANVIL_ATTR_COUNT, anvil_remote->count),
+                        SEND_ATTR_INT(ANVIL_ATTR_RATE, anvil_remote->rate),
+                        SEND_ATTR_INT(ANVIL_ATTR_MAIL, anvil_remote->mail),
+                        SEND_ATTR_INT(ANVIL_ATTR_RCPT, anvil_remote->rcpt),
+                        SEND_ATTR_INT(ANVIL_ATTR_NTLS, anvil_remote->ntls),
                         ATTR_TYPE_END);
     }
 }
@@ -617,9 +617,9 @@ static void anvil_remote_connect(VSTREAM *client_stream, const char *ident)
      * Respond to the local server.
      */
     attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                    ATTR_TYPE_INT, ANVIL_ATTR_COUNT, anvil_remote->count,
-                    ATTR_TYPE_INT, ANVIL_ATTR_RATE, anvil_remote->rate,
+                    SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                    SEND_ATTR_INT(ANVIL_ATTR_COUNT, anvil_remote->count),
+                    SEND_ATTR_INT(ANVIL_ATTR_RATE, anvil_remote->rate),
                     ATTR_TYPE_END);
 
     /*
@@ -649,8 +649,8 @@ static void anvil_remote_mail(VSTREAM *client_stream, const char *ident)
      */
     ANVIL_REMOTE_INCR_MAIL(anvil_remote);
     attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                    ATTR_TYPE_INT, ANVIL_ATTR_RATE, anvil_remote->mail,
+                    SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                    SEND_ATTR_INT(ANVIL_ATTR_RATE, anvil_remote->mail),
                     ATTR_TYPE_END);
 
     /*
@@ -678,8 +678,8 @@ static void anvil_remote_rcpt(VSTREAM *client_stream, const char *ident)
      */
     ANVIL_REMOTE_INCR_RCPT(anvil_remote);
     attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                    ATTR_TYPE_INT, ANVIL_ATTR_RATE, anvil_remote->rcpt,
+                    SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                    SEND_ATTR_INT(ANVIL_ATTR_RATE, anvil_remote->rcpt),
                     ATTR_TYPE_END);
 
     /*
@@ -707,8 +707,8 @@ static void anvil_remote_newtls(VSTREAM *client_stream, const char *ident)
      */
     ANVIL_REMOTE_INCR_NTLS(anvil_remote);
     attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                    ATTR_TYPE_INT, ANVIL_ATTR_RATE, anvil_remote->ntls,
+                    SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                    SEND_ATTR_INT(ANVIL_ATTR_RATE, anvil_remote->ntls),
                     ATTR_TYPE_END);
 
     /*
@@ -747,8 +747,8 @@ static void anvil_remote_newtls_stat(VSTREAM *client_stream, const char *ident)
      * Respond to local server.
      */
     attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
-                    ATTR_TYPE_INT, ANVIL_ATTR_RATE, rate,
+                    SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
+                    SEND_ATTR_INT(ANVIL_ATTR_RATE, rate),
                     ATTR_TYPE_END);
 }
 
@@ -784,7 +784,7 @@ static void anvil_remote_disconnect(VSTREAM *client_stream, const char *ident)
      * Respond to the local server.
      */
     attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_OK,
+                    SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_OK),
                     ATTR_TYPE_END);
 }
 
@@ -884,14 +884,14 @@ static void anvil_service(VSTREAM *client_stream, char *unused_service, char **a
        msg_info("--- start request ---");
     if (attr_scan_plain(client_stream,
                        ATTR_FLAG_MISSING | ATTR_FLAG_STRICT,
-                       ATTR_TYPE_STR, ANVIL_ATTR_REQ, request,
-                       ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                       RECV_ATTR_STR(ANVIL_ATTR_REQ, request),
+                       RECV_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                        ATTR_TYPE_END) == 2) {
        for (rp = request_table; /* see below */ ; rp++) {
            if (rp->name == 0) {
                msg_warn("unrecognized request: \"%s\", ignored", STR(request));
                attr_print_plain(client_stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, ANVIL_STAT_FAIL,
+                         SEND_ATTR_INT(ANVIL_ATTR_STATUS, ANVIL_STAT_FAIL),
                                 ATTR_TYPE_END);
                break;
            }
index 1fd913f5c218eac14250c234911830ddc8fdd73d..7eb5fc3d66a73e87d7e37988f2e45473ce7d5288 100644 (file)
@@ -97,10 +97,12 @@ depend: $(MAKES)
 bounce.o: ../../include/attr.h
 bounce.o: ../../include/bounce.h
 bounce.o: ../../include/bounce_log.h
+bounce.o: ../../include/check_arg.h
 bounce.o: ../../include/deliver_request.h
 bounce.o: ../../include/dsb_scan.h
 bounce.o: ../../include/dsn.h
 bounce.o: ../../include/dsn_buf.h
+bounce.o: ../../include/htable.h
 bounce.o: ../../include/iostuff.h
 bounce.o: ../../include/load_file.h
 bounce.o: ../../include/mail_addr.h
@@ -112,6 +114,8 @@ bounce.o: ../../include/mail_server.h
 bounce.o: ../../include/mail_version.h
 bounce.o: ../../include/msg.h
 bounce.o: ../../include/msg_stats.h
+bounce.o: ../../include/mymalloc.h
+bounce.o: ../../include/nvtable.h
 bounce.o: ../../include/rcpt_buf.h
 bounce.o: ../../include/recipient_list.h
 bounce.o: ../../include/stringops.h
@@ -124,15 +128,19 @@ bounce.o: bounce_service.h
 bounce.o: bounce_template.h
 bounce_append_service.o: ../../include/attr.h
 bounce_append_service.o: ../../include/bounce_log.h
+bounce_append_service.o: ../../include/check_arg.h
 bounce_append_service.o: ../../include/deliver_flock.h
 bounce_append_service.o: ../../include/dsn.h
 bounce_append_service.o: ../../include/dsn_buf.h
+bounce_append_service.o: ../../include/htable.h
 bounce_append_service.o: ../../include/iostuff.h
 bounce_append_service.o: ../../include/mail_params.h
 bounce_append_service.o: ../../include/mail_proto.h
 bounce_append_service.o: ../../include/mail_queue.h
 bounce_append_service.o: ../../include/msg.h
 bounce_append_service.o: ../../include/myflock.h
+bounce_append_service.o: ../../include/mymalloc.h
+bounce_append_service.o: ../../include/nvtable.h
 bounce_append_service.o: ../../include/quote_822_local.h
 bounce_append_service.o: ../../include/quote_flags.h
 bounce_append_service.o: ../../include/rcpt_buf.h
@@ -147,11 +155,14 @@ bounce_append_service.o: bounce_service.h
 bounce_append_service.o: bounce_template.h
 bounce_cleanup.o: ../../include/attr.h
 bounce_cleanup.o: ../../include/bounce_log.h
+bounce_cleanup.o: ../../include/check_arg.h
 bounce_cleanup.o: ../../include/dsn.h
 bounce_cleanup.o: ../../include/dsn_buf.h
+bounce_cleanup.o: ../../include/htable.h
 bounce_cleanup.o: ../../include/mail_queue.h
 bounce_cleanup.o: ../../include/msg.h
 bounce_cleanup.o: ../../include/mymalloc.h
+bounce_cleanup.o: ../../include/nvtable.h
 bounce_cleanup.o: ../../include/rcpt_buf.h
 bounce_cleanup.o: ../../include/recipient_list.h
 bounce_cleanup.o: ../../include/sys_defs.h
@@ -164,11 +175,13 @@ bounce_cleanup.o: bounce_template.h
 bounce_notify_service.o: ../../include/attr.h
 bounce_notify_service.o: ../../include/bounce.h
 bounce_notify_service.o: ../../include/bounce_log.h
+bounce_notify_service.o: ../../include/check_arg.h
 bounce_notify_service.o: ../../include/cleanup_user.h
 bounce_notify_service.o: ../../include/deliver_request.h
 bounce_notify_service.o: ../../include/dsn.h
 bounce_notify_service.o: ../../include/dsn_buf.h
 bounce_notify_service.o: ../../include/dsn_mask.h
+bounce_notify_service.o: ../../include/htable.h
 bounce_notify_service.o: ../../include/int_filt.h
 bounce_notify_service.o: ../../include/iostuff.h
 bounce_notify_service.o: ../../include/mail_addr.h
@@ -178,7 +191,9 @@ bounce_notify_service.o: ../../include/mail_proto.h
 bounce_notify_service.o: ../../include/mail_queue.h
 bounce_notify_service.o: ../../include/msg.h
 bounce_notify_service.o: ../../include/msg_stats.h
+bounce_notify_service.o: ../../include/mymalloc.h
 bounce_notify_service.o: ../../include/name_mask.h
+bounce_notify_service.o: ../../include/nvtable.h
 bounce_notify_service.o: ../../include/post_mail.h
 bounce_notify_service.o: ../../include/rcpt_buf.h
 bounce_notify_service.o: ../../include/rec_type.h
@@ -193,12 +208,14 @@ bounce_notify_service.o: bounce_service.h
 bounce_notify_service.o: bounce_template.h
 bounce_notify_util.o: ../../include/attr.h
 bounce_notify_util.o: ../../include/bounce_log.h
+bounce_notify_util.o: ../../include/check_arg.h
 bounce_notify_util.o: ../../include/cleanup_user.h
 bounce_notify_util.o: ../../include/deliver_completed.h
 bounce_notify_util.o: ../../include/dsn.h
 bounce_notify_util.o: ../../include/dsn_buf.h
 bounce_notify_util.o: ../../include/dsn_mask.h
 bounce_notify_util.o: ../../include/events.h
+bounce_notify_util.o: ../../include/htable.h
 bounce_notify_util.o: ../../include/int_filt.h
 bounce_notify_util.o: ../../include/iostuff.h
 bounce_notify_util.o: ../../include/is_header.h
@@ -214,6 +231,7 @@ bounce_notify_util.o: ../../include/msg.h
 bounce_notify_util.o: ../../include/myflock.h
 bounce_notify_util.o: ../../include/mymalloc.h
 bounce_notify_util.o: ../../include/name_mask.h
+bounce_notify_util.o: ../../include/nvtable.h
 bounce_notify_util.o: ../../include/post_mail.h
 bounce_notify_util.o: ../../include/quote_822_local.h
 bounce_notify_util.o: ../../include/quote_flags.h
@@ -233,11 +251,13 @@ bounce_notify_util.o: bounce_template.h
 bounce_notify_verp.o: ../../include/attr.h
 bounce_notify_verp.o: ../../include/bounce.h
 bounce_notify_verp.o: ../../include/bounce_log.h
+bounce_notify_verp.o: ../../include/check_arg.h
 bounce_notify_verp.o: ../../include/cleanup_user.h
 bounce_notify_verp.o: ../../include/deliver_request.h
 bounce_notify_verp.o: ../../include/dsn.h
 bounce_notify_verp.o: ../../include/dsn_buf.h
 bounce_notify_verp.o: ../../include/dsn_mask.h
+bounce_notify_verp.o: ../../include/htable.h
 bounce_notify_verp.o: ../../include/int_filt.h
 bounce_notify_verp.o: ../../include/iostuff.h
 bounce_notify_verp.o: ../../include/mail_addr.h
@@ -247,7 +267,9 @@ bounce_notify_verp.o: ../../include/mail_proto.h
 bounce_notify_verp.o: ../../include/mail_queue.h
 bounce_notify_verp.o: ../../include/msg.h
 bounce_notify_verp.o: ../../include/msg_stats.h
+bounce_notify_verp.o: ../../include/mymalloc.h
 bounce_notify_verp.o: ../../include/name_mask.h
+bounce_notify_verp.o: ../../include/nvtable.h
 bounce_notify_verp.o: ../../include/post_mail.h
 bounce_notify_verp.o: ../../include/rcpt_buf.h
 bounce_notify_verp.o: ../../include/rec_type.h
@@ -264,11 +286,13 @@ bounce_notify_verp.o: bounce_template.h
 bounce_one_service.o: ../../include/attr.h
 bounce_one_service.o: ../../include/bounce.h
 bounce_one_service.o: ../../include/bounce_log.h
+bounce_one_service.o: ../../include/check_arg.h
 bounce_one_service.o: ../../include/cleanup_user.h
 bounce_one_service.o: ../../include/deliver_request.h
 bounce_one_service.o: ../../include/dsn.h
 bounce_one_service.o: ../../include/dsn_buf.h
 bounce_one_service.o: ../../include/dsn_mask.h
+bounce_one_service.o: ../../include/htable.h
 bounce_one_service.o: ../../include/int_filt.h
 bounce_one_service.o: ../../include/iostuff.h
 bounce_one_service.o: ../../include/mail_addr.h
@@ -277,7 +301,9 @@ bounce_one_service.o: ../../include/mail_params.h
 bounce_one_service.o: ../../include/mail_proto.h
 bounce_one_service.o: ../../include/msg.h
 bounce_one_service.o: ../../include/msg_stats.h
+bounce_one_service.o: ../../include/mymalloc.h
 bounce_one_service.o: ../../include/name_mask.h
+bounce_one_service.o: ../../include/nvtable.h
 bounce_one_service.o: ../../include/post_mail.h
 bounce_one_service.o: ../../include/rcpt_buf.h
 bounce_one_service.o: ../../include/rec_type.h
@@ -291,6 +317,8 @@ bounce_one_service.o: bounce_one_service.c
 bounce_one_service.o: bounce_service.h
 bounce_one_service.o: bounce_template.h
 bounce_template.o: ../../include/attr.h
+bounce_template.o: ../../include/check_arg.h
+bounce_template.o: ../../include/htable.h
 bounce_template.o: ../../include/iostuff.h
 bounce_template.o: ../../include/is_header.h
 bounce_template.o: ../../include/mac_expand.h
@@ -301,6 +329,7 @@ bounce_template.o: ../../include/mail_proto.h
 bounce_template.o: ../../include/midna.h
 bounce_template.o: ../../include/msg.h
 bounce_template.o: ../../include/mymalloc.h
+bounce_template.o: ../../include/nvtable.h
 bounce_template.o: ../../include/split_at.h
 bounce_template.o: ../../include/stringops.h
 bounce_template.o: ../../include/sys_defs.h
@@ -310,11 +339,14 @@ bounce_template.o: ../../include/vstring.h
 bounce_template.o: bounce_template.c
 bounce_template.o: bounce_template.h
 bounce_templates.o: ../../include/attr.h
+bounce_templates.o: ../../include/check_arg.h
+bounce_templates.o: ../../include/htable.h
 bounce_templates.o: ../../include/iostuff.h
 bounce_templates.o: ../../include/mail_addr.h
 bounce_templates.o: ../../include/mail_proto.h
 bounce_templates.o: ../../include/msg.h
 bounce_templates.o: ../../include/mymalloc.h
+bounce_templates.o: ../../include/nvtable.h
 bounce_templates.o: ../../include/stringops.h
 bounce_templates.o: ../../include/sys_defs.h
 bounce_templates.o: ../../include/vbuf.h
@@ -325,11 +357,13 @@ bounce_templates.o: bounce_template.h
 bounce_templates.o: bounce_templates.c
 bounce_trace_service.o: ../../include/attr.h
 bounce_trace_service.o: ../../include/bounce_log.h
+bounce_trace_service.o: ../../include/check_arg.h
 bounce_trace_service.o: ../../include/cleanup_user.h
 bounce_trace_service.o: ../../include/deliver_request.h
 bounce_trace_service.o: ../../include/dsn.h
 bounce_trace_service.o: ../../include/dsn_buf.h
 bounce_trace_service.o: ../../include/dsn_mask.h
+bounce_trace_service.o: ../../include/htable.h
 bounce_trace_service.o: ../../include/int_filt.h
 bounce_trace_service.o: ../../include/iostuff.h
 bounce_trace_service.o: ../../include/mail_addr.h
@@ -339,7 +373,9 @@ bounce_trace_service.o: ../../include/mail_proto.h
 bounce_trace_service.o: ../../include/mail_queue.h
 bounce_trace_service.o: ../../include/msg.h
 bounce_trace_service.o: ../../include/msg_stats.h
+bounce_trace_service.o: ../../include/mymalloc.h
 bounce_trace_service.o: ../../include/name_mask.h
+bounce_trace_service.o: ../../include/nvtable.h
 bounce_trace_service.o: ../../include/post_mail.h
 bounce_trace_service.o: ../../include/rcpt_buf.h
 bounce_trace_service.o: ../../include/rec_type.h
@@ -354,10 +390,12 @@ bounce_trace_service.o: bounce_template.h
 bounce_trace_service.o: bounce_trace_service.c
 bounce_warn_service.o: ../../include/attr.h
 bounce_warn_service.o: ../../include/bounce_log.h
+bounce_warn_service.o: ../../include/check_arg.h
 bounce_warn_service.o: ../../include/cleanup_user.h
 bounce_warn_service.o: ../../include/dsn.h
 bounce_warn_service.o: ../../include/dsn_buf.h
 bounce_warn_service.o: ../../include/dsn_mask.h
+bounce_warn_service.o: ../../include/htable.h
 bounce_warn_service.o: ../../include/int_filt.h
 bounce_warn_service.o: ../../include/iostuff.h
 bounce_warn_service.o: ../../include/mail_addr.h
@@ -366,7 +404,9 @@ bounce_warn_service.o: ../../include/mail_params.h
 bounce_warn_service.o: ../../include/mail_proto.h
 bounce_warn_service.o: ../../include/mail_queue.h
 bounce_warn_service.o: ../../include/msg.h
+bounce_warn_service.o: ../../include/mymalloc.h
 bounce_warn_service.o: ../../include/name_mask.h
+bounce_warn_service.o: ../../include/nvtable.h
 bounce_warn_service.o: ../../include/post_mail.h
 bounce_warn_service.o: ../../include/rcpt_buf.h
 bounce_warn_service.o: ../../include/rec_type.h
index 5ab4a0eae60406887dc52cf338b1f9505ecf591c..2016a3433ef0b05e2abd89087d6a4e1f6b424cff 100644 (file)
@@ -223,10 +223,10 @@ static int bounce_append_proto(char *service_name, VSTREAM *client)
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
-                           ATTR_TYPE_FUNC, rcpb_scan, (void *) rcpt_buf,
-                           ATTR_TYPE_FUNC, dsb_scan, (void *) dsn_buf,
+                           RECV_ATTR_INT(MAIL_ATTR_FLAGS, &flags),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
+                           RECV_ATTR_FUNC(rcpb_scan, (void *) rcpt_buf),
+                           RECV_ATTR_FUNC(dsb_scan, (void *) dsn_buf),
                            ATTR_TYPE_END) != 4) {
        msg_warn("malformed request");
        return (-1);
@@ -295,14 +295,14 @@ static int bounce_notify_proto(char *service_name, VSTREAM *client,
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
+                           RECV_ATTR_INT(MAIL_ATTR_FLAGS, &flags),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUE, queue_name),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
+                           RECV_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           RECV_ATTR_INT(MAIL_ATTR_SMTPUTF8, &smtputf8),
+                           RECV_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           RECV_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           RECV_ATTR_INT(MAIL_ATTR_DSN_RET, &dsn_ret),
                            ATTR_TYPE_END) != 8) {
        msg_warn("malformed request");
        return (-1);
@@ -355,15 +355,15 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client)
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
-                           ATTR_TYPE_STR, MAIL_ATTR_VERPDL, verp_delims,
+                           RECV_ATTR_INT(MAIL_ATTR_FLAGS, &flags),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUE, queue_name),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
+                           RECV_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           RECV_ATTR_INT(MAIL_ATTR_SMTPUTF8, &smtputf8),
+                           RECV_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           RECV_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           RECV_ATTR_INT(MAIL_ATTR_DSN_RET, &dsn_ret),
+                           RECV_ATTR_STR(MAIL_ATTR_VERPDL, verp_delims),
                            ATTR_TYPE_END) != 9) {
        msg_warn("malformed request");
        return (-1);
@@ -429,16 +429,16 @@ static int bounce_one_proto(char *service_name, VSTREAM *client)
      * Read and validate the client request.
      */
     if (mail_command_server(client,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
-                           ATTR_TYPE_FUNC, rcpb_scan, (void *) rcpt_buf,
-                           ATTR_TYPE_FUNC, dsb_scan, (void *) dsn_buf,
+                           RECV_ATTR_INT(MAIL_ATTR_FLAGS, &flags),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUE, queue_name),
+                           RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
+                           RECV_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           RECV_ATTR_INT(MAIL_ATTR_SMTPUTF8, &smtputf8),
+                           RECV_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           RECV_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           RECV_ATTR_INT(MAIL_ATTR_DSN_RET, &dsn_ret),
+                           RECV_ATTR_FUNC(rcpb_scan, (void *) rcpt_buf),
+                           RECV_ATTR_FUNC(dsb_scan, (void *) dsn_buf),
                            ATTR_TYPE_END) != 10) {
        msg_warn("malformed request");
        return (-1);
@@ -518,7 +518,7 @@ static void bounce_service(VSTREAM *client, char *service_name, char **argv)
      * request-specific protocol routines take care of the remainder.
      */
     if (attr_scan(client, ATTR_FLAG_STRICT | ATTR_FLAG_MORE,
-                 ATTR_TYPE_INT, MAIL_ATTR_NREQ, &command, 0) != 1) {
+                 RECV_ATTR_INT(MAIL_ATTR_NREQ, &command), 0) != 1) {
        msg_warn("malformed request");
        status = -1;
     } else if (command == BOUNCE_CMD_VERP) {
@@ -546,7 +546,7 @@ static void bounce_service(VSTREAM *client, char *service_name, char **argv)
      * client.
      */
     attr_print(client, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
               ATTR_TYPE_END);
     vstream_fflush(client);
 
index 6c9dfcc682ec8ed5f5cc542fecfcd4173933e145..3d2e3db0fbca465084033a53846357de98a2f5f3 100644 (file)
@@ -564,6 +564,7 @@ depend: $(MAKES)
 cleanup.o: ../../include/argv.h
 cleanup.o: ../../include/attr.h
 cleanup.o: ../../include/been_here.h
+cleanup.o: ../../include/check_arg.h
 cleanup.o: ../../include/cleanup_user.h
 cleanup.o: ../../include/dict.h
 cleanup.o: ../../include/dsn_mask.h
@@ -600,6 +601,7 @@ cleanup_addr.o: ../../include/argv.h
 cleanup_addr.o: ../../include/attr.h
 cleanup_addr.o: ../../include/been_here.h
 cleanup_addr.o: ../../include/canon_addr.h
+cleanup_addr.o: ../../include/check_arg.h
 cleanup_addr.o: ../../include/cleanup_user.h
 cleanup_addr.o: ../../include/dict.h
 cleanup_addr.o: ../../include/dsn_mask.h
@@ -638,6 +640,7 @@ cleanup_api.o: ../../include/argv.h
 cleanup_api.o: ../../include/attr.h
 cleanup_api.o: ../../include/been_here.h
 cleanup_api.o: ../../include/bounce.h
+cleanup_api.o: ../../include/check_arg.h
 cleanup_api.o: ../../include/cleanup_user.h
 cleanup_api.o: ../../include/deliver_request.h
 cleanup_api.o: ../../include/dict.h
@@ -678,6 +681,7 @@ cleanup_api.o: cleanup_api.c
 cleanup_body_edit.o: ../../include/argv.h
 cleanup_body_edit.o: ../../include/attr.h
 cleanup_body_edit.o: ../../include/been_here.h
+cleanup_body_edit.o: ../../include/check_arg.h
 cleanup_body_edit.o: ../../include/cleanup_user.h
 cleanup_body_edit.o: ../../include/dict.h
 cleanup_body_edit.o: ../../include/dsn_mask.h
@@ -709,6 +713,7 @@ cleanup_bounce.o: ../../include/argv.h
 cleanup_bounce.o: ../../include/attr.h
 cleanup_bounce.o: ../../include/been_here.h
 cleanup_bounce.o: ../../include/bounce.h
+cleanup_bounce.o: ../../include/check_arg.h
 cleanup_bounce.o: ../../include/cleanup_user.h
 cleanup_bounce.o: ../../include/deliver_request.h
 cleanup_bounce.o: ../../include/dict.h
@@ -751,6 +756,7 @@ cleanup_bounce.o: cleanup_bounce.c
 cleanup_envelope.o: ../../include/argv.h
 cleanup_envelope.o: ../../include/attr.h
 cleanup_envelope.o: ../../include/been_here.h
+cleanup_envelope.o: ../../include/check_arg.h
 cleanup_envelope.o: ../../include/cleanup_user.h
 cleanup_envelope.o: ../../include/dict.h
 cleanup_envelope.o: ../../include/dsn_mask.h
@@ -790,6 +796,7 @@ cleanup_envelope.o: cleanup_envelope.c
 cleanup_extracted.o: ../../include/argv.h
 cleanup_extracted.o: ../../include/attr.h
 cleanup_extracted.o: ../../include/been_here.h
+cleanup_extracted.o: ../../include/check_arg.h
 cleanup_extracted.o: ../../include/cleanup_user.h
 cleanup_extracted.o: ../../include/dict.h
 cleanup_extracted.o: ../../include/dsn_mask.h
@@ -826,6 +833,7 @@ cleanup_extracted.o: cleanup_extracted.c
 cleanup_final.o: ../../include/argv.h
 cleanup_final.o: ../../include/attr.h
 cleanup_final.o: ../../include/been_here.h
+cleanup_final.o: ../../include/check_arg.h
 cleanup_final.o: ../../include/cleanup_user.h
 cleanup_final.o: ../../include/dict.h
 cleanup_final.o: ../../include/dsn_mask.h
@@ -855,6 +863,7 @@ cleanup_final.o: cleanup_final.c
 cleanup_init.o: ../../include/argv.h
 cleanup_init.o: ../../include/attr.h
 cleanup_init.o: ../../include/been_here.h
+cleanup_init.o: ../../include/check_arg.h
 cleanup_init.o: ../../include/cleanup_user.h
 cleanup_init.o: ../../include/dict.h
 cleanup_init.o: ../../include/dsn_mask.h
@@ -891,6 +900,7 @@ cleanup_init.o: cleanup_init.c
 cleanup_map11.o: ../../include/argv.h
 cleanup_map11.o: ../../include/attr.h
 cleanup_map11.o: ../../include/been_here.h
+cleanup_map11.o: ../../include/check_arg.h
 cleanup_map11.o: ../../include/cleanup_user.h
 cleanup_map11.o: ../../include/dict.h
 cleanup_map11.o: ../../include/dsn_mask.h
@@ -922,6 +932,7 @@ cleanup_map11.o: cleanup_map11.c
 cleanup_map1n.o: ../../include/argv.h
 cleanup_map1n.o: ../../include/attr.h
 cleanup_map1n.o: ../../include/been_here.h
+cleanup_map1n.o: ../../include/check_arg.h
 cleanup_map1n.o: ../../include/cleanup_user.h
 cleanup_map1n.o: ../../include/dict.h
 cleanup_map1n.o: ../../include/dsn_mask.h
@@ -954,6 +965,7 @@ cleanup_map1n.o: cleanup_map1n.c
 cleanup_masquerade.o: ../../include/argv.h
 cleanup_masquerade.o: ../../include/attr.h
 cleanup_masquerade.o: ../../include/been_here.h
+cleanup_masquerade.o: ../../include/check_arg.h
 cleanup_masquerade.o: ../../include/cleanup_user.h
 cleanup_masquerade.o: ../../include/dict.h
 cleanup_masquerade.o: ../../include/dsn_mask.h
@@ -986,6 +998,7 @@ cleanup_masquerade.o: cleanup_masquerade.c
 cleanup_message.o: ../../include/argv.h
 cleanup_message.o: ../../include/attr.h
 cleanup_message.o: ../../include/been_here.h
+cleanup_message.o: ../../include/check_arg.h
 cleanup_message.o: ../../include/cleanup_user.h
 cleanup_message.o: ../../include/conv_time.h
 cleanup_message.o: ../../include/dict.h
@@ -1030,6 +1043,7 @@ cleanup_message.o: cleanup_message.c
 cleanup_milter.o: ../../include/argv.h
 cleanup_milter.o: ../../include/attr.h
 cleanup_milter.o: ../../include/been_here.h
+cleanup_milter.o: ../../include/check_arg.h
 cleanup_milter.o: ../../include/cleanup_user.h
 cleanup_milter.o: ../../include/dict.h
 cleanup_milter.o: ../../include/dsn_mask.h
@@ -1072,6 +1086,7 @@ cleanup_milter.o: cleanup_milter.c
 cleanup_out.o: ../../include/argv.h
 cleanup_out.o: ../../include/attr.h
 cleanup_out.o: ../../include/been_here.h
+cleanup_out.o: ../../include/check_arg.h
 cleanup_out.o: ../../include/cleanup_user.h
 cleanup_out.o: ../../include/dict.h
 cleanup_out.o: ../../include/dsn_mask.h
@@ -1108,6 +1123,7 @@ cleanup_out_recipient.o: ../../include/argv.h
 cleanup_out_recipient.o: ../../include/attr.h
 cleanup_out_recipient.o: ../../include/been_here.h
 cleanup_out_recipient.o: ../../include/bounce.h
+cleanup_out_recipient.o: ../../include/check_arg.h
 cleanup_out_recipient.o: ../../include/cleanup_user.h
 cleanup_out_recipient.o: ../../include/deliver_request.h
 cleanup_out_recipient.o: ../../include/dict.h
@@ -1148,6 +1164,7 @@ cleanup_out_recipient.o: cleanup_out_recipient.c
 cleanup_region.o: ../../include/argv.h
 cleanup_region.o: ../../include/attr.h
 cleanup_region.o: ../../include/been_here.h
+cleanup_region.o: ../../include/check_arg.h
 cleanup_region.o: ../../include/cleanup_user.h
 cleanup_region.o: ../../include/dict.h
 cleanup_region.o: ../../include/dsn_mask.h
@@ -1177,6 +1194,7 @@ cleanup_region.o: cleanup_region.c
 cleanup_rewrite.o: ../../include/argv.h
 cleanup_rewrite.o: ../../include/attr.h
 cleanup_rewrite.o: ../../include/been_here.h
+cleanup_rewrite.o: ../../include/check_arg.h
 cleanup_rewrite.o: ../../include/cleanup_user.h
 cleanup_rewrite.o: ../../include/dict.h
 cleanup_rewrite.o: ../../include/dsn_mask.h
@@ -1210,6 +1228,7 @@ cleanup_rewrite.o: cleanup_rewrite.c
 cleanup_state.o: ../../include/argv.h
 cleanup_state.o: ../../include/attr.h
 cleanup_state.o: ../../include/been_here.h
+cleanup_state.o: ../../include/check_arg.h
 cleanup_state.o: ../../include/cleanup_user.h
 cleanup_state.o: ../../include/dict.h
 cleanup_state.o: ../../include/dsn_mask.h
index a3530fa0e81468a37d97080d74db91f00eb6a11a..3c05943f97b3fcba709edd1dc1d9771b4f779bec 100644 (file)
@@ -459,10 +459,10 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
      * about the whole operation.
      */
     attr_print(src, ATTR_FLAG_NONE,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, state->queue_id,
+              SEND_ATTR_STR(MAIL_ATTR_QUEUEID, state->queue_id),
               ATTR_TYPE_END);
     if (attr_scan(src, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &flags,
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &flags),
                  ATTR_TYPE_END) != 1) {
        state->errs |= CLEANUP_STAT_BAD;
        flags = 0;
@@ -521,11 +521,11 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
      */
     status = cleanup_flush(state);             /* in case state is modified */
     attr_print(src, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
-              ATTR_TYPE_STR, MAIL_ATTR_WHY,
-              (state->flags & CLEANUP_FLAG_SMTP_REPLY)
-              && state->smtp_reply ? state->smtp_reply :
-              state->reason ? state->reason : "",
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
+              SEND_ATTR_STR(MAIL_ATTR_WHY,
+                            (state->flags & CLEANUP_FLAG_SMTP_REPLY)
+                            && state->smtp_reply ? state->smtp_reply :
+                            state->reason ? state->reason : ""),
               ATTR_TYPE_END);
     cleanup_free(state);
 
index 797f1c619dc75125e9fbc2868ae2a706e7f64420..d14751466a8f89398942a48b9de5cbdb31016256 100644 (file)
@@ -61,17 +61,21 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 discard.o: ../../include/attr.h
 discard.o: ../../include/bounce.h
+discard.o: ../../include/check_arg.h
 discard.o: ../../include/deliver_completed.h
 discard.o: ../../include/deliver_request.h
 discard.o: ../../include/dsn.h
 discard.o: ../../include/dsn_buf.h
 discard.o: ../../include/dsn_util.h
 discard.o: ../../include/flush_clnt.h
+discard.o: ../../include/htable.h
 discard.o: ../../include/mail_queue.h
 discard.o: ../../include/mail_server.h
 discard.o: ../../include/mail_version.h
 discard.o: ../../include/msg.h
 discard.o: ../../include/msg_stats.h
+discard.o: ../../include/mymalloc.h
+discard.o: ../../include/nvtable.h
 discard.o: ../../include/recipient_list.h
 discard.o: ../../include/sent.h
 discard.o: ../../include/sys_defs.h
index 6cfc08b83c9ce09075669059a2cfefdf515cfe46..f5bf0dffc63e9894d3ccf21fc4e1034a435e235f 100644 (file)
@@ -62,7 +62,9 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 dnsblog.o: ../../include/argv.h
 dnsblog.o: ../../include/attr.h
+dnsblog.o: ../../include/check_arg.h
 dnsblog.o: ../../include/dns.h
+dnsblog.o: ../../include/htable.h
 dnsblog.o: ../../include/iostuff.h
 dnsblog.o: ../../include/mail_conf.h
 dnsblog.o: ../../include/mail_params.h
@@ -71,6 +73,8 @@ dnsblog.o: ../../include/mail_server.h
 dnsblog.o: ../../include/mail_version.h
 dnsblog.o: ../../include/msg.h
 dnsblog.o: ../../include/myaddrinfo.h
+dnsblog.o: ../../include/mymalloc.h
+dnsblog.o: ../../include/nvtable.h
 dnsblog.o: ../../include/sock_addr.h
 dnsblog.o: ../../include/sys_defs.h
 dnsblog.o: ../../include/valid_hostname.h
index 33af6c8527b59a2b1d4fc6ce1d140ea1d83ee07f..d12ce69ae1c11a98c4dfbcf6b9c06a83c439b8ec 100644 (file)
@@ -231,18 +231,18 @@ static void dnsblog_service(VSTREAM *client_stream, char *unused_service,
      */
     if (attr_scan(client_stream,
                  ATTR_FLAG_MORE | ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_RBL_DOMAIN, rbl_domain,
-                 ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, addr,
-                 ATTR_TYPE_INT, MAIL_ATTR_LABEL, &request_id,
+                 RECV_ATTR_STR(MAIL_ATTR_RBL_DOMAIN, rbl_domain),
+                 RECV_ATTR_STR(MAIL_ATTR_ACT_CLIENT_ADDR, addr),
+                 RECV_ATTR_INT(MAIL_ATTR_LABEL, &request_id),
                  ATTR_TYPE_END) == 3) {
        (void) dnsblog_query(result, STR(rbl_domain), STR(addr));
        if (var_dnsblog_delay > 0)
            sleep(var_dnsblog_delay);
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_STR, MAIL_ATTR_RBL_DOMAIN, STR(rbl_domain),
-                  ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, STR(addr),
-                  ATTR_TYPE_INT, MAIL_ATTR_LABEL, request_id,
-                  ATTR_TYPE_STR, MAIL_ATTR_RBL_ADDR, STR(result),
+                  SEND_ATTR_STR(MAIL_ATTR_RBL_DOMAIN, STR(rbl_domain)),
+                  SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_ADDR, STR(addr)),
+                  SEND_ATTR_INT(MAIL_ATTR_LABEL, request_id),
+                  SEND_ATTR_STR(MAIL_ATTR_RBL_ADDR, STR(result)),
                   ATTR_TYPE_END);
        vstream_fflush(client_stream);
     }
index 2aafa5b4039939035184b3b47fce384468806b68..31e32b7f713af64612b04d5b16ef953d91f65201 100644 (file)
@@ -61,6 +61,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 error.o: ../../include/attr.h
 error.o: ../../include/bounce.h
+error.o: ../../include/check_arg.h
 error.o: ../../include/defer.h
 error.o: ../../include/deliver_completed.h
 error.o: ../../include/deliver_request.h
@@ -68,6 +69,7 @@ error.o: ../../include/dsn.h
 error.o: ../../include/dsn_buf.h
 error.o: ../../include/dsn_util.h
 error.o: ../../include/flush_clnt.h
+error.o: ../../include/htable.h
 error.o: ../../include/iostuff.h
 error.o: ../../include/mail_proto.h
 error.o: ../../include/mail_queue.h
@@ -75,6 +77,8 @@ error.o: ../../include/mail_server.h
 error.o: ../../include/mail_version.h
 error.o: ../../include/msg.h
 error.o: ../../include/msg_stats.h
+error.o: ../../include/mymalloc.h
+error.o: ../../include/nvtable.h
 error.o: ../../include/recipient_list.h
 error.o: ../../include/sys_defs.h
 error.o: ../../include/sys_exits.h
index b60ed87a131fb24289411797cd3ef76cbcd34053..ff94b79e3616057b4b37820558bd8ac918d13b2e 100644 (file)
@@ -61,6 +61,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 flush.o: ../../include/argv.h
 flush.o: ../../include/attr.h
+flush.o: ../../include/check_arg.h
 flush.o: ../../include/dict.h
 flush.o: ../../include/domain_list.h
 flush.o: ../../include/events.h
@@ -80,6 +81,8 @@ flush.o: ../../include/match_list.h
 flush.o: ../../include/match_parent_style.h
 flush.o: ../../include/msg.h
 flush.o: ../../include/myflock.h
+flush.o: ../../include/mymalloc.h
+flush.o: ../../include/nvtable.h
 flush.o: ../../include/safe_open.h
 flush.o: ../../include/scan_dir.h
 flush.o: ../../include/stringops.h
index 7b4fd01a523225ec45ff777c2b10813147fd5e20..1f544bdefc7f27186612186591d69f9e88792315 100644 (file)
@@ -707,7 +707,7 @@ static int flush_request_receive(VSTREAM *client_stream, VSTRING *request)
     else {
        if (attr_scan(client_stream,
                      ATTR_FLAG_MORE | ATTR_FLAG_STRICT,
-                     ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
+                     RECV_ATTR_STR(MAIL_ATTR_REQ, request),
                      ATTR_TYPE_END) != 1) {
            return (-1);
        }
@@ -749,50 +749,50 @@ static void flush_service(VSTREAM *client_stream, char *unused_service,
            site = vstring_alloc(10);
            queue_id = vstring_alloc(10);
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, MAIL_ATTR_SITE, site,
-                         ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
+                         RECV_ATTR_STR(MAIL_ATTR_SITE, site),
+                         RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
                          ATTR_TYPE_END) == 2
                && mail_queue_id_ok(STR(queue_id)))
                status = flush_add_service(lowercase(STR(site)), STR(queue_id));
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
                       ATTR_TYPE_END);
        } else if (STREQ(STR(request), FLUSH_REQ_SEND_SITE)) {
            site = vstring_alloc(10);
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, MAIL_ATTR_SITE, site,
+                         RECV_ATTR_STR(MAIL_ATTR_SITE, site),
                          ATTR_TYPE_END) == 1)
                status = flush_send_service(lowercase(STR(site)),
                                            UNTHROTTLE_BEFORE);
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
                       ATTR_TYPE_END);
        } else if (STREQ(STR(request), FLUSH_REQ_SEND_FILE)) {
            queue_id = vstring_alloc(10);
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
+                         RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
                          ATTR_TYPE_END) == 1)
                status = flush_send_file_service(STR(queue_id));
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
                       ATTR_TYPE_END);
        } else if (STREQ(STR(request), FLUSH_REQ_REFRESH)
                   || STREQ(STR(request), wakeup)) {
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, FLUSH_STAT_OK,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, FLUSH_STAT_OK),
                       ATTR_TYPE_END);
            vstream_fflush(client_stream);
            (void) flush_refresh_service(var_fflush_refresh);
        } else if (STREQ(STR(request), FLUSH_REQ_PURGE)) {
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, FLUSH_STAT_OK,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, FLUSH_STAT_OK),
                       ATTR_TYPE_END);
            vstream_fflush(client_stream);
            (void) flush_refresh_service(0);
        }
     } else
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
                   ATTR_TYPE_END);
     vstring_free(request);
     if (site)
index 8d487598b4afdd336cc78aefc86524ea871b22bd..ad2082e4aa5057573b9529c60662fb9f44e3fbf3 100644 (file)
@@ -665,10 +665,13 @@ depend: $(MAKES)
 
 # do not edit below this line - it is generated by 'make depend'
 abounce.o: ../../include/attr.h
+abounce.o: ../../include/check_arg.h
 abounce.o: ../../include/events.h
+abounce.o: ../../include/htable.h
 abounce.o: ../../include/iostuff.h
 abounce.o: ../../include/msg.h
 abounce.o: ../../include/mymalloc.h
+abounce.o: ../../include/nvtable.h
 abounce.o: ../../include/sys_defs.h
 abounce.o: ../../include/vbuf.h
 abounce.o: ../../include/vstream.h
@@ -690,9 +693,12 @@ addr_match_list.o: addr_match_list.c
 addr_match_list.o: addr_match_list.h
 anvil_clnt.o: ../../include/attr.h
 anvil_clnt.o: ../../include/attr_clnt.h
+anvil_clnt.o: ../../include/check_arg.h
+anvil_clnt.o: ../../include/htable.h
 anvil_clnt.o: ../../include/iostuff.h
 anvil_clnt.o: ../../include/msg.h
 anvil_clnt.o: ../../include/mymalloc.h
+anvil_clnt.o: ../../include/nvtable.h
 anvil_clnt.o: ../../include/stringops.h
 anvil_clnt.o: ../../include/sys_defs.h
 anvil_clnt.o: ../../include/vbuf.h
@@ -721,9 +727,12 @@ been_here.o: ../../include/vstring.h
 been_here.o: been_here.c
 been_here.o: been_here.h
 bounce.o: ../../include/attr.h
+bounce.o: ../../include/check_arg.h
+bounce.o: ../../include/htable.h
 bounce.o: ../../include/iostuff.h
 bounce.o: ../../include/msg.h
 bounce.o: ../../include/mymalloc.h
+bounce.o: ../../include/nvtable.h
 bounce.o: ../../include/sys_defs.h
 bounce.o: ../../include/vbuf.h
 bounce.o: ../../include/vstream.h
@@ -746,9 +755,12 @@ bounce.o: recipient_list.h
 bounce.o: trace.h
 bounce.o: verify.h
 bounce_log.o: ../../include/attr.h
+bounce_log.o: ../../include/check_arg.h
+bounce_log.o: ../../include/htable.h
 bounce_log.o: ../../include/iostuff.h
 bounce_log.o: ../../include/msg.h
 bounce_log.o: ../../include/mymalloc.h
+bounce_log.o: ../../include/nvtable.h
 bounce_log.o: ../../include/stringops.h
 bounce_log.o: ../../include/sys_defs.h
 bounce_log.o: ../../include/vbuf.h
@@ -766,8 +778,11 @@ bounce_log.o: mail_queue.h
 bounce_log.o: rcpt_buf.h
 bounce_log.o: recipient_list.h
 canon_addr.o: ../../include/attr.h
+canon_addr.o: ../../include/check_arg.h
+canon_addr.o: ../../include/htable.h
 canon_addr.o: ../../include/iostuff.h
 canon_addr.o: ../../include/mymalloc.h
+canon_addr.o: ../../include/nvtable.h
 canon_addr.o: ../../include/sys_defs.h
 canon_addr.o: ../../include/vbuf.h
 canon_addr.o: ../../include/vstream.h
@@ -801,13 +816,17 @@ cleanup_strflags.o: ../../include/vstring.h
 cleanup_strflags.o: cleanup_strflags.c
 cleanup_strflags.o: cleanup_user.h
 clnt_stream.o: ../../include/attr.h
+clnt_stream.o: ../../include/check_arg.h
 clnt_stream.o: ../../include/events.h
+clnt_stream.o: ../../include/htable.h
 clnt_stream.o: ../../include/iostuff.h
 clnt_stream.o: ../../include/msg.h
 clnt_stream.o: ../../include/mymalloc.h
+clnt_stream.o: ../../include/nvtable.h
 clnt_stream.o: ../../include/sys_defs.h
 clnt_stream.o: ../../include/vbuf.h
 clnt_stream.o: ../../include/vstream.h
+clnt_stream.o: ../../include/vstring.h
 clnt_stream.o: clnt_stream.c
 clnt_stream.o: clnt_stream.h
 clnt_stream.o: mail_params.h
@@ -866,8 +885,12 @@ debug_process.o: debug_process.h
 debug_process.o: mail_conf.h
 debug_process.o: mail_params.h
 defer.o: ../../include/attr.h
+defer.o: ../../include/check_arg.h
+defer.o: ../../include/htable.h
 defer.o: ../../include/iostuff.h
 defer.o: ../../include/msg.h
+defer.o: ../../include/mymalloc.h
+defer.o: ../../include/nvtable.h
 defer.o: ../../include/sys_defs.h
 defer.o: ../../include/vbuf.h
 defer.o: ../../include/vstream.h
@@ -909,9 +932,12 @@ deliver_flock.o: deliver_flock.c
 deliver_flock.o: deliver_flock.h
 deliver_flock.o: mail_params.h
 deliver_pass.o: ../../include/attr.h
+deliver_pass.o: ../../include/check_arg.h
+deliver_pass.o: ../../include/htable.h
 deliver_pass.o: ../../include/iostuff.h
 deliver_pass.o: ../../include/msg.h
 deliver_pass.o: ../../include/mymalloc.h
+deliver_pass.o: ../../include/nvtable.h
 deliver_pass.o: ../../include/split_at.h
 deliver_pass.o: ../../include/sys_defs.h
 deliver_pass.o: ../../include/vbuf.h
@@ -931,10 +957,13 @@ deliver_pass.o: msg_stats.h
 deliver_pass.o: rcpt_print.h
 deliver_pass.o: recipient_list.h
 deliver_request.o: ../../include/attr.h
+deliver_request.o: ../../include/check_arg.h
+deliver_request.o: ../../include/htable.h
 deliver_request.o: ../../include/iostuff.h
 deliver_request.o: ../../include/msg.h
 deliver_request.o: ../../include/myflock.h
 deliver_request.o: ../../include/mymalloc.h
+deliver_request.o: ../../include/nvtable.h
 deliver_request.o: ../../include/sys_defs.h
 deliver_request.o: ../../include/vbuf.h
 deliver_request.o: ../../include/vstream.h
@@ -1004,8 +1033,26 @@ dict_memcache.o: dict_memcache.c
 dict_memcache.o: dict_memcache.h
 dict_memcache.o: memcache_proto.h
 dict_memcache.o: string_list.h
+dict_mysql.o: ../../include/argv.h
+dict_mysql.o: ../../include/dict.h
+dict_mysql.o: ../../include/events.h
+dict_mysql.o: ../../include/find_inet.h
+dict_mysql.o: ../../include/match_list.h
+dict_mysql.o: ../../include/msg.h
+dict_mysql.o: ../../include/myflock.h
+dict_mysql.o: ../../include/mymalloc.h
+dict_mysql.o: ../../include/myrand.h
+dict_mysql.o: ../../include/split_at.h
+dict_mysql.o: ../../include/stringops.h
 dict_mysql.o: ../../include/sys_defs.h
+dict_mysql.o: ../../include/vbuf.h
+dict_mysql.o: ../../include/vstream.h
+dict_mysql.o: ../../include/vstring.h
+dict_mysql.o: cfg_parser.h
+dict_mysql.o: db_common.h
 dict_mysql.o: dict_mysql.c
+dict_mysql.o: dict_mysql.h
+dict_mysql.o: string_list.h
 dict_pgsql.o: ../../include/argv.h
 dict_pgsql.o: ../../include/dict.h
 dict_pgsql.o: ../../include/events.h
@@ -1028,11 +1075,14 @@ dict_pgsql.o: dict_pgsql.h
 dict_pgsql.o: string_list.h
 dict_proxy.o: ../../include/argv.h
 dict_proxy.o: ../../include/attr.h
+dict_proxy.o: ../../include/check_arg.h
 dict_proxy.o: ../../include/dict.h
+dict_proxy.o: ../../include/htable.h
 dict_proxy.o: ../../include/iostuff.h
 dict_proxy.o: ../../include/msg.h
 dict_proxy.o: ../../include/myflock.h
 dict_proxy.o: ../../include/mymalloc.h
+dict_proxy.o: ../../include/nvtable.h
 dict_proxy.o: ../../include/stringops.h
 dict_proxy.o: ../../include/sys_defs.h
 dict_proxy.o: ../../include/vbuf.h
@@ -1083,7 +1133,11 @@ dot_lockfile_as.o: dot_lockfile.h
 dot_lockfile_as.o: dot_lockfile_as.c
 dot_lockfile_as.o: dot_lockfile_as.h
 dsb_scan.o: ../../include/attr.h
+dsb_scan.o: ../../include/check_arg.h
+dsb_scan.o: ../../include/htable.h
 dsb_scan.o: ../../include/iostuff.h
+dsb_scan.o: ../../include/mymalloc.h
+dsb_scan.o: ../../include/nvtable.h
 dsb_scan.o: ../../include/sys_defs.h
 dsb_scan.o: ../../include/vbuf.h
 dsb_scan.o: ../../include/vstream.h
@@ -1129,10 +1183,15 @@ dsn_mask.o: ../../include/vstring.h
 dsn_mask.o: dsn_mask.c
 dsn_mask.o: dsn_mask.h
 dsn_print.o: ../../include/attr.h
+dsn_print.o: ../../include/check_arg.h
+dsn_print.o: ../../include/htable.h
 dsn_print.o: ../../include/iostuff.h
+dsn_print.o: ../../include/mymalloc.h
+dsn_print.o: ../../include/nvtable.h
 dsn_print.o: ../../include/sys_defs.h
 dsn_print.o: ../../include/vbuf.h
 dsn_print.o: ../../include/vstream.h
+dsn_print.o: ../../include/vstring.h
 dsn_print.o: dsn.h
 dsn_print.o: dsn_print.c
 dsn_print.o: dsn_print.h
@@ -1188,12 +1247,17 @@ file_id.o: mail_queue.h
 file_id.o: safe_ultostr.h
 flush_clnt.o: ../../include/argv.h
 flush_clnt.o: ../../include/attr.h
+flush_clnt.o: ../../include/check_arg.h
+flush_clnt.o: ../../include/htable.h
 flush_clnt.o: ../../include/iostuff.h
 flush_clnt.o: ../../include/match_list.h
 flush_clnt.o: ../../include/msg.h
+flush_clnt.o: ../../include/mymalloc.h
+flush_clnt.o: ../../include/nvtable.h
 flush_clnt.o: ../../include/sys_defs.h
 flush_clnt.o: ../../include/vbuf.h
 flush_clnt.o: ../../include/vstream.h
+flush_clnt.o: ../../include/vstring.h
 flush_clnt.o: domain_list.h
 flush_clnt.o: flush_clnt.c
 flush_clnt.o: flush_clnt.h
@@ -1264,9 +1328,13 @@ input_transp.o: input_transp.c
 input_transp.o: input_transp.h
 input_transp.o: mail_params.h
 int_filt.o: ../../include/attr.h
+int_filt.o: ../../include/check_arg.h
+int_filt.o: ../../include/htable.h
 int_filt.o: ../../include/iostuff.h
 int_filt.o: ../../include/msg.h
+int_filt.o: ../../include/mymalloc.h
 int_filt.o: ../../include/name_mask.h
+int_filt.o: ../../include/nvtable.h
 int_filt.o: ../../include/sys_defs.h
 int_filt.o: ../../include/vbuf.h
 int_filt.o: ../../include/vstream.h
@@ -1280,8 +1348,12 @@ is_header.o: ../../include/sys_defs.h
 is_header.o: is_header.c
 is_header.o: is_header.h
 log_adhoc.o: ../../include/attr.h
+log_adhoc.o: ../../include/check_arg.h
 log_adhoc.o: ../../include/format_tv.h
+log_adhoc.o: ../../include/htable.h
 log_adhoc.o: ../../include/msg.h
+log_adhoc.o: ../../include/mymalloc.h
+log_adhoc.o: ../../include/nvtable.h
 log_adhoc.o: ../../include/sys_defs.h
 log_adhoc.o: ../../include/vbuf.h
 log_adhoc.o: ../../include/vstream.h
@@ -1340,17 +1412,27 @@ mail_addr_map.o: mail_addr_map.c
 mail_addr_map.o: mail_addr_map.h
 mail_addr_map.o: maps.h
 mail_command_client.o: ../../include/attr.h
+mail_command_client.o: ../../include/check_arg.h
+mail_command_client.o: ../../include/htable.h
 mail_command_client.o: ../../include/iostuff.h
+mail_command_client.o: ../../include/mymalloc.h
+mail_command_client.o: ../../include/nvtable.h
 mail_command_client.o: ../../include/sys_defs.h
 mail_command_client.o: ../../include/vbuf.h
 mail_command_client.o: ../../include/vstream.h
+mail_command_client.o: ../../include/vstring.h
 mail_command_client.o: mail_command_client.c
 mail_command_client.o: mail_proto.h
 mail_command_server.o: ../../include/attr.h
+mail_command_server.o: ../../include/check_arg.h
+mail_command_server.o: ../../include/htable.h
 mail_command_server.o: ../../include/iostuff.h
+mail_command_server.o: ../../include/mymalloc.h
+mail_command_server.o: ../../include/nvtable.h
 mail_command_server.o: ../../include/sys_defs.h
 mail_command_server.o: ../../include/vbuf.h
 mail_command_server.o: ../../include/vstream.h
+mail_command_server.o: ../../include/vstring.h
 mail_command_server.o: mail_command_server.c
 mail_command_server.o: mail_proto.h
 mail_conf.o: ../../include/argv.h
@@ -1451,10 +1533,13 @@ mail_conf_time.o: conv_time.h
 mail_conf_time.o: mail_conf.h
 mail_conf_time.o: mail_conf_time.c
 mail_connect.o: ../../include/attr.h
+mail_connect.o: ../../include/check_arg.h
 mail_connect.o: ../../include/connect.h
+mail_connect.o: ../../include/htable.h
 mail_connect.o: ../../include/iostuff.h
 mail_connect.o: ../../include/msg.h
 mail_connect.o: ../../include/mymalloc.h
+mail_connect.o: ../../include/nvtable.h
 mail_connect.o: ../../include/stringops.h
 mail_connect.o: ../../include/sys_defs.h
 mail_connect.o: ../../include/vbuf.h
@@ -1521,10 +1606,15 @@ mail_error.o: ../../include/vstring.h
 mail_error.o: mail_error.c
 mail_error.o: mail_error.h
 mail_flush.o: ../../include/attr.h
+mail_flush.o: ../../include/check_arg.h
+mail_flush.o: ../../include/htable.h
 mail_flush.o: ../../include/iostuff.h
+mail_flush.o: ../../include/mymalloc.h
+mail_flush.o: ../../include/nvtable.h
 mail_flush.o: ../../include/sys_defs.h
 mail_flush.o: ../../include/vbuf.h
 mail_flush.o: ../../include/vstream.h
+mail_flush.o: ../../include/vstring.h
 mail_flush.o: mail_flush.c
 mail_flush.o: mail_flush.h
 mail_flush.o: mail_params.h
@@ -1540,10 +1630,12 @@ mail_open_ok.o: mail_open_ok.h
 mail_open_ok.o: mail_queue.h
 mail_params.o: ../../include/argv.h
 mail_params.o: ../../include/attr.h
+mail_params.o: ../../include/check_arg.h
 mail_params.o: ../../include/dict.h
 mail_params.o: ../../include/dict_db.h
 mail_params.o: ../../include/dict_lmdb.h
 mail_params.o: ../../include/get_hostname.h
+mail_params.o: ../../include/htable.h
 mail_params.o: ../../include/inet_addr_list.h
 mail_params.o: ../../include/inet_proto.h
 mail_params.o: ../../include/iostuff.h
@@ -1552,6 +1644,7 @@ mail_params.o: ../../include/msg_syslog.h
 mail_params.o: ../../include/myaddrinfo.h
 mail_params.o: ../../include/myflock.h
 mail_params.o: ../../include/mymalloc.h
+mail_params.o: ../../include/nvtable.h
 mail_params.o: ../../include/safe.h
 mail_params.o: ../../include/safe_open.h
 mail_params.o: ../../include/stringops.h
@@ -1581,7 +1674,11 @@ mail_parm_split.o: mail_params.h
 mail_parm_split.o: mail_parm_split.c
 mail_parm_split.o: mail_parm_split.h
 mail_pathname.o: ../../include/attr.h
+mail_pathname.o: ../../include/check_arg.h
+mail_pathname.o: ../../include/htable.h
 mail_pathname.o: ../../include/iostuff.h
+mail_pathname.o: ../../include/mymalloc.h
+mail_pathname.o: ../../include/nvtable.h
 mail_pathname.o: ../../include/stringops.h
 mail_pathname.o: ../../include/sys_defs.h
 mail_pathname.o: ../../include/vbuf.h
@@ -1621,9 +1718,12 @@ mail_scan_dir.o: mail_scan_dir.c
 mail_scan_dir.o: mail_scan_dir.h
 mail_stream.o: ../../include/argv.h
 mail_stream.o: ../../include/attr.h
+mail_stream.o: ../../include/check_arg.h
+mail_stream.o: ../../include/htable.h
 mail_stream.o: ../../include/iostuff.h
 mail_stream.o: ../../include/msg.h
 mail_stream.o: ../../include/mymalloc.h
+mail_stream.o: ../../include/nvtable.h
 mail_stream.o: ../../include/sane_fsops.h
 mail_stream.o: ../../include/stringops.h
 mail_stream.o: ../../include/sys_defs.h
@@ -1648,13 +1748,17 @@ mail_task.o: mail_params.h
 mail_task.o: mail_task.c
 mail_task.o: mail_task.h
 mail_trigger.o: ../../include/attr.h
+mail_trigger.o: ../../include/check_arg.h
+mail_trigger.o: ../../include/htable.h
 mail_trigger.o: ../../include/iostuff.h
 mail_trigger.o: ../../include/msg.h
 mail_trigger.o: ../../include/mymalloc.h
+mail_trigger.o: ../../include/nvtable.h
 mail_trigger.o: ../../include/sys_defs.h
 mail_trigger.o: ../../include/trigger.h
 mail_trigger.o: ../../include/vbuf.h
 mail_trigger.o: ../../include/vstream.h
+mail_trigger.o: ../../include/vstring.h
 mail_trigger.o: ../../include/warn_stat.h
 mail_trigger.o: mail_params.h
 mail_trigger.o: mail_proto.h
@@ -1683,7 +1787,11 @@ maps.o: mail_conf.h
 maps.o: maps.c
 maps.o: maps.h
 mark_corrupt.o: ../../include/attr.h
+mark_corrupt.o: ../../include/check_arg.h
+mark_corrupt.o: ../../include/htable.h
 mark_corrupt.o: ../../include/msg.h
+mark_corrupt.o: ../../include/mymalloc.h
+mark_corrupt.o: ../../include/nvtable.h
 mark_corrupt.o: ../../include/set_eugid.h
 mark_corrupt.o: ../../include/sys_defs.h
 mark_corrupt.o: ../../include/vbuf.h
@@ -1872,16 +1980,25 @@ mkmap_sdbm.o: ../../include/vstring.h
 mkmap_sdbm.o: mkmap.h
 mkmap_sdbm.o: mkmap_sdbm.c
 msg_stats_print.o: ../../include/attr.h
+msg_stats_print.o: ../../include/check_arg.h
+msg_stats_print.o: ../../include/htable.h
 msg_stats_print.o: ../../include/iostuff.h
+msg_stats_print.o: ../../include/mymalloc.h
+msg_stats_print.o: ../../include/nvtable.h
 msg_stats_print.o: ../../include/sys_defs.h
 msg_stats_print.o: ../../include/vbuf.h
 msg_stats_print.o: ../../include/vstream.h
+msg_stats_print.o: ../../include/vstring.h
 msg_stats_print.o: mail_proto.h
 msg_stats_print.o: msg_stats.h
 msg_stats_print.o: msg_stats_print.c
 msg_stats_scan.o: ../../include/attr.h
+msg_stats_scan.o: ../../include/check_arg.h
+msg_stats_scan.o: ../../include/htable.h
 msg_stats_scan.o: ../../include/iostuff.h
 msg_stats_scan.o: ../../include/msg.h
+msg_stats_scan.o: ../../include/mymalloc.h
+msg_stats_scan.o: ../../include/nvtable.h
 msg_stats_scan.o: ../../include/sys_defs.h
 msg_stats_scan.o: ../../include/vbuf.h
 msg_stats_scan.o: ../../include/vstream.h
@@ -1969,10 +2086,13 @@ pipe_command.o: pipe_command.c
 pipe_command.o: pipe_command.h
 pipe_command.o: sys_exits.h
 post_mail.o: ../../include/attr.h
+post_mail.o: ../../include/check_arg.h
 post_mail.o: ../../include/events.h
+post_mail.o: ../../include/htable.h
 post_mail.o: ../../include/iostuff.h
 post_mail.o: ../../include/msg.h
 post_mail.o: ../../include/mymalloc.h
+post_mail.o: ../../include/nvtable.h
 post_mail.o: ../../include/sys_defs.h
 post_mail.o: ../../include/vbuf.h
 post_mail.o: ../../include/vstream.h
@@ -2000,8 +2120,11 @@ quote_822_local.o: quote_822_local.c
 quote_822_local.o: quote_822_local.h
 quote_822_local.o: quote_flags.h
 rcpt_buf.o: ../../include/attr.h
+rcpt_buf.o: ../../include/check_arg.h
+rcpt_buf.o: ../../include/htable.h
 rcpt_buf.o: ../../include/iostuff.h
 rcpt_buf.o: ../../include/mymalloc.h
+rcpt_buf.o: ../../include/nvtable.h
 rcpt_buf.o: ../../include/sys_defs.h
 rcpt_buf.o: ../../include/vbuf.h
 rcpt_buf.o: ../../include/vstream.h
@@ -2011,10 +2134,15 @@ rcpt_buf.o: rcpt_buf.c
 rcpt_buf.o: rcpt_buf.h
 rcpt_buf.o: recipient_list.h
 rcpt_print.o: ../../include/attr.h
+rcpt_print.o: ../../include/check_arg.h
+rcpt_print.o: ../../include/htable.h
 rcpt_print.o: ../../include/iostuff.h
+rcpt_print.o: ../../include/mymalloc.h
+rcpt_print.o: ../../include/nvtable.h
 rcpt_print.o: ../../include/sys_defs.h
 rcpt_print.o: ../../include/vbuf.h
 rcpt_print.o: ../../include/vstream.h
+rcpt_print.o: ../../include/vstring.h
 rcpt_print.o: mail_proto.h
 rcpt_print.o: rcpt_print.c
 rcpt_print.o: rcpt_print.h
@@ -2028,10 +2156,15 @@ rec2stream.o: rec_streamlf.h
 rec2stream.o: rec_type.h
 rec2stream.o: record.h
 rec_attr_map.o: ../../include/attr.h
+rec_attr_map.o: ../../include/check_arg.h
+rec_attr_map.o: ../../include/htable.h
 rec_attr_map.o: ../../include/iostuff.h
+rec_attr_map.o: ../../include/mymalloc.h
+rec_attr_map.o: ../../include/nvtable.h
 rec_attr_map.o: ../../include/sys_defs.h
 rec_attr_map.o: ../../include/vbuf.h
 rec_attr_map.o: ../../include/vstream.h
+rec_attr_map.o: ../../include/vstring.h
 rec_attr_map.o: mail_proto.h
 rec_attr_map.o: rec_attr_map.c
 rec_attr_map.o: rec_attr_map.h
@@ -2078,9 +2211,13 @@ remove.o: ../../include/warn_stat.h
 remove.o: mail_params.h
 remove.o: remove.c
 resolve_clnt.o: ../../include/attr.h
+resolve_clnt.o: ../../include/check_arg.h
 resolve_clnt.o: ../../include/events.h
+resolve_clnt.o: ../../include/htable.h
 resolve_clnt.o: ../../include/iostuff.h
 resolve_clnt.o: ../../include/msg.h
+resolve_clnt.o: ../../include/mymalloc.h
+resolve_clnt.o: ../../include/nvtable.h
 resolve_clnt.o: ../../include/sys_defs.h
 resolve_clnt.o: ../../include/vbuf.h
 resolve_clnt.o: ../../include/vstream.h
@@ -2111,9 +2248,13 @@ resolve_local.o: resolve_local.h
 resolve_local.o: string_list.h
 resolve_local.o: valid_mailhost_addr.h
 rewrite_clnt.o: ../../include/attr.h
+rewrite_clnt.o: ../../include/check_arg.h
 rewrite_clnt.o: ../../include/events.h
+rewrite_clnt.o: ../../include/htable.h
 rewrite_clnt.o: ../../include/iostuff.h
 rewrite_clnt.o: ../../include/msg.h
+rewrite_clnt.o: ../../include/mymalloc.h
+rewrite_clnt.o: ../../include/nvtable.h
 rewrite_clnt.o: ../../include/sys_defs.h
 rewrite_clnt.o: ../../include/vbuf.h
 rewrite_clnt.o: ../../include/vstream.h
@@ -2145,9 +2286,12 @@ scache.o: scache.c
 scache.o: scache.h
 scache_clnt.o: ../../include/attr.h
 scache_clnt.o: ../../include/auto_clnt.h
+scache_clnt.o: ../../include/check_arg.h
+scache_clnt.o: ../../include/htable.h
 scache_clnt.o: ../../include/iostuff.h
 scache_clnt.o: ../../include/msg.h
 scache_clnt.o: ../../include/mymalloc.h
+scache_clnt.o: ../../include/nvtable.h
 scache_clnt.o: ../../include/stringops.h
 scache_clnt.o: ../../include/sys_defs.h
 scache_clnt.o: ../../include/vbuf.h
@@ -2176,7 +2320,11 @@ scache_single.o: ../../include/vstring.h
 scache_single.o: scache.h
 scache_single.o: scache_single.c
 sent.o: ../../include/attr.h
+sent.o: ../../include/check_arg.h
+sent.o: ../../include/htable.h
 sent.o: ../../include/msg.h
+sent.o: ../../include/mymalloc.h
+sent.o: ../../include/nvtable.h
 sent.o: ../../include/sys_defs.h
 sent.o: ../../include/vbuf.h
 sent.o: ../../include/vstream.h
@@ -2233,9 +2381,13 @@ smtp_stream.o: ../../include/vstring_vstream.h
 smtp_stream.o: smtp_stream.c
 smtp_stream.o: smtp_stream.h
 smtputf8.o: ../../include/attr.h
+smtputf8.o: ../../include/check_arg.h
+smtputf8.o: ../../include/htable.h
 smtputf8.o: ../../include/iostuff.h
 smtputf8.o: ../../include/msg.h
+smtputf8.o: ../../include/mymalloc.h
 smtputf8.o: ../../include/name_mask.h
+smtputf8.o: ../../include/nvtable.h
 smtputf8.o: ../../include/sys_defs.h
 smtputf8.o: ../../include/vbuf.h
 smtputf8.o: ../../include/vstream.h
@@ -2314,8 +2466,12 @@ tok822_resolve.o: resolve_clnt.h
 tok822_resolve.o: tok822.h
 tok822_resolve.o: tok822_resolve.c
 tok822_rewrite.o: ../../include/attr.h
+tok822_rewrite.o: ../../include/check_arg.h
+tok822_rewrite.o: ../../include/htable.h
 tok822_rewrite.o: ../../include/iostuff.h
 tok822_rewrite.o: ../../include/msg.h
+tok822_rewrite.o: ../../include/mymalloc.h
+tok822_rewrite.o: ../../include/nvtable.h
 tok822_rewrite.o: ../../include/sys_defs.h
 tok822_rewrite.o: ../../include/vbuf.h
 tok822_rewrite.o: ../../include/vstream.h
@@ -2333,8 +2489,12 @@ tok822_tree.o: resolve_clnt.h
 tok822_tree.o: tok822.h
 tok822_tree.o: tok822_tree.c
 trace.o: ../../include/attr.h
+trace.o: ../../include/check_arg.h
+trace.o: ../../include/htable.h
 trace.o: ../../include/iostuff.h
 trace.o: ../../include/msg.h
+trace.o: ../../include/mymalloc.h
+trace.o: ../../include/nvtable.h
 trace.o: ../../include/sys_defs.h
 trace.o: ../../include/vbuf.h
 trace.o: ../../include/vstream.h
@@ -2378,8 +2538,12 @@ valid_mailhost_addr.o: ../../include/valid_hostname.h
 valid_mailhost_addr.o: valid_mailhost_addr.c
 valid_mailhost_addr.o: valid_mailhost_addr.h
 verify.o: ../../include/attr.h
+verify.o: ../../include/check_arg.h
+verify.o: ../../include/htable.h
 verify.o: ../../include/iostuff.h
 verify.o: ../../include/msg.h
+verify.o: ../../include/mymalloc.h
+verify.o: ../../include/nvtable.h
 verify.o: ../../include/sys_defs.h
 verify.o: ../../include/vbuf.h
 verify.o: ../../include/vstream.h
@@ -2395,8 +2559,12 @@ verify.o: verify.c
 verify.o: verify.h
 verify.o: verify_clnt.h
 verify_clnt.o: ../../include/attr.h
+verify_clnt.o: ../../include/check_arg.h
+verify_clnt.o: ../../include/htable.h
 verify_clnt.o: ../../include/iostuff.h
 verify_clnt.o: ../../include/msg.h
+verify_clnt.o: ../../include/mymalloc.h
+verify_clnt.o: ../../include/nvtable.h
 verify_clnt.o: ../../include/sys_defs.h
 verify_clnt.o: ../../include/vbuf.h
 verify_clnt.o: ../../include/vstream.h
@@ -2411,9 +2579,13 @@ verify_clnt.o: recipient_list.h
 verify_clnt.o: verify_clnt.c
 verify_clnt.o: verify_clnt.h
 verify_sender_addr.o: ../../include/attr.h
+verify_sender_addr.o: ../../include/check_arg.h
 verify_sender_addr.o: ../../include/events.h
+verify_sender_addr.o: ../../include/htable.h
 verify_sender_addr.o: ../../include/iostuff.h
 verify_sender_addr.o: ../../include/msg.h
+verify_sender_addr.o: ../../include/mymalloc.h
+verify_sender_addr.o: ../../include/nvtable.h
 verify_sender_addr.o: ../../include/sys_defs.h
 verify_sender_addr.o: ../../include/vbuf.h
 verify_sender_addr.o: ../../include/vstream.h
index 4f1e96e98bcf9234928549ca1ced771def1cb7eb..efbf1050f1cd203a9678210896927075babf4d49 100644 (file)
@@ -255,7 +255,7 @@ static void abounce_event(int event, void *context)
     ABOUNCE_EVENT_DISABLE(vstream_fileno(ap->fp), abounce_event, context);
     abounce_done(ap, (event != EVENT_TIME
                      && attr_scan(ap->fp, ATTR_FLAG_STRICT,
-                                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                                  RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                                   ATTR_TYPE_END) == 1) ? status : -1);
 }
 
@@ -288,16 +288,16 @@ static void abounce_request_verp(const char *class, const char *service,
     ap->fp = mail_connect_wait(class, service);
 
     if (attr_print(ap->fp, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_NREQ, command,
-                  ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                  ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                  ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                  ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                  ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                  ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                  ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
-                  ATTR_TYPE_STR, MAIL_ATTR_VERPDL, verp,
+                  SEND_ATTR_INT(MAIL_ATTR_NREQ, command),
+                  SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                  SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                  SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                  SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                  SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                  SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                  SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
+                  SEND_ATTR_STR(MAIL_ATTR_VERPDL, verp),
                   ATTR_TYPE_END) == 0
        && vstream_fflush(ap->fp) == 0) {
        ABOUNCE_EVENT_ENABLE(vstream_fileno(ap->fp), abounce_event,
@@ -360,15 +360,15 @@ static void abounce_request(const char *class, const char *service,
     ap->fp = mail_connect_wait(class, service);
 
     if (attr_print(ap->fp, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_NREQ, command,
-                  ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                  ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                  ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                  ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                  ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                  ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                  ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
+                  SEND_ATTR_INT(MAIL_ATTR_NREQ, command),
+                  SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                  SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                  SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                  SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                  SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                  SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                  SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
                   ATTR_TYPE_END) == 0
        && vstream_fflush(ap->fp) == 0) {
        ABOUNCE_EVENT_ENABLE(vstream_fileno(ap->fp), abounce_event,
index 02ecac2f9c9a99900935aa3396f45a366a696d59..34d3c0f3107012de3c29ee4e549b039decf8808e 100644 (file)
@@ -188,16 +188,16 @@ int     anvil_clnt_lookup(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_LOOKUP,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_LOOKUP),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, ANVIL_ATTR_COUNT, count,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RATE, rate,
-                         ATTR_TYPE_INT, ANVIL_ATTR_MAIL, msgs,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RCPT, rcpts,
-                         ATTR_TYPE_INT, ANVIL_ATTR_NTLS, newtls,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(ANVIL_ATTR_COUNT, count),
+                         RECV_ATTR_INT(ANVIL_ATTR_RATE, rate),
+                         RECV_ATTR_INT(ANVIL_ATTR_MAIL, msgs),
+                         RECV_ATTR_INT(ANVIL_ATTR_RCPT, rcpts),
+                         RECV_ATTR_INT(ANVIL_ATTR_NTLS, newtls),
                          ATTR_TYPE_END) != 6)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
@@ -216,13 +216,13 @@ int     anvil_clnt_connect(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_CONN,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_CONN),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, ANVIL_ATTR_COUNT, count,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RATE, rate,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(ANVIL_ATTR_COUNT, count),
+                         RECV_ATTR_INT(ANVIL_ATTR_RATE, rate),
                          ATTR_TYPE_END) != 3)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
@@ -241,12 +241,12 @@ int     anvil_clnt_mail(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_MAIL,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_MAIL),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RATE, msgs,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(ANVIL_ATTR_RATE, msgs),
                          ATTR_TYPE_END) != 2)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
@@ -265,12 +265,12 @@ int     anvil_clnt_rcpt(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_RCPT,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_RCPT),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RATE, rcpts,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(ANVIL_ATTR_RATE, rcpts),
                          ATTR_TYPE_END) != 2)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
@@ -289,12 +289,12 @@ int     anvil_clnt_newtls(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_NTLS,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_NTLS),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RATE, newtls,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(ANVIL_ATTR_RATE, newtls),
                          ATTR_TYPE_END) != 2)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
@@ -313,12 +313,12 @@ int     anvil_clnt_newtls_stat(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_NTLS_STAT,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_NTLS_STAT),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, ANVIL_ATTR_RATE, newtls,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(ANVIL_ATTR_RATE, newtls),
                          ATTR_TYPE_END) != 2)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
@@ -337,11 +337,11 @@ int     anvil_clnt_disconnect(ANVIL_CLNT *anvil_clnt, const char *service,
 
     if (attr_clnt_request((ATTR_CLNT *) anvil_clnt,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                         ATTR_TYPE_STR, ANVIL_ATTR_REQ, ANVIL_REQ_DISC,
-                         ATTR_TYPE_STR, ANVIL_ATTR_IDENT, ident,
+                         SEND_ATTR_STR(ANVIL_ATTR_REQ, ANVIL_REQ_DISC),
+                         SEND_ATTR_STR(ANVIL_ATTR_IDENT, ident),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_INT, ANVIL_ATTR_STATUS, &status,
+                         RECV_ATTR_INT(ANVIL_ATTR_STATUS, &status),
                          ATTR_TYPE_END) != 1)
        status = ANVIL_STAT_FAIL;
     else if (status != ANVIL_STAT_OK)
index e45d9427a15e84b830b1b01b4f86e699d2289da8..134bcd248f5d0dccf65d6d56bfcfaebe623ea15f 100644 (file)
@@ -310,11 +310,11 @@ int     bounce_append_intern(int flags, const char *id, MSG_STATS *stats,
 
        if (mail_command_client(MAIL_CLASS_PRIVATE, var_soft_bounce ?
                                var_defer_service : var_bounce_service,
-                          ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND,
-                               ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                               ATTR_TYPE_FUNC, rcpt_print, (void *) rcpt,
-                               ATTR_TYPE_FUNC, dsn_print, (void *) &my_dsn,
+                          SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND),
+                               SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                               SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                               SEND_ATTR_FUNC(rcpt_print, (void *) rcpt),
+                               SEND_ATTR_FUNC(dsn_print, (void *) &my_dsn),
                                ATTR_TYPE_END) == 0
            && ((flags & DEL_REQ_FLAG_RECORD) == 0
                || trace_append(flags, id, stats, rcpt, relay,
@@ -353,15 +353,15 @@ int     bounce_flush(int flags, const char *queue, const char *id,
     if (var_soft_bounce)
        return (-1);
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_bounce_service,
-                           ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_FLUSH,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
+                           SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_FLUSH),
+                           SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                           SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                           SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
                            ATTR_TYPE_END) == 0) {
        return (0);
     } else if ((flags & BOUNCE_FLAG_CLEAN) == 0) {
@@ -387,16 +387,16 @@ int     bounce_flush_verp(int flags, const char *queue, const char *id,
     if (var_soft_bounce)
        return (-1);
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_bounce_service,
-                           ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_VERP,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
-                           ATTR_TYPE_STR, MAIL_ATTR_VERPDL, verp_delims,
+                           SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_VERP),
+                           SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                           SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                           SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
+                           SEND_ATTR_STR(MAIL_ATTR_VERPDL, verp_delims),
                            ATTR_TYPE_END) == 0) {
        return (0);
     } else if ((flags & BOUNCE_FLAG_CLEAN) == 0) {
@@ -494,17 +494,17 @@ int     bounce_one_intern(int flags, const char *queue, const char *id,
        my_dsn.action = "failed";
 
        if (mail_command_client(MAIL_CLASS_PRIVATE, var_bounce_service,
-                             ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_ONE,
-                               ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                               ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                               ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                               ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                               ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                             ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                               ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
-                               ATTR_TYPE_FUNC, rcpt_print, (void *) rcpt,
-                               ATTR_TYPE_FUNC, dsn_print, (void *) &my_dsn,
+                             SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_ONE),
+                               SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                               SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                               SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                               SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                               SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                               SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                             SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                               SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
+                               SEND_ATTR_FUNC(rcpt_print, (void *) rcpt),
+                               SEND_ATTR_FUNC(dsn_print, (void *) &my_dsn),
                                ATTR_TYPE_END) == 0
            && ((flags & DEL_REQ_FLAG_RECORD) == 0
                || trace_append(flags, id, stats, rcpt, relay,
index 110d2fc91fba8d24f5d7e222fe90e1aa1a448860..7b5c0ae8e8811f83b1f096434671508b40354f76 100644 (file)
@@ -25,7 +25,7 @@
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*
-/*     int     defer_warn(flags, queue, id, encoding, smtputf8, sender, 
+/*     int     defer_warn(flags, queue, id, encoding, smtputf8, sender,
                                dsn_envid, dsn_ret)
 /*     int     flags;
 /*     const char *queue;
@@ -257,11 +257,11 @@ int     defer_append_intern(int flags, const char *id, MSG_STATS *stats,
        my_dsn.action = "delayed";
 
        if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
-                          ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND,
-                               ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                               ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                               ATTR_TYPE_FUNC, rcpt_print, (void *) rcpt,
-                               ATTR_TYPE_FUNC, dsn_print, (void *) &my_dsn,
+                          SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND),
+                               SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                               SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                               SEND_ATTR_FUNC(rcpt_print, (void *) rcpt),
+                               SEND_ATTR_FUNC(dsn_print, (void *) &my_dsn),
                                ATTR_TYPE_END) != 0)
            msg_warn("%s: %s service failure", id, var_defer_service);
        log_adhoc(id, stats, rcpt, relay, &my_dsn, "deferred");
@@ -301,15 +301,15 @@ int     defer_flush(int flags, const char *queue, const char *id,
     flags |= BOUNCE_FLAG_DELRCPT;
 
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
-                           ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_FLUSH,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
+                           SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_FLUSH),
+                           SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                           SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                           SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
                            ATTR_TYPE_END) == 0) {
        return (0);
     } else {
@@ -321,19 +321,19 @@ int     defer_flush(int flags, const char *queue, const char *id,
  * do not flush the log */
 
 int     defer_warn(int flags, const char *queue, const char *id,
-                       const char *encoding, int smtputf8,
+                          const char *encoding, int smtputf8,
                         const char *sender, const char *envid, int dsn_ret)
 {
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
-                           ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_WARN,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
+                           SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_WARN),
+                           SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                           SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+                           SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, envid),
+                           SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
                            ATTR_TYPE_END) == 0) {
        return (0);
     } else {
index 01b70b942056e247b7af1282e9cec10e7a2644a3..e2112bafced8d75f074aa908c76a5e6be2b8ba07 100644 (file)
@@ -81,7 +81,7 @@ static int deliver_pass_initial_reply(VSTREAM *stream)
     int     stat;
 
     if (attr_scan(stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_INT, MAIL_ATTR_STATUS, &stat,
+                 RECV_ATTR_INT(MAIL_ATTR_STATUS, &stat),
                  ATTR_TYPE_END) != 1) {
        msg_warn("%s: malformed response", VSTREAM_PATH(stream));
        stat = -1;
@@ -98,35 +98,35 @@ static int deliver_pass_send_request(VSTREAM *stream, DELIVER_REQUEST *request,
     int     stat;
 
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, request->flags,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUE, request->queue_name,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, request->queue_id,
-              ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, request->data_offset,
-              ATTR_TYPE_LONG, MAIL_ATTR_SIZE, request->data_size,
-              ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, nexthop,
-              ATTR_TYPE_STR, MAIL_ATTR_ENCODING, request->encoding,
-              ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, request->smtputf8,
-              ATTR_TYPE_STR, MAIL_ATTR_SENDER, request->sender,
-              ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, request->dsn_envid,
-              ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, request->dsn_ret,
-              ATTR_TYPE_FUNC, msg_stats_print, (void *) &request->msg_stats,
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, request->flags),
+              SEND_ATTR_STR(MAIL_ATTR_QUEUE, request->queue_name),
+              SEND_ATTR_STR(MAIL_ATTR_QUEUEID, request->queue_id),
+              SEND_ATTR_LONG(MAIL_ATTR_OFFSET, request->data_offset),
+              SEND_ATTR_LONG(MAIL_ATTR_SIZE, request->data_size),
+              SEND_ATTR_STR(MAIL_ATTR_NEXTHOP, nexthop),
+              SEND_ATTR_STR(MAIL_ATTR_ENCODING, request->encoding),
+              SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, request->smtputf8),
+              SEND_ATTR_STR(MAIL_ATTR_SENDER, request->sender),
+              SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, request->dsn_envid),
+              SEND_ATTR_INT(MAIL_ATTR_DSN_RET, request->dsn_ret),
+              SEND_ATTR_FUNC(msg_stats_print, (void *) &request->msg_stats),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_NAME, request->client_name,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_ADDR, request->client_addr,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_PORT, request->client_port,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_PROTO_NAME, request->client_proto,
-              ATTR_TYPE_STR, MAIL_ATTR_LOG_HELO_NAME, request->client_helo,
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_NAME, request->client_name),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_ADDR, request->client_addr),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_PORT, request->client_port),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_PROTO_NAME, request->client_proto),
+              SEND_ATTR_STR(MAIL_ATTR_LOG_HELO_NAME, request->client_helo),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-              ATTR_TYPE_STR, MAIL_ATTR_SASL_METHOD, request->sasl_method,
-            ATTR_TYPE_STR, MAIL_ATTR_SASL_USERNAME, request->sasl_username,
-              ATTR_TYPE_STR, MAIL_ATTR_SASL_SENDER, request->sasl_sender,
+              SEND_ATTR_STR(MAIL_ATTR_SASL_METHOD, request->sasl_method),
+            SEND_ATTR_STR(MAIL_ATTR_SASL_USERNAME, request->sasl_username),
+              SEND_ATTR_STR(MAIL_ATTR_SASL_SENDER, request->sasl_sender),
     /* XXX Ditto if we want to pass TLS certificate info. */
-              ATTR_TYPE_STR, MAIL_ATTR_LOG_IDENT, request->log_ident,
-            ATTR_TYPE_STR, MAIL_ATTR_RWR_CONTEXT, request->rewrite_context,
-              ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT, 1,
+              SEND_ATTR_STR(MAIL_ATTR_LOG_IDENT, request->log_ident),
+            SEND_ATTR_STR(MAIL_ATTR_RWR_CONTEXT, request->rewrite_context),
+              SEND_ATTR_INT(MAIL_ATTR_RCPT_COUNT, 1),
               ATTR_TYPE_END);
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_FUNC, rcpt_print, (void *) rcpt,
+              SEND_ATTR_FUNC(rcpt_print, (void *) rcpt),
               ATTR_TYPE_END);
 
     if (vstream_fflush(stream)) {
@@ -145,8 +145,8 @@ static int deliver_pass_final_reply(VSTREAM *stream, DSN_BUF *dsb)
     int     stat;
 
     if (attr_scan(stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_FUNC, dsb_scan, (void *) dsb,
-                 ATTR_TYPE_INT, MAIL_ATTR_STATUS, &stat,
+                 RECV_ATTR_FUNC(dsb_scan, (void *) dsb),
+                 RECV_ATTR_INT(MAIL_ATTR_STATUS, &stat),
                  ATTR_TYPE_END) != 2) {
        msg_warn("%s: malformed response", VSTREAM_PATH(stream));
        return (DELIVER_PASS_UNKNOWN);
index 087170bbe7b97b0be030c4b2676b955ecf1ee827..f5c775ab2a26a77dd92952bb83fc486ab4c24401 100644 (file)
@@ -137,7 +137,7 @@ static int deliver_request_initial(VSTREAM *stream)
     if (msg_verbose)
        msg_info("deliver_request_initial: send initial status");
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, 0,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, 0),
               ATTR_TYPE_END);
     if ((err = vstream_fflush(stream)) != 0)
        if (msg_verbose)
@@ -165,8 +165,8 @@ static int deliver_request_final(VSTREAM *stream, DELIVER_REQUEST *request,
        msg_info("deliver_request_final: send: \"%s\" %d",
                 hop_status->reason, status);
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_FUNC, dsn_print, (void *) hop_status,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+              SEND_ATTR_FUNC(dsn_print, (void *) hop_status),
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
               ATTR_TYPE_END);
     if ((err = vstream_fflush(stream)) != 0)
        if (msg_verbose)
@@ -241,32 +241,32 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
      * the conversation when they send bad information.
      */
     if (attr_scan(stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request->flags,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
-                 ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, &request->data_offset,
-                 ATTR_TYPE_LONG, MAIL_ATTR_SIZE, &request->data_size,
-                 ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, nexthop,
-                 ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                 ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
-                 ATTR_TYPE_STR, MAIL_ATTR_SENDER, address,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                 ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
-              ATTR_TYPE_FUNC, msg_stats_scan, (void *) &request->msg_stats,
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &request->flags),
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUE, queue_name),
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
+                 RECV_ATTR_LONG(MAIL_ATTR_OFFSET, &request->data_offset),
+                 RECV_ATTR_LONG(MAIL_ATTR_SIZE, &request->data_size),
+                 RECV_ATTR_STR(MAIL_ATTR_NEXTHOP, nexthop),
+                 RECV_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                 RECV_ATTR_INT(MAIL_ATTR_SMTPUTF8, &smtputf8),
+                 RECV_ATTR_STR(MAIL_ATTR_SENDER, address),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                 RECV_ATTR_INT(MAIL_ATTR_DSN_RET, &dsn_ret),
+              RECV_ATTR_FUNC(msg_stats_scan, (void *) &request->msg_stats),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-                 ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_NAME, client_name,
-                 ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_ADDR, client_addr,
-                 ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_PORT, client_port,
-                 ATTR_TYPE_STR, MAIL_ATTR_LOG_PROTO_NAME, client_proto,
-                 ATTR_TYPE_STR, MAIL_ATTR_LOG_HELO_NAME, client_helo,
+                 RECV_ATTR_STR(MAIL_ATTR_LOG_CLIENT_NAME, client_name),
+                 RECV_ATTR_STR(MAIL_ATTR_LOG_CLIENT_ADDR, client_addr),
+                 RECV_ATTR_STR(MAIL_ATTR_LOG_CLIENT_PORT, client_port),
+                 RECV_ATTR_STR(MAIL_ATTR_LOG_PROTO_NAME, client_proto),
+                 RECV_ATTR_STR(MAIL_ATTR_LOG_HELO_NAME, client_helo),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-                 ATTR_TYPE_STR, MAIL_ATTR_SASL_METHOD, sasl_method,
-                 ATTR_TYPE_STR, MAIL_ATTR_SASL_USERNAME, sasl_username,
-                 ATTR_TYPE_STR, MAIL_ATTR_SASL_SENDER, sasl_sender,
+                 RECV_ATTR_STR(MAIL_ATTR_SASL_METHOD, sasl_method),
+                 RECV_ATTR_STR(MAIL_ATTR_SASL_USERNAME, sasl_username),
+                 RECV_ATTR_STR(MAIL_ATTR_SASL_SENDER, sasl_sender),
     /* XXX Ditto if we want to pass TLS certificate info. */
-                 ATTR_TYPE_STR, MAIL_ATTR_LOG_IDENT, log_ident,
-                 ATTR_TYPE_STR, MAIL_ATTR_RWR_CONTEXT, rewrite_context,
-                 ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT, &rcpt_count,
+                 RECV_ATTR_STR(MAIL_ATTR_LOG_IDENT, log_ident),
+                 RECV_ATTR_STR(MAIL_ATTR_RWR_CONTEXT, rewrite_context),
+                 RECV_ATTR_INT(MAIL_ATTR_RCPT_COUNT, &rcpt_count),
                  ATTR_TYPE_END) != 23) {
        msg_warn("%s: error receiving common attributes", myname);
        return (-1);
@@ -305,7 +305,7 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
      */
     while (rcpt_count-- > 0) {
        if (attr_scan(stream, ATTR_FLAG_STRICT,
-                     ATTR_TYPE_FUNC, rcpb_scan, (void *) rcpt_buf,
+                     RECV_ATTR_FUNC(rcpb_scan, (void *) rcpt_buf),
                      ATTR_TYPE_END) != 1) {
            msg_warn("%s: error receiving recipient attributes", myname);
            return (-1);
index 86682f84d822d5d18865e5647398e886e4319e89..29410d7851b331bad6f954804dc7274de0303718 100644 (file)
@@ -119,16 +119,16 @@ static int dict_proxy_sequence(DICT *dict, int function,
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, PROXY_REQ_SEQUENCE,
-                      ATTR_TYPE_STR, MAIL_ATTR_TABLE, dict->name,
-                      ATTR_TYPE_INT, MAIL_ATTR_FLAGS, request_flags,
-                      ATTR_TYPE_INT, MAIL_ATTR_FUNC, function,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, PROXY_REQ_SEQUENCE),
+                      SEND_ATTR_STR(MAIL_ATTR_TABLE, dict->name),
+                      SEND_ATTR_INT(MAIL_ATTR_FLAGS, request_flags),
+                      SEND_ATTR_INT(MAIL_ATTR_FUNC, function),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                        ATTR_TYPE_STR, MAIL_ATTR_KEY, dict_proxy->reskey,
-                        ATTR_TYPE_STR, MAIL_ATTR_VALUE, dict_proxy->result,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                        RECV_ATTR_STR(MAIL_ATTR_KEY, dict_proxy->reskey),
+                        RECV_ATTR_STR(MAIL_ATTR_VALUE, dict_proxy->result),
                         ATTR_TYPE_END) != 3) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                msg_warn("%s: service %s: %m", myname, VSTREAM_PATH(stream));
@@ -194,15 +194,15 @@ static const char *dict_proxy_lookup(DICT *dict, const char *key)
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, PROXY_REQ_LOOKUP,
-                      ATTR_TYPE_STR, MAIL_ATTR_TABLE, dict->name,
-                      ATTR_TYPE_INT, MAIL_ATTR_FLAGS, request_flags,
-                      ATTR_TYPE_STR, MAIL_ATTR_KEY, key,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, PROXY_REQ_LOOKUP),
+                      SEND_ATTR_STR(MAIL_ATTR_TABLE, dict->name),
+                      SEND_ATTR_INT(MAIL_ATTR_FLAGS, request_flags),
+                      SEND_ATTR_STR(MAIL_ATTR_KEY, key),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                        ATTR_TYPE_STR, MAIL_ATTR_VALUE, dict_proxy->result,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                        RECV_ATTR_STR(MAIL_ATTR_VALUE, dict_proxy->result),
                         ATTR_TYPE_END) != 2) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                msg_warn("%s: service %s: %m", myname, VSTREAM_PATH(stream));
@@ -262,15 +262,15 @@ static int dict_proxy_update(DICT *dict, const char *key, const char *value)
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, PROXY_REQ_UPDATE,
-                      ATTR_TYPE_STR, MAIL_ATTR_TABLE, dict->name,
-                      ATTR_TYPE_INT, MAIL_ATTR_FLAGS, request_flags,
-                      ATTR_TYPE_STR, MAIL_ATTR_KEY, key,
-                      ATTR_TYPE_STR, MAIL_ATTR_VALUE, value,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, PROXY_REQ_UPDATE),
+                      SEND_ATTR_STR(MAIL_ATTR_TABLE, dict->name),
+                      SEND_ATTR_INT(MAIL_ATTR_FLAGS, request_flags),
+                      SEND_ATTR_STR(MAIL_ATTR_KEY, key),
+                      SEND_ATTR_STR(MAIL_ATTR_VALUE, value),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                         ATTR_TYPE_END) != 1) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                msg_warn("%s: service %s: %m", myname, VSTREAM_PATH(stream));
@@ -329,14 +329,14 @@ static int dict_proxy_delete(DICT *dict, const char *key)
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, PROXY_REQ_DELETE,
-                      ATTR_TYPE_STR, MAIL_ATTR_TABLE, dict->name,
-                      ATTR_TYPE_INT, MAIL_ATTR_FLAGS, request_flags,
-                      ATTR_TYPE_STR, MAIL_ATTR_KEY, key,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, PROXY_REQ_DELETE),
+                      SEND_ATTR_STR(MAIL_ATTR_TABLE, dict->name),
+                      SEND_ATTR_INT(MAIL_ATTR_FLAGS, request_flags),
+                      SEND_ATTR_STR(MAIL_ATTR_KEY, key),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                         ATTR_TYPE_END) != 1) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno !=
                                             ENOENT))
@@ -465,14 +465,14 @@ DICT   *dict_proxy_open(const char *map, int open_flags, int dict_flags)
        stream = clnt_stream_access(dict_proxy->clnt);
        errno = 0;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, PROXY_REQ_OPEN,
-                      ATTR_TYPE_STR, MAIL_ATTR_TABLE, dict_proxy->dict.name,
-                    ATTR_TYPE_INT, MAIL_ATTR_FLAGS, dict_proxy->inst_flags,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, PROXY_REQ_OPEN),
+                      SEND_ATTR_STR(MAIL_ATTR_TABLE, dict_proxy->dict.name),
+                    SEND_ATTR_INT(MAIL_ATTR_FLAGS, dict_proxy->inst_flags),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                        ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &server_flags,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                        RECV_ATTR_INT(MAIL_ATTR_FLAGS, &server_flags),
                         ATTR_TYPE_END) != 2) {
            if (msg_verbose || (errno != EPIPE && errno != ENOENT))
                msg_warn("%s: service %s: %m", VSTREAM_PATH(stream), myname);
index 8331022c5235e23e9b146fe486791831944b4c5f..e99c4436b9fef55f36d3863235f4e2d70f0077dc 100644 (file)
@@ -16,7 +16,7 @@
 /*     specified attribute scan routine. dsb_scan() is meant
 /*     to be passed as a call-back to attr_scan(), thusly:
 /*
-/*     ... ATTR_TYPE_FUNC, dsb_scan, (void *) &dsbuf, ...
+/*     ... RECV_ATTR_FUNC(dsb_scan, (void *) &dsbuf), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -56,13 +56,13 @@ int     dsb_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
      * be sanitized after all the ad-hoc DSN read/write code is replaced.
      */
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_STATUS, dsb->status,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_DTYPE, dsb->dtype,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_DTEXT, dsb->dtext,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_MTYPE, dsb->mtype,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_MNAME, dsb->mname,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_ACTION, dsb->action,
-                 ATTR_TYPE_STR, MAIL_ATTR_WHY, dsb->reason,
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_STATUS, dsb->status),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_DTYPE, dsb->dtype),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_DTEXT, dsb->dtext),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_MTYPE, dsb->mtype),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_MNAME, dsb->mname),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_ACTION, dsb->action),
+                 RECV_ATTR_STR(MAIL_ATTR_WHY, dsb->reason),
                  ATTR_TYPE_END);
     return (ret == 7 ? 1 : -1);
 }
index 58f06a34c7728ecb967d90106560a5b21cd15bb8..369804839c2738952bf1ed74953daf443551a838 100644 (file)
@@ -16,7 +16,7 @@
 /*     the specified attribute print routine. dsn_print() is meant
 /*     to be passed as a call-back to attr_print(), thusly:
 /*
-/*     ... ATTR_TYPE_FUNC, dsn_print, (void *) dsn, ...
+/*     ... SEND_ATTR_FUNC(dsn_print, (void *) dsn), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -56,13 +56,13 @@ int     dsn_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
      * be sanitized after all the ad-hoc DSN read/write code is replaced.
      */
     ret = print_fn(fp, flags | ATTR_FLAG_MORE,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_STATUS, dsn->status,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_DTYPE, dsn->dtype,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_DTEXT, dsn->dtext,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_MTYPE, dsn->mtype,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_MNAME, dsn->mname,
-                  ATTR_TYPE_STR, MAIL_ATTR_DSN_ACTION, dsn->action,
-                  ATTR_TYPE_STR, MAIL_ATTR_WHY, dsn->reason,
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_STATUS, dsn->status),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_DTYPE, dsn->dtype),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_DTEXT, dsn->dtext),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_MTYPE, dsn->mtype),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_MNAME, dsn->mname),
+                  SEND_ATTR_STR(MAIL_ATTR_DSN_ACTION, dsn->action),
+                  SEND_ATTR_STR(MAIL_ATTR_WHY, dsn->reason),
                   ATTR_TYPE_END);
     return (ret);
 }
index 898181293b1c363475a65b1b1cfa6aba0f4716aa..07985dc2073ac7904cc9ab5b070ebbdc375ed7a1 100644 (file)
@@ -125,7 +125,7 @@ int     flush_purge(void)
        status = FLUSH_STAT_DENY;
     else
        status = mail_command_client(MAIL_CLASS_PUBLIC, var_flush_service,
-                             ATTR_TYPE_STR, MAIL_ATTR_REQ, FLUSH_REQ_PURGE,
+                             SEND_ATTR_STR(MAIL_ATTR_REQ, FLUSH_REQ_PURGE),
                                     ATTR_TYPE_END);
 
     if (msg_verbose)
@@ -151,7 +151,7 @@ int     flush_refresh(void)
        status = FLUSH_STAT_DENY;
     else
        status = mail_command_client(MAIL_CLASS_PUBLIC, var_flush_service,
-                           ATTR_TYPE_STR, MAIL_ATTR_REQ, FLUSH_REQ_REFRESH,
+                           SEND_ATTR_STR(MAIL_ATTR_REQ, FLUSH_REQ_REFRESH),
                                     ATTR_TYPE_END);
 
     if (msg_verbose)
@@ -182,8 +182,8 @@ int     flush_send_site(const char *site)
                     VAR_RELAY_DOMAINS "=$mydestination to flush "
                     "mail for domain \"%s\"", site);
        status = mail_command_client(MAIL_CLASS_PUBLIC, var_flush_service,
-                         ATTR_TYPE_STR, MAIL_ATTR_REQ, FLUSH_REQ_SEND_SITE,
-                                    ATTR_TYPE_STR, MAIL_ATTR_SITE, site,
+                         SEND_ATTR_STR(MAIL_ATTR_REQ, FLUSH_REQ_SEND_SITE),
+                                    SEND_ATTR_STR(MAIL_ATTR_SITE, site),
                                     ATTR_TYPE_END);
     } else if (flush_domains->error == 0)
        status = FLUSH_STAT_DENY;
@@ -210,8 +210,8 @@ int     flush_send_file(const char *queue_id)
      * Require that the service is turned on.
      */
     status = mail_command_client(MAIL_CLASS_PUBLIC, var_flush_service,
-                         ATTR_TYPE_STR, MAIL_ATTR_REQ, FLUSH_REQ_SEND_FILE,
-                                ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
+                         SEND_ATTR_STR(MAIL_ATTR_REQ, FLUSH_REQ_SEND_FILE),
+                                SEND_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
                                 ATTR_TYPE_END);
 
     if (msg_verbose)
@@ -242,9 +242,9 @@ int     flush_add(const char *site, const char *queue_id)
                     VAR_RELAY_DOMAINS "=$mydestination to update "
                     "fast-flush logfile for domain \"%s\"", site);
        status = mail_command_client(MAIL_CLASS_PUBLIC, var_flush_service,
-                               ATTR_TYPE_STR, MAIL_ATTR_REQ, FLUSH_REQ_ADD,
-                                    ATTR_TYPE_STR, MAIL_ATTR_SITE, site,
-                                ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
+                               SEND_ATTR_STR(MAIL_ATTR_REQ, FLUSH_REQ_ADD),
+                                    SEND_ATTR_STR(MAIL_ATTR_SITE, site),
+                                SEND_ATTR_STR(MAIL_ATTR_QUEUEID, queue_id),
                                     ATTR_TYPE_END);
     } else if (flush_domains->error == 0)
        status = FLUSH_STAT_DENY;
index db436097252969f4aa9e88bcac67a8e50c410647..b5cb21c78446cc2b967dfabc807730a928068314 100644 (file)
@@ -75,7 +75,7 @@ int     mail_command_client(const char *class, const char *name,...)
     va_end(ap);
     if (status != 0
        || attr_scan(stream, ATTR_FLAG_STRICT,
-                    ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status, 0) != 1)
+                    RECV_ATTR_INT(MAIL_ATTR_STATUS, &status), 0) != 1)
        status = -1;
     (void) vstream_fclose(stream);
     return (status);
index 941c77db01dca72ac7bc3c99e4ce89c7069ec5ee..f760636ee40e4dbb1498497ce6216da1194c0102 100644 (file)
@@ -378,11 +378,11 @@ static int mail_stream_finish_ipc(MAIL_STREAM *info, VSTRING *why)
      * Receive the peer's completion status.
      */
     if ((why && attr_scan(info->stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                         ATTR_TYPE_STR, MAIL_ATTR_WHY, why,
+                         RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                         RECV_ATTR_STR(MAIL_ATTR_WHY, why),
                          ATTR_TYPE_END) != 2)
        || (!why && attr_scan(info->stream, ATTR_FLAG_MISSING,
-                             ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                             RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                              ATTR_TYPE_END) != 1))
        status = CLEANUP_STAT_WRITE;
 
@@ -441,7 +441,7 @@ MAIL_STREAM *mail_stream_service(const char *class, const char *name)
 
     stream = mail_connect_wait(class, name);
     if (attr_scan(stream, ATTR_FLAG_MISSING,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id_buf, 0) != 1) {
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUEID, id_buf), 0) != 1) {
        vstream_fclose(stream);
        return (0);
     } else {
@@ -493,7 +493,7 @@ MAIL_STREAM *mail_stream_command(const char *command)
                    VSTREAM_CTL_END);
 
     if (attr_scan(stream, ATTR_FLAG_MISSING,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id_buf, 0) != 1) {
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUEID, id_buf), 0) != 1) {
        if ((status = vstream_pclose(stream)) != 0)
            msg_warn("command \"%s\" exited with status %d", command, status);
        return (0);
index c579ef1426de6722b99ea08ba76316792478b510..df9c2fd6cab98eff28d3f44143112f699949c181 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20141214"
+#define MAIL_RELEASE_DATE      "20141221"
 #define MAIL_VERSION_NUMBER    "2.12"
 
 #ifdef SNAPSHOT
index f39b73c99cbeef98e561061174a5083e0899345f..18d2ee26db7719ea522c0d6d3628362141c4d61f 100644 (file)
@@ -17,7 +17,7 @@
 /*     msg_stats_print() is meant to be passed as a call-back to
 /*     attr_print(), thusly:
 /*
-/*     ... ATTR_TYPE_FUNC, msg_stats_print, (void *) stats, ...
+/*     ... SEND_ATTR_FUNC(msg_stats_print, (void *) stats), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -58,7 +58,7 @@ int     msg_stats_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
      * initialize the unused fields by hand.
      */
     ret = print_fn(fp, flags | ATTR_FLAG_MORE,
-                  ATTR_TYPE_DATA, MAIL_ATTR_TIME, sizeof(MSG_STATS), ptr,
+                  SEND_ATTR_DATA(MAIL_ATTR_TIME, sizeof(MSG_STATS), ptr),
                   ATTR_TYPE_END);
     return (ret);
 }
index 3c05ce07e3da8c54a3e0dd77a6fe9df3d24079b7..280d32107fa3c9f0730b5ef109cc14ac65e0b1d1 100644 (file)
@@ -16,7 +16,7 @@
 /*     using the specified attribute scan routine. msg_stats_scan()
 /*     is meant to be passed as a call-back to attr_scan(), thusly:
 /*
-/*     ... ATTR_SCAN_FUNC, msg_stats_scan, (void *) &stats, ...
+/*     ... RECV_ATTR_FUNC(msg_stats_scan, (void *) &stats), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -70,7 +70,7 @@ int     msg_stats_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
      * gracefully reject attempts to extend it.
      */
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
-                 ATTR_TYPE_DATA, MAIL_ATTR_TIME, buf,
+                 RECV_ATTR_DATA(MAIL_ATTR_TIME, buf),
                  ATTR_TYPE_END);
     if (ret == 1) {
        if (LEN(buf) == sizeof(*stats)) {
index 3a1cbc48dceeb6294557a346da78e7c7d8f7d9b2..a267e34c5f2a7d30eea34687a5fac5ad310590a7 100644 (file)
@@ -209,10 +209,10 @@ static void post_mail_init(VSTREAM *stream, const char *sender,
      * Negotiate with the cleanup service. Give up if we can't agree.
      */
     if (attr_scan(stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUEID, id),
                  ATTR_TYPE_END) != 1
        || attr_print(stream, ATTR_FLAG_NONE,
-                     ATTR_TYPE_INT, MAIL_ATTR_FLAGS, cleanup_flags,
+                     SEND_ATTR_INT(MAIL_ATTR_FLAGS, cleanup_flags),
                      ATTR_TYPE_END) != 0)
        msg_fatal("unable to contact the %s service", var_cleanup_service);
 
@@ -425,7 +425,7 @@ int     post_mail_fclose(VSTREAM *cleanup)
        rec_fputs(cleanup, REC_TYPE_END, "");
        if (vstream_fflush(cleanup)
            || attr_scan(cleanup, ATTR_FLAG_MISSING,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                         ATTR_TYPE_END) != 1)
            status = CLEANUP_STAT_WRITE;
     }
index 1da56483b6a4faa13b5966fc4cdfa71e00fcaec6..73175fd0379e87b0f2e15aaad02f2e3be1d7add6 100644 (file)
@@ -126,11 +126,11 @@ int     rcpb_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
      * can be fixed after all the ad-hoc read/write code is replaced.
      */
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
-                 ATTR_TYPE_STR, MAIL_ATTR_ORCPT, rcpt->orig_addr,
-                 ATTR_TYPE_STR, MAIL_ATTR_RECIP, rcpt->address,
-                 ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, &rcpt->offset,
-                 ATTR_TYPE_STR, MAIL_ATTR_DSN_ORCPT, rcpt->dsn_orcpt,
-                 ATTR_TYPE_INT, MAIL_ATTR_DSN_NOTIFY, &rcpt->dsn_notify,
+                 RECV_ATTR_STR(MAIL_ATTR_ORCPT, rcpt->orig_addr),
+                 RECV_ATTR_STR(MAIL_ATTR_RECIP, rcpt->address),
+                 RECV_ATTR_LONG(MAIL_ATTR_OFFSET, &rcpt->offset),
+                 RECV_ATTR_STR(MAIL_ATTR_DSN_ORCPT, rcpt->dsn_orcpt),
+                 RECV_ATTR_INT(MAIL_ATTR_DSN_NOTIFY, &rcpt->dsn_notify),
                  ATTR_TYPE_END);
     return (ret == 5 ? 1 : -1);
 }
index c98809cc42bbc358d9d713490f8fdf6023025b5d..60d9d30a314cc1f67d419ce95e084ec1d2741d70 100644 (file)
@@ -17,7 +17,7 @@
 /*     routine. rcpt_print() is meant to be passed as a call-back
 /*     to attr_print(), thusly:
 /*
-/*     ... ATTR_TYPE_FUNC, rcpt_print, (void *) recipient, ...
+/*     ... SEND_ATTR_FUNC(rcpt_print, (void *) recipient), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -61,11 +61,11 @@ int     rcpt_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
      */
     ret =
        print_fn(fp, flags | ATTR_FLAG_MORE,
-                ATTR_TYPE_STR, MAIL_ATTR_ORCPT, rcpt->orig_addr,
-                ATTR_TYPE_STR, MAIL_ATTR_RECIP, rcpt->address,
-                ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, rcpt->offset,
-                ATTR_TYPE_STR, MAIL_ATTR_DSN_ORCPT, rcpt->dsn_orcpt,
-                ATTR_TYPE_INT, MAIL_ATTR_DSN_NOTIFY, rcpt->dsn_notify,
+                SEND_ATTR_STR(MAIL_ATTR_ORCPT, rcpt->orig_addr),
+                SEND_ATTR_STR(MAIL_ATTR_RECIP, rcpt->address),
+                SEND_ATTR_LONG(MAIL_ATTR_OFFSET, rcpt->offset),
+                SEND_ATTR_STR(MAIL_ATTR_DSN_ORCPT, rcpt->dsn_orcpt),
+                SEND_ATTR_INT(MAIL_ATTR_DSN_NOTIFY, rcpt->dsn_notify),
                 ATTR_TYPE_END);
     return (ret);
 }
index 5b28772c16776829ab0a4dd18571c0e7560c39e9..40ef3b77ca55f34e16675772dc92254f9487cc3e 100644 (file)
@@ -231,17 +231,17 @@ void    resolve_clnt(const char *class, const char *sender,
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, class,
-                      ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                      ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, class),
+                      SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                      SEND_ATTR_STR(MAIL_ATTR_ADDR, addr),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &server_flags,
-                      ATTR_TYPE_STR, MAIL_ATTR_TRANSPORT, reply->transport,
-                        ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, reply->nexthop,
-                        ATTR_TYPE_STR, MAIL_ATTR_RECIP, reply->recipient,
-                        ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &reply->flags,
+                        RECV_ATTR_INT(MAIL_ATTR_FLAGS, &server_flags),
+                      RECV_ATTR_STR(MAIL_ATTR_TRANSPORT, reply->transport),
+                        RECV_ATTR_STR(MAIL_ATTR_NEXTHOP, reply->nexthop),
+                        RECV_ATTR_STR(MAIL_ATTR_RECIP, reply->recipient),
+                        RECV_ATTR_INT(MAIL_ATTR_FLAGS, &reply->flags),
                         ATTR_TYPE_END) != 5) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                msg_warn("problem talking to service %s: %m",
index 43b892a258a99db13bd9ce6731553a36f3f52800..e11f81a4ab51bacdf91cc5c0e9ec4340e930aea7 100644 (file)
@@ -134,14 +134,14 @@ VSTRING *rewrite_clnt(const char *rule, const char *addr, VSTRING *result)
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, REWRITE_ADDR,
-                      ATTR_TYPE_STR, MAIL_ATTR_RULE, rule,
-                      ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, REWRITE_ADDR),
+                      SEND_ATTR_STR(MAIL_ATTR_RULE, rule),
+                      SEND_ATTR_STR(MAIL_ATTR_ADDR, addr),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &server_flags,
-                        ATTR_TYPE_STR, MAIL_ATTR_ADDR, result,
+                        RECV_ATTR_INT(MAIL_ATTR_FLAGS, &server_flags),
+                        RECV_ATTR_STR(MAIL_ATTR_ADDR, result),
                         ATTR_TYPE_END) != 2) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                msg_warn("problem talking to service %s: %m",
index 1ffebdc5c7f59f8dda53cc679fd8181d2b96dd55..536053234d06e80f3da33c3f817d28686cdd12d4 100644 (file)
@@ -113,20 +113,20 @@ static void scache_clnt_save_endp(SCACHE *scache, int endp_ttl,
            errno = 0;
            count += 1;
            if (attr_print(stream, ATTR_FLAG_NONE,
-                        ATTR_TYPE_STR, MAIL_ATTR_REQ, SCACHE_REQ_SAVE_ENDP,
-                          ATTR_TYPE_INT, MAIL_ATTR_TTL, endp_ttl,
-                          ATTR_TYPE_STR, MAIL_ATTR_LABEL, endp_label,
-                          ATTR_TYPE_STR, MAIL_ATTR_PROP, endp_prop,
+                        SEND_ATTR_STR(MAIL_ATTR_REQ, SCACHE_REQ_SAVE_ENDP),
+                          SEND_ATTR_INT(MAIL_ATTR_TTL, endp_ttl),
+                          SEND_ATTR_STR(MAIL_ATTR_LABEL, endp_label),
+                          SEND_ATTR_STR(MAIL_ATTR_PROP, endp_prop),
                           ATTR_TYPE_END) != 0
                || vstream_fflush(stream)
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
                || attr_scan(stream, ATTR_FLAG_STRICT,
-                            ATTR_TYPE_STR, MAIL_ATTR_DUMMY, sp->dummy,
+                            RECV_ATTR_STR(MAIL_ATTR_DUMMY, sp->dummy),
                             ATTR_TYPE_END) != 1
 #endif
                || LOCAL_SEND_FD(vstream_fileno(stream), fd) < 0
                || attr_scan(stream, ATTR_FLAG_STRICT,
-                            ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                            RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                             ATTR_TYPE_END) != 1) {
                if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                    msg_warn("problem talking to service %s: %m",
@@ -175,13 +175,13 @@ static int scache_clnt_find_endp(SCACHE *scache, const char *endp_label,
        if ((stream = auto_clnt_access(sp->auto_clnt)) != 0) {
            errno = 0;
            if (attr_print(stream, ATTR_FLAG_NONE,
-                        ATTR_TYPE_STR, MAIL_ATTR_REQ, SCACHE_REQ_FIND_ENDP,
-                          ATTR_TYPE_STR, MAIL_ATTR_LABEL, endp_label,
+                        SEND_ATTR_STR(MAIL_ATTR_REQ, SCACHE_REQ_FIND_ENDP),
+                          SEND_ATTR_STR(MAIL_ATTR_LABEL, endp_label),
                           ATTR_TYPE_END) != 0
                || vstream_fflush(stream)
                || attr_scan(stream, ATTR_FLAG_STRICT,
-                            ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                            ATTR_TYPE_STR, MAIL_ATTR_PROP, endp_prop,
+                            RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                            RECV_ATTR_STR(MAIL_ATTR_PROP, endp_prop),
                             ATTR_TYPE_END) != 2) {
                if (msg_verbose || (errno != EPIPE && errno != ENOENT))
                    msg_warn("problem talking to service %s: %m",
@@ -194,7 +194,7 @@ static int scache_clnt_find_endp(SCACHE *scache, const char *endp_label,
            } else if (
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
                       attr_print(stream, ATTR_FLAG_NONE,
-                                 ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                                 SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                                  ATTR_TYPE_END) != 0
                       || vstream_fflush(stream) != 0
                       || read_wait(vstream_fileno(stream),
@@ -208,7 +208,7 @@ static int scache_clnt_find_endp(SCACHE *scache, const char *endp_label,
            } else {
 #ifdef MUST_READ_AFTER_SENDING_FD
                (void) attr_print(stream, ATTR_FLAG_NONE,
-                                 ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                                 SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                                  ATTR_TYPE_END);
                (void) vstream_fflush(stream);
 #endif
@@ -263,15 +263,15 @@ static void scache_clnt_save_dest(SCACHE *scache, int dest_ttl,
        if ((stream = auto_clnt_access(sp->auto_clnt)) != 0) {
            errno = 0;
            if (attr_print(stream, ATTR_FLAG_NONE,
-                        ATTR_TYPE_STR, MAIL_ATTR_REQ, SCACHE_REQ_SAVE_DEST,
-                          ATTR_TYPE_INT, MAIL_ATTR_TTL, dest_ttl,
-                          ATTR_TYPE_STR, MAIL_ATTR_LABEL, dest_label,
-                          ATTR_TYPE_STR, MAIL_ATTR_PROP, dest_prop,
-                          ATTR_TYPE_STR, MAIL_ATTR_LABEL, endp_label,
+                        SEND_ATTR_STR(MAIL_ATTR_REQ, SCACHE_REQ_SAVE_DEST),
+                          SEND_ATTR_INT(MAIL_ATTR_TTL, dest_ttl),
+                          SEND_ATTR_STR(MAIL_ATTR_LABEL, dest_label),
+                          SEND_ATTR_STR(MAIL_ATTR_PROP, dest_prop),
+                          SEND_ATTR_STR(MAIL_ATTR_LABEL, endp_label),
                           ATTR_TYPE_END) != 0
                || vstream_fflush(stream)
                || attr_scan(stream, ATTR_FLAG_STRICT,
-                            ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                            RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                             ATTR_TYPE_END) != 1) {
                if (msg_verbose || (errno != EPIPE && errno != ENOENT))
                    msg_warn("problem talking to service %s: %m",
@@ -318,14 +318,14 @@ static int scache_clnt_find_dest(SCACHE *scache, const char *dest_label,
        if ((stream = auto_clnt_access(sp->auto_clnt)) != 0) {
            errno = 0;
            if (attr_print(stream, ATTR_FLAG_NONE,
-                        ATTR_TYPE_STR, MAIL_ATTR_REQ, SCACHE_REQ_FIND_DEST,
-                          ATTR_TYPE_STR, MAIL_ATTR_LABEL, dest_label,
+                        SEND_ATTR_STR(MAIL_ATTR_REQ, SCACHE_REQ_FIND_DEST),
+                          SEND_ATTR_STR(MAIL_ATTR_LABEL, dest_label),
                           ATTR_TYPE_END) != 0
                || vstream_fflush(stream)
                || attr_scan(stream, ATTR_FLAG_STRICT,
-                            ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                            ATTR_TYPE_STR, MAIL_ATTR_PROP, dest_prop,
-                            ATTR_TYPE_STR, MAIL_ATTR_PROP, endp_prop,
+                            RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                            RECV_ATTR_STR(MAIL_ATTR_PROP, dest_prop),
+                            RECV_ATTR_STR(MAIL_ATTR_PROP, endp_prop),
                             ATTR_TYPE_END) != 3) {
                if (msg_verbose || (errno != EPIPE && errno != ENOENT))
                    msg_warn("problem talking to service %s: %m",
@@ -338,7 +338,7 @@ static int scache_clnt_find_dest(SCACHE *scache, const char *dest_label,
            } else if (
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
                       attr_print(stream, ATTR_FLAG_NONE,
-                                 ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                                 SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                                  ATTR_TYPE_END) != 0
                       || vstream_fflush(stream) != 0
                       || read_wait(vstream_fileno(stream),
@@ -352,7 +352,7 @@ static int scache_clnt_find_dest(SCACHE *scache, const char *dest_label,
            } else {
 #ifdef MUST_READ_AFTER_SENDING_FD
                (void) attr_print(stream, ATTR_FLAG_NONE,
-                                 ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                                 SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                                  ATTR_TYPE_END);
                (void) vstream_fflush(stream);
 #endif
index e6e86ee06f7e3bc8e39e49ea9486242614cc7693..d451b4f457b89e44433b3163dcd038c6ee6713c2 100644 (file)
@@ -121,11 +121,11 @@ int     trace_append(int flags, const char *id, MSG_STATS *stats,
     my_dsn.reason = vstring_str(why);
 
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_trace_service,
-                           ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                           ATTR_TYPE_FUNC, rcpt_print, (void *) rcpt,
-                           ATTR_TYPE_FUNC, dsn_print, (void *) &my_dsn,
+                           SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_APPEND),
+                           SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                           SEND_ATTR_FUNC(rcpt_print, (void *) rcpt),
+                           SEND_ATTR_FUNC(dsn_print, (void *) &my_dsn),
                            ATTR_TYPE_END) != 0) {
        msg_warn("%s: %s service failure", id, var_trace_service);
        req_stat = -1;
@@ -145,14 +145,14 @@ int     trace_flush(int flags, const char *queue, const char *id,
                            const char *dsn_envid, int dsn_ret)
 {
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_trace_service,
-                           ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_TRACE,
-                           ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
-                           ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
-                           ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
-                           ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                           ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
-                           ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
+                           SEND_ATTR_INT(MAIL_ATTR_NREQ, BOUNCE_CMD_TRACE),
+                           SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUE, queue),
+                           SEND_ATTR_STR(MAIL_ATTR_QUEUEID, id),
+                           SEND_ATTR_STR(MAIL_ATTR_ENCODING, encoding),
+                           SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                           SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, dsn_envid),
+                           SEND_ATTR_INT(MAIL_ATTR_DSN_RET, dsn_ret),
                            ATTR_TYPE_END) == 0) {
        return (0);
     } else {
index e6de59bccb1f344bbf2a876d5b310f167288973e..131ca1cc7776bc7649f2f6e35800e264c7520856 100644 (file)
@@ -112,14 +112,14 @@ int     verify_clnt_query(const char *addr, int *addr_status, VSTRING *why)
        errno = 0;
        count += 1;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, VRFY_REQ_QUERY,
-                      ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, VRFY_REQ_QUERY),
+                      SEND_ATTR_STR(MAIL_ATTR_ADDR, addr),
                       ATTR_TYPE_END) != 0
            || vstream_fflush(stream)
            || attr_scan(stream, ATTR_FLAG_MISSING,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &request_status,
-                        ATTR_TYPE_INT, MAIL_ATTR_ADDR_STATUS, addr_status,
-                        ATTR_TYPE_STR, MAIL_ATTR_WHY, why,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &request_status),
+                        RECV_ATTR_INT(MAIL_ATTR_ADDR_STATUS, addr_status),
+                        RECV_ATTR_STR(MAIL_ATTR_WHY, why),
                         ATTR_TYPE_END) != 3) {
            if (msg_verbose || count > 1 || (errno && errno != EPIPE && errno != ENOENT))
                msg_warn("problem talking to service %s: %m",
@@ -154,13 +154,13 @@ int     verify_clnt_update(const char *addr, int addr_status, const char *why)
        stream = clnt_stream_access(vrfy_clnt);
        errno = 0;
        if (attr_print(stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_STR, MAIL_ATTR_REQ, VRFY_REQ_UPDATE,
-                      ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
-                      ATTR_TYPE_INT, MAIL_ATTR_ADDR_STATUS, addr_status,
-                      ATTR_TYPE_STR, MAIL_ATTR_WHY, why,
+                      SEND_ATTR_STR(MAIL_ATTR_REQ, VRFY_REQ_UPDATE),
+                      SEND_ATTR_STR(MAIL_ATTR_ADDR, addr),
+                      SEND_ATTR_INT(MAIL_ATTR_ADDR_STATUS, addr_status),
+                      SEND_ATTR_STR(MAIL_ATTR_WHY, why),
                       ATTR_TYPE_END) != 0
            || attr_scan(stream, ATTR_FLAG_MISSING,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &request_status,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &request_status),
                         ATTR_TYPE_END) != 1) {
            if (msg_verbose || (errno != EPIPE && errno != ENOENT))
                msg_warn("problem talking to service %s: %m",
index ff1362399d337d6068b6dd049496f6033f86cb39..86653c2e2779c27bc2c4cdf62c91c9c83f3fe1ad 100644 (file)
@@ -71,6 +71,7 @@ alias.o: ../../include/attr.h
 alias.o: ../../include/been_here.h
 alias.o: ../../include/bounce.h
 alias.o: ../../include/canon_addr.h
+alias.o: ../../include/check_arg.h
 alias.o: ../../include/defer.h
 alias.o: ../../include/deliver_request.h
 alias.o: ../../include/delivered_hdr.h
@@ -88,6 +89,7 @@ alias.o: ../../include/msg_stats.h
 alias.o: ../../include/myflock.h
 alias.o: ../../include/mymalloc.h
 alias.o: ../../include/mypwd.h
+alias.o: ../../include/nvtable.h
 alias.o: ../../include/recipient_list.h
 alias.o: ../../include/resolve_clnt.h
 alias.o: ../../include/sent.h
@@ -110,6 +112,7 @@ bounce_workaround.o: ../../include/attr.h
 bounce_workaround.o: ../../include/been_here.h
 bounce_workaround.o: ../../include/bounce.h
 bounce_workaround.o: ../../include/canon_addr.h
+bounce_workaround.o: ../../include/check_arg.h
 bounce_workaround.o: ../../include/defer.h
 bounce_workaround.o: ../../include/deliver_request.h
 bounce_workaround.o: ../../include/delivered_hdr.h
@@ -125,6 +128,7 @@ bounce_workaround.o: ../../include/msg.h
 bounce_workaround.o: ../../include/msg_stats.h
 bounce_workaround.o: ../../include/myflock.h
 bounce_workaround.o: ../../include/mymalloc.h
+bounce_workaround.o: ../../include/nvtable.h
 bounce_workaround.o: ../../include/recipient_list.h
 bounce_workaround.o: ../../include/resolve_clnt.h
 bounce_workaround.o: ../../include/split_addr.h
@@ -142,6 +146,7 @@ command.o: ../../include/argv.h
 command.o: ../../include/attr.h
 command.o: ../../include/been_here.h
 command.o: ../../include/bounce.h
+command.o: ../../include/check_arg.h
 command.o: ../../include/defer.h
 command.o: ../../include/deliver_request.h
 command.o: ../../include/delivered_hdr.h
@@ -160,6 +165,8 @@ command.o: ../../include/mbox_conf.h
 command.o: ../../include/msg.h
 command.o: ../../include/msg_stats.h
 command.o: ../../include/myflock.h
+command.o: ../../include/mymalloc.h
+command.o: ../../include/nvtable.h
 command.o: ../../include/pipe_command.h
 command.o: ../../include/recipient_list.h
 command.o: ../../include/resolve_clnt.h
@@ -174,6 +181,7 @@ command.o: local.h
 deliver_attr.o: ../../include/argv.h
 deliver_attr.o: ../../include/attr.h
 deliver_attr.o: ../../include/been_here.h
+deliver_attr.o: ../../include/check_arg.h
 deliver_attr.o: ../../include/deliver_request.h
 deliver_attr.o: ../../include/delivered_hdr.h
 deliver_attr.o: ../../include/dict.h
@@ -186,6 +194,8 @@ deliver_attr.o: ../../include/mbox_conf.h
 deliver_attr.o: ../../include/msg.h
 deliver_attr.o: ../../include/msg_stats.h
 deliver_attr.o: ../../include/myflock.h
+deliver_attr.o: ../../include/mymalloc.h
+deliver_attr.o: ../../include/nvtable.h
 deliver_attr.o: ../../include/recipient_list.h
 deliver_attr.o: ../../include/resolve_clnt.h
 deliver_attr.o: ../../include/sys_defs.h
@@ -199,6 +209,7 @@ dotforward.o: ../../include/argv.h
 dotforward.o: ../../include/attr.h
 dotforward.o: ../../include/been_here.h
 dotforward.o: ../../include/bounce.h
+dotforward.o: ../../include/check_arg.h
 dotforward.o: ../../include/defer.h
 dotforward.o: ../../include/deliver_request.h
 dotforward.o: ../../include/delivered_hdr.h
@@ -222,6 +233,7 @@ dotforward.o: ../../include/msg_stats.h
 dotforward.o: ../../include/myflock.h
 dotforward.o: ../../include/mymalloc.h
 dotforward.o: ../../include/mypwd.h
+dotforward.o: ../../include/nvtable.h
 dotforward.o: ../../include/open_as.h
 dotforward.o: ../../include/recipient_list.h
 dotforward.o: ../../include/resolve_clnt.h
@@ -239,6 +251,7 @@ file.o: ../../include/argv.h
 file.o: ../../include/attr.h
 file.o: ../../include/been_here.h
 file.o: ../../include/bounce.h
+file.o: ../../include/check_arg.h
 file.o: ../../include/defer.h
 file.o: ../../include/deliver_flock.h
 file.o: ../../include/deliver_request.h
@@ -257,6 +270,8 @@ file.o: ../../include/mbox_open.h
 file.o: ../../include/msg.h
 file.o: ../../include/msg_stats.h
 file.o: ../../include/myflock.h
+file.o: ../../include/mymalloc.h
+file.o: ../../include/nvtable.h
 file.o: ../../include/recipient_list.h
 file.o: ../../include/resolve_clnt.h
 file.o: ../../include/safe_open.h
@@ -273,6 +288,7 @@ forward.o: ../../include/argv.h
 forward.o: ../../include/attr.h
 forward.o: ../../include/been_here.h
 forward.o: ../../include/bounce.h
+forward.o: ../../include/check_arg.h
 forward.o: ../../include/cleanup_user.h
 forward.o: ../../include/deliver_request.h
 forward.o: ../../include/delivered_hdr.h
@@ -293,6 +309,7 @@ forward.o: ../../include/msg.h
 forward.o: ../../include/msg_stats.h
 forward.o: ../../include/myflock.h
 forward.o: ../../include/mymalloc.h
+forward.o: ../../include/nvtable.h
 forward.o: ../../include/rec_type.h
 forward.o: ../../include/recipient_list.h
 forward.o: ../../include/record.h
@@ -312,6 +329,7 @@ include.o: ../../include/argv.h
 include.o: ../../include/attr.h
 include.o: ../../include/been_here.h
 include.o: ../../include/bounce.h
+include.o: ../../include/check_arg.h
 include.o: ../../include/defer.h
 include.o: ../../include/deliver_request.h
 include.o: ../../include/delivered_hdr.h
@@ -330,6 +348,7 @@ include.o: ../../include/msg_stats.h
 include.o: ../../include/myflock.h
 include.o: ../../include/mymalloc.h
 include.o: ../../include/mypwd.h
+include.o: ../../include/nvtable.h
 include.o: ../../include/open_as.h
 include.o: ../../include/recipient_list.h
 include.o: ../../include/resolve_clnt.h
@@ -346,6 +365,7 @@ indirect.o: ../../include/argv.h
 indirect.o: ../../include/attr.h
 indirect.o: ../../include/been_here.h
 indirect.o: ../../include/bounce.h
+indirect.o: ../../include/check_arg.h
 indirect.o: ../../include/defer.h
 indirect.o: ../../include/deliver_request.h
 indirect.o: ../../include/delivered_hdr.h
@@ -360,6 +380,8 @@ indirect.o: ../../include/mbox_conf.h
 indirect.o: ../../include/msg.h
 indirect.o: ../../include/msg_stats.h
 indirect.o: ../../include/myflock.h
+indirect.o: ../../include/mymalloc.h
+indirect.o: ../../include/nvtable.h
 indirect.o: ../../include/recipient_list.h
 indirect.o: ../../include/resolve_clnt.h
 indirect.o: ../../include/sent.h
@@ -373,6 +395,7 @@ indirect.o: local.h
 local.o: ../../include/argv.h
 local.o: ../../include/attr.h
 local.o: ../../include/been_here.h
+local.o: ../../include/check_arg.h
 local.o: ../../include/deliver_completed.h
 local.o: ../../include/deliver_request.h
 local.o: ../../include/delivered_hdr.h
@@ -396,6 +419,7 @@ local.o: ../../include/msg_stats.h
 local.o: ../../include/myflock.h
 local.o: ../../include/mymalloc.h
 local.o: ../../include/name_mask.h
+local.o: ../../include/nvtable.h
 local.o: ../../include/recipient_list.h
 local.o: ../../include/resolve_clnt.h
 local.o: ../../include/set_eugid.h
@@ -409,6 +433,7 @@ local.o: local.h
 local_expand.o: ../../include/argv.h
 local_expand.o: ../../include/attr.h
 local_expand.o: ../../include/been_here.h
+local_expand.o: ../../include/check_arg.h
 local_expand.o: ../../include/deliver_request.h
 local_expand.o: ../../include/delivered_hdr.h
 local_expand.o: ../../include/dict.h
@@ -423,6 +448,8 @@ local_expand.o: ../../include/maps.h
 local_expand.o: ../../include/mbox_conf.h
 local_expand.o: ../../include/msg_stats.h
 local_expand.o: ../../include/myflock.h
+local_expand.o: ../../include/mymalloc.h
+local_expand.o: ../../include/nvtable.h
 local_expand.o: ../../include/recipient_list.h
 local_expand.o: ../../include/resolve_clnt.h
 local_expand.o: ../../include/sys_defs.h
@@ -436,6 +463,7 @@ mailbox.o: ../../include/argv.h
 mailbox.o: ../../include/attr.h
 mailbox.o: ../../include/been_here.h
 mailbox.o: ../../include/bounce.h
+mailbox.o: ../../include/check_arg.h
 mailbox.o: ../../include/defer.h
 mailbox.o: ../../include/deliver_pass.h
 mailbox.o: ../../include/deliver_request.h
@@ -458,6 +486,7 @@ mailbox.o: ../../include/msg_stats.h
 mailbox.o: ../../include/myflock.h
 mailbox.o: ../../include/mymalloc.h
 mailbox.o: ../../include/mypwd.h
+mailbox.o: ../../include/nvtable.h
 mailbox.o: ../../include/recipient_list.h
 mailbox.o: ../../include/resolve_clnt.h
 mailbox.o: ../../include/safe_open.h
@@ -477,6 +506,7 @@ maildir.o: ../../include/argv.h
 maildir.o: ../../include/attr.h
 maildir.o: ../../include/been_here.h
 maildir.o: ../../include/bounce.h
+maildir.o: ../../include/check_arg.h
 maildir.o: ../../include/defer.h
 maildir.o: ../../include/deliver_request.h
 maildir.o: ../../include/delivered_hdr.h
@@ -497,6 +527,7 @@ maildir.o: ../../include/msg.h
 maildir.o: ../../include/msg_stats.h
 maildir.o: ../../include/myflock.h
 maildir.o: ../../include/mymalloc.h
+maildir.o: ../../include/nvtable.h
 maildir.o: ../../include/recipient_list.h
 maildir.o: ../../include/resolve_clnt.h
 maildir.o: ../../include/safe_open.h
@@ -517,6 +548,7 @@ recipient.o: ../../include/attr.h
 recipient.o: ../../include/been_here.h
 recipient.o: ../../include/bounce.h
 recipient.o: ../../include/canon_addr.h
+recipient.o: ../../include/check_arg.h
 recipient.o: ../../include/defer.h
 recipient.o: ../../include/deliver_request.h
 recipient.o: ../../include/delivered_hdr.h
@@ -534,6 +566,7 @@ recipient.o: ../../include/msg_stats.h
 recipient.o: ../../include/myflock.h
 recipient.o: ../../include/mymalloc.h
 recipient.o: ../../include/mypwd.h
+recipient.o: ../../include/nvtable.h
 recipient.o: ../../include/recipient_list.h
 recipient.o: ../../include/resolve_clnt.h
 recipient.o: ../../include/split_addr.h
@@ -552,6 +585,7 @@ resolve.o: ../../include/argv.h
 resolve.o: ../../include/attr.h
 resolve.o: ../../include/been_here.h
 resolve.o: ../../include/bounce.h
+resolve.o: ../../include/check_arg.h
 resolve.o: ../../include/defer.h
 resolve.o: ../../include/deliver_request.h
 resolve.o: ../../include/delivered_hdr.h
@@ -568,6 +602,8 @@ resolve.o: ../../include/mbox_conf.h
 resolve.o: ../../include/msg.h
 resolve.o: ../../include/msg_stats.h
 resolve.o: ../../include/myflock.h
+resolve.o: ../../include/mymalloc.h
+resolve.o: ../../include/nvtable.h
 resolve.o: ../../include/recipient_list.h
 resolve.o: ../../include/resolve_clnt.h
 resolve.o: ../../include/rewrite_clnt.h
@@ -582,6 +618,7 @@ token.o: ../../include/argv.h
 token.o: ../../include/attr.h
 token.o: ../../include/been_here.h
 token.o: ../../include/bounce.h
+token.o: ../../include/check_arg.h
 token.o: ../../include/defer.h
 token.o: ../../include/deliver_request.h
 token.o: ../../include/delivered_hdr.h
@@ -597,6 +634,7 @@ token.o: ../../include/msg.h
 token.o: ../../include/msg_stats.h
 token.o: ../../include/myflock.h
 token.o: ../../include/mymalloc.h
+token.o: ../../include/nvtable.h
 token.o: ../../include/readlline.h
 token.o: ../../include/recipient_list.h
 token.o: ../../include/resolve_clnt.h
@@ -613,6 +651,7 @@ unknown.o: ../../include/argv.h
 unknown.o: ../../include/attr.h
 unknown.o: ../../include/been_here.h
 unknown.o: ../../include/bounce.h
+unknown.o: ../../include/check_arg.h
 unknown.o: ../../include/defer.h
 unknown.o: ../../include/deliver_pass.h
 unknown.o: ../../include/deliver_request.h
@@ -632,6 +671,7 @@ unknown.o: ../../include/msg.h
 unknown.o: ../../include/msg_stats.h
 unknown.o: ../../include/myflock.h
 unknown.o: ../../include/mymalloc.h
+unknown.o: ../../include/nvtable.h
 unknown.o: ../../include/recipient_list.h
 unknown.o: ../../include/resolve_clnt.h
 unknown.o: ../../include/sent.h
index b30ab5e5028c0a7c3161cea893ba13789454f2f4..c63027ff926689f33db6cc163fce145ab13408c2 100644 (file)
@@ -138,7 +138,7 @@ static FORWARD_INFO *forward_open(DELIVER_REQUEST *request, const char *sender)
        FORWARD_OPEN_RETURN(0);
     close_on_exec(vstream_fileno(cleanup), CLOSE_ON_EXEC);
     if (attr_scan(cleanup, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, buffer,
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUEID, buffer),
                  ATTR_TYPE_END) != 1) {
        vstream_fclose(cleanup);
        FORWARD_OPEN_RETURN(0);
@@ -155,7 +155,7 @@ static FORWARD_INFO *forward_open(DELIVER_REQUEST *request, const char *sender)
        CLEANUP_FLAG_SMTPUTF8 : 0))
 
     attr_print(cleanup, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, FORWARD_CLEANUP_FLAGS,
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, FORWARD_CLEANUP_FLAGS),
               ATTR_TYPE_END);
 
     /*
@@ -305,7 +305,7 @@ static int forward_send(FORWARD_INFO *info, DELIVER_REQUEST *request,
     if (status == 0)
        if (vstream_fflush(info->cleanup)
            || attr_scan(info->cleanup, ATTR_FLAG_MISSING,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                         ATTR_TYPE_END) != 1)
            status = 1;
 
index dff0db24897f0e6b4fd722481565f99a29e33e23..450617a8317cce72c2a6ae2d7dae2cbb2d331402 100644 (file)
@@ -90,6 +90,7 @@ depend: $(MAKES)
 event_server.o: ../../include/argv.h
 event_server.o: ../../include/attr.h
 event_server.o: ../../include/bounce.h
+event_server.o: ../../include/check_arg.h
 event_server.o: ../../include/chroot_uid.h
 event_server.o: ../../include/debug_process.h
 event_server.o: ../../include/deliver_request.h
@@ -111,6 +112,7 @@ event_server.o: ../../include/msg_syslog.h
 event_server.o: ../../include/msg_vstream.h
 event_server.o: ../../include/myflock.h
 event_server.o: ../../include/mymalloc.h
+event_server.o: ../../include/nvtable.h
 event_server.o: ../../include/recipient_list.h
 event_server.o: ../../include/resolve_local.h
 event_server.o: ../../include/safe_open.h
@@ -174,7 +176,9 @@ master_conf.o: master.h
 master_conf.o: master_conf.c
 master_ent.o: ../../include/argv.h
 master_ent.o: ../../include/attr.h
+master_ent.o: ../../include/check_arg.h
 master_ent.o: ../../include/host_port.h
+master_ent.o: ../../include/htable.h
 master_ent.o: ../../include/inet_addr_host.h
 master_ent.o: ../../include/inet_addr_list.h
 master_ent.o: ../../include/inet_proto.h
@@ -186,6 +190,7 @@ master_ent.o: ../../include/match_service.h
 master_ent.o: ../../include/msg.h
 master_ent.o: ../../include/myaddrinfo.h
 master_ent.o: ../../include/mymalloc.h
+master_ent.o: ../../include/nvtable.h
 master_ent.o: ../../include/own_inet_addr.h
 master_ent.o: ../../include/readlline.h
 master_ent.o: ../../include/sock_addr.h
@@ -274,17 +279,22 @@ master_vars.o: ../../include/vstring.h
 master_vars.o: master.h
 master_vars.o: master_vars.c
 master_wakeup.o: ../../include/attr.h
+master_wakeup.o: ../../include/check_arg.h
 master_wakeup.o: ../../include/events.h
+master_wakeup.o: ../../include/htable.h
 master_wakeup.o: ../../include/iostuff.h
 master_wakeup.o: ../../include/mail_params.h
 master_wakeup.o: ../../include/mail_proto.h
 master_wakeup.o: ../../include/msg.h
+master_wakeup.o: ../../include/mymalloc.h
+master_wakeup.o: ../../include/nvtable.h
 master_wakeup.o: ../../include/set_eugid.h
 master_wakeup.o: ../../include/set_ugid.h
 master_wakeup.o: ../../include/sys_defs.h
 master_wakeup.o: ../../include/trigger.h
 master_wakeup.o: ../../include/vbuf.h
 master_wakeup.o: ../../include/vstream.h
+master_wakeup.o: ../../include/vstring.h
 master_wakeup.o: mail_server.h
 master_wakeup.o: master.h
 master_wakeup.o: master_wakeup.c
@@ -296,6 +306,7 @@ master_watch.o: master_watch.c
 multi_server.o: ../../include/argv.h
 multi_server.o: ../../include/attr.h
 multi_server.o: ../../include/bounce.h
+multi_server.o: ../../include/check_arg.h
 multi_server.o: ../../include/chroot_uid.h
 multi_server.o: ../../include/debug_process.h
 multi_server.o: ../../include/deliver_request.h
@@ -317,6 +328,7 @@ multi_server.o: ../../include/msg_syslog.h
 multi_server.o: ../../include/msg_vstream.h
 multi_server.o: ../../include/myflock.h
 multi_server.o: ../../include/mymalloc.h
+multi_server.o: ../../include/nvtable.h
 multi_server.o: ../../include/recipient_list.h
 multi_server.o: ../../include/resolve_local.h
 multi_server.o: ../../include/safe_open.h
@@ -336,6 +348,7 @@ multi_server.o: multi_server.c
 single_server.o: ../../include/argv.h
 single_server.o: ../../include/attr.h
 single_server.o: ../../include/bounce.h
+single_server.o: ../../include/check_arg.h
 single_server.o: ../../include/chroot_uid.h
 single_server.o: ../../include/debug_process.h
 single_server.o: ../../include/deliver_request.h
@@ -357,6 +370,7 @@ single_server.o: ../../include/msg_syslog.h
 single_server.o: ../../include/msg_vstream.h
 single_server.o: ../../include/myflock.h
 single_server.o: ../../include/mymalloc.h
+single_server.o: ../../include/nvtable.h
 single_server.o: ../../include/recipient_list.h
 single_server.o: ../../include/resolve_local.h
 single_server.o: ../../include/safe_open.h
@@ -376,6 +390,7 @@ single_server.o: single_server.c
 trigger_server.o: ../../include/argv.h
 trigger_server.o: ../../include/attr.h
 trigger_server.o: ../../include/bounce.h
+trigger_server.o: ../../include/check_arg.h
 trigger_server.o: ../../include/chroot_uid.h
 trigger_server.o: ../../include/debug_process.h
 trigger_server.o: ../../include/deliver_request.h
@@ -397,6 +412,7 @@ trigger_server.o: ../../include/msg_syslog.h
 trigger_server.o: ../../include/msg_vstream.h
 trigger_server.o: ../../include/myflock.h
 trigger_server.o: ../../include/mymalloc.h
+trigger_server.o: ../../include/nvtable.h
 trigger_server.o: ../../include/recipient_list.h
 trigger_server.o: ../../include/resolve_local.h
 trigger_server.o: ../../include/safe_open.h
index 891193604d3090012559e51b5017c78f036a96f0..fa58690aac1892875a2a1c672963f64ddaa80ff5 100644 (file)
@@ -83,11 +83,14 @@ depend: $(MAKES)
 milter.o: ../../include/argv.h
 milter.o: ../../include/attr.h
 milter.o: ../../include/attr_override.h
+milter.o: ../../include/check_arg.h
+milter.o: ../../include/htable.h
 milter.o: ../../include/iostuff.h
 milter.o: ../../include/mail_params.h
 milter.o: ../../include/mail_proto.h
 milter.o: ../../include/msg.h
 milter.o: ../../include/mymalloc.h
+milter.o: ../../include/nvtable.h
 milter.o: ../../include/rec_type.h
 milter.o: ../../include/record.h
 milter.o: ../../include/stringops.h
@@ -99,9 +102,11 @@ milter.o: milter.c
 milter.o: milter.h
 milter8.o: ../../include/argv.h
 milter8.o: ../../include/attr.h
+milter8.o: ../../include/check_arg.h
 milter8.o: ../../include/compat_va_copy.h
 milter8.o: ../../include/connect.h
 milter8.o: ../../include/header_opts.h
+milter8.o: ../../include/htable.h
 milter8.o: ../../include/iostuff.h
 milter8.o: ../../include/is_header.h
 milter8.o: ../../include/mail_params.h
@@ -111,6 +116,7 @@ milter8.o: ../../include/msg.h
 milter8.o: ../../include/mymalloc.h
 milter8.o: ../../include/name_code.h
 milter8.o: ../../include/name_mask.h
+milter8.o: ../../include/nvtable.h
 milter8.o: ../../include/rec_type.h
 milter8.o: ../../include/record.h
 milter8.o: ../../include/split_at.h
@@ -123,10 +129,13 @@ milter8.o: milter.h
 milter8.o: milter8.c
 milter_macros.o: ../../include/argv.h
 milter_macros.o: ../../include/attr.h
+milter_macros.o: ../../include/check_arg.h
+milter_macros.o: ../../include/htable.h
 milter_macros.o: ../../include/iostuff.h
 milter_macros.o: ../../include/mail_proto.h
 milter_macros.o: ../../include/msg.h
 milter_macros.o: ../../include/mymalloc.h
+milter_macros.o: ../../include/nvtable.h
 milter_macros.o: ../../include/sys_defs.h
 milter_macros.o: ../../include/vbuf.h
 milter_macros.o: ../../include/vstream.h
index 014d9c4dc4ff1990a17efde70332904a52569fd3..5b067a5323230192d773386909b37b9e8a29ee69 100644 (file)
@@ -716,8 +716,8 @@ int     milter_send(MILTERS *milters, VSTREAM *stream)
      * Send the filter macro name lists.
      */
     (void) attr_print(stream, ATTR_FLAG_MORE,
-                     ATTR_TYPE_FUNC, milter_macros_print,
-                     (void *) milters->macros,
+                     SEND_ATTR_FUNC(milter_macros_print,
+                                    (void *) milters->macros),
                      ATTR_TYPE_END);
 
     /*
@@ -732,7 +732,7 @@ int     milter_send(MILTERS *milters, VSTREAM *stream)
      */
     if (status != 0
        || attr_scan(stream, ATTR_FLAG_STRICT,
-                    ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                    RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                     ATTR_TYPE_END) != 1
        || status != 0) {
        msg_warn("cannot send milters to service %s", VSTREAM_PATH(stream));
@@ -779,8 +779,8 @@ MILTERS *milter_receive(VSTREAM *stream, int count)
      */
     milters->macros = milter_macros_alloc(MILTER_MACROS_ALLOC_ZERO);
     if (attr_scan(stream, ATTR_FLAG_STRICT | ATTR_FLAG_MORE,
-                 ATTR_TYPE_FUNC, milter_macros_scan,
-                 (void *) milters->macros,
+                 RECV_ATTR_FUNC(milter_macros_scan,
+                                (void *) milters->macros),
                  ATTR_TYPE_END) != 1) {
        milter_free(milters);
        return (0);
@@ -809,7 +809,7 @@ MILTERS *milter_receive(VSTREAM *stream, int count)
      * Over to you.
      */
     (void) attr_print(stream, ATTR_FLAG_NONE,
-                     ATTR_TYPE_INT, MAIL_ATTR_STATUS, 0,
+                     SEND_ATTR_INT(MAIL_ATTR_STATUS, 0),
                      ATTR_TYPE_END);
     return (milters);
 }
index 02adb839378c46075addc64804866f883dfac0dd..c813d3c8b1af64eb5f31aeab0b6dbce93f28d7bf 100644 (file)
@@ -2660,22 +2660,22 @@ static int milter8_send(MILTER *m, VSTREAM *stream)
        vstream_fflush(milter->fp);
 
     if (attr_print(stream, ATTR_FLAG_MORE,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_NAME, milter->m.name,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_VERS, milter->version,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_ACTS, milter->rq_mask,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_EVTS, milter->ev_mask,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_NPTS, milter->np_mask,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_STAT, milter->state,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_CONN, milter->conn_timeout,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_CMD, milter->cmd_timeout,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_MSG, milter->msg_timeout,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_ACT, milter->def_action,
-                  ATTR_TYPE_INT, MAIL_ATTR_MILT_MAC, milter->m.macros != 0,
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_NAME, milter->m.name),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_VERS, milter->version),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_ACTS, milter->rq_mask),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_EVTS, milter->ev_mask),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_NPTS, milter->np_mask),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_STAT, milter->state),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_CONN, milter->conn_timeout),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_CMD, milter->cmd_timeout),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_MSG, milter->msg_timeout),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_ACT, milter->def_action),
+                  SEND_ATTR_INT(MAIL_ATTR_MILT_MAC, milter->m.macros != 0),
                   ATTR_TYPE_END) != 0
        || (milter->m.macros != 0
            && attr_print(stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_FUNC, milter_macros_print,
-                         (void *) milter->m.macros,
+                         SEND_ATTR_FUNC(milter_macros_print,
+                                        (void *) milter->m.macros),
                          ATTR_TYPE_END) != 0)
        || (milter->m.macros == 0
            && attr_print(stream, ATTR_FLAG_NONE,
@@ -2684,7 +2684,7 @@ static int milter8_send(MILTER *m, VSTREAM *stream)
        return (-1);
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
     } else if (attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_STR, MAIL_ATTR_DUMMY, milter->buf,
+                        RECV_ATTR_STR(MAIL_ATTR_DUMMY, milter->buf),
                         ATTR_TYPE_END) != 1) {
        return (-1);
 #endif
@@ -2693,7 +2693,7 @@ static int milter8_send(MILTER *m, VSTREAM *stream)
        return (-1);
 #ifdef MUST_READ_AFTER_SENDING_FD
     } else if (attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_STR, MAIL_ATTR_DUMMY, milter->buf,
+                        RECV_ATTR_STR(MAIL_ATTR_DUMMY, milter->buf),
                         ATTR_TYPE_END) != 1) {
        return (-1);
 #endif
@@ -2736,23 +2736,23 @@ MILTER *milter8_receive(VSTREAM *stream, MILTERS *parent)
        act_buf = vstring_alloc(10);
     }
     if (attr_scan(stream, ATTR_FLAG_STRICT | ATTR_FLAG_MORE,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_NAME, name_buf,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_VERS, &version,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_ACTS, &rq_mask,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_EVTS, &ev_mask,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_NPTS, &np_mask,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_STAT, &state,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_CONN, &conn_timeout,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_CMD, &cmd_timeout,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_MSG, &msg_timeout,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_ACT, act_buf,
-                 ATTR_TYPE_INT, MAIL_ATTR_MILT_MAC, &has_macros,
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_NAME, name_buf),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_VERS, &version),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_ACTS, &rq_mask),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_EVTS, &ev_mask),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_NPTS, &np_mask),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_STAT, &state),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_CONN, &conn_timeout),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_CMD, &cmd_timeout),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_MSG, &msg_timeout),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_ACT, act_buf),
+                 RECV_ATTR_INT(MAIL_ATTR_MILT_MAC, &has_macros),
                  ATTR_TYPE_END) < 10
        || (has_macros != 0
            && attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_FUNC, milter_macros_scan,
-                        (void *) (macros =
-                            milter_macros_alloc(MILTER_MACROS_ALLOC_ZERO)),
+                        RECV_ATTR_FUNC(milter_macros_scan,
+                                       (void *) (macros =
+                           milter_macros_alloc(MILTER_MACROS_ALLOC_ZERO))),
                         ATTR_TYPE_END) < 1)
        || (has_macros == 0
            && attr_scan(stream, ATTR_FLAG_STRICT,
@@ -2760,7 +2760,7 @@ MILTER *milter8_receive(VSTREAM *stream, MILTERS *parent)
        FREE_MACROS_AND_RETURN(0);
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
     } else if (attr_print(stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                         SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                          ATTR_TYPE_END) != 0
               || vstream_fflush(stream) != 0) {
        FREE_MACROS_AND_RETURN(0);
@@ -2770,7 +2770,7 @@ MILTER *milter8_receive(VSTREAM *stream, MILTERS *parent)
     } else {
 #ifdef MUST_READ_AFTER_SENDING_FD
        (void) attr_print(stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                         SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                          ATTR_TYPE_END);
 #endif
 #define NO_PROTOCOL    ((char *) 0)
index 4e575aae0d820ce46a756b0adac4e951c0c2ce94..95126b1ed92fbe4a5833f3e79ec6df283d6c9c00 100644 (file)
@@ -77,7 +77,7 @@
 /*     print routine.  milter_macros_print() is meant to be passed
 /*     as a call-back to attr_print*(), thusly:
 /*
-/*     ATTR_TYPE_FUNC, milter_macros_print, (void *) macros,
+/*     SEND_ATTR_FUNC(milter_macros_print, (void *) macros),
 /*
 /*     milter_macros_scan() reads a MILTER_MACROS structure from
 /*     the named stream using the specified attribute scan routine.
@@ -85,7 +85,7 @@
 /*     members.  milter_macros_scan() is meant to be passed as a
 /*     call-back to attr_scan*(), thusly:
 /*
-/*     ATTR_TYPE_FUNC, milter_macros_scan, (void *) macros,
+/*     RECV_ATTR_FUNC(milter_macros_scan, (void *) macros),
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -141,14 +141,14 @@ int     milter_macros_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
      * as in the milter_macros_scan() function.
      */
     ret = print_fn(fp, flags | ATTR_FLAG_MORE,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_CONN, mp->conn_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_HELO, mp->helo_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_MAIL, mp->mail_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_RCPT, mp->rcpt_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_DATA, mp->data_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_EOH, mp->eoh_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_EOD, mp->eod_macros,
-                  ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_UNK, mp->unk_macros,
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_CONN, mp->conn_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_HELO, mp->helo_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_MAIL, mp->mail_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_RCPT, mp->rcpt_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_DATA, mp->data_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_EOH, mp->eoh_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_EOD, mp->eod_macros),
+                  SEND_ATTR_STR(MAIL_ATTR_MILT_MAC_UNK, mp->unk_macros),
                   ATTR_TYPE_END);
     return (ret);
 }
@@ -178,14 +178,14 @@ int     milter_macros_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
      * as in the milter_macros_print() function.
      */
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_CONN, conn_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_HELO, helo_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_MAIL, mail_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_RCPT, rcpt_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_DATA, data_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_EOH, eoh_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_EOD, eod_macros,
-                 ATTR_TYPE_STR, MAIL_ATTR_MILT_MAC_UNK, unk_macros,
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_CONN, conn_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_HELO, helo_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_MAIL, mail_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_RCPT, rcpt_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_DATA, data_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_EOH, eoh_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_EOD, eod_macros),
+                 RECV_ATTR_STR(MAIL_ATTR_MILT_MAC_UNK, unk_macros),
                  ATTR_TYPE_END);
 
     /*
index 09d52367c9f4429df6f8b82a262991eb1c8c5478..07148f55ec82b762fadb442604ce16b5f5357e9f 100644 (file)
@@ -68,10 +68,12 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 qmgr.o: ../../include/argv.h
 qmgr.o: ../../include/attr.h
+qmgr.o: ../../include/check_arg.h
 qmgr.o: ../../include/dict.h
 qmgr.o: ../../include/dsn.h
 qmgr.o: ../../include/events.h
 qmgr.o: ../../include/flush_clnt.h
+qmgr.o: ../../include/htable.h
 qmgr.o: ../../include/iostuff.h
 qmgr.o: ../../include/mail_conf.h
 qmgr.o: ../../include/mail_flow.h
@@ -83,6 +85,8 @@ qmgr.o: ../../include/mail_version.h
 qmgr.o: ../../include/master_proto.h
 qmgr.o: ../../include/msg.h
 qmgr.o: ../../include/myflock.h
+qmgr.o: ../../include/mymalloc.h
+qmgr.o: ../../include/nvtable.h
 qmgr.o: ../../include/recipient_list.h
 qmgr.o: ../../include/scan_dir.h
 qmgr.o: ../../include/sys_defs.h
@@ -94,18 +98,21 @@ qmgr.o: qmgr.h
 qmgr_active.o: ../../include/abounce.h
 qmgr_active.o: ../../include/attr.h
 qmgr_active.o: ../../include/bounce.h
+qmgr_active.o: ../../include/check_arg.h
 qmgr_active.o: ../../include/defer.h
 qmgr_active.o: ../../include/deliver_request.h
 qmgr_active.o: ../../include/dsn.h
 qmgr_active.o: ../../include/dsn_buf.h
 qmgr_active.o: ../../include/dsn_mask.h
 qmgr_active.o: ../../include/events.h
+qmgr_active.o: ../../include/htable.h
 qmgr_active.o: ../../include/mail_open_ok.h
 qmgr_active.o: ../../include/mail_params.h
 qmgr_active.o: ../../include/mail_queue.h
 qmgr_active.o: ../../include/msg.h
 qmgr_active.o: ../../include/msg_stats.h
 qmgr_active.o: ../../include/mymalloc.h
+qmgr_active.o: ../../include/nvtable.h
 qmgr_active.o: ../../include/qmgr_user.h
 qmgr_active.o: ../../include/rec_type.h
 qmgr_active.o: ../../include/recipient_list.h
@@ -120,11 +127,15 @@ qmgr_active.o: qmgr.h
 qmgr_active.o: qmgr_active.c
 qmgr_bounce.o: ../../include/attr.h
 qmgr_bounce.o: ../../include/bounce.h
+qmgr_bounce.o: ../../include/check_arg.h
 qmgr_bounce.o: ../../include/deliver_completed.h
 qmgr_bounce.o: ../../include/deliver_request.h
 qmgr_bounce.o: ../../include/dsn.h
 qmgr_bounce.o: ../../include/dsn_buf.h
+qmgr_bounce.o: ../../include/htable.h
 qmgr_bounce.o: ../../include/msg_stats.h
+qmgr_bounce.o: ../../include/mymalloc.h
+qmgr_bounce.o: ../../include/nvtable.h
 qmgr_bounce.o: ../../include/recipient_list.h
 qmgr_bounce.o: ../../include/scan_dir.h
 qmgr_bounce.o: ../../include/sys_defs.h
@@ -135,14 +146,18 @@ qmgr_bounce.o: qmgr.h
 qmgr_bounce.o: qmgr_bounce.c
 qmgr_defer.o: ../../include/attr.h
 qmgr_defer.o: ../../include/bounce.h
+qmgr_defer.o: ../../include/check_arg.h
 qmgr_defer.o: ../../include/defer.h
 qmgr_defer.o: ../../include/deliver_request.h
 qmgr_defer.o: ../../include/dsn.h
 qmgr_defer.o: ../../include/dsn_buf.h
+qmgr_defer.o: ../../include/htable.h
 qmgr_defer.o: ../../include/iostuff.h
 qmgr_defer.o: ../../include/mail_proto.h
 qmgr_defer.o: ../../include/msg.h
 qmgr_defer.o: ../../include/msg_stats.h
+qmgr_defer.o: ../../include/mymalloc.h
+qmgr_defer.o: ../../include/nvtable.h
 qmgr_defer.o: ../../include/recipient_list.h
 qmgr_defer.o: ../../include/scan_dir.h
 qmgr_defer.o: ../../include/sys_defs.h
@@ -152,12 +167,14 @@ qmgr_defer.o: ../../include/vstring.h
 qmgr_defer.o: qmgr.h
 qmgr_defer.o: qmgr_defer.c
 qmgr_deliver.o: ../../include/attr.h
+qmgr_deliver.o: ../../include/check_arg.h
 qmgr_deliver.o: ../../include/deliver_request.h
 qmgr_deliver.o: ../../include/dsb_scan.h
 qmgr_deliver.o: ../../include/dsn.h
 qmgr_deliver.o: ../../include/dsn_buf.h
 qmgr_deliver.o: ../../include/dsn_util.h
 qmgr_deliver.o: ../../include/events.h
+qmgr_deliver.o: ../../include/htable.h
 qmgr_deliver.o: ../../include/iostuff.h
 qmgr_deliver.o: ../../include/mail_params.h
 qmgr_deliver.o: ../../include/mail_proto.h
@@ -165,6 +182,7 @@ qmgr_deliver.o: ../../include/mail_queue.h
 qmgr_deliver.o: ../../include/msg.h
 qmgr_deliver.o: ../../include/msg_stats.h
 qmgr_deliver.o: ../../include/mymalloc.h
+qmgr_deliver.o: ../../include/nvtable.h
 qmgr_deliver.o: ../../include/rcpt_print.h
 qmgr_deliver.o: ../../include/recipient_list.h
 qmgr_deliver.o: ../../include/scan_dir.h
@@ -188,13 +206,16 @@ qmgr_enable.o: ../../include/vstream.h
 qmgr_enable.o: qmgr.h
 qmgr_enable.o: qmgr_enable.c
 qmgr_entry.o: ../../include/attr.h
+qmgr_entry.o: ../../include/check_arg.h
 qmgr_entry.o: ../../include/deliver_request.h
 qmgr_entry.o: ../../include/dsn.h
 qmgr_entry.o: ../../include/events.h
+qmgr_entry.o: ../../include/htable.h
 qmgr_entry.o: ../../include/mail_params.h
 qmgr_entry.o: ../../include/msg.h
 qmgr_entry.o: ../../include/msg_stats.h
 qmgr_entry.o: ../../include/mymalloc.h
+qmgr_entry.o: ../../include/nvtable.h
 qmgr_entry.o: ../../include/recipient_list.h
 qmgr_entry.o: ../../include/scan_dir.h
 qmgr_entry.o: ../../include/sys_defs.h
@@ -233,12 +254,14 @@ qmgr_message.o: ../../include/argv.h
 qmgr_message.o: ../../include/attr.h
 qmgr_message.o: ../../include/bounce.h
 qmgr_message.o: ../../include/canon_addr.h
+qmgr_message.o: ../../include/check_arg.h
 qmgr_message.o: ../../include/deliver_completed.h
 qmgr_message.o: ../../include/deliver_request.h
 qmgr_message.o: ../../include/dict.h
 qmgr_message.o: ../../include/dsn.h
 qmgr_message.o: ../../include/dsn_buf.h
 qmgr_message.o: ../../include/dsn_mask.h
+qmgr_message.o: ../../include/htable.h
 qmgr_message.o: ../../include/iostuff.h
 qmgr_message.o: ../../include/mail_params.h
 qmgr_message.o: ../../include/mail_proto.h
@@ -247,6 +270,7 @@ qmgr_message.o: ../../include/msg.h
 qmgr_message.o: ../../include/msg_stats.h
 qmgr_message.o: ../../include/myflock.h
 qmgr_message.o: ../../include/mymalloc.h
+qmgr_message.o: ../../include/nvtable.h
 qmgr_message.o: ../../include/opened.h
 qmgr_message.o: ../../include/qmgr_user.h
 qmgr_message.o: ../../include/rec_attr_map.h
@@ -281,6 +305,7 @@ qmgr_move.o: ../../include/vstring.h
 qmgr_move.o: qmgr.h
 qmgr_move.o: qmgr_move.c
 qmgr_queue.o: ../../include/attr.h
+qmgr_queue.o: ../../include/check_arg.h
 qmgr_queue.o: ../../include/dsn.h
 qmgr_queue.o: ../../include/events.h
 qmgr_queue.o: ../../include/htable.h
@@ -289,11 +314,13 @@ qmgr_queue.o: ../../include/mail_params.h
 qmgr_queue.o: ../../include/mail_proto.h
 qmgr_queue.o: ../../include/msg.h
 qmgr_queue.o: ../../include/mymalloc.h
+qmgr_queue.o: ../../include/nvtable.h
 qmgr_queue.o: ../../include/recipient_list.h
 qmgr_queue.o: ../../include/scan_dir.h
 qmgr_queue.o: ../../include/sys_defs.h
 qmgr_queue.o: ../../include/vbuf.h
 qmgr_queue.o: ../../include/vstream.h
+qmgr_queue.o: ../../include/vstring.h
 qmgr_queue.o: qmgr.h
 qmgr_queue.o: qmgr_queue.c
 qmgr_scan.o: ../../include/dsn.h
@@ -308,6 +335,7 @@ qmgr_scan.o: ../../include/vstream.h
 qmgr_scan.o: qmgr.h
 qmgr_scan.o: qmgr_scan.c
 qmgr_transport.o: ../../include/attr.h
+qmgr_transport.o: ../../include/check_arg.h
 qmgr_transport.o: ../../include/dsn.h
 qmgr_transport.o: ../../include/events.h
 qmgr_transport.o: ../../include/htable.h
@@ -317,10 +345,12 @@ qmgr_transport.o: ../../include/mail_params.h
 qmgr_transport.o: ../../include/mail_proto.h
 qmgr_transport.o: ../../include/msg.h
 qmgr_transport.o: ../../include/mymalloc.h
+qmgr_transport.o: ../../include/nvtable.h
 qmgr_transport.o: ../../include/recipient_list.h
 qmgr_transport.o: ../../include/scan_dir.h
 qmgr_transport.o: ../../include/sys_defs.h
 qmgr_transport.o: ../../include/vbuf.h
 qmgr_transport.o: ../../include/vstream.h
+qmgr_transport.o: ../../include/vstring.h
 qmgr_transport.o: qmgr.h
 qmgr_transport.o: qmgr_transport.c
index 69e52d6153112c03b8ac07343c3b06f6d0fc2a83..cd6f35a1d8b34337a264d88c5b4994c5519f0bb0 100644 (file)
@@ -96,7 +96,7 @@ static int qmgr_deliver_initial_reply(VSTREAM *stream)
        msg_warn("%s: premature disconnect", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
     } else if (attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &stat,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &stat),
                         ATTR_TYPE_END) != 1) {
        msg_warn("%s: malformed response", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
@@ -115,8 +115,8 @@ static int qmgr_deliver_final_reply(VSTREAM *stream, DSN_BUF *dsb)
        msg_warn("%s: premature disconnect", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
     } else if (attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_FUNC, dsb_scan, (void *) dsb,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &stat,
+                        RECV_ATTR_FUNC(dsb_scan, (void *) dsb),
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &stat),
                         ATTR_TYPE_END) != 2) {
        msg_warn("%s: malformed response", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
@@ -169,38 +169,38 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
        | (message->inspect_xport ? DEL_REQ_FLAG_BOUNCE : DEL_REQ_FLAG_DEFLT);
     (void) QMGR_MSG_STATS(&stats, message);
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUE, message->queue_name,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, message->queue_id,
-              ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, message->data_offset,
-              ATTR_TYPE_LONG, MAIL_ATTR_SIZE, message->cont_length,
-              ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, entry->queue->nexthop,
-              ATTR_TYPE_STR, MAIL_ATTR_ENCODING, message->encoding,
-              ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-              ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-              ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, message->dsn_envid,
-              ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, message->dsn_ret,
-              ATTR_TYPE_FUNC, msg_stats_print, (void *) &stats,
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+              SEND_ATTR_STR(MAIL_ATTR_QUEUE, message->queue_name),
+              SEND_ATTR_STR(MAIL_ATTR_QUEUEID, message->queue_id),
+              SEND_ATTR_LONG(MAIL_ATTR_OFFSET, message->data_offset),
+              SEND_ATTR_LONG(MAIL_ATTR_SIZE, message->cont_length),
+              SEND_ATTR_STR(MAIL_ATTR_NEXTHOP, entry->queue->nexthop),
+              SEND_ATTR_STR(MAIL_ATTR_ENCODING, message->encoding),
+              SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+              SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+              SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, message->dsn_envid),
+              SEND_ATTR_INT(MAIL_ATTR_DSN_RET, message->dsn_ret),
+              SEND_ATTR_FUNC(msg_stats_print, (void *) &stats),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_NAME, message->client_name,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_ADDR, message->client_addr,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_PORT, message->client_port,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_PROTO_NAME, message->client_proto,
-              ATTR_TYPE_STR, MAIL_ATTR_LOG_HELO_NAME, message->client_helo,
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_NAME, message->client_name),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_ADDR, message->client_addr),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_PORT, message->client_port),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_PROTO_NAME, message->client_proto),
+              SEND_ATTR_STR(MAIL_ATTR_LOG_HELO_NAME, message->client_helo),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-              ATTR_TYPE_STR, MAIL_ATTR_SASL_METHOD, message->sasl_method,
-            ATTR_TYPE_STR, MAIL_ATTR_SASL_USERNAME, message->sasl_username,
-              ATTR_TYPE_STR, MAIL_ATTR_SASL_SENDER, message->sasl_sender,
+              SEND_ATTR_STR(MAIL_ATTR_SASL_METHOD, message->sasl_method),
+            SEND_ATTR_STR(MAIL_ATTR_SASL_USERNAME, message->sasl_username),
+              SEND_ATTR_STR(MAIL_ATTR_SASL_SENDER, message->sasl_sender),
     /* XXX Ditto if we want to pass TLS certificate info. */
-              ATTR_TYPE_STR, MAIL_ATTR_LOG_IDENT, message->log_ident,
-            ATTR_TYPE_STR, MAIL_ATTR_RWR_CONTEXT, message->rewrite_context,
-              ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT, list.len,
+              SEND_ATTR_STR(MAIL_ATTR_LOG_IDENT, message->log_ident),
+            SEND_ATTR_STR(MAIL_ATTR_RWR_CONTEXT, message->rewrite_context),
+              SEND_ATTR_INT(MAIL_ATTR_RCPT_COUNT, list.len),
               ATTR_TYPE_END);
     if (sender_buf != 0)
        vstring_free(sender_buf);
     for (recipient = list.info; recipient < list.info + list.len; recipient++)
        attr_print(stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_FUNC, rcpt_print, (void *) recipient,
+                  SEND_ATTR_FUNC(rcpt_print, (void *) recipient),
                   ATTR_TYPE_END);
     if (vstream_fflush(stream) != 0) {
        msg_warn("write to process (%s): %m", entry->queue->transport->name);
index 613cc87687e8ce0fe858370531bd566818ba762f..300b9e15b5fe56a97aef76d631e84c918888a128 100644 (file)
@@ -60,7 +60,9 @@ depend: $(MAKES)
 
 # do not edit below this line - it is generated by 'make depend'
 pickup.o: ../../include/attr.h
+pickup.o: ../../include/check_arg.h
 pickup.o: ../../include/cleanup_user.h
+pickup.o: ../../include/htable.h
 pickup.o: ../../include/input_transp.h
 pickup.o: ../../include/iostuff.h
 pickup.o: ../../include/lex_822.h
@@ -74,6 +76,7 @@ pickup.o: ../../include/mail_server.h
 pickup.o: ../../include/mail_version.h
 pickup.o: ../../include/msg.h
 pickup.o: ../../include/mymalloc.h
+pickup.o: ../../include/nvtable.h
 pickup.o: ../../include/rec_attr_map.h
 pickup.o: ../../include/rec_type.h
 pickup.o: ../../include/record.h
index 27a86543db1309a53dedc3e84a8a68c77c59453a..1b11fda2873a3c096cd795a3a4344569e229d663 100644 (file)
@@ -396,8 +396,8 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
      */
     rec_fputs(cleanup, REC_TYPE_END, "");
     if (attr_scan(cleanup, ATTR_FLAG_MISSING,
-                 ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
-                 ATTR_TYPE_STR, MAIL_ATTR_WHY, buf,
+                 RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
+                 RECV_ATTR_STR(MAIL_ATTR_WHY, buf),
                  ATTR_TYPE_END) != 2)
        return (cleanup_service_error(info, CLEANUP_STAT_WRITE));
 
@@ -471,10 +471,10 @@ static int pickup_file(PICKUP_INFO *info)
 
     cleanup = mail_connect_wait(MAIL_CLASS_PUBLIC, var_cleanup_service);
     if (attr_scan(cleanup, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, buf,
+                 RECV_ATTR_STR(MAIL_ATTR_QUEUEID, buf),
                  ATTR_TYPE_END) != 1
        || attr_print(cleanup, ATTR_FLAG_NONE,
-                     ATTR_TYPE_INT, MAIL_ATTR_FLAGS, cleanup_flags,
+                     SEND_ATTR_INT(MAIL_ATTR_FLAGS, cleanup_flags),
                      ATTR_TYPE_END) != 0) {
        status = KEEP_MESSAGE_FILE;
     } else {
index 4818d7644a2bea420a21240df1088dd4fbdb81ea..2649d8ca1f4b09017e3bc81fe00fb719f18e1aac 100644 (file)
@@ -63,6 +63,7 @@ pipe.o: ../../include/argv.h
 pipe.o: ../../include/attr.h
 pipe.o: ../../include/bounce.h
 pipe.o: ../../include/canon_addr.h
+pipe.o: ../../include/check_arg.h
 pipe.o: ../../include/defer.h
 pipe.o: ../../include/deliver_completed.h
 pipe.o: ../../include/deliver_request.h
@@ -87,6 +88,7 @@ pipe.o: ../../include/msg.h
 pipe.o: ../../include/msg_stats.h
 pipe.o: ../../include/myflock.h
 pipe.o: ../../include/mymalloc.h
+pipe.o: ../../include/nvtable.h
 pipe.o: ../../include/off_cvt.h
 pipe.o: ../../include/pipe_command.h
 pipe.o: ../../include/quote_822_local.h
index 1abda27a01da64c0e56401736d6fbed0f8560ddf..ba6dd331b47281d020825008a6cd53045af49582 100644 (file)
@@ -99,6 +99,8 @@ depend: $(MAKES)
 
 # do not edit below this line - it is generated by 'make depend'
 postcat.o: ../../include/attr.h
+postcat.o: ../../include/check_arg.h
+postcat.o: ../../include/htable.h
 postcat.o: ../../include/iostuff.h
 postcat.o: ../../include/is_header.h
 postcat.o: ../../include/lex_822.h
@@ -109,6 +111,8 @@ postcat.o: ../../include/mail_queue.h
 postcat.o: ../../include/mail_version.h
 postcat.o: ../../include/msg.h
 postcat.o: ../../include/msg_vstream.h
+postcat.o: ../../include/mymalloc.h
+postcat.o: ../../include/nvtable.h
 postcat.o: ../../include/rec_type.h
 postcat.o: ../../include/record.h
 postcat.o: ../../include/stringops.h
index 069cb8d7aa392e33ca35c8cac2e73b221d92153c..78f22f3531ecab9052084fc8db48f14e64f3c8dd 100644 (file)
@@ -857,6 +857,7 @@ postconf.o: postconf.c
 postconf.o: postconf.h
 postconf_builtin.o: ../../include/argv.h
 postconf_builtin.o: ../../include/attr.h
+postconf_builtin.o: ../../include/check_arg.h
 postconf_builtin.o: ../../include/dict.h
 postconf_builtin.o: ../../include/get_hostname.h
 postconf_builtin.o: ../../include/htable.h
@@ -872,6 +873,7 @@ postconf_builtin.o: ../../include/myflock.h
 postconf_builtin.o: ../../include/mymalloc.h
 postconf_builtin.o: ../../include/mynetworks.h
 postconf_builtin.o: ../../include/name_code.h
+postconf_builtin.o: ../../include/nvtable.h
 postconf_builtin.o: ../../include/server_acl.h
 postconf_builtin.o: ../../include/stringops.h
 postconf_builtin.o: ../../include/sys_defs.h
index 4f99efb5f1304187c002ccd4d54f66626e83fa1b..024b09ec8e57f934a2542d1ba1c80ecfb5d4d39c 100644 (file)
@@ -60,8 +60,10 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 postdrop.o: ../../include/argv.h
 postdrop.o: ../../include/attr.h
+postdrop.o: ../../include/check_arg.h
 postdrop.o: ../../include/clean_env.h
 postdrop.o: ../../include/cleanup_user.h
+postdrop.o: ../../include/htable.h
 postdrop.o: ../../include/iostuff.h
 postdrop.o: ../../include/mail_conf.h
 postdrop.o: ../../include/mail_dict.h
@@ -76,6 +78,7 @@ postdrop.o: ../../include/msg.h
 postdrop.o: ../../include/msg_syslog.h
 postdrop.o: ../../include/msg_vstream.h
 postdrop.o: ../../include/mymalloc.h
+postdrop.o: ../../include/nvtable.h
 postdrop.o: ../../include/rec_attr_map.h
 postdrop.o: ../../include/rec_type.h
 postdrop.o: ../../include/record.h
index 437e8b3a4c63a7613cda50f8b04f896b27310cef..14e32066368e27d0017a61abc2ef82b5edfbb56f 100644 (file)
@@ -374,7 +374,7 @@ int     main(int argc, char **argv)
     dst = mail_stream_file(MAIL_QUEUE_MAILDROP, MAIL_CLASS_PUBLIC,
                           var_pickup_service, 0444);
     attr_print(VSTREAM_OUT, ATTR_FLAG_NONE,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, dst->id,
+              SEND_ATTR_STR(MAIL_ATTR_QUEUEID, dst->id),
               ATTR_TYPE_END);
     vstream_fflush(VSTREAM_OUT);
     postdrop_path = mystrdup(VSTREAM_PATH(dst->stream));
@@ -516,8 +516,8 @@ int     main(int argc, char **argv)
      * Send the completion status to the caller and terminate.
      */
     attr_print(VSTREAM_OUT, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
-              ATTR_TYPE_STR, MAIL_ATTR_WHY, "",
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
+              SEND_ATTR_STR(MAIL_ATTR_WHY, ""),
               ATTR_TYPE_END);
     vstream_fflush(VSTREAM_OUT);
     exit(status);
index 74f1cddaef8480685508dfcfb51e2166928b018c..e0661c4c87d07a4d60e54d8f9b1d3334ff6d343e 100644 (file)
@@ -59,7 +59,9 @@ depend: $(MAKES)
 
 # do not edit below this line - it is generated by 'make depend'
 postkick.o: ../../include/attr.h
+postkick.o: ../../include/check_arg.h
 postkick.o: ../../include/events.h
+postkick.o: ../../include/htable.h
 postkick.o: ../../include/iostuff.h
 postkick.o: ../../include/mail_conf.h
 postkick.o: ../../include/mail_params.h
@@ -68,9 +70,11 @@ postkick.o: ../../include/mail_version.h
 postkick.o: ../../include/msg.h
 postkick.o: ../../include/msg_vstream.h
 postkick.o: ../../include/mymalloc.h
+postkick.o: ../../include/nvtable.h
 postkick.o: ../../include/safe.h
 postkick.o: ../../include/sys_defs.h
 postkick.o: ../../include/vbuf.h
 postkick.o: ../../include/vstream.h
+postkick.o: ../../include/vstring.h
 postkick.o: ../../include/warn_stat.h
 postkick.o: postkick.c
index 55381638cbec833167dc1a2ebf0aad259207e9fe..b7a3341e337de63f5cf266aa8a5ddf19a85d2b17 100644 (file)
@@ -60,10 +60,12 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 postqueue.o: ../../include/argv.h
 postqueue.o: ../../include/attr.h
+postqueue.o: ../../include/check_arg.h
 postqueue.o: ../../include/clean_env.h
 postqueue.o: ../../include/connect.h
 postqueue.o: ../../include/events.h
 postqueue.o: ../../include/flush_clnt.h
+postqueue.o: ../../include/htable.h
 postqueue.o: ../../include/iostuff.h
 postqueue.o: ../../include/mail_conf.h
 postqueue.o: ../../include/mail_dict.h
@@ -79,6 +81,7 @@ postqueue.o: ../../include/msg.h
 postqueue.o: ../../include/msg_syslog.h
 postqueue.o: ../../include/msg_vstream.h
 postqueue.o: ../../include/mymalloc.h
+postqueue.o: ../../include/nvtable.h
 postqueue.o: ../../include/safe.h
 postqueue.o: ../../include/smtp_stream.h
 postqueue.o: ../../include/sys_defs.h
index a15f41afb8415b12b7b9afac99264c3cc6a7f153..5ccbb12445128e17b2af6b8cee7a6e7dc294fac0 100644 (file)
@@ -73,6 +73,7 @@ depend: $(MAKES)
 postscreen.o: ../../include/addr_match_list.h
 postscreen.o: ../../include/argv.h
 postscreen.o: ../../include/attr.h
+postscreen.o: ../../include/check_arg.h
 postscreen.o: ../../include/data_redirect.h
 postscreen.o: ../../include/dict.h
 postscreen.o: ../../include/dict_cache.h
@@ -92,6 +93,7 @@ postscreen.o: ../../include/myaddrinfo.h
 postscreen.o: ../../include/myflock.h
 postscreen.o: ../../include/mymalloc.h
 postscreen.o: ../../include/name_code.h
+postscreen.o: ../../include/nvtable.h
 postscreen.o: ../../include/server_acl.h
 postscreen.o: ../../include/set_eugid.h
 postscreen.o: ../../include/string_list.h
@@ -123,6 +125,7 @@ postscreen_dict.o: postscreen_dict.c
 postscreen_dnsbl.o: ../../include/addr_match_list.h
 postscreen_dnsbl.o: ../../include/argv.h
 postscreen_dnsbl.o: ../../include/attr.h
+postscreen_dnsbl.o: ../../include/check_arg.h
 postscreen_dnsbl.o: ../../include/connect.h
 postscreen_dnsbl.o: ../../include/dict.h
 postscreen_dnsbl.o: ../../include/dict_cache.h
@@ -138,6 +141,7 @@ postscreen_dnsbl.o: ../../include/msg.h
 postscreen_dnsbl.o: ../../include/myaddrinfo.h
 postscreen_dnsbl.o: ../../include/myflock.h
 postscreen_dnsbl.o: ../../include/mymalloc.h
+postscreen_dnsbl.o: ../../include/nvtable.h
 postscreen_dnsbl.o: ../../include/server_acl.h
 postscreen_dnsbl.o: ../../include/split_at.h
 postscreen_dnsbl.o: ../../include/string_list.h
@@ -197,6 +201,7 @@ postscreen_endpt.o: postscreen_haproxy.h
 postscreen_expand.o: ../../include/addr_match_list.h
 postscreen_expand.o: ../../include/argv.h
 postscreen_expand.o: ../../include/attr.h
+postscreen_expand.o: ../../include/check_arg.h
 postscreen_expand.o: ../../include/dict.h
 postscreen_expand.o: ../../include/dict_cache.h
 postscreen_expand.o: ../../include/events.h
@@ -209,6 +214,8 @@ postscreen_expand.o: ../../include/match_list.h
 postscreen_expand.o: ../../include/msg.h
 postscreen_expand.o: ../../include/myaddrinfo.h
 postscreen_expand.o: ../../include/myflock.h
+postscreen_expand.o: ../../include/mymalloc.h
+postscreen_expand.o: ../../include/nvtable.h
 postscreen_expand.o: ../../include/server_acl.h
 postscreen_expand.o: ../../include/string_list.h
 postscreen_expand.o: ../../include/stringops.h
@@ -267,6 +274,7 @@ postscreen_misc.o: postscreen_misc.c
 postscreen_send.o: ../../include/addr_match_list.h
 postscreen_send.o: ../../include/argv.h
 postscreen_send.o: ../../include/attr.h
+postscreen_send.o: ../../include/check_arg.h
 postscreen_send.o: ../../include/connect.h
 postscreen_send.o: ../../include/dict.h
 postscreen_send.o: ../../include/dict_cache.h
@@ -282,6 +290,8 @@ postscreen_send.o: ../../include/match_list.h
 postscreen_send.o: ../../include/msg.h
 postscreen_send.o: ../../include/myaddrinfo.h
 postscreen_send.o: ../../include/myflock.h
+postscreen_send.o: ../../include/mymalloc.h
+postscreen_send.o: ../../include/nvtable.h
 postscreen_send.o: ../../include/server_acl.h
 postscreen_send.o: ../../include/smtp_reply_footer.h
 postscreen_send.o: ../../include/string_list.h
@@ -294,6 +304,7 @@ postscreen_send.o: postscreen_send.c
 postscreen_smtpd.o: ../../include/addr_match_list.h
 postscreen_smtpd.o: ../../include/argv.h
 postscreen_smtpd.o: ../../include/attr.h
+postscreen_smtpd.o: ../../include/check_arg.h
 postscreen_smtpd.o: ../../include/dict.h
 postscreen_smtpd.o: ../../include/dict_cache.h
 postscreen_smtpd.o: ../../include/dns.h
@@ -313,6 +324,7 @@ postscreen_smtpd.o: ../../include/myflock.h
 postscreen_smtpd.o: ../../include/mymalloc.h
 postscreen_smtpd.o: ../../include/name_code.h
 postscreen_smtpd.o: ../../include/name_mask.h
+postscreen_smtpd.o: ../../include/nvtable.h
 postscreen_smtpd.o: ../../include/server_acl.h
 postscreen_smtpd.o: ../../include/sock_addr.h
 postscreen_smtpd.o: ../../include/string_list.h
@@ -327,6 +339,7 @@ postscreen_smtpd.o: postscreen_smtpd.c
 postscreen_starttls.o: ../../include/addr_match_list.h
 postscreen_starttls.o: ../../include/argv.h
 postscreen_starttls.o: ../../include/attr.h
+postscreen_starttls.o: ../../include/check_arg.h
 postscreen_starttls.o: ../../include/connect.h
 postscreen_starttls.o: ../../include/dict.h
 postscreen_starttls.o: ../../include/dict_cache.h
@@ -344,6 +357,7 @@ postscreen_starttls.o: ../../include/myflock.h
 postscreen_starttls.o: ../../include/mymalloc.h
 postscreen_starttls.o: ../../include/name_code.h
 postscreen_starttls.o: ../../include/name_mask.h
+postscreen_starttls.o: ../../include/nvtable.h
 postscreen_starttls.o: ../../include/server_acl.h
 postscreen_starttls.o: ../../include/sock_addr.h
 postscreen_starttls.o: ../../include/string_list.h
@@ -359,6 +373,7 @@ postscreen_starttls.o: postscreen_starttls.c
 postscreen_state.o: ../../include/addr_match_list.h
 postscreen_state.o: ../../include/argv.h
 postscreen_state.o: ../../include/attr.h
+postscreen_state.o: ../../include/check_arg.h
 postscreen_state.o: ../../include/dict.h
 postscreen_state.o: ../../include/dict_cache.h
 postscreen_state.o: ../../include/events.h
@@ -373,6 +388,7 @@ postscreen_state.o: ../../include/myaddrinfo.h
 postscreen_state.o: ../../include/myflock.h
 postscreen_state.o: ../../include/mymalloc.h
 postscreen_state.o: ../../include/name_mask.h
+postscreen_state.o: ../../include/nvtable.h
 postscreen_state.o: ../../include/server_acl.h
 postscreen_state.o: ../../include/string_list.h
 postscreen_state.o: ../../include/sys_defs.h
index 5aa7850e7b8855fcb18761d8a3a20affa494cac9..8d51673385e372661b09959d6713ab909f4806b8 100644 (file)
@@ -370,10 +370,10 @@ static void psc_dnsbl_receive(int event, void *context)
     if (event == EVENT_READ
        && attr_scan(stream,
                     ATTR_FLAG_STRICT,
-                    ATTR_TYPE_STR, MAIL_ATTR_RBL_DOMAIN, reply_dnsbl,
-                    ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, reply_client,
-                    ATTR_TYPE_INT, MAIL_ATTR_LABEL, &request_id,
-                    ATTR_TYPE_STR, MAIL_ATTR_RBL_ADDR, reply_addr,
+                    RECV_ATTR_STR(MAIL_ATTR_RBL_DOMAIN, reply_dnsbl),
+                    RECV_ATTR_STR(MAIL_ATTR_ACT_CLIENT_ADDR, reply_client),
+                    RECV_ATTR_INT(MAIL_ATTR_LABEL, &request_id),
+                    RECV_ATTR_STR(MAIL_ATTR_RBL_ADDR, reply_addr),
                     ATTR_TYPE_END) == 4
        && (score = (PSC_DNSBL_SCORE *)
            htable_find(dnsbl_score_cache, STR(reply_client))) != 0
@@ -509,9 +509,9 @@ int     psc_dnsbl_request(const char *client_addr,
                        VSTREAM_CTL_CONTEXT, ht[0]->key,
                        VSTREAM_CTL_END);
        attr_print(stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_STR, MAIL_ATTR_RBL_DOMAIN, ht[0]->key,
-                  ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, client_addr,
-                  ATTR_TYPE_INT, MAIL_ATTR_LABEL, score->request_id,
+                  SEND_ATTR_STR(MAIL_ATTR_RBL_DOMAIN, ht[0]->key),
+                  SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_ADDR, client_addr),
+                  SEND_ATTR_INT(MAIL_ATTR_LABEL, score->request_id),
                   ATTR_TYPE_END);
        if (vstream_fflush(stream) != 0) {
            msg_warn("%s: error sending to %s service: %m",
index 7abb73426ae2b2987b9277032362f1b6ecb3d68b..9561629da08d82c6382290a6e776a94b0ebe5541 100644 (file)
@@ -209,11 +209,12 @@ void    psc_send_socket(PSC_STATE *state)
        (LOCAL_SEND_FD(server_fd,
                       vstream_fileno(state->smtp_client_stream)) < 0
         || (attr_print(fp, ATTR_FLAG_NONE,
-         ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, state->smtp_client_addr,
-         ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_PORT, state->smtp_client_port,
-         ATTR_TYPE_STR, MAIL_ATTR_ACT_SERVER_ADDR, state->smtp_server_addr,
-         ATTR_TYPE_STR, MAIL_ATTR_ACT_SERVER_PORT, state->smtp_server_port,
+         SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_ADDR, state->smtp_client_addr),
+         SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_PORT, state->smtp_client_port),
+         SEND_ATTR_STR(MAIL_ATTR_ACT_SERVER_ADDR, state->smtp_server_addr),
+         SEND_ATTR_STR(MAIL_ATTR_ACT_SERVER_PORT, state->smtp_server_port),
                        ATTR_TYPE_END) || vstream_fflush(fp)));
+    /* XXX Note: no read between attr_print() and vstream_fdclose(). */
     (void) vstream_fdclose(fp);
     if (pass_err != 0) {
        msg_warn("cannot pass connection to service %s: %m",
index d00f12443bd6853e30b616686ec62d6c92b3db32..a4b40085c80282589f7d0776872675f541f917ad 100644 (file)
@@ -118,7 +118,7 @@ static void psc_starttls_finish(int event, void *context)
      */
     if (event != EVENT_READ
        || attr_scan(tlsproxy_stream, ATTR_FLAG_STRICT,
-                    ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                    RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                     ATTR_TYPE_END) != 1 || status == 0) {
 
        /*
@@ -226,10 +226,10 @@ void    psc_starttls_open(PSC_STATE *smtp_state, EVENT_NOTIFY_FN resume_event)
     vstring_sprintf(remote_endpt, "[%s]:%s", smtp_state->smtp_client_addr,
                    smtp_state->smtp_client_port);
     attr_print(tlsproxy_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_STR, MAIL_ATTR_REMOTE_ENDPT, STR(remote_endpt),
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, TLS_PROXY_FLAG_ROLE_SERVER,
-              ATTR_TYPE_INT, MAIL_ATTR_TIMEOUT, psc_normal_cmd_time_limit,
-              ATTR_TYPE_STR, MAIL_ATTR_SERVER_ID, MAIL_SERVICE_SMTPD,  /* XXX */
+              SEND_ATTR_STR(MAIL_ATTR_REMOTE_ENDPT, STR(remote_endpt)),
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, TLS_PROXY_FLAG_ROLE_SERVER),
+              SEND_ATTR_INT(MAIL_ATTR_TIMEOUT, psc_normal_cmd_time_limit),
+              SEND_ATTR_STR(MAIL_ATTR_SERVER_ID, MAIL_SERVICE_SMTPD),  /* XXX */
               ATTR_TYPE_END);
     if (vstream_fflush(tlsproxy_stream) != 0) {
        msg_warn("error sending request to %s service: %m", psc_tlsp_service);
index 387bb890f65b2c9ecb79747b2c8666841447354d..5a61fbba687ccab28e2757790a3e38d10a32885f 100644 (file)
@@ -61,6 +61,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 proxymap.o: ../../include/argv.h
 proxymap.o: ../../include/attr.h
+proxymap.o: ../../include/check_arg.h
 proxymap.o: ../../include/dict.h
 proxymap.o: ../../include/dict_proxy.h
 proxymap.o: ../../include/htable.h
@@ -73,6 +74,7 @@ proxymap.o: ../../include/mail_version.h
 proxymap.o: ../../include/msg.h
 proxymap.o: ../../include/myflock.h
 proxymap.o: ../../include/mymalloc.h
+proxymap.o: ../../include/nvtable.h
 proxymap.o: ../../include/stringops.h
 proxymap.o: ../../include/sys_defs.h
 proxymap.o: ../../include/vbuf.h
index 11a1b2fb19ad4e8393592830cbdaa98ebdfebe1f..31ae405fb6515cee6e0639ac75914b22b4c6d0af 100644 (file)
@@ -361,9 +361,9 @@ static void proxymap_sequence_service(VSTREAM *client_stream)
      * Process the request.
      */
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
-                 ATTR_TYPE_INT, MAIL_ATTR_FUNC, &request_func,
+                 RECV_ATTR_STR(MAIL_ATTR_TABLE, request_map),
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &request_flags),
+                 RECV_ATTR_INT(MAIL_ATTR_FUNC, &request_func),
                  ATTR_TYPE_END) != 3
        || (request_func != DICT_SEQ_FUN_FIRST
            && request_func != DICT_SEQ_FUN_NEXT)) {
@@ -391,9 +391,9 @@ static void proxymap_sequence_service(VSTREAM *client_stream)
      * Respond to the client.
      */
     attr_print(client_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
-              ATTR_TYPE_STR, MAIL_ATTR_KEY, reply_key,
-              ATTR_TYPE_STR, MAIL_ATTR_VALUE, reply_value,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, reply_status),
+              SEND_ATTR_STR(MAIL_ATTR_KEY, reply_key),
+              SEND_ATTR_STR(MAIL_ATTR_VALUE, reply_value),
               ATTR_TYPE_END);
 }
 
@@ -410,9 +410,9 @@ static void proxymap_lookup_service(VSTREAM *client_stream)
      * Process the request.
      */
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
-                 ATTR_TYPE_STR, MAIL_ATTR_KEY, request_key,
+                 RECV_ATTR_STR(MAIL_ATTR_TABLE, request_map),
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &request_flags),
+                 RECV_ATTR_STR(MAIL_ATTR_KEY, request_key),
                  ATTR_TYPE_END) != 3) {
        reply_status = PROXY_STAT_BAD;
        reply_value = "";
@@ -435,8 +435,8 @@ static void proxymap_lookup_service(VSTREAM *client_stream)
      * Respond to the client.
      */
     attr_print(client_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
-              ATTR_TYPE_STR, MAIL_ATTR_VALUE, reply_value,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, reply_status),
+              SEND_ATTR_STR(MAIL_ATTR_VALUE, reply_value),
               ATTR_TYPE_END);
 }
 
@@ -459,10 +459,10 @@ static void proxymap_update_service(VSTREAM *client_stream)
      * otherwise.
      */
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
-                 ATTR_TYPE_STR, MAIL_ATTR_KEY, request_key,
-                 ATTR_TYPE_STR, MAIL_ATTR_VALUE, request_value,
+                 RECV_ATTR_STR(MAIL_ATTR_TABLE, request_map),
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &request_flags),
+                 RECV_ATTR_STR(MAIL_ATTR_KEY, request_key),
+                 RECV_ATTR_STR(MAIL_ATTR_VALUE, request_value),
                  ATTR_TYPE_END) != 4) {
        reply_status = PROXY_STAT_BAD;
     } else if (proxy_writer == 0) {
@@ -490,7 +490,7 @@ static void proxymap_update_service(VSTREAM *client_stream)
      * Respond to the client.
      */
     attr_print(client_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, reply_status),
               ATTR_TYPE_END);
 }
 
@@ -510,9 +510,9 @@ static void proxymap_delete_service(VSTREAM *client_stream)
      * that the on-disk data is in a consistent state between updates.
      */
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
-                 ATTR_TYPE_STR, MAIL_ATTR_KEY, request_key,
+                 RECV_ATTR_STR(MAIL_ATTR_TABLE, request_map),
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &request_flags),
+                 RECV_ATTR_STR(MAIL_ATTR_KEY, request_key),
                  ATTR_TYPE_END) != 3) {
        reply_status = PROXY_STAT_BAD;
     } else if (proxy_writer == 0) {
@@ -540,7 +540,7 @@ static void proxymap_delete_service(VSTREAM *client_stream)
      * Respond to the client.
      */
     attr_print(client_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, reply_status),
               ATTR_TYPE_END);
 }
 
@@ -557,8 +557,8 @@ static void proxymap_open_service(VSTREAM *client_stream)
      * Process the request.
      */
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_TABLE, request_map,
-                 ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &request_flags,
+                 RECV_ATTR_STR(MAIL_ATTR_TABLE, request_map),
+                 RECV_ATTR_INT(MAIL_ATTR_FLAGS, &request_flags),
                  ATTR_TYPE_END) != 2) {
        reply_status = PROXY_STAT_BAD;
        reply_flags = 0;
@@ -574,8 +574,8 @@ static void proxymap_open_service(VSTREAM *client_stream)
      * Respond to the client.
      */
     attr_print(client_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_STATUS, reply_status,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, reply_flags,
+              SEND_ATTR_INT(MAIL_ATTR_STATUS, reply_status),
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, reply_flags),
               ATTR_TYPE_END);
 }
 
@@ -609,7 +609,7 @@ static void proxymap_service(VSTREAM *client_stream, char *unused_service,
                    VSTREAM_CTL_END);
     if (attr_scan(client_stream,
                  ATTR_FLAG_MORE | ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
+                 RECV_ATTR_STR(MAIL_ATTR_REQ, request),
                  ATTR_TYPE_END) == 1) {
        if (VSTREQ(request, PROXY_REQ_LOOKUP)) {
            proxymap_lookup_service(client_stream);
@@ -624,7 +624,7 @@ static void proxymap_service(VSTREAM *client_stream, char *unused_service,
        } else {
            msg_warn("unrecognized request: \"%s\", ignored", STR(request));
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, PROXY_STAT_BAD,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, PROXY_STAT_BAD),
                       ATTR_TYPE_END);
        }
     }
index 6bf8824da39f4149861beeae016818df1703eb67..243a9b0917f9ebfc2eb115d1255722d74010ce56 100644 (file)
@@ -70,10 +70,12 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 qmgr.o: ../../include/argv.h
 qmgr.o: ../../include/attr.h
+qmgr.o: ../../include/check_arg.h
 qmgr.o: ../../include/dict.h
 qmgr.o: ../../include/dsn.h
 qmgr.o: ../../include/events.h
 qmgr.o: ../../include/flush_clnt.h
+qmgr.o: ../../include/htable.h
 qmgr.o: ../../include/iostuff.h
 qmgr.o: ../../include/mail_conf.h
 qmgr.o: ../../include/mail_flow.h
@@ -85,6 +87,8 @@ qmgr.o: ../../include/mail_version.h
 qmgr.o: ../../include/master_proto.h
 qmgr.o: ../../include/msg.h
 qmgr.o: ../../include/myflock.h
+qmgr.o: ../../include/mymalloc.h
+qmgr.o: ../../include/nvtable.h
 qmgr.o: ../../include/recipient_list.h
 qmgr.o: ../../include/scan_dir.h
 qmgr.o: ../../include/sys_defs.h
@@ -96,18 +100,21 @@ qmgr.o: qmgr.h
 qmgr_active.o: ../../include/abounce.h
 qmgr_active.o: ../../include/attr.h
 qmgr_active.o: ../../include/bounce.h
+qmgr_active.o: ../../include/check_arg.h
 qmgr_active.o: ../../include/defer.h
 qmgr_active.o: ../../include/deliver_request.h
 qmgr_active.o: ../../include/dsn.h
 qmgr_active.o: ../../include/dsn_buf.h
 qmgr_active.o: ../../include/dsn_mask.h
 qmgr_active.o: ../../include/events.h
+qmgr_active.o: ../../include/htable.h
 qmgr_active.o: ../../include/mail_open_ok.h
 qmgr_active.o: ../../include/mail_params.h
 qmgr_active.o: ../../include/mail_queue.h
 qmgr_active.o: ../../include/msg.h
 qmgr_active.o: ../../include/msg_stats.h
 qmgr_active.o: ../../include/mymalloc.h
+qmgr_active.o: ../../include/nvtable.h
 qmgr_active.o: ../../include/qmgr_user.h
 qmgr_active.o: ../../include/rec_type.h
 qmgr_active.o: ../../include/recipient_list.h
@@ -122,11 +129,15 @@ qmgr_active.o: qmgr.h
 qmgr_active.o: qmgr_active.c
 qmgr_bounce.o: ../../include/attr.h
 qmgr_bounce.o: ../../include/bounce.h
+qmgr_bounce.o: ../../include/check_arg.h
 qmgr_bounce.o: ../../include/deliver_completed.h
 qmgr_bounce.o: ../../include/deliver_request.h
 qmgr_bounce.o: ../../include/dsn.h
 qmgr_bounce.o: ../../include/dsn_buf.h
+qmgr_bounce.o: ../../include/htable.h
 qmgr_bounce.o: ../../include/msg_stats.h
+qmgr_bounce.o: ../../include/mymalloc.h
+qmgr_bounce.o: ../../include/nvtable.h
 qmgr_bounce.o: ../../include/recipient_list.h
 qmgr_bounce.o: ../../include/scan_dir.h
 qmgr_bounce.o: ../../include/sys_defs.h
@@ -137,14 +148,18 @@ qmgr_bounce.o: qmgr.h
 qmgr_bounce.o: qmgr_bounce.c
 qmgr_defer.o: ../../include/attr.h
 qmgr_defer.o: ../../include/bounce.h
+qmgr_defer.o: ../../include/check_arg.h
 qmgr_defer.o: ../../include/defer.h
 qmgr_defer.o: ../../include/deliver_request.h
 qmgr_defer.o: ../../include/dsn.h
 qmgr_defer.o: ../../include/dsn_buf.h
+qmgr_defer.o: ../../include/htable.h
 qmgr_defer.o: ../../include/iostuff.h
 qmgr_defer.o: ../../include/mail_proto.h
 qmgr_defer.o: ../../include/msg.h
 qmgr_defer.o: ../../include/msg_stats.h
+qmgr_defer.o: ../../include/mymalloc.h
+qmgr_defer.o: ../../include/nvtable.h
 qmgr_defer.o: ../../include/recipient_list.h
 qmgr_defer.o: ../../include/scan_dir.h
 qmgr_defer.o: ../../include/sys_defs.h
@@ -154,12 +169,14 @@ qmgr_defer.o: ../../include/vstring.h
 qmgr_defer.o: qmgr.h
 qmgr_defer.o: qmgr_defer.c
 qmgr_deliver.o: ../../include/attr.h
+qmgr_deliver.o: ../../include/check_arg.h
 qmgr_deliver.o: ../../include/deliver_request.h
 qmgr_deliver.o: ../../include/dsb_scan.h
 qmgr_deliver.o: ../../include/dsn.h
 qmgr_deliver.o: ../../include/dsn_buf.h
 qmgr_deliver.o: ../../include/dsn_util.h
 qmgr_deliver.o: ../../include/events.h
+qmgr_deliver.o: ../../include/htable.h
 qmgr_deliver.o: ../../include/iostuff.h
 qmgr_deliver.o: ../../include/mail_params.h
 qmgr_deliver.o: ../../include/mail_proto.h
@@ -167,6 +184,7 @@ qmgr_deliver.o: ../../include/mail_queue.h
 qmgr_deliver.o: ../../include/msg.h
 qmgr_deliver.o: ../../include/msg_stats.h
 qmgr_deliver.o: ../../include/mymalloc.h
+qmgr_deliver.o: ../../include/nvtable.h
 qmgr_deliver.o: ../../include/rcpt_print.h
 qmgr_deliver.o: ../../include/recipient_list.h
 qmgr_deliver.o: ../../include/scan_dir.h
@@ -190,13 +208,16 @@ qmgr_enable.o: ../../include/vstream.h
 qmgr_enable.o: qmgr.h
 qmgr_enable.o: qmgr_enable.c
 qmgr_entry.o: ../../include/attr.h
+qmgr_entry.o: ../../include/check_arg.h
 qmgr_entry.o: ../../include/deliver_request.h
 qmgr_entry.o: ../../include/dsn.h
 qmgr_entry.o: ../../include/events.h
+qmgr_entry.o: ../../include/htable.h
 qmgr_entry.o: ../../include/mail_params.h
 qmgr_entry.o: ../../include/msg.h
 qmgr_entry.o: ../../include/msg_stats.h
 qmgr_entry.o: ../../include/mymalloc.h
+qmgr_entry.o: ../../include/nvtable.h
 qmgr_entry.o: ../../include/recipient_list.h
 qmgr_entry.o: ../../include/scan_dir.h
 qmgr_entry.o: ../../include/sys_defs.h
@@ -247,12 +268,14 @@ qmgr_message.o: ../../include/argv.h
 qmgr_message.o: ../../include/attr.h
 qmgr_message.o: ../../include/bounce.h
 qmgr_message.o: ../../include/canon_addr.h
+qmgr_message.o: ../../include/check_arg.h
 qmgr_message.o: ../../include/deliver_completed.h
 qmgr_message.o: ../../include/deliver_request.h
 qmgr_message.o: ../../include/dict.h
 qmgr_message.o: ../../include/dsn.h
 qmgr_message.o: ../../include/dsn_buf.h
 qmgr_message.o: ../../include/dsn_mask.h
+qmgr_message.o: ../../include/htable.h
 qmgr_message.o: ../../include/iostuff.h
 qmgr_message.o: ../../include/mail_params.h
 qmgr_message.o: ../../include/mail_proto.h
@@ -261,6 +284,7 @@ qmgr_message.o: ../../include/msg.h
 qmgr_message.o: ../../include/msg_stats.h
 qmgr_message.o: ../../include/myflock.h
 qmgr_message.o: ../../include/mymalloc.h
+qmgr_message.o: ../../include/nvtable.h
 qmgr_message.o: ../../include/opened.h
 qmgr_message.o: ../../include/qmgr_user.h
 qmgr_message.o: ../../include/rec_attr_map.h
@@ -307,6 +331,7 @@ qmgr_peer.o: ../../include/vstream.h
 qmgr_peer.o: qmgr.h
 qmgr_peer.o: qmgr_peer.c
 qmgr_queue.o: ../../include/attr.h
+qmgr_queue.o: ../../include/check_arg.h
 qmgr_queue.o: ../../include/dsn.h
 qmgr_queue.o: ../../include/events.h
 qmgr_queue.o: ../../include/htable.h
@@ -315,11 +340,13 @@ qmgr_queue.o: ../../include/mail_params.h
 qmgr_queue.o: ../../include/mail_proto.h
 qmgr_queue.o: ../../include/msg.h
 qmgr_queue.o: ../../include/mymalloc.h
+qmgr_queue.o: ../../include/nvtable.h
 qmgr_queue.o: ../../include/recipient_list.h
 qmgr_queue.o: ../../include/scan_dir.h
 qmgr_queue.o: ../../include/sys_defs.h
 qmgr_queue.o: ../../include/vbuf.h
 qmgr_queue.o: ../../include/vstream.h
+qmgr_queue.o: ../../include/vstring.h
 qmgr_queue.o: qmgr.h
 qmgr_queue.o: qmgr_queue.c
 qmgr_scan.o: ../../include/dsn.h
@@ -334,6 +361,7 @@ qmgr_scan.o: ../../include/vstream.h
 qmgr_scan.o: qmgr.h
 qmgr_scan.o: qmgr_scan.c
 qmgr_transport.o: ../../include/attr.h
+qmgr_transport.o: ../../include/check_arg.h
 qmgr_transport.o: ../../include/dsn.h
 qmgr_transport.o: ../../include/events.h
 qmgr_transport.o: ../../include/htable.h
@@ -343,10 +371,12 @@ qmgr_transport.o: ../../include/mail_params.h
 qmgr_transport.o: ../../include/mail_proto.h
 qmgr_transport.o: ../../include/msg.h
 qmgr_transport.o: ../../include/mymalloc.h
+qmgr_transport.o: ../../include/nvtable.h
 qmgr_transport.o: ../../include/recipient_list.h
 qmgr_transport.o: ../../include/scan_dir.h
 qmgr_transport.o: ../../include/sys_defs.h
 qmgr_transport.o: ../../include/vbuf.h
 qmgr_transport.o: ../../include/vstream.h
+qmgr_transport.o: ../../include/vstring.h
 qmgr_transport.o: qmgr.h
 qmgr_transport.o: qmgr_transport.c
index 6a7bdba919878fcd93dd1b5b2ac825ebfac7f3bc..2c7ca7f8d3ad81cb07adcedce40888f2f4c2c3f5 100644 (file)
@@ -101,7 +101,7 @@ static int qmgr_deliver_initial_reply(VSTREAM *stream)
        msg_warn("%s: premature disconnect", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
     } else if (attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &stat,
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &stat),
                         ATTR_TYPE_END) != 1) {
        msg_warn("%s: malformed response", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
@@ -120,8 +120,8 @@ static int qmgr_deliver_final_reply(VSTREAM *stream, DSN_BUF *dsb)
        msg_warn("%s: premature disconnect", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
     } else if (attr_scan(stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_FUNC, dsb_scan, (void *) dsb,
-                        ATTR_TYPE_INT, MAIL_ATTR_STATUS, &stat,
+                        RECV_ATTR_FUNC(dsb_scan, (void *) dsb),
+                        RECV_ATTR_INT(MAIL_ATTR_STATUS, &stat),
                         ATTR_TYPE_END) != 2) {
        msg_warn("%s: malformed response", VSTREAM_PATH(stream));
        return (DELIVER_STAT_CRASH);
@@ -174,38 +174,38 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
        | (message->inspect_xport ? DEL_REQ_FLAG_BOUNCE : DEL_REQ_FLAG_DEFLT);
     (void) QMGR_MSG_STATS(&stats, message);
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUE, message->queue_name,
-              ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, message->queue_id,
-              ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, message->data_offset,
-              ATTR_TYPE_LONG, MAIL_ATTR_SIZE, message->cont_length,
-              ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, entry->queue->nexthop,
-              ATTR_TYPE_STR, MAIL_ATTR_ENCODING, message->encoding,
-              ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
-              ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-              ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, message->dsn_envid,
-              ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, message->dsn_ret,
-              ATTR_TYPE_FUNC, msg_stats_print, (void *) &stats,
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+              SEND_ATTR_STR(MAIL_ATTR_QUEUE, message->queue_name),
+              SEND_ATTR_STR(MAIL_ATTR_QUEUEID, message->queue_id),
+              SEND_ATTR_LONG(MAIL_ATTR_OFFSET, message->data_offset),
+              SEND_ATTR_LONG(MAIL_ATTR_SIZE, message->cont_length),
+              SEND_ATTR_STR(MAIL_ATTR_NEXTHOP, entry->queue->nexthop),
+              SEND_ATTR_STR(MAIL_ATTR_ENCODING, message->encoding),
+              SEND_ATTR_INT(MAIL_ATTR_SMTPUTF8, smtputf8),
+              SEND_ATTR_STR(MAIL_ATTR_SENDER, sender),
+              SEND_ATTR_STR(MAIL_ATTR_DSN_ENVID, message->dsn_envid),
+              SEND_ATTR_INT(MAIL_ATTR_DSN_RET, message->dsn_ret),
+              SEND_ATTR_FUNC(msg_stats_print, (void *) &stats),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_NAME, message->client_name,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_ADDR, message->client_addr,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_CLIENT_PORT, message->client_port,
-            ATTR_TYPE_STR, MAIL_ATTR_LOG_PROTO_NAME, message->client_proto,
-              ATTR_TYPE_STR, MAIL_ATTR_LOG_HELO_NAME, message->client_helo,
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_NAME, message->client_name),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_ADDR, message->client_addr),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_CLIENT_PORT, message->client_port),
+            SEND_ATTR_STR(MAIL_ATTR_LOG_PROTO_NAME, message->client_proto),
+              SEND_ATTR_STR(MAIL_ATTR_LOG_HELO_NAME, message->client_helo),
     /* XXX Should be encapsulated with ATTR_TYPE_FUNC. */
-              ATTR_TYPE_STR, MAIL_ATTR_SASL_METHOD, message->sasl_method,
-            ATTR_TYPE_STR, MAIL_ATTR_SASL_USERNAME, message->sasl_username,
-              ATTR_TYPE_STR, MAIL_ATTR_SASL_SENDER, message->sasl_sender,
+              SEND_ATTR_STR(MAIL_ATTR_SASL_METHOD, message->sasl_method),
+            SEND_ATTR_STR(MAIL_ATTR_SASL_USERNAME, message->sasl_username),
+              SEND_ATTR_STR(MAIL_ATTR_SASL_SENDER, message->sasl_sender),
     /* XXX Ditto if we want to pass TLS certificate info. */
-              ATTR_TYPE_STR, MAIL_ATTR_LOG_IDENT, message->log_ident,
-            ATTR_TYPE_STR, MAIL_ATTR_RWR_CONTEXT, message->rewrite_context,
-              ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT, list.len,
+              SEND_ATTR_STR(MAIL_ATTR_LOG_IDENT, message->log_ident),
+            SEND_ATTR_STR(MAIL_ATTR_RWR_CONTEXT, message->rewrite_context),
+              SEND_ATTR_INT(MAIL_ATTR_RCPT_COUNT, list.len),
               ATTR_TYPE_END);
     if (sender_buf != 0)
        vstring_free(sender_buf);
     for (recipient = list.info; recipient < list.info + list.len; recipient++)
        attr_print(stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_FUNC, rcpt_print, (void *) recipient,
+                  SEND_ATTR_FUNC(rcpt_print, (void *) recipient),
                   ATTR_TYPE_END);
     if (vstream_fflush(stream) != 0) {
        msg_warn("write to process (%s): %m", entry->queue->transport->name);
index 74cab19d66342b0778c6e0275422c88ee736ba44..62ce2ee72d5be8bd8c539bc4ae00849c6f496fab 100644 (file)
@@ -63,9 +63,11 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 qmqpd.o: ../../include/argv.h
 qmqpd.o: ../../include/attr.h
+qmqpd.o: ../../include/check_arg.h
 qmqpd.o: ../../include/cleanup_user.h
 qmqpd.o: ../../include/debug_peer.h
 qmqpd.o: ../../include/dict.h
+qmqpd.o: ../../include/htable.h
 qmqpd.o: ../../include/inet_proto.h
 qmqpd.o: ../../include/input_transp.h
 qmqpd.o: ../../include/iostuff.h
@@ -84,6 +86,7 @@ qmqpd.o: ../../include/myflock.h
 qmqpd.o: ../../include/mymalloc.h
 qmqpd.o: ../../include/namadr_list.h
 qmqpd.o: ../../include/netstring.h
+qmqpd.o: ../../include/nvtable.h
 qmqpd.o: ../../include/quote_822_local.h
 qmqpd.o: ../../include/quote_flags.h
 qmqpd.o: ../../include/rec_type.h
@@ -98,6 +101,8 @@ qmqpd.o: ../../include/vstring.h
 qmqpd.o: qmqpd.c
 qmqpd.o: qmqpd.h
 qmqpd_peer.o: ../../include/attr.h
+qmqpd_peer.o: ../../include/check_arg.h
+qmqpd_peer.o: ../../include/htable.h
 qmqpd_peer.o: ../../include/inet_proto.h
 qmqpd_peer.o: ../../include/iostuff.h
 qmqpd_peer.o: ../../include/mail_params.h
@@ -106,6 +111,7 @@ qmqpd_peer.o: ../../include/mail_stream.h
 qmqpd_peer.o: ../../include/msg.h
 qmqpd_peer.o: ../../include/myaddrinfo.h
 qmqpd_peer.o: ../../include/mymalloc.h
+qmqpd_peer.o: ../../include/nvtable.h
 qmqpd_peer.o: ../../include/sock_addr.h
 qmqpd_peer.o: ../../include/split_at.h
 qmqpd_peer.o: ../../include/stringops.h
@@ -118,11 +124,14 @@ qmqpd_peer.o: ../../include/vstring.h
 qmqpd_peer.o: qmqpd.h
 qmqpd_peer.o: qmqpd_peer.c
 qmqpd_state.o: ../../include/attr.h
+qmqpd_state.o: ../../include/check_arg.h
 qmqpd_state.o: ../../include/cleanup_user.h
+qmqpd_state.o: ../../include/htable.h
 qmqpd_state.o: ../../include/iostuff.h
 qmqpd_state.o: ../../include/mail_proto.h
 qmqpd_state.o: ../../include/mail_stream.h
 qmqpd_state.o: ../../include/mymalloc.h
+qmqpd_state.o: ../../include/nvtable.h
 qmqpd_state.o: ../../include/sys_defs.h
 qmqpd_state.o: ../../include/vbuf.h
 qmqpd_state.o: ../../include/vstream.h
index 7e01485ccf853aac5b0450d0e256e03ee9732e74..a1b4ba06ce997249aaa318fb8b66d865045f0959 100644 (file)
@@ -253,7 +253,7 @@ static void qmqpd_open_file(QMQPD_STATE *state)
     state->dest = mail_stream_service(MAIL_CLASS_PUBLIC, var_cleanup_service);
     if (state->dest == 0
        || attr_print(state->dest->stream, ATTR_FLAG_NONE,
-                     ATTR_TYPE_INT, MAIL_ATTR_FLAGS, cleanup_flags,
+                     SEND_ATTR_INT(MAIL_ATTR_FLAGS, cleanup_flags),
                      ATTR_TYPE_END) != 0)
        msg_fatal("unable to connect to the %s %s service",
                  MAIL_CLASS_PUBLIC, var_cleanup_service);
index 274fb8aaa94552e9d13dd8e191976fee7897d5fa..7ccfa3f33cd0fcf1eb6866a80f374ffcbfdf621f 100644 (file)
@@ -60,6 +60,7 @@ depend: $(MAKES)
 
 # do not edit below this line - it is generated by 'make depend'
 scache.o: ../../include/attr.h
+scache.o: ../../include/check_arg.h
 scache.o: ../../include/events.h
 scache.o: ../../include/htable.h
 scache.o: ../../include/iostuff.h
@@ -69,6 +70,8 @@ scache.o: ../../include/mail_proto.h
 scache.o: ../../include/mail_server.h
 scache.o: ../../include/mail_version.h
 scache.o: ../../include/msg.h
+scache.o: ../../include/mymalloc.h
+scache.o: ../../include/nvtable.h
 scache.o: ../../include/ring.h
 scache.o: ../../include/scache.h
 scache.o: ../../include/sys_defs.h
index 94a967f11be17bbdb90bf77ba9beeefd31dd48eb..4af9a62611b2b4f6bf6db62aab3cad67c6010a76 100644 (file)
@@ -220,20 +220,20 @@ static void scache_save_endp_service(VSTREAM *client_stream)
 
     if (attr_scan(client_stream,
                  ATTR_FLAG_STRICT,
-                 ATTR_TYPE_INT, MAIL_ATTR_TTL, &ttl,
-                 ATTR_TYPE_STR, MAIL_ATTR_LABEL, scache_endp_label,
-                 ATTR_TYPE_STR, MAIL_ATTR_PROP, scache_endp_prop,
+                 RECV_ATTR_INT(MAIL_ATTR_TTL, &ttl),
+                 RECV_ATTR_STR(MAIL_ATTR_LABEL, scache_endp_label),
+                 RECV_ATTR_STR(MAIL_ATTR_PROP, scache_endp_prop),
                  ATTR_TYPE_END) != 3
        || ttl <= 0) {
        msg_warn("%s: bad or missing request parameter", myname);
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_BAD,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_BAD),
                   ATTR_TYPE_END);
        return;
     } else if (
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
               attr_print(client_stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_STR, MAIL_ATTR_DUMMY, "",
+                         SEND_ATTR_STR(MAIL_ATTR_DUMMY, ""),
                          ATTR_TYPE_END) != 0
               || vstream_fflush(client_stream) != 0
               || read_wait(vstream_fileno(client_stream),
@@ -243,7 +243,7 @@ static void scache_save_endp_service(VSTREAM *client_stream)
               (fd = LOCAL_RECV_FD(vstream_fileno(client_stream))) < 0) {
        msg_warn("%s: unable to receive file descriptor: %m", myname);
        (void) attr_print(client_stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_FAIL,
+                         SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_FAIL),
                          ATTR_TYPE_END);
        return;
     } else {
@@ -251,7 +251,7 @@ static void scache_save_endp_service(VSTREAM *client_stream)
                         ttl > var_scache_ttl_lim ? var_scache_ttl_lim : ttl,
                         STR(scache_endp_label), STR(scache_endp_prop), fd);
        (void) attr_print(client_stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_OK,
+                         SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_OK),
                          ATTR_TYPE_END);
        scache_size(scache, &size);
        if (size.endp_count > scache_endp_count)
@@ -271,37 +271,37 @@ static void scache_find_endp_service(VSTREAM *client_stream)
 
     if (attr_scan(client_stream,
                  ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_LABEL, scache_endp_label,
+                 RECV_ATTR_STR(MAIL_ATTR_LABEL, scache_endp_label),
                  ATTR_TYPE_END) != 1) {
        msg_warn("%s: bad or missing request parameter", myname);
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_BAD,
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, "",
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_BAD),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, ""),
                   ATTR_TYPE_END);
        return;
     } else if ((fd = scache_find_endp(scache, STR(scache_endp_label),
                                      scache_endp_prop)) < 0) {
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_FAIL,
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, "",
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_FAIL),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, ""),
                   ATTR_TYPE_END);
        scache_endp_miss++;
        return;
     } else {
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_OK,
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, STR(scache_endp_prop),
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_OK),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, STR(scache_endp_prop)),
                   ATTR_TYPE_END);
        if (vstream_fflush(client_stream) != 0
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
            || attr_scan(client_stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_STR, MAIL_ATTR_DUMMY, scache_dummy,
+                        RECV_ATTR_STR(MAIL_ATTR_DUMMY, scache_dummy),
                         ATTR_TYPE_END) != 1
 #endif
            || LOCAL_SEND_FD(vstream_fileno(client_stream), fd) < 0
 #ifdef MUST_READ_AFTER_SENDING_FD
            || attr_scan(client_stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_STR, MAIL_ATTR_DUMMY, scache_dummy,
+                        RECV_ATTR_STR(MAIL_ATTR_DUMMY, scache_dummy),
                         ATTR_TYPE_END) != 1
 #endif
            )
@@ -323,15 +323,15 @@ static void scache_save_dest_service(VSTREAM *client_stream)
 
     if (attr_scan(client_stream,
                  ATTR_FLAG_STRICT,
-                 ATTR_TYPE_INT, MAIL_ATTR_TTL, &ttl,
-                 ATTR_TYPE_STR, MAIL_ATTR_LABEL, scache_dest_label,
-                 ATTR_TYPE_STR, MAIL_ATTR_PROP, scache_dest_prop,
-                 ATTR_TYPE_STR, MAIL_ATTR_LABEL, scache_endp_label,
+                 RECV_ATTR_INT(MAIL_ATTR_TTL, &ttl),
+                 RECV_ATTR_STR(MAIL_ATTR_LABEL, scache_dest_label),
+                 RECV_ATTR_STR(MAIL_ATTR_PROP, scache_dest_prop),
+                 RECV_ATTR_STR(MAIL_ATTR_LABEL, scache_endp_label),
                  ATTR_TYPE_END) != 4
        || ttl <= 0) {
        msg_warn("%s: bad or missing request parameter", myname);
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_BAD,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_BAD),
                   ATTR_TYPE_END);
        return;
     } else {
@@ -340,7 +340,7 @@ static void scache_save_dest_service(VSTREAM *client_stream)
                         STR(scache_dest_label), STR(scache_dest_prop),
                         STR(scache_endp_label));
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_OK,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_OK),
                   ATTR_TYPE_END);
        scache_size(scache, &size);
        if (size.dest_count > scache_dest_count)
@@ -360,41 +360,41 @@ static void scache_find_dest_service(VSTREAM *client_stream)
 
     if (attr_scan(client_stream,
                  ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_LABEL, scache_dest_label,
+                 RECV_ATTR_STR(MAIL_ATTR_LABEL, scache_dest_label),
                  ATTR_TYPE_END) != 1) {
        msg_warn("%s: bad or missing request parameter", myname);
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_BAD,
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, "",
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, "",
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_BAD),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, ""),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, ""),
                   ATTR_TYPE_END);
        return;
     } else if ((fd = scache_find_dest(scache, STR(scache_dest_label),
                                      scache_dest_prop,
                                      scache_endp_prop)) < 0) {
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_FAIL,
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, "",
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, "",
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_FAIL),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, ""),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, ""),
                   ATTR_TYPE_END);
        scache_dest_miss++;
        return;
     } else {
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_OK,
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, STR(scache_dest_prop),
-                  ATTR_TYPE_STR, MAIL_ATTR_PROP, STR(scache_endp_prop),
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_OK),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, STR(scache_dest_prop)),
+                  SEND_ATTR_STR(MAIL_ATTR_PROP, STR(scache_endp_prop)),
                   ATTR_TYPE_END);
        if (vstream_fflush(client_stream) != 0
 #ifdef CANT_WRITE_BEFORE_SENDING_FD
            || attr_scan(client_stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_STR, MAIL_ATTR_DUMMY, scache_dummy,
+                        RECV_ATTR_STR(MAIL_ATTR_DUMMY, scache_dummy),
                         ATTR_TYPE_END) != 1
 #endif
            || LOCAL_SEND_FD(vstream_fileno(client_stream), fd) < 0
 #ifdef MUST_READ_AFTER_SENDING_FD
            || attr_scan(client_stream, ATTR_FLAG_STRICT,
-                        ATTR_TYPE_STR, MAIL_ATTR_DUMMY, scache_dummy,
+                        RECV_ATTR_STR(MAIL_ATTR_DUMMY, scache_dummy),
                         ATTR_TYPE_END) != 1
 #endif
            )
@@ -433,7 +433,7 @@ static void scache_service(VSTREAM *client_stream, char *unused_service,
     do {
        if (attr_scan(client_stream,
                      ATTR_FLAG_MORE | ATTR_FLAG_STRICT,
-                     ATTR_TYPE_STR, MAIL_ATTR_REQ, scache_request,
+                     RECV_ATTR_STR(MAIL_ATTR_REQ, scache_request),
                      ATTR_TYPE_END) == 1) {
            if (VSTREQ(scache_request, SCACHE_REQ_SAVE_DEST)) {
                scache_save_dest_service(client_stream);
@@ -447,7 +447,7 @@ static void scache_service(VSTREAM *client_stream, char *unused_service,
                msg_warn("unrecognized request: \"%s\", ignored",
                         STR(scache_request));
                attr_print(client_stream, ATTR_FLAG_NONE,
-                          ATTR_TYPE_INT, MAIL_ATTR_STATUS, SCACHE_STAT_BAD,
+                          SEND_ATTR_INT(MAIL_ATTR_STATUS, SCACHE_STAT_BAD),
                           ATTR_TYPE_END);
            }
        }
index 740d745a29ae7259d4c0d7f9a65014ac5c780129..86802dbd9bc593c1449f783e87e070c016ef2752 100644 (file)
@@ -60,6 +60,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 sendmail.o: ../../include/argv.h
 sendmail.o: ../../include/attr.h
+sendmail.o: ../../include/check_arg.h
 sendmail.o: ../../include/cleanup_user.h
 sendmail.o: ../../include/connect.h
 sendmail.o: ../../include/debug_process.h
@@ -68,6 +69,7 @@ sendmail.o: ../../include/dsn.h
 sendmail.o: ../../include/dsn_mask.h
 sendmail.o: ../../include/fullname.h
 sendmail.o: ../../include/header_opts.h
+sendmail.o: ../../include/htable.h
 sendmail.o: ../../include/iostuff.h
 sendmail.o: ../../include/mail_conf.h
 sendmail.o: ../../include/mail_flush.h
@@ -85,6 +87,7 @@ sendmail.o: ../../include/msg_syslog.h
 sendmail.o: ../../include/msg_vstream.h
 sendmail.o: ../../include/mymalloc.h
 sendmail.o: ../../include/name_code.h
+sendmail.o: ../../include/nvtable.h
 sendmail.o: ../../include/rec_streamlf.h
 sendmail.o: ../../include/rec_type.h
 sendmail.o: ../../include/recipient_list.h
index ecfea376b21b318a93a5706769896778d7e91f81..2192c3374a0b90e723fa0d506b70ad878d307ada 100644 (file)
@@ -61,6 +61,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 showq.o: ../../include/attr.h
 showq.o: ../../include/bounce_log.h
+showq.o: ../../include/check_arg.h
 showq.o: ../../include/dsn.h
 showq.o: ../../include/dsn_buf.h
 showq.o: ../../include/htable.h
@@ -77,6 +78,7 @@ showq.o: ../../include/mail_server.h
 showq.o: ../../include/mail_version.h
 showq.o: ../../include/msg.h
 showq.o: ../../include/mymalloc.h
+showq.o: ../../include/nvtable.h
 showq.o: ../../include/quote_822_local.h
 showq.o: ../../include/quote_flags.h
 showq.o: ../../include/rcpt_buf.h
index fdbab2f97c101ccb0d034cdd680c421b844bf362..bcbd2f2fad857a35be3cbad4801980e942cab590 100644 (file)
@@ -94,6 +94,7 @@ depend: $(MAKES)
 lmtp_params.o: lmtp_params.c
 smtp.o: ../../include/argv.h
 smtp.o: ../../include/attr.h
+smtp.o: ../../include/check_arg.h
 smtp.o: ../../include/debug_peer.h
 smtp.o: ../../include/deliver_request.h
 smtp.o: ../../include/dict.h
@@ -119,6 +120,7 @@ smtp.o: ../../include/myflock.h
 smtp.o: ../../include/mymalloc.h
 smtp.o: ../../include/name_code.h
 smtp.o: ../../include/name_mask.h
+smtp.o: ../../include/nvtable.h
 smtp.o: ../../include/recipient_list.h
 smtp.o: ../../include/resolve_clnt.h
 smtp.o: ../../include/scache.h
@@ -138,6 +140,7 @@ smtp.o: smtp_params.c
 smtp.o: smtp_sasl.h
 smtp_addr.o: ../../include/argv.h
 smtp_addr.o: ../../include/attr.h
+smtp_addr.o: ../../include/check_arg.h
 smtp_addr.o: ../../include/deliver_request.h
 smtp_addr.o: ../../include/dict.h
 smtp_addr.o: ../../include/dns.h
@@ -160,6 +163,7 @@ smtp_addr.o: ../../include/myflock.h
 smtp_addr.o: ../../include/mymalloc.h
 smtp_addr.o: ../../include/name_code.h
 smtp_addr.o: ../../include/name_mask.h
+smtp_addr.o: ../../include/nvtable.h
 smtp_addr.o: ../../include/own_inet_addr.h
 smtp_addr.o: ../../include/recipient_list.h
 smtp_addr.o: ../../include/resolve_clnt.h
@@ -178,6 +182,7 @@ smtp_addr.o: smtp_addr.c
 smtp_addr.o: smtp_addr.h
 smtp_chat.o: ../../include/argv.h
 smtp_chat.o: ../../include/attr.h
+smtp_chat.o: ../../include/check_arg.h
 smtp_chat.o: ../../include/cleanup_user.h
 smtp_chat.o: ../../include/deliver_request.h
 smtp_chat.o: ../../include/dict.h
@@ -205,6 +210,7 @@ smtp_chat.o: ../../include/myflock.h
 smtp_chat.o: ../../include/mymalloc.h
 smtp_chat.o: ../../include/name_code.h
 smtp_chat.o: ../../include/name_mask.h
+smtp_chat.o: ../../include/nvtable.h
 smtp_chat.o: ../../include/post_mail.h
 smtp_chat.o: ../../include/recipient_list.h
 smtp_chat.o: ../../include/resolve_clnt.h
@@ -224,6 +230,7 @@ smtp_chat.o: smtp.h
 smtp_chat.o: smtp_chat.c
 smtp_connect.o: ../../include/argv.h
 smtp_connect.o: ../../include/attr.h
+smtp_connect.o: ../../include/check_arg.h
 smtp_connect.o: ../../include/deliver_pass.h
 smtp_connect.o: ../../include/deliver_request.h
 smtp_connect.o: ../../include/dict.h
@@ -251,6 +258,7 @@ smtp_connect.o: ../../include/myflock.h
 smtp_connect.o: ../../include/mymalloc.h
 smtp_connect.o: ../../include/name_code.h
 smtp_connect.o: ../../include/name_mask.h
+smtp_connect.o: ../../include/nvtable.h
 smtp_connect.o: ../../include/own_inet_addr.h
 smtp_connect.o: ../../include/recipient_list.h
 smtp_connect.o: ../../include/resolve_clnt.h
@@ -274,6 +282,7 @@ smtp_connect.o: smtp_reuse.h
 smtp_key.o: ../../include/argv.h
 smtp_key.o: ../../include/attr.h
 smtp_key.o: ../../include/base64_code.h
+smtp_key.o: ../../include/check_arg.h
 smtp_key.o: ../../include/deliver_request.h
 smtp_key.o: ../../include/dict.h
 smtp_key.o: ../../include/dns.h
@@ -290,8 +299,10 @@ smtp_key.o: ../../include/msg.h
 smtp_key.o: ../../include/msg_stats.h
 smtp_key.o: ../../include/myaddrinfo.h
 smtp_key.o: ../../include/myflock.h
+smtp_key.o: ../../include/mymalloc.h
 smtp_key.o: ../../include/name_code.h
 smtp_key.o: ../../include/name_mask.h
+smtp_key.o: ../../include/nvtable.h
 smtp_key.o: ../../include/recipient_list.h
 smtp_key.o: ../../include/resolve_clnt.h
 smtp_key.o: ../../include/scache.h
@@ -307,6 +318,7 @@ smtp_key.o: smtp.h
 smtp_key.o: smtp_key.c
 smtp_map11.o: ../../include/argv.h
 smtp_map11.o: ../../include/attr.h
+smtp_map11.o: ../../include/check_arg.h
 smtp_map11.o: ../../include/deliver_request.h
 smtp_map11.o: ../../include/dict.h
 smtp_map11.o: ../../include/dns.h
@@ -323,8 +335,10 @@ smtp_map11.o: ../../include/msg.h
 smtp_map11.o: ../../include/msg_stats.h
 smtp_map11.o: ../../include/myaddrinfo.h
 smtp_map11.o: ../../include/myflock.h
+smtp_map11.o: ../../include/mymalloc.h
 smtp_map11.o: ../../include/name_code.h
 smtp_map11.o: ../../include/name_mask.h
+smtp_map11.o: ../../include/nvtable.h
 smtp_map11.o: ../../include/quote_822_local.h
 smtp_map11.o: ../../include/quote_flags.h
 smtp_map11.o: ../../include/recipient_list.h
@@ -344,6 +358,7 @@ smtp_params.o: smtp_params.c
 smtp_proto.o: ../../include/argv.h
 smtp_proto.o: ../../include/attr.h
 smtp_proto.o: ../../include/bounce.h
+smtp_proto.o: ../../include/check_arg.h
 smtp_proto.o: ../../include/defer.h
 smtp_proto.o: ../../include/deliver_request.h
 smtp_proto.o: ../../include/dict.h
@@ -373,6 +388,7 @@ smtp_proto.o: ../../include/myflock.h
 smtp_proto.o: ../../include/mymalloc.h
 smtp_proto.o: ../../include/name_code.h
 smtp_proto.o: ../../include/name_mask.h
+smtp_proto.o: ../../include/nvtable.h
 smtp_proto.o: ../../include/off_cvt.h
 smtp_proto.o: ../../include/quote_821_local.h
 smtp_proto.o: ../../include/quote_822_local.h
@@ -403,6 +419,7 @@ smtp_proto.o: smtp_sasl.h
 smtp_rcpt.o: ../../include/argv.h
 smtp_rcpt.o: ../../include/attr.h
 smtp_rcpt.o: ../../include/bounce.h
+smtp_rcpt.o: ../../include/check_arg.h
 smtp_rcpt.o: ../../include/deliver_completed.h
 smtp_rcpt.o: ../../include/deliver_request.h
 smtp_rcpt.o: ../../include/dict.h
@@ -424,6 +441,7 @@ smtp_rcpt.o: ../../include/myflock.h
 smtp_rcpt.o: ../../include/mymalloc.h
 smtp_rcpt.o: ../../include/name_code.h
 smtp_rcpt.o: ../../include/name_mask.h
+smtp_rcpt.o: ../../include/nvtable.h
 smtp_rcpt.o: ../../include/recipient_list.h
 smtp_rcpt.o: ../../include/resolve_clnt.h
 smtp_rcpt.o: ../../include/scache.h
@@ -441,6 +459,7 @@ smtp_rcpt.o: smtp.h
 smtp_rcpt.o: smtp_rcpt.c
 smtp_reuse.o: ../../include/argv.h
 smtp_reuse.o: ../../include/attr.h
+smtp_reuse.o: ../../include/check_arg.h
 smtp_reuse.o: ../../include/deliver_request.h
 smtp_reuse.o: ../../include/dict.h
 smtp_reuse.o: ../../include/dns.h
@@ -460,6 +479,7 @@ smtp_reuse.o: ../../include/myflock.h
 smtp_reuse.o: ../../include/mymalloc.h
 smtp_reuse.o: ../../include/name_code.h
 smtp_reuse.o: ../../include/name_mask.h
+smtp_reuse.o: ../../include/nvtable.h
 smtp_reuse.o: ../../include/recipient_list.h
 smtp_reuse.o: ../../include/resolve_clnt.h
 smtp_reuse.o: ../../include/scache.h
@@ -478,6 +498,7 @@ smtp_reuse.o: smtp_reuse.h
 smtp_sasl_auth_cache.o: ../../include/argv.h
 smtp_sasl_auth_cache.o: ../../include/attr.h
 smtp_sasl_auth_cache.o: ../../include/base64_code.h
+smtp_sasl_auth_cache.o: ../../include/check_arg.h
 smtp_sasl_auth_cache.o: ../../include/deliver_request.h
 smtp_sasl_auth_cache.o: ../../include/dict.h
 smtp_sasl_auth_cache.o: ../../include/dict_proxy.h
@@ -498,6 +519,7 @@ smtp_sasl_auth_cache.o: ../../include/myflock.h
 smtp_sasl_auth_cache.o: ../../include/mymalloc.h
 smtp_sasl_auth_cache.o: ../../include/name_code.h
 smtp_sasl_auth_cache.o: ../../include/name_mask.h
+smtp_sasl_auth_cache.o: ../../include/nvtable.h
 smtp_sasl_auth_cache.o: ../../include/recipient_list.h
 smtp_sasl_auth_cache.o: ../../include/resolve_clnt.h
 smtp_sasl_auth_cache.o: ../../include/scache.h
@@ -515,6 +537,7 @@ smtp_sasl_auth_cache.o: smtp_sasl_auth_cache.c
 smtp_sasl_auth_cache.o: smtp_sasl_auth_cache.h
 smtp_sasl_glue.o: ../../include/argv.h
 smtp_sasl_glue.o: ../../include/attr.h
+smtp_sasl_glue.o: ../../include/check_arg.h
 smtp_sasl_glue.o: ../../include/deliver_request.h
 smtp_sasl_glue.o: ../../include/dict.h
 smtp_sasl_glue.o: ../../include/dns.h
@@ -535,6 +558,7 @@ smtp_sasl_glue.o: ../../include/myflock.h
 smtp_sasl_glue.o: ../../include/mymalloc.h
 smtp_sasl_glue.o: ../../include/name_code.h
 smtp_sasl_glue.o: ../../include/name_mask.h
+smtp_sasl_glue.o: ../../include/nvtable.h
 smtp_sasl_glue.o: ../../include/recipient_list.h
 smtp_sasl_glue.o: ../../include/resolve_clnt.h
 smtp_sasl_glue.o: ../../include/scache.h
@@ -556,6 +580,7 @@ smtp_sasl_glue.o: smtp_sasl_auth_cache.h
 smtp_sasl_glue.o: smtp_sasl_glue.c
 smtp_sasl_proto.o: ../../include/argv.h
 smtp_sasl_proto.o: ../../include/attr.h
+smtp_sasl_proto.o: ../../include/check_arg.h
 smtp_sasl_proto.o: ../../include/deliver_request.h
 smtp_sasl_proto.o: ../../include/dict.h
 smtp_sasl_proto.o: ../../include/dns.h
@@ -575,6 +600,7 @@ smtp_sasl_proto.o: ../../include/myflock.h
 smtp_sasl_proto.o: ../../include/mymalloc.h
 smtp_sasl_proto.o: ../../include/name_code.h
 smtp_sasl_proto.o: ../../include/name_mask.h
+smtp_sasl_proto.o: ../../include/nvtable.h
 smtp_sasl_proto.o: ../../include/recipient_list.h
 smtp_sasl_proto.o: ../../include/resolve_clnt.h
 smtp_sasl_proto.o: ../../include/scache.h
@@ -592,6 +618,7 @@ smtp_sasl_proto.o: smtp_sasl.h
 smtp_sasl_proto.o: smtp_sasl_proto.c
 smtp_session.o: ../../include/argv.h
 smtp_session.o: ../../include/attr.h
+smtp_session.o: ../../include/check_arg.h
 smtp_session.o: ../../include/debug_peer.h
 smtp_session.o: ../../include/deliver_request.h
 smtp_session.o: ../../include/dict.h
@@ -612,6 +639,7 @@ smtp_session.o: ../../include/myflock.h
 smtp_session.o: ../../include/mymalloc.h
 smtp_session.o: ../../include/name_code.h
 smtp_session.o: ../../include/name_mask.h
+smtp_session.o: ../../include/nvtable.h
 smtp_session.o: ../../include/recipient_list.h
 smtp_session.o: ../../include/resolve_clnt.h
 smtp_session.o: ../../include/scache.h
@@ -629,6 +657,7 @@ smtp_session.o: smtp_sasl.h
 smtp_session.o: smtp_session.c
 smtp_state.o: ../../include/argv.h
 smtp_state.o: ../../include/attr.h
+smtp_state.o: ../../include/check_arg.h
 smtp_state.o: ../../include/deliver_request.h
 smtp_state.o: ../../include/dict.h
 smtp_state.o: ../../include/dns.h
@@ -648,6 +677,7 @@ smtp_state.o: ../../include/myflock.h
 smtp_state.o: ../../include/mymalloc.h
 smtp_state.o: ../../include/name_code.h
 smtp_state.o: ../../include/name_mask.h
+smtp_state.o: ../../include/nvtable.h
 smtp_state.o: ../../include/recipient_list.h
 smtp_state.o: ../../include/resolve_clnt.h
 smtp_state.o: ../../include/scache.h
@@ -664,6 +694,7 @@ smtp_state.o: smtp_sasl.h
 smtp_state.o: smtp_state.c
 smtp_tls_policy.o: ../../include/argv.h
 smtp_tls_policy.o: ../../include/attr.h
+smtp_tls_policy.o: ../../include/check_arg.h
 smtp_tls_policy.o: ../../include/ctable.h
 smtp_tls_policy.o: ../../include/deliver_request.h
 smtp_tls_policy.o: ../../include/dict.h
@@ -684,6 +715,7 @@ smtp_tls_policy.o: ../../include/myflock.h
 smtp_tls_policy.o: ../../include/mymalloc.h
 smtp_tls_policy.o: ../../include/name_code.h
 smtp_tls_policy.o: ../../include/name_mask.h
+smtp_tls_policy.o: ../../include/nvtable.h
 smtp_tls_policy.o: ../../include/recipient_list.h
 smtp_tls_policy.o: ../../include/resolve_clnt.h
 smtp_tls_policy.o: ../../include/scache.h
@@ -703,6 +735,7 @@ smtp_tls_policy.o: smtp_tls_policy.c
 smtp_trouble.o: ../../include/argv.h
 smtp_trouble.o: ../../include/attr.h
 smtp_trouble.o: ../../include/bounce.h
+smtp_trouble.o: ../../include/check_arg.h
 smtp_trouble.o: ../../include/defer.h
 smtp_trouble.o: ../../include/deliver_completed.h
 smtp_trouble.o: ../../include/deliver_request.h
@@ -722,8 +755,10 @@ smtp_trouble.o: ../../include/msg.h
 smtp_trouble.o: ../../include/msg_stats.h
 smtp_trouble.o: ../../include/myaddrinfo.h
 smtp_trouble.o: ../../include/myflock.h
+smtp_trouble.o: ../../include/mymalloc.h
 smtp_trouble.o: ../../include/name_code.h
 smtp_trouble.o: ../../include/name_mask.h
+smtp_trouble.o: ../../include/nvtable.h
 smtp_trouble.o: ../../include/recipient_list.h
 smtp_trouble.o: ../../include/resolve_clnt.h
 smtp_trouble.o: ../../include/scache.h
@@ -742,6 +777,7 @@ smtp_trouble.o: smtp_sasl.h
 smtp_trouble.o: smtp_trouble.c
 smtp_unalias.o: ../../include/argv.h
 smtp_unalias.o: ../../include/attr.h
+smtp_unalias.o: ../../include/check_arg.h
 smtp_unalias.o: ../../include/deliver_request.h
 smtp_unalias.o: ../../include/dict.h
 smtp_unalias.o: ../../include/dns.h
@@ -757,8 +793,10 @@ smtp_unalias.o: ../../include/msg.h
 smtp_unalias.o: ../../include/msg_stats.h
 smtp_unalias.o: ../../include/myaddrinfo.h
 smtp_unalias.o: ../../include/myflock.h
+smtp_unalias.o: ../../include/mymalloc.h
 smtp_unalias.o: ../../include/name_code.h
 smtp_unalias.o: ../../include/name_mask.h
+smtp_unalias.o: ../../include/nvtable.h
 smtp_unalias.o: ../../include/recipient_list.h
 smtp_unalias.o: ../../include/resolve_clnt.h
 smtp_unalias.o: ../../include/scache.h
index 60112c37bd568d6fa51a875ad23dcf7708faae6c..987db1c47a6fc8be03bc16d2a862e95ff0d2f0bf 100644 (file)
@@ -179,6 +179,7 @@ smtpd.o: ../../include/anvil_clnt.h
 smtpd.o: ../../include/argv.h
 smtpd.o: ../../include/attr.h
 smtpd.o: ../../include/attr_clnt.h
+smtpd.o: ../../include/check_arg.h
 smtpd.o: ../../include/cleanup_user.h
 smtpd.o: ../../include/debug_peer.h
 smtpd.o: ../../include/dict.h
@@ -187,6 +188,7 @@ smtpd.o: ../../include/dsn_mask.h
 smtpd.o: ../../include/ehlo_mask.h
 smtpd.o: ../../include/events.h
 smtpd.o: ../../include/flush_clnt.h
+smtpd.o: ../../include/htable.h
 smtpd.o: ../../include/inet_proto.h
 smtpd.o: ../../include/input_transp.h
 smtpd.o: ../../include/iostuff.h
@@ -214,6 +216,7 @@ smtpd.o: ../../include/mymalloc.h
 smtpd.o: ../../include/namadr_list.h
 smtpd.o: ../../include/name_code.h
 smtpd.o: ../../include/name_mask.h
+smtpd.o: ../../include/nvtable.h
 smtpd.o: ../../include/off_cvt.h
 smtpd.o: ../../include/quote_822_local.h
 smtpd.o: ../../include/quote_flags.h
@@ -254,8 +257,10 @@ smtpd.o: smtpd_sasl_proto.h
 smtpd.o: smtpd_token.h
 smtpd_chat.o: ../../include/argv.h
 smtpd_chat.o: ../../include/attr.h
+smtpd_chat.o: ../../include/check_arg.h
 smtpd_chat.o: ../../include/cleanup_user.h
 smtpd_chat.o: ../../include/dns.h
+smtpd_chat.o: ../../include/htable.h
 smtpd_chat.o: ../../include/int_filt.h
 smtpd_chat.o: ../../include/iostuff.h
 smtpd_chat.o: ../../include/line_wrap.h
@@ -272,6 +277,7 @@ smtpd_chat.o: ../../include/myaddrinfo.h
 smtpd_chat.o: ../../include/mymalloc.h
 smtpd_chat.o: ../../include/name_code.h
 smtpd_chat.o: ../../include/name_mask.h
+smtpd_chat.o: ../../include/nvtable.h
 smtpd_chat.o: ../../include/post_mail.h
 smtpd_chat.o: ../../include/rec_type.h
 smtpd_chat.o: ../../include/record.h
@@ -293,6 +299,7 @@ smtpd_check.o: ../../include/argv.h
 smtpd_check.o: ../../include/attr.h
 smtpd_check.o: ../../include/attr_clnt.h
 smtpd_check.o: ../../include/attr_override.h
+smtpd_check.o: ../../include/check_arg.h
 smtpd_check.o: ../../include/cleanup_user.h
 smtpd_check.o: ../../include/conv_time.h
 smtpd_check.o: ../../include/ctable.h
@@ -333,6 +340,7 @@ smtpd_check.o: ../../include/mynetworks.h
 smtpd_check.o: ../../include/namadr_list.h
 smtpd_check.o: ../../include/name_code.h
 smtpd_check.o: ../../include/name_mask.h
+smtpd_check.o: ../../include/nvtable.h
 smtpd_check.o: ../../include/own_inet_addr.h
 smtpd_check.o: ../../include/rec_type.h
 smtpd_check.o: ../../include/recipient_list.h
@@ -368,7 +376,9 @@ smtpd_dsn_fix.o: smtpd_dsn_fix.c
 smtpd_dsn_fix.o: smtpd_dsn_fix.h
 smtpd_expand.o: ../../include/argv.h
 smtpd_expand.o: ../../include/attr.h
+smtpd_expand.o: ../../include/check_arg.h
 smtpd_expand.o: ../../include/dns.h
+smtpd_expand.o: ../../include/htable.h
 smtpd_expand.o: ../../include/iostuff.h
 smtpd_expand.o: ../../include/mac_expand.h
 smtpd_expand.o: ../../include/mac_parse.h
@@ -378,8 +388,10 @@ smtpd_expand.o: ../../include/mail_stream.h
 smtpd_expand.o: ../../include/milter.h
 smtpd_expand.o: ../../include/msg.h
 smtpd_expand.o: ../../include/myaddrinfo.h
+smtpd_expand.o: ../../include/mymalloc.h
 smtpd_expand.o: ../../include/name_code.h
 smtpd_expand.o: ../../include/name_mask.h
+smtpd_expand.o: ../../include/nvtable.h
 smtpd_expand.o: ../../include/sock_addr.h
 smtpd_expand.o: ../../include/stringops.h
 smtpd_expand.o: ../../include/sys_defs.h
@@ -392,8 +404,10 @@ smtpd_expand.o: smtpd_expand.c
 smtpd_expand.o: smtpd_expand.h
 smtpd_haproxy.o: ../../include/argv.h
 smtpd_haproxy.o: ../../include/attr.h
+smtpd_haproxy.o: ../../include/check_arg.h
 smtpd_haproxy.o: ../../include/dns.h
 smtpd_haproxy.o: ../../include/haproxy_srvr.h
+smtpd_haproxy.o: ../../include/htable.h
 smtpd_haproxy.o: ../../include/mail_params.h
 smtpd_haproxy.o: ../../include/mail_stream.h
 smtpd_haproxy.o: ../../include/milter.h
@@ -402,6 +416,7 @@ smtpd_haproxy.o: ../../include/myaddrinfo.h
 smtpd_haproxy.o: ../../include/mymalloc.h
 smtpd_haproxy.o: ../../include/name_code.h
 smtpd_haproxy.o: ../../include/name_mask.h
+smtpd_haproxy.o: ../../include/nvtable.h
 smtpd_haproxy.o: ../../include/smtp_stream.h
 smtpd_haproxy.o: ../../include/sock_addr.h
 smtpd_haproxy.o: ../../include/stringops.h
@@ -416,13 +431,17 @@ smtpd_haproxy.o: smtpd.h
 smtpd_haproxy.o: smtpd_haproxy.c
 smtpd_milter.o: ../../include/argv.h
 smtpd_milter.o: ../../include/attr.h
+smtpd_milter.o: ../../include/check_arg.h
 smtpd_milter.o: ../../include/dns.h
+smtpd_milter.o: ../../include/htable.h
 smtpd_milter.o: ../../include/mail_params.h
 smtpd_milter.o: ../../include/mail_stream.h
 smtpd_milter.o: ../../include/milter.h
 smtpd_milter.o: ../../include/myaddrinfo.h
+smtpd_milter.o: ../../include/mymalloc.h
 smtpd_milter.o: ../../include/name_code.h
 smtpd_milter.o: ../../include/name_mask.h
+smtpd_milter.o: ../../include/nvtable.h
 smtpd_milter.o: ../../include/quote_821_local.h
 smtpd_milter.o: ../../include/quote_flags.h
 smtpd_milter.o: ../../include/resolve_clnt.h
@@ -440,6 +459,7 @@ smtpd_milter.o: smtpd_resolve.h
 smtpd_milter.o: smtpd_sasl_glue.h
 smtpd_peer.o: ../../include/argv.h
 smtpd_peer.o: ../../include/attr.h
+smtpd_peer.o: ../../include/check_arg.h
 smtpd_peer.o: ../../include/dns.h
 smtpd_peer.o: ../../include/haproxy_srvr.h
 smtpd_peer.o: ../../include/htable.h
@@ -454,6 +474,7 @@ smtpd_peer.o: ../../include/myaddrinfo.h
 smtpd_peer.o: ../../include/mymalloc.h
 smtpd_peer.o: ../../include/name_code.h
 smtpd_peer.o: ../../include/name_mask.h
+smtpd_peer.o: ../../include/nvtable.h
 smtpd_peer.o: ../../include/sock_addr.h
 smtpd_peer.o: ../../include/split_at.h
 smtpd_peer.o: ../../include/stringops.h
@@ -468,9 +489,11 @@ smtpd_peer.o: smtpd.h
 smtpd_peer.o: smtpd_peer.c
 smtpd_proxy.o: ../../include/argv.h
 smtpd_proxy.o: ../../include/attr.h
+smtpd_proxy.o: ../../include/check_arg.h
 smtpd_proxy.o: ../../include/cleanup_user.h
 smtpd_proxy.o: ../../include/connect.h
 smtpd_proxy.o: ../../include/dns.h
+smtpd_proxy.o: ../../include/htable.h
 smtpd_proxy.o: ../../include/iostuff.h
 smtpd_proxy.o: ../../include/mail_error.h
 smtpd_proxy.o: ../../include/mail_params.h
@@ -483,6 +506,7 @@ smtpd_proxy.o: ../../include/myaddrinfo.h
 smtpd_proxy.o: ../../include/mymalloc.h
 smtpd_proxy.o: ../../include/name_code.h
 smtpd_proxy.o: ../../include/name_mask.h
+smtpd_proxy.o: ../../include/nvtable.h
 smtpd_proxy.o: ../../include/rec_type.h
 smtpd_proxy.o: ../../include/record.h
 smtpd_proxy.o: ../../include/smtp_stream.h
@@ -498,11 +522,14 @@ smtpd_proxy.o: smtpd.h
 smtpd_proxy.o: smtpd_proxy.c
 smtpd_proxy.o: smtpd_proxy.h
 smtpd_resolve.o: ../../include/attr.h
+smtpd_resolve.o: ../../include/check_arg.h
 smtpd_resolve.o: ../../include/ctable.h
+smtpd_resolve.o: ../../include/htable.h
 smtpd_resolve.o: ../../include/iostuff.h
 smtpd_resolve.o: ../../include/mail_proto.h
 smtpd_resolve.o: ../../include/msg.h
 smtpd_resolve.o: ../../include/mymalloc.h
+smtpd_resolve.o: ../../include/nvtable.h
 smtpd_resolve.o: ../../include/resolve_clnt.h
 smtpd_resolve.o: ../../include/rewrite_clnt.h
 smtpd_resolve.o: ../../include/stringops.h
@@ -514,7 +541,9 @@ smtpd_resolve.o: smtpd_resolve.c
 smtpd_resolve.o: smtpd_resolve.h
 smtpd_sasl_glue.o: ../../include/argv.h
 smtpd_sasl_glue.o: ../../include/attr.h
+smtpd_sasl_glue.o: ../../include/check_arg.h
 smtpd_sasl_glue.o: ../../include/dns.h
+smtpd_sasl_glue.o: ../../include/htable.h
 smtpd_sasl_glue.o: ../../include/mail_params.h
 smtpd_sasl_glue.o: ../../include/mail_stream.h
 smtpd_sasl_glue.o: ../../include/milter.h
@@ -523,6 +552,7 @@ smtpd_sasl_glue.o: ../../include/myaddrinfo.h
 smtpd_sasl_glue.o: ../../include/mymalloc.h
 smtpd_sasl_glue.o: ../../include/name_code.h
 smtpd_sasl_glue.o: ../../include/name_mask.h
+smtpd_sasl_glue.o: ../../include/nvtable.h
 smtpd_sasl_glue.o: ../../include/sock_addr.h
 smtpd_sasl_glue.o: ../../include/stringops.h
 smtpd_sasl_glue.o: ../../include/sys_defs.h
@@ -537,8 +567,10 @@ smtpd_sasl_glue.o: smtpd_sasl_glue.c
 smtpd_sasl_glue.o: smtpd_sasl_glue.h
 smtpd_sasl_proto.o: ../../include/argv.h
 smtpd_sasl_proto.o: ../../include/attr.h
+smtpd_sasl_proto.o: ../../include/check_arg.h
 smtpd_sasl_proto.o: ../../include/dns.h
 smtpd_sasl_proto.o: ../../include/ehlo_mask.h
+smtpd_sasl_proto.o: ../../include/htable.h
 smtpd_sasl_proto.o: ../../include/iostuff.h
 smtpd_sasl_proto.o: ../../include/mail_error.h
 smtpd_sasl_proto.o: ../../include/mail_params.h
@@ -550,6 +582,7 @@ smtpd_sasl_proto.o: ../../include/myaddrinfo.h
 smtpd_sasl_proto.o: ../../include/mymalloc.h
 smtpd_sasl_proto.o: ../../include/name_code.h
 smtpd_sasl_proto.o: ../../include/name_mask.h
+smtpd_sasl_proto.o: ../../include/nvtable.h
 smtpd_sasl_proto.o: ../../include/sock_addr.h
 smtpd_sasl_proto.o: ../../include/stringops.h
 smtpd_sasl_proto.o: ../../include/sys_defs.h
@@ -565,9 +598,11 @@ smtpd_sasl_proto.o: smtpd_sasl_proto.h
 smtpd_sasl_proto.o: smtpd_token.h
 smtpd_state.o: ../../include/argv.h
 smtpd_state.o: ../../include/attr.h
+smtpd_state.o: ../../include/check_arg.h
 smtpd_state.o: ../../include/cleanup_user.h
 smtpd_state.o: ../../include/dns.h
 smtpd_state.o: ../../include/events.h
+smtpd_state.o: ../../include/htable.h
 smtpd_state.o: ../../include/iostuff.h
 smtpd_state.o: ../../include/mail_error.h
 smtpd_state.o: ../../include/mail_params.h
@@ -579,6 +614,7 @@ smtpd_state.o: ../../include/myaddrinfo.h
 smtpd_state.o: ../../include/mymalloc.h
 smtpd_state.o: ../../include/name_code.h
 smtpd_state.o: ../../include/name_mask.h
+smtpd_state.o: ../../include/nvtable.h
 smtpd_state.o: ../../include/sock_addr.h
 smtpd_state.o: ../../include/sys_defs.h
 smtpd_state.o: ../../include/tls.h
@@ -598,7 +634,9 @@ smtpd_token.o: smtpd_token.c
 smtpd_token.o: smtpd_token.h
 smtpd_xforward.o: ../../include/argv.h
 smtpd_xforward.o: ../../include/attr.h
+smtpd_xforward.o: ../../include/check_arg.h
 smtpd_xforward.o: ../../include/dns.h
+smtpd_xforward.o: ../../include/htable.h
 smtpd_xforward.o: ../../include/iostuff.h
 smtpd_xforward.o: ../../include/mail_proto.h
 smtpd_xforward.o: ../../include/mail_stream.h
@@ -608,6 +646,7 @@ smtpd_xforward.o: ../../include/myaddrinfo.h
 smtpd_xforward.o: ../../include/mymalloc.h
 smtpd_xforward.o: ../../include/name_code.h
 smtpd_xforward.o: ../../include/name_mask.h
+smtpd_xforward.o: ../../include/nvtable.h
 smtpd_xforward.o: ../../include/sock_addr.h
 smtpd_xforward.o: ../../include/sys_defs.h
 smtpd_xforward.o: ../../include/tls.h
index 0444866a6e3cf476303295f806d7b27dd4c9ea78..935a148554f6c7e70dd3313c0f08fd3bbbec0792 100644 (file)
@@ -1924,7 +1924,7 @@ static int mail_open_stream(SMTPD_STATE *state)
                                          var_cleanup_service);
        if (state->dest == 0
            || attr_print(state->dest->stream, ATTR_FLAG_NONE,
-                         ATTR_TYPE_INT, MAIL_ATTR_FLAGS, cleanup_flags,
+                         SEND_ATTR_INT(MAIL_ATTR_FLAGS, cleanup_flags),
                          ATTR_TYPE_END) != 0)
            msg_fatal("unable to connect to the %s %s service",
                      MAIL_CLASS_PUBLIC, var_cleanup_service);
index 8e61bfca2228cd505d8df6ec138c1986e64601f0..0c34982f79915d0a3fc588bf4e5d05597405e618 100644 (file)
@@ -3867,65 +3867,65 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
 
     if (attr_clnt_request(policy_clnt->client,
                          ATTR_FLAG_NONE,       /* Query attributes. */
-                       ATTR_TYPE_STR, MAIL_ATTR_REQ, "smtpd_access_policy",
-                         ATTR_TYPE_STR, MAIL_ATTR_PROTO_STATE, state->where,
-                  ATTR_TYPE_STR, MAIL_ATTR_ACT_PROTO_NAME, state->protocol,
-                     ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_ADDR, state->addr,
-                     ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_NAME, state->name,
-                     ATTR_TYPE_STR, MAIL_ATTR_ACT_CLIENT_PORT, state->port,
-                         ATTR_TYPE_STR, MAIL_ATTR_ACT_REVERSE_CLIENT_NAME,
-                         state->reverse_name,
-                         ATTR_TYPE_STR, MAIL_ATTR_ACT_HELO_NAME,
-                         state->helo_name ? state->helo_name : "",
-                         ATTR_TYPE_STR, MAIL_ATTR_SENDER,
-                         state->sender ? state->sender : "",
-                         ATTR_TYPE_STR, MAIL_ATTR_RECIP,
-                         state->recipient ? state->recipient : "",
-                         ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT,
-                         ((strcasecmp(state->where, SMTPD_CMD_DATA) == 0) ||
-                        (strcasecmp(state->where, SMTPD_AFTER_DOT) == 0)) ?
-                         state->rcpt_count : 0,
-                         ATTR_TYPE_STR, MAIL_ATTR_QUEUEID,
-                         state->queue_id ? state->queue_id : "",
-                         ATTR_TYPE_STR, MAIL_ATTR_INSTANCE,
-                         STR(state->instance),
-                         ATTR_TYPE_LONG, MAIL_ATTR_SIZE,
-                         (unsigned long) (state->act_size > 0 ?
-                                        state->act_size : state->msg_size),
-                         ATTR_TYPE_STR, MAIL_ATTR_ETRN_DOMAIN,
-                         state->etrn_name ? state->etrn_name : "",
-                         ATTR_TYPE_STR, MAIL_ATTR_STRESS, var_stress,
+                       SEND_ATTR_STR(MAIL_ATTR_REQ, "smtpd_access_policy"),
+                         SEND_ATTR_STR(MAIL_ATTR_PROTO_STATE, state->where),
+                  SEND_ATTR_STR(MAIL_ATTR_ACT_PROTO_NAME, state->protocol),
+                     SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_ADDR, state->addr),
+                     SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_NAME, state->name),
+                     SEND_ATTR_STR(MAIL_ATTR_ACT_CLIENT_PORT, state->port),
+                         SEND_ATTR_STR(MAIL_ATTR_ACT_REVERSE_CLIENT_NAME,
+                                       state->reverse_name),
+                         SEND_ATTR_STR(MAIL_ATTR_ACT_HELO_NAME,
+                                 state->helo_name ? state->helo_name : ""),
+                         SEND_ATTR_STR(MAIL_ATTR_SENDER,
+                                       state->sender ? state->sender : ""),
+                         SEND_ATTR_STR(MAIL_ATTR_RECIP,
+                                 state->recipient ? state->recipient : ""),
+                         SEND_ATTR_INT(MAIL_ATTR_RCPT_COUNT,
+                        ((strcasecmp(state->where, SMTPD_CMD_DATA) == 0) ||
+                         (strcasecmp(state->where, SMTPD_AFTER_DOT) == 0)) ?
+                                       state->rcpt_count : 0),
+                         SEND_ATTR_STR(MAIL_ATTR_QUEUEID,
+                                   state->queue_id ? state->queue_id : ""),
+                         SEND_ATTR_STR(MAIL_ATTR_INSTANCE,
+                                       STR(state->instance)),
+                         SEND_ATTR_LONG(MAIL_ATTR_SIZE,
+                                     (unsigned long) (state->act_size > 0 ?
+                                       state->act_size : state->msg_size)),
+                         SEND_ATTR_STR(MAIL_ATTR_ETRN_DOMAIN,
+                                 state->etrn_name ? state->etrn_name : ""),
+                         SEND_ATTR_STR(MAIL_ATTR_STRESS, var_stress),
 #ifdef USE_SASL_AUTH
-                         ATTR_TYPE_STR, MAIL_ATTR_SASL_METHOD,
-                         state->sasl_method ? state->sasl_method : "",
-                         ATTR_TYPE_STR, MAIL_ATTR_SASL_USERNAME,
-                         state->sasl_username ? state->sasl_username : "",
-                         ATTR_TYPE_STR, MAIL_ATTR_SASL_SENDER,
-                         state->sasl_sender ? state->sasl_sender : "",
+                         SEND_ATTR_STR(MAIL_ATTR_SASL_METHOD,
+                             state->sasl_method ? state->sasl_method : ""),
+                         SEND_ATTR_STR(MAIL_ATTR_SASL_USERNAME,
+                         state->sasl_username ? state->sasl_username : ""),
+                         SEND_ATTR_STR(MAIL_ATTR_SASL_SENDER,
+                             state->sasl_sender ? state->sasl_sender : ""),
 #endif
 #ifdef USE_TLS
 #define IF_ENCRYPTED(x, y) ((state->tls_context && ((x) != 0)) ? (x) : (y))
-                         ATTR_TYPE_STR, MAIL_ATTR_CCERT_SUBJECT, subject,
-                         ATTR_TYPE_STR, MAIL_ATTR_CCERT_ISSUER, issuer,
+                         SEND_ATTR_STR(MAIL_ATTR_CCERT_SUBJECT, subject),
+                         SEND_ATTR_STR(MAIL_ATTR_CCERT_ISSUER, issuer),
 
     /*
      * When directly checking the fingerprint, it is OK if the issuing CA is
      * not trusted.
      */
-                         ATTR_TYPE_STR, MAIL_ATTR_CCERT_CERT_FPRINT,
-                    IF_ENCRYPTED(state->tls_context->peer_cert_fprint, ""),
-                         ATTR_TYPE_STR, MAIL_ATTR_CCERT_PKEY_FPRINT,
-                    IF_ENCRYPTED(state->tls_context->peer_pkey_fprint, ""),
-                         ATTR_TYPE_STR, MAIL_ATTR_CRYPTO_PROTOCOL,
-                         IF_ENCRYPTED(state->tls_context->protocol, ""),
-                         ATTR_TYPE_STR, MAIL_ATTR_CRYPTO_CIPHER,
-                         IF_ENCRYPTED(state->tls_context->cipher_name, ""),
-                         ATTR_TYPE_INT, MAIL_ATTR_CRYPTO_KEYSIZE,
-                       IF_ENCRYPTED(state->tls_context->cipher_usebits, 0),
+                         SEND_ATTR_STR(MAIL_ATTR_CCERT_CERT_FPRINT,
+                   IF_ENCRYPTED(state->tls_context->peer_cert_fprint, "")),
+                         SEND_ATTR_STR(MAIL_ATTR_CCERT_PKEY_FPRINT,
+                   IF_ENCRYPTED(state->tls_context->peer_pkey_fprint, "")),
+                         SEND_ATTR_STR(MAIL_ATTR_CRYPTO_PROTOCOL,
+                           IF_ENCRYPTED(state->tls_context->protocol, "")),
+                         SEND_ATTR_STR(MAIL_ATTR_CRYPTO_CIPHER,
+                        IF_ENCRYPTED(state->tls_context->cipher_name, "")),
+                         SEND_ATTR_INT(MAIL_ATTR_CRYPTO_KEYSIZE,
+                      IF_ENCRYPTED(state->tls_context->cipher_usebits, 0)),
 #endif
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes. */
-                         ATTR_TYPE_STR, MAIL_ATTR_ACTION, action,
+                         RECV_ATTR_STR(MAIL_ATTR_ACTION, action),
                          ATTR_TYPE_END) != 1) {
        NOCLOBBER static int nesting_level = 0;
        jmp_buf savebuf;
index 51dcb34a8e388eff74573f47ee934f5ca89dcc6a..3e48a3b87e72ec8646b540a54e327ffd6de422f2 100644 (file)
 /* .IP "\fB-h\fI hostname\fR"
 /*     Use \fIhostname\fR in the SMTP greeting, in the HELO response,
 /*     and in the EHLO response. The default hostname is "smtp-sink".
+/* .IP "\fB-H\fI delay\fR"
+/*     Delay the first read operation after receiving DATA (time
+/*     in seconds). Combine with a large test message and a small
+/*     TCP window size (see the \fB-T\fR option) to test the Postfix
+/*     client write_wait() implementation.
 /* .IP \fB-L\fR
 /*     Enable LMTP instead of SMTP.
 /* .IP "\fB-m \fIcount\fR (default: 256)"
@@ -376,6 +381,7 @@ static int max_client_count = DEF_MAX_CLIENT_COUNT;
 static int client_count;
 static int sock;
 static int abort_delay = -1;
+static int data_read_delay = 0;
 
 static char *single_template;          /* individual template */
 static char *shared_template;          /* shared template */
@@ -732,6 +738,28 @@ static void abort_event(int unused_event, void *context)
     disconnect(state);
 }
 
+/* delay_read_event - resume input event handling */
+
+static void delay_read_event(int event, void *context)
+{
+    SINK_STATE *state = (SINK_STATE *) context;
+
+    if (event != EVENT_TIME)
+       msg_panic("delay_read_event: non-timer event %d", event);
+
+    event_enable_read(vstream_fileno(state->stream), read_event, (void *) state);
+    event_request_timer(read_timeout, (void *) state, var_tmout);
+}
+
+/* delay_read - temporarily suspend input event handling */
+
+static void delay_read(SINK_STATE *state, int delay)
+{
+    event_disable_readwrite(vstream_fileno(state->stream));
+    event_cancel_timer(read_timeout, (void *) state);
+    event_request_timer(delay_read_event, (void *) state, delay);
+}
+
 /* data_response - respond to DATA command */
 
 static void data_response(SINK_STATE *state, const char *unused_args)
@@ -747,6 +775,9 @@ static void data_response(SINK_STATE *state, const char *unused_args)
     SMTP_FLUSH(state->stream);
     if (abort_delay < 0) {
        state->read_fn = data_read;
+       /* Todo: move into code that invokes the command response function. */
+       if (data_read_delay > 0)
+           delay_read(state, data_read_delay);
     } else {
        /* Stop reading, send premature 550, and disconnect. */
        event_disable_readwrite(vstream_fileno(state->stream));
@@ -1427,7 +1458,7 @@ int     main(int argc, char **argv)
     /*
      * Parse JCL.
      */
-    while ((ch = GETOPT(argc, argv, "468aA:b:B:cCd:D:eEf:Fh:Ln:m:M:NpPq:Q:r:R:s:S:t:T:u:vw:W:")) > 0) {
+    while ((ch = GETOPT(argc, argv, "468aA:b:B:cCd:D:eEf:Fh:H:Ln:m:M:NpPq:Q:r:R:s:S:t:T:u:vw:W:")) > 0) {
        switch (ch) {
        case '4':
            protocols = INET_PROTO_NAME_IPV4;
@@ -1489,6 +1520,10 @@ int     main(int argc, char **argv)
        case 'h':
            var_myhostname = optarg;
            break;
+       case 'H':
+           if ((data_read_delay = atoi(optarg)) <= 0)
+               msg_fatal("bad data read delay: %s", optarg);
+           break;
        case 'L':
            enable_lmtp = 1;
            break;
index e0a1c707baeace5b9e8463afc0ceac5eb0ac1a79..6324fb59c3c916807499278587f51cf5c8e72636 100644 (file)
@@ -221,13 +221,16 @@ tls_level.o: tls_level.c
 tls_mgr.o: ../../include/argv.h
 tls_mgr.o: ../../include/attr.h
 tls_mgr.o: ../../include/attr_clnt.h
+tls_mgr.o: ../../include/check_arg.h
 tls_mgr.o: ../../include/dict.h
+tls_mgr.o: ../../include/htable.h
 tls_mgr.o: ../../include/iostuff.h
 tls_mgr.o: ../../include/mail_params.h
 tls_mgr.o: ../../include/mail_proto.h
 tls_mgr.o: ../../include/msg.h
 tls_mgr.o: ../../include/myflock.h
 tls_mgr.o: ../../include/mymalloc.h
+tls_mgr.o: ../../include/nvtable.h
 tls_mgr.o: ../../include/stringops.h
 tls_mgr.o: ../../include/sys_defs.h
 tls_mgr.o: ../../include/vbuf.h
@@ -283,8 +286,10 @@ tls_prng_file.o: tls_prng.h
 tls_prng_file.o: tls_prng_file.c
 tls_proxy_clnt.o: ../../include/argv.h
 tls_proxy_clnt.o: ../../include/attr.h
+tls_proxy_clnt.o: ../../include/check_arg.h
 tls_proxy_clnt.o: ../../include/connect.h
 tls_proxy_clnt.o: ../../include/dns.h
+tls_proxy_clnt.o: ../../include/htable.h
 tls_proxy_clnt.o: ../../include/iostuff.h
 tls_proxy_clnt.o: ../../include/mail_params.h
 tls_proxy_clnt.o: ../../include/mail_proto.h
@@ -293,6 +298,7 @@ tls_proxy_clnt.o: ../../include/myaddrinfo.h
 tls_proxy_clnt.o: ../../include/mymalloc.h
 tls_proxy_clnt.o: ../../include/name_code.h
 tls_proxy_clnt.o: ../../include/name_mask.h
+tls_proxy_clnt.o: ../../include/nvtable.h
 tls_proxy_clnt.o: ../../include/sock_addr.h
 tls_proxy_clnt.o: ../../include/stringops.h
 tls_proxy_clnt.o: ../../include/sys_defs.h
@@ -304,12 +310,16 @@ tls_proxy_clnt.o: tls_proxy.h
 tls_proxy_clnt.o: tls_proxy_clnt.c
 tls_proxy_print.o: ../../include/argv.h
 tls_proxy_print.o: ../../include/attr.h
+tls_proxy_print.o: ../../include/check_arg.h
 tls_proxy_print.o: ../../include/dns.h
+tls_proxy_print.o: ../../include/htable.h
 tls_proxy_print.o: ../../include/iostuff.h
 tls_proxy_print.o: ../../include/mail_proto.h
 tls_proxy_print.o: ../../include/myaddrinfo.h
+tls_proxy_print.o: ../../include/mymalloc.h
 tls_proxy_print.o: ../../include/name_code.h
 tls_proxy_print.o: ../../include/name_mask.h
+tls_proxy_print.o: ../../include/nvtable.h
 tls_proxy_print.o: ../../include/sock_addr.h
 tls_proxy_print.o: ../../include/sys_defs.h
 tls_proxy_print.o: ../../include/vbuf.h
@@ -320,12 +330,16 @@ tls_proxy_print.o: tls_proxy.h
 tls_proxy_print.o: tls_proxy_print.c
 tls_proxy_scan.o: ../../include/argv.h
 tls_proxy_scan.o: ../../include/attr.h
+tls_proxy_scan.o: ../../include/check_arg.h
 tls_proxy_scan.o: ../../include/dns.h
+tls_proxy_scan.o: ../../include/htable.h
 tls_proxy_scan.o: ../../include/iostuff.h
 tls_proxy_scan.o: ../../include/mail_proto.h
 tls_proxy_scan.o: ../../include/myaddrinfo.h
+tls_proxy_scan.o: ../../include/mymalloc.h
 tls_proxy_scan.o: ../../include/name_code.h
 tls_proxy_scan.o: ../../include/name_mask.h
+tls_proxy_scan.o: ../../include/nvtable.h
 tls_proxy_scan.o: ../../include/sock_addr.h
 tls_proxy_scan.o: ../../include/sys_defs.h
 tls_proxy_scan.o: ../../include/vbuf.h
index b9fe04270613e7afc37cf883e231aa5717d487cf..60fc0e705932e3d258cf3b549ae3b965cb626928 100644 (file)
@@ -188,12 +188,12 @@ int     tls_mgr_seed(VSTRING *buf, int len)
      */
     if (attr_clnt_request(tls_mgr,
                          ATTR_FLAG_NONE,       /* Request attributes */
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, TLS_MGR_REQ_SEED,
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_SIZE, len,
+                         SEND_ATTR_STR(TLS_MGR_ATTR_REQ, TLS_MGR_REQ_SEED),
+                         SEND_ATTR_INT(TLS_MGR_ATTR_SIZE, len),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes */
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_STATUS, &status,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_SEED, buf,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_STATUS, &status),
+                         RECV_ATTR_DATA(TLS_MGR_ATTR_SEED, buf),
                          ATTR_TYPE_END) != 2)
        status = TLS_MGR_STAT_FAIL;
     return (status);
@@ -216,13 +216,13 @@ int     tls_mgr_policy(const char *cache_type, int *cachable, int *timeout)
      */
     if (attr_clnt_request(tls_mgr,
                          ATTR_FLAG_NONE,       /* Request attributes */
-                       ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, TLS_MGR_REQ_POLICY,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
+                       SEND_ATTR_STR(TLS_MGR_ATTR_REQ, TLS_MGR_REQ_POLICY),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply attributes */
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_STATUS, &status,
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_CACHABLE, cachable,
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_SESSTOUT, timeout,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_STATUS, &status),
+                         RECV_ATTR_INT(TLS_MGR_ATTR_CACHABLE, cachable),
+                         RECV_ATTR_INT(TLS_MGR_ATTR_SESSTOUT, timeout),
                          ATTR_TYPE_END) != 3)
        status = TLS_MGR_STAT_FAIL;
     return (status);
@@ -246,13 +246,13 @@ int     tls_mgr_lookup(const char *cache_type, const char *cache_id,
      */
     if (attr_clnt_request(tls_mgr,
                          ATTR_FLAG_NONE,       /* Request */
-                       ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, TLS_MGR_REQ_LOOKUP,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_ID, cache_id,
+                       SEND_ATTR_STR(TLS_MGR_ATTR_REQ, TLS_MGR_REQ_LOOKUP),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_ID, cache_id),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply */
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_STATUS, &status,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_SESSION, buf,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_STATUS, &status),
+                         RECV_ATTR_DATA(TLS_MGR_ATTR_SESSION, buf),
                          ATTR_TYPE_END) != 2)
        status = TLS_MGR_STAT_FAIL;
     return (status);
@@ -276,13 +276,13 @@ int     tls_mgr_update(const char *cache_type, const char *cache_id,
      */
     if (attr_clnt_request(tls_mgr,
                          ATTR_FLAG_NONE,       /* Request */
-                       ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, TLS_MGR_REQ_UPDATE,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_ID, cache_id,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_SESSION, len, buf,
+                       SEND_ATTR_STR(TLS_MGR_ATTR_REQ, TLS_MGR_REQ_UPDATE),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_ID, cache_id),
+                         SEND_ATTR_DATA(TLS_MGR_ATTR_SESSION, len, buf),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply */
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_STATUS, &status,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_STATUS, &status),
                          ATTR_TYPE_END) != 1)
        status = TLS_MGR_STAT_FAIL;
     return (status);
@@ -305,12 +305,12 @@ int     tls_mgr_delete(const char *cache_type, const char *cache_id)
      */
     if (attr_clnt_request(tls_mgr,
                          ATTR_FLAG_NONE,       /* Request */
-                       ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, TLS_MGR_REQ_DELETE,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_ID, cache_id,
+                       SEND_ATTR_STR(TLS_MGR_ATTR_REQ, TLS_MGR_REQ_DELETE),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
+                         SEND_ATTR_STR(TLS_MGR_ATTR_CACHE_ID, cache_id),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply */
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_STATUS, &status,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_STATUS, &status),
                          ATTR_TYPE_END) != 1)
        status = TLS_MGR_STAT_FAIL;
     return (status);
@@ -344,12 +344,12 @@ static TLS_TICKET_KEY *request_scache_key(unsigned char *keyname)
      */
     if (attr_clnt_request(tls_mgr,
                          ATTR_FLAG_NONE,       /* Request */
-                       ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, TLS_MGR_REQ_TKTKEY,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_KEYNAME, len, name,
+                       SEND_ATTR_STR(TLS_MGR_ATTR_REQ, TLS_MGR_REQ_TKTKEY),
+                         SEND_ATTR_DATA(TLS_MGR_ATTR_KEYNAME, len, name),
                          ATTR_TYPE_END,
                          ATTR_FLAG_MISSING,    /* Reply */
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_STATUS, &status,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_KEYBUF, keybuf,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_STATUS, &status),
+                         RECV_ATTR_DATA(TLS_MGR_ATTR_KEYBUF, keybuf),
                          ATTR_TYPE_END) != 2
        || status != TLS_MGR_STAT_OK
        || LEN(keybuf) != sizeof(tmp))
index 8b4e0d069370bfb7c7156ead1af8fa91a7e4969b..70c0096dca30892ba6d47677db5d699ef58d022c 100644 (file)
@@ -155,9 +155,9 @@ VSTREAM *tls_proxy_open(const char *service, int flags,
     tlsproxy_stream = vstream_fdopen(fd, O_RDWR);
     vstring_sprintf(remote_endpt, "[%s]:%s", peer_addr, peer_port);
     attr_print(tlsproxy_stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_STR, MAIL_ATTR_REMOTE_ENDPT, STR(remote_endpt),
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
-              ATTR_TYPE_INT, MAIL_ATTR_TIMEOUT, timeout,
+              SEND_ATTR_STR(MAIL_ATTR_REMOTE_ENDPT, STR(remote_endpt)),
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
+              SEND_ATTR_INT(MAIL_ATTR_TIMEOUT, timeout),
               ATTR_TYPE_END);
     if (vstream_fflush(tlsproxy_stream) != 0) {
        msg_warn("error sending request to %s service: %m",
@@ -174,7 +174,7 @@ VSTREAM *tls_proxy_open(const char *service, int flags,
      * descriptor. We can't assume UNIX-domain socket semantics here.
      */
     if (attr_scan(tlsproxy_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_INT, MAIL_ATTR_STATUS, &status,
+                 RECV_ATTR_INT(MAIL_ATTR_STATUS, &status),
                  ATTR_TYPE_END) != 1 || status == 0) {
 
        /*
@@ -216,7 +216,7 @@ TLS_SESS_STATE *tls_proxy_context_receive(VSTREAM *proxy_stream)
     tls_context = (TLS_SESS_STATE *) mymalloc(sizeof(*tls_context));
 
     if (attr_scan(proxy_stream, ATTR_FLAG_STRICT,
-              ATTR_TYPE_FUNC, tls_proxy_context_scan, (void *) tls_context,
+              RECV_ATTR_FUNC(tls_proxy_context_scan, (void *) tls_context),
                  ATTR_TYPE_END) != 1) {
        tls_proxy_context_free(tls_context);
        return (0);
index a850cb1d429d54c1a422bcfd3fed7572da5255fd..e30e8be88beea626dd26ef4e108f98ebed450354 100644 (file)
@@ -17,7 +17,7 @@
 /*     routine. TLS_SESS_STATE() is meant to be passed as a call-back
 /*     to attr_print(), thusly:
 /*
-/*     ... ATTR_TYPE_FUNC, tls_proxy_context_print, (void *) tls_context, ...
+/*     ... SEND_ATTR_FUNC(tls_proxy_context_print, (void *) tls_context), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -61,24 +61,24 @@ int     tls_proxy_context_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
 #define STRING_OR_EMPTY(s) ((s) ? (s) : "")
 
     ret = print_fn(fp, flags | ATTR_FLAG_MORE,
-                  ATTR_TYPE_STR, MAIL_ATTR_PEER_CN,
-                  STRING_OR_EMPTY(tp->peer_CN),
-                  ATTR_TYPE_STR, MAIL_ATTR_ISSUER_CN,
-                  STRING_OR_EMPTY(tp->issuer_CN),
-                  ATTR_TYPE_STR, MAIL_ATTR_PEER_CERT_FPT,
-                  STRING_OR_EMPTY(tp->peer_cert_fprint),
-                  ATTR_TYPE_STR, MAIL_ATTR_PEER_PKEY_FPT,
-                  STRING_OR_EMPTY(tp->peer_pkey_fprint),
-                  ATTR_TYPE_INT, MAIL_ATTR_PEER_STATUS,
-                  tp->peer_status,
-                  ATTR_TYPE_STR, MAIL_ATTR_CIPHER_PROTOCOL,
-                  STRING_OR_EMPTY(tp->protocol),
-                  ATTR_TYPE_STR, MAIL_ATTR_CIPHER_NAME,
-                  STRING_OR_EMPTY(tp->cipher_name),
-                  ATTR_TYPE_INT, MAIL_ATTR_CIPHER_USEBITS,
-                  tp->cipher_usebits,
-                  ATTR_TYPE_INT, MAIL_ATTR_CIPHER_ALGBITS,
-                  tp->cipher_algbits,
+                  SEND_ATTR_STR(MAIL_ATTR_PEER_CN,
+                                STRING_OR_EMPTY(tp->peer_CN)),
+                  SEND_ATTR_STR(MAIL_ATTR_ISSUER_CN,
+                                STRING_OR_EMPTY(tp->issuer_CN)),
+                  SEND_ATTR_STR(MAIL_ATTR_PEER_CERT_FPT,
+                                STRING_OR_EMPTY(tp->peer_cert_fprint)),
+                  SEND_ATTR_STR(MAIL_ATTR_PEER_PKEY_FPT,
+                                STRING_OR_EMPTY(tp->peer_pkey_fprint)),
+                  SEND_ATTR_INT(MAIL_ATTR_PEER_STATUS,
+                                tp->peer_status),
+                  SEND_ATTR_STR(MAIL_ATTR_CIPHER_PROTOCOL,
+                                STRING_OR_EMPTY(tp->protocol)),
+                  SEND_ATTR_STR(MAIL_ATTR_CIPHER_NAME,
+                                STRING_OR_EMPTY(tp->cipher_name)),
+                  SEND_ATTR_INT(MAIL_ATTR_CIPHER_USEBITS,
+                                tp->cipher_usebits),
+                  SEND_ATTR_INT(MAIL_ATTR_CIPHER_ALGBITS,
+                                tp->cipher_algbits),
                   ATTR_TYPE_END);
     return (ret);
 }
index 428f24a57b1bae2e90aac497d00894bd0b64f9bf..29a0cd9f97ebaa5101f00f339915f4a5e670641c 100644 (file)
@@ -17,7 +17,7 @@
 /*     routine.  tls_proxy_context_scan() is meant to be passed as
 /*     a call-back to attr_scan(), thusly:
 /*
-/*     ... ATTR_TYPE_FUNC, tls_proxy_context_scan, (void *) tls_context, ...
+/*     ... RECV_ATTR_FUNC(tls_proxy_context_scan, (void *) tls_context), ...
 /* DIAGNOSTICS
 /*     Fatal: out of memory.
 /* LICENSE
@@ -69,18 +69,18 @@ int     tls_proxy_context_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
      */
     memset(ptr, 0, sizeof(TLS_SESS_STATE));
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
-                 ATTR_TYPE_STR, MAIL_ATTR_PEER_CN, peer_CN,
-                 ATTR_TYPE_STR, MAIL_ATTR_ISSUER_CN, issuer_CN,
-                 ATTR_TYPE_STR, MAIL_ATTR_PEER_CERT_FPT, peer_cert_fprint,
-                 ATTR_TYPE_STR, MAIL_ATTR_PEER_PKEY_FPT, peer_pkey_fprint,
-                 ATTR_TYPE_INT, MAIL_ATTR_PEER_STATUS,
-                 &tls_context->peer_status,
-                 ATTR_TYPE_STR, MAIL_ATTR_CIPHER_PROTOCOL, protocol,
-                 ATTR_TYPE_STR, MAIL_ATTR_CIPHER_NAME, cipher_name,
-                 ATTR_TYPE_INT, MAIL_ATTR_CIPHER_USEBITS,
-                 &tls_context->cipher_usebits,
-                 ATTR_TYPE_INT, MAIL_ATTR_CIPHER_ALGBITS,
-                 &tls_context->cipher_algbits,
+                 RECV_ATTR_STR(MAIL_ATTR_PEER_CN, peer_CN),
+                 RECV_ATTR_STR(MAIL_ATTR_ISSUER_CN, issuer_CN),
+                 RECV_ATTR_STR(MAIL_ATTR_PEER_CERT_FPT, peer_cert_fprint),
+                 RECV_ATTR_STR(MAIL_ATTR_PEER_PKEY_FPT, peer_pkey_fprint),
+                 RECV_ATTR_INT(MAIL_ATTR_PEER_STATUS,
+                               &tls_context->peer_status),
+                 RECV_ATTR_STR(MAIL_ATTR_CIPHER_PROTOCOL, protocol),
+                 RECV_ATTR_STR(MAIL_ATTR_CIPHER_NAME, cipher_name),
+                 RECV_ATTR_INT(MAIL_ATTR_CIPHER_USEBITS,
+                               &tls_context->cipher_usebits),
+                 RECV_ATTR_INT(MAIL_ATTR_CIPHER_ALGBITS,
+                               &tls_context->cipher_algbits),
                  ATTR_TYPE_END);
     tls_context->peer_CN = vstring_export(peer_CN);
     tls_context->issuer_CN = vstring_export(issuer_CN);
index 5f2cd95ed1155d81410b94065ed91b9b55c0d19d..6dd3e1556307e33599191797991338f10c818255 100644 (file)
@@ -65,6 +65,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 tlsmgr.o: ../../include/argv.h
 tlsmgr.o: ../../include/attr.h
+tlsmgr.o: ../../include/check_arg.h
 tlsmgr.o: ../../include/data_redirect.h
 tlsmgr.o: ../../include/dict.h
 tlsmgr.o: ../../include/dns.h
@@ -83,6 +84,7 @@ tlsmgr.o: ../../include/myflock.h
 tlsmgr.o: ../../include/mymalloc.h
 tlsmgr.o: ../../include/name_code.h
 tlsmgr.o: ../../include/name_mask.h
+tlsmgr.o: ../../include/nvtable.h
 tlsmgr.o: ../../include/set_eugid.h
 tlsmgr.o: ../../include/sock_addr.h
 tlsmgr.o: ../../include/stringops.h
index 6018555079e66e8e04ac3d49ae9de1f83c10466a..7072c0c6b9a38183edf5a9b2bb0d8294ebbd6105 100644 (file)
@@ -574,7 +574,7 @@ static int tlsmgr_request_receive(VSTREAM *client_stream, VSTRING *request)
     else {
        if (attr_scan(client_stream,
                      ATTR_FLAG_MORE | ATTR_FLAG_STRICT,
-                     ATTR_TYPE_STR, TLS_MGR_ATTR_REQ, request,
+                     RECV_ATTR_STR(TLS_MGR_ATTR_REQ, request),
                      ATTR_TYPE_END) != 1) {
            return (-1);
        }
@@ -628,8 +628,8 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
         */
        if (STREQ(STR(request), TLS_MGR_REQ_LOOKUP)) {
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_ID, cache_id,
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_ID, cache_id),
                          ATTR_TYPE_END) == 2) {
                for (ent = cache_table; ent->cache_label; ++ent)
                    if (strcmp(ent->cache_label, STR(cache_type)) == 0)
@@ -651,9 +651,9 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
                }
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
-                      ATTR_TYPE_DATA, TLS_MGR_ATTR_SESSION,
-                      LEN(buffer), STR(buffer),
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
+                      SEND_ATTR_DATA(TLS_MGR_ATTR_SESSION,
+                                     LEN(buffer), STR(buffer)),
                       ATTR_TYPE_END);
        }
 
@@ -662,9 +662,9 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
         */
        else if (STREQ(STR(request), TLS_MGR_REQ_UPDATE)) {
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_ID, cache_id,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_SESSION, buffer,
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_ID, cache_id),
+                         RECV_ATTR_DATA(TLS_MGR_ATTR_SESSION, buffer),
                          ATTR_TYPE_END) == 3) {
                for (ent = cache_table; ent->cache_label; ++ent)
                    if (strcmp(ent->cache_label, STR(cache_type)) == 0)
@@ -680,7 +680,7 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
                }
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
                       ATTR_TYPE_END);
        }
 
@@ -689,8 +689,8 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
         */
        else if (STREQ(STR(request), TLS_MGR_REQ_DELETE)) {
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_ID, cache_id,
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_ID, cache_id),
                          ATTR_TYPE_END) == 2) {
                for (ent = cache_table; ent->cache_label; ++ent)
                    if (strcmp(ent->cache_label, STR(cache_type)) == 0)
@@ -705,7 +705,7 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
                }
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
                       ATTR_TYPE_END);
        }
 
@@ -714,7 +714,7 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
         */
        else if (STREQ(STR(request), TLS_MGR_REQ_TKTKEY)) {
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_DATA, TLS_MGR_ATTR_KEYNAME, buffer,
+                         RECV_ATTR_DATA(TLS_MGR_ATTR_KEYNAME, buffer),
                          ATTR_TYPE_END) == 1) {
                if (LEN(buffer) != 0 && LEN(buffer) != TLS_TICKET_NAMELEN) {
                    msg_warn("invalid session ticket key name length: %ld",
@@ -728,9 +728,9 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
                }
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
-                      ATTR_TYPE_DATA, TLS_MGR_ATTR_KEYBUF,
-                      LEN(buffer), STR(buffer),
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
+                      SEND_ATTR_DATA(TLS_MGR_ATTR_KEYBUF,
+                                     LEN(buffer), STR(buffer)),
                       ATTR_TYPE_END);
        }
 
@@ -739,7 +739,7 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
         */
        else if (STREQ(STR(request), TLS_MGR_REQ_SEED)) {
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_INT, TLS_MGR_ATTR_SIZE, &len,
+                         RECV_ATTR_INT(TLS_MGR_ATTR_SIZE, &len),
                          ATTR_TYPE_END) == 1) {
                VSTRING_RESET(buffer);
                if (len <= 0 || len > 255) {
@@ -754,9 +754,9 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
                }
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
-                      ATTR_TYPE_DATA, TLS_MGR_ATTR_SEED,
-                      LEN(buffer), STR(buffer),
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
+                      SEND_ATTR_DATA(TLS_MGR_ATTR_SEED,
+                                     LEN(buffer), STR(buffer)),
                       ATTR_TYPE_END);
        }
 
@@ -768,7 +768,7 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
            int     timeout = 0;
 
            if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                         ATTR_TYPE_STR, TLS_MGR_ATTR_CACHE_TYPE, cache_type,
+                         RECV_ATTR_STR(TLS_MGR_ATTR_CACHE_TYPE, cache_type),
                          ATTR_TYPE_END) == 1) {
                for (ent = cache_table; ent->cache_label; ++ent)
                    if (strcmp(ent->cache_label, STR(cache_type)) == 0)
@@ -783,9 +783,9 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
                }
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, status,
-                      ATTR_TYPE_INT, TLS_MGR_ATTR_CACHABLE, cachable,
-                      ATTR_TYPE_INT, TLS_MGR_ATTR_SESSTOUT, timeout,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, status),
+                      SEND_ATTR_INT(TLS_MGR_ATTR_CACHABLE, cachable),
+                      SEND_ATTR_INT(TLS_MGR_ATTR_SESSTOUT, timeout),
                       ATTR_TYPE_END);
        }
 
@@ -813,7 +813,7 @@ static void tlsmgr_service(VSTREAM *client_stream, char *unused_service,
      */
     else {
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, TLS_MGR_STAT_FAIL,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, TLS_MGR_STAT_FAIL),
                   ATTR_TYPE_END);
     }
     vstream_fflush(client_stream);
index 0435f0dd5e8e63a56b63e81ae32b3f1ecbc13a40..8e97f2105a16e659e4a8142c9a365fe9fb766cd6 100644 (file)
@@ -63,8 +63,10 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 tlsproxy.o: ../../include/argv.h
 tlsproxy.o: ../../include/attr.h
+tlsproxy.o: ../../include/check_arg.h
 tlsproxy.o: ../../include/dns.h
 tlsproxy.o: ../../include/events.h
+tlsproxy.o: ../../include/htable.h
 tlsproxy.o: ../../include/iostuff.h
 tlsproxy.o: ../../include/mail_conf.h
 tlsproxy.o: ../../include/mail_params.h
@@ -77,6 +79,7 @@ tlsproxy.o: ../../include/mymalloc.h
 tlsproxy.o: ../../include/name_code.h
 tlsproxy.o: ../../include/name_mask.h
 tlsproxy.o: ../../include/nbbio.h
+tlsproxy.o: ../../include/nvtable.h
 tlsproxy.o: ../../include/sock_addr.h
 tlsproxy.o: ../../include/sys_defs.h
 tlsproxy.o: ../../include/tls.h
index 6fdcf46c7862b21b03282a0494f6aa9e54821a11..1bd7fc3986db058f8de1bf7f7ead1f2e0baacde7 100644 (file)
@@ -471,8 +471,9 @@ static void tlsp_strategy(TLSP_STATE *state)
        }
        if ((state->req_flags & TLS_PROXY_FLAG_SEND_CONTEXT) != 0
            && (attr_print(state->plaintext_stream, ATTR_FLAG_NONE,
-                          ATTR_TYPE_FUNC, tls_proxy_context_print,
-                          (void *) state->tls_context, ATTR_TYPE_END) != 0
+                          SEND_ATTR_FUNC(tls_proxy_context_print,
+                                         (void *) state->tls_context),
+                          ATTR_TYPE_END) != 0
                || vstream_fflush(state->plaintext_stream) != 0)) {
            msg_warn("cannot send TLS context: %m");
            tlsp_state_free(state);
@@ -809,10 +810,10 @@ static void tlsp_get_request_event(int event, void *context)
      */
     if (event != EVENT_READ
        || attr_scan(plaintext_stream, ATTR_FLAG_STRICT,
-                    ATTR_TYPE_STR, MAIL_ATTR_REMOTE_ENDPT, remote_endpt,
-                    ATTR_TYPE_INT, MAIL_ATTR_FLAGS, &req_flags,
-                    ATTR_TYPE_INT, MAIL_ATTR_TIMEOUT, &timeout,
-                    ATTR_TYPE_STR, MAIL_ATTR_SERVER_ID, server_id,
+                    RECV_ATTR_STR(MAIL_ATTR_REMOTE_ENDPT, remote_endpt),
+                    RECV_ATTR_INT(MAIL_ATTR_FLAGS, &req_flags),
+                    RECV_ATTR_INT(MAIL_ATTR_TIMEOUT, &timeout),
+                    RECV_ATTR_STR(MAIL_ATTR_SERVER_ID, server_id),
                     ATTR_TYPE_END) != 4) {
        msg_warn("%s: receive request attributes: %m", myname);
        event_disable_readwrite(plaintext_fd);
@@ -827,7 +828,7 @@ static void tlsp_get_request_event(int event, void *context)
     ready = ((req_flags & TLS_PROXY_FLAG_ROLE_SERVER) != 0
             && tlsp_server_ctx != 0);
     if (attr_print(plaintext_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, ready,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, ready),
                   ATTR_TYPE_END) != 0
        || vstream_fflush(plaintext_stream) != 0
        || ready == 0) {
index 80dce59978e36dce88945e94eee5766b904a010a..f9e47df444d1947d4af1d085da59b50093b65582 100644 (file)
@@ -67,8 +67,10 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 resolve.o: ../../include/argv.h
 resolve.o: ../../include/attr.h
+resolve.o: ../../include/check_arg.h
 resolve.o: ../../include/dict.h
 resolve.o: ../../include/domain_list.h
+resolve.o: ../../include/htable.h
 resolve.o: ../../include/iostuff.h
 resolve.o: ../../include/mail_addr_find.h
 resolve.o: ../../include/mail_conf.h
@@ -80,6 +82,7 @@ resolve.o: ../../include/match_parent_style.h
 resolve.o: ../../include/msg.h
 resolve.o: ../../include/myflock.h
 resolve.o: ../../include/mymalloc.h
+resolve.o: ../../include/nvtable.h
 resolve.o: ../../include/quote_822_local.h
 resolve.o: ../../include/quote_flags.h
 resolve.o: ../../include/resolve_clnt.h
@@ -101,7 +104,9 @@ resolve.o: transport.h
 resolve.o: trivial-rewrite.h
 rewrite.o: ../../include/argv.h
 rewrite.o: ../../include/attr.h
+rewrite.o: ../../include/check_arg.h
 rewrite.o: ../../include/dict.h
+rewrite.o: ../../include/htable.h
 rewrite.o: ../../include/iostuff.h
 rewrite.o: ../../include/mail_conf.h
 rewrite.o: ../../include/mail_params.h
@@ -109,6 +114,8 @@ rewrite.o: ../../include/mail_proto.h
 rewrite.o: ../../include/maps.h
 rewrite.o: ../../include/msg.h
 rewrite.o: ../../include/myflock.h
+rewrite.o: ../../include/mymalloc.h
+rewrite.o: ../../include/nvtable.h
 rewrite.o: ../../include/resolve_clnt.h
 rewrite.o: ../../include/resolve_local.h
 rewrite.o: ../../include/split_at.h
@@ -122,8 +129,10 @@ rewrite.o: rewrite.c
 rewrite.o: trivial-rewrite.h
 transport.o: ../../include/argv.h
 transport.o: ../../include/attr.h
+transport.o: ../../include/check_arg.h
 transport.o: ../../include/dict.h
 transport.o: ../../include/events.h
+transport.o: ../../include/htable.h
 transport.o: ../../include/iostuff.h
 transport.o: ../../include/mail_params.h
 transport.o: ../../include/mail_proto.h
@@ -133,6 +142,7 @@ transport.o: ../../include/match_parent_style.h
 transport.o: ../../include/msg.h
 transport.o: ../../include/myflock.h
 transport.o: ../../include/mymalloc.h
+transport.o: ../../include/nvtable.h
 transport.o: ../../include/split_at.h
 transport.o: ../../include/stringops.h
 transport.o: ../../include/strip_addr.h
@@ -144,8 +154,10 @@ transport.o: transport.c
 transport.o: transport.h
 trivial-rewrite.o: ../../include/argv.h
 trivial-rewrite.o: ../../include/attr.h
+trivial-rewrite.o: ../../include/check_arg.h
 trivial-rewrite.o: ../../include/dict.h
 trivial-rewrite.o: ../../include/events.h
+trivial-rewrite.o: ../../include/htable.h
 trivial-rewrite.o: ../../include/iostuff.h
 trivial-rewrite.o: ../../include/mail_addr.h
 trivial-rewrite.o: ../../include/mail_conf.h
@@ -156,6 +168,8 @@ trivial-rewrite.o: ../../include/mail_version.h
 trivial-rewrite.o: ../../include/maps.h
 trivial-rewrite.o: ../../include/msg.h
 trivial-rewrite.o: ../../include/myflock.h
+trivial-rewrite.o: ../../include/mymalloc.h
+trivial-rewrite.o: ../../include/nvtable.h
 trivial-rewrite.o: ../../include/resolve_clnt.h
 trivial-rewrite.o: ../../include/resolve_local.h
 trivial-rewrite.o: ../../include/rewrite_clnt.h
index 45b25deae7856113a08bce7a5c128e6e36e6bae8..8ffb196efcd6e7241fc27c14af5a22890ae4ff30 100644 (file)
@@ -140,7 +140,7 @@ static MAPS *relocated_maps;
 
 /* resolve_class - determine domain address class */
 
-int resolve_class(const char *domain)
+int     resolve_class(const char *domain)
 {
     int     ret;
 
@@ -751,8 +751,8 @@ int     resolve_proto(RES_CONTEXT *context, VSTREAM *stream)
     int     flags;
 
     if (attr_scan(stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
-                 ATTR_TYPE_STR, MAIL_ATTR_ADDR, query,
+                 RECV_ATTR_STR(MAIL_ATTR_SENDER, sender),
+                 RECV_ATTR_STR(MAIL_ATTR_ADDR, query),
                  ATTR_TYPE_END) != 2)
        return (-1);
 
@@ -765,11 +765,11 @@ int     resolve_proto(RES_CONTEXT *context, VSTREAM *stream)
                 STR(nexthop), STR(nextrcpt), flags);
 
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, server_flags,
-              ATTR_TYPE_STR, MAIL_ATTR_TRANSPORT, STR(channel),
-              ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, STR(nexthop),
-              ATTR_TYPE_STR, MAIL_ATTR_RECIP, STR(nextrcpt),
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, flags,
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, server_flags),
+              SEND_ATTR_STR(MAIL_ATTR_TRANSPORT, STR(channel)),
+              SEND_ATTR_STR(MAIL_ATTR_NEXTHOP, STR(nexthop)),
+              SEND_ATTR_STR(MAIL_ATTR_RECIP, STR(nextrcpt)),
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, flags),
               ATTR_TYPE_END);
 
     if (vstream_fflush(stream) != 0) {
index de8323958095481d2458a5b90b03ae2c8fbfdab8..ec01f9e79ce6c1794f92d668cdbd23965070ffa1 100644 (file)
@@ -244,8 +244,8 @@ int     rewrite_proto(VSTREAM *stream)
     TOK822 *tree;
 
     if (attr_scan(stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_RULE, ruleset,
-                 ATTR_TYPE_STR, MAIL_ATTR_ADDR, address,
+                 RECV_ATTR_STR(MAIL_ATTR_RULE, ruleset),
+                 RECV_ATTR_STR(MAIL_ATTR_ADDR, address),
                  ATTR_TYPE_END) != 2)
        return (-1);
 
@@ -281,8 +281,8 @@ int     rewrite_proto(VSTREAM *stream)
                 vstring_str(address), vstring_str(result));
 
     attr_print(stream, ATTR_FLAG_NONE,
-              ATTR_TYPE_INT, MAIL_ATTR_FLAGS, server_flags,
-              ATTR_TYPE_STR, MAIL_ATTR_ADDR, vstring_str(result),
+              SEND_ATTR_INT(MAIL_ATTR_FLAGS, server_flags),
+              SEND_ATTR_STR(MAIL_ATTR_ADDR, vstring_str(result)),
               ATTR_TYPE_END);
 
     if (vstream_fflush(stream) != 0) {
index bbb6757ed5691312bcc9882e732c877117fa65b8..d167a9a7ccaf4b83f26947c47f21cb22dc1ca5e2 100644 (file)
@@ -479,7 +479,7 @@ static void rewrite_service(VSTREAM *stream, char *unused_service, char **argv)
      * handled by the common code in multi_server.c.
      */
     if (attr_scan(stream, ATTR_FLAG_STRICT | ATTR_FLAG_MORE,
-                 ATTR_TYPE_STR, MAIL_ATTR_REQ, command,
+                 RECV_ATTR_STR(MAIL_ATTR_REQ, command),
                  ATTR_TYPE_END) == 1) {
        if (strcmp(vstring_str(command), REWRITE_ADDR) == 0) {
            status = rewrite_proto(stream);
index a4f9448d7d9b05ceeee4cb20064dd54af955ebe4..ded35f049d2107bc4fabca6db06db6350083ad16 100644 (file)
@@ -39,7 +39,7 @@ SRCS  = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
        dict_sockmap.c line_number.c recv_pass_attr.c pass_accept.c \
        poll_fd.c timecmp.c slmdb.c dict_pipe.c dict_random.c \
        valid_utf8_hostname.c midna.c argv_splitq.c balpar.c dict_union.c \
-       extpar.c dict_inline.c
+       extpar.c dict_inline.c attr.c
 OBJS   = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
        attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
@@ -80,7 +80,7 @@ OBJS  = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        dict_sockmap.o line_number.o recv_pass_attr.o pass_accept.o \
        poll_fd.o timecmp.o $(NON_PLUGIN_MAP_OBJ) dict_pipe.o dict_random.o \
        valid_utf8_hostname.o midna.o argv_splitq.o balpar.o dict_union.o \
-       extpar.o dict_inline.o
+       extpar.o dict_inline.o attr.o
 # MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
 # When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
 # otherwise it sets the PLUGIN_* macros.
@@ -109,7 +109,7 @@ HDRS        = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
        edit_file.h dict_cache.h dict_thash.h ip_match.h nbbio.h base32_code.h \
        dict_fail.h warn_stat.h dict_sockmap.h line_number.h timecmp.h \
        slmdb.h compat_va_copy.h dict_pipe.h dict_random.h \
-       valid_utf8_hostname.h midna.h dict_union.h dict_inline.h
+       valid_utf8_hostname.h midna.h dict_union.h dict_inline.h check_arg.h
 TESTSRC        = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
        stream_test.c dup2_pass_on_exec.c
 DEFS   = -I. -D$(SYSTYPE)
@@ -801,24 +801,39 @@ argv_splitq.o: stringops.h
 argv_splitq.o: sys_defs.h
 argv_splitq.o: vbuf.h
 argv_splitq.o: vstring.h
+attr.o: attr.c
+attr.o: attr.h
+attr.o: check_arg.h
+attr.o: htable.h
+attr.o: mymalloc.h
+attr.o: nvtable.h
+attr.o: sys_defs.h
+attr.o: vbuf.h
+attr.o: vstream.h
+attr.o: vstring.h
 attr_clnt.o: attr.h
 attr_clnt.o: attr_clnt.c
 attr_clnt.o: attr_clnt.h
 attr_clnt.o: auto_clnt.h
+attr_clnt.o: check_arg.h
 attr_clnt.o: compat_va_copy.h
 attr_clnt.o: htable.h
 attr_clnt.o: iostuff.h
 attr_clnt.o: msg.h
 attr_clnt.o: mymalloc.h
+attr_clnt.o: nvtable.h
 attr_clnt.o: sys_defs.h
 attr_clnt.o: vbuf.h
 attr_clnt.o: vstream.h
+attr_clnt.o: vstring.h
 attr_print0.o: attr.h
 attr_print0.o: attr_print0.c
 attr_print0.o: base64_code.h
+attr_print0.o: check_arg.h
 attr_print0.o: htable.h
 attr_print0.o: msg.h
 attr_print0.o: mymalloc.h
+attr_print0.o: nvtable.h
 attr_print0.o: sys_defs.h
 attr_print0.o: vbuf.h
 attr_print0.o: vstream.h
@@ -826,9 +841,11 @@ attr_print0.o: vstring.h
 attr_print64.o: attr.h
 attr_print64.o: attr_print64.c
 attr_print64.o: base64_code.h
+attr_print64.o: check_arg.h
 attr_print64.o: htable.h
 attr_print64.o: msg.h
 attr_print64.o: mymalloc.h
+attr_print64.o: nvtable.h
 attr_print64.o: sys_defs.h
 attr_print64.o: vbuf.h
 attr_print64.o: vstream.h
@@ -836,9 +853,11 @@ attr_print64.o: vstring.h
 attr_print_plain.o: attr.h
 attr_print_plain.o: attr_print_plain.c
 attr_print_plain.o: base64_code.h
+attr_print_plain.o: check_arg.h
 attr_print_plain.o: htable.h
 attr_print_plain.o: msg.h
 attr_print_plain.o: mymalloc.h
+attr_print_plain.o: nvtable.h
 attr_print_plain.o: sys_defs.h
 attr_print_plain.o: vbuf.h
 attr_print_plain.o: vstream.h
@@ -846,9 +865,11 @@ attr_print_plain.o: vstring.h
 attr_scan0.o: attr.h
 attr_scan0.o: attr_scan0.c
 attr_scan0.o: base64_code.h
+attr_scan0.o: check_arg.h
 attr_scan0.o: htable.h
 attr_scan0.o: msg.h
 attr_scan0.o: mymalloc.h
+attr_scan0.o: nvtable.h
 attr_scan0.o: sys_defs.h
 attr_scan0.o: vbuf.h
 attr_scan0.o: vstream.h
@@ -857,9 +878,11 @@ attr_scan0.o: vstring_vstream.h
 attr_scan64.o: attr.h
 attr_scan64.o: attr_scan64.c
 attr_scan64.o: base64_code.h
+attr_scan64.o: check_arg.h
 attr_scan64.o: htable.h
 attr_scan64.o: msg.h
 attr_scan64.o: mymalloc.h
+attr_scan64.o: nvtable.h
 attr_scan64.o: sys_defs.h
 attr_scan64.o: vbuf.h
 attr_scan64.o: vstream.h
@@ -867,9 +890,11 @@ attr_scan64.o: vstring.h
 attr_scan_plain.o: attr.h
 attr_scan_plain.o: attr_scan_plain.c
 attr_scan_plain.o: base64_code.h
+attr_scan_plain.o: check_arg.h
 attr_scan_plain.o: htable.h
 attr_scan_plain.o: msg.h
 attr_scan_plain.o: mymalloc.h
+attr_scan_plain.o: nvtable.h
 attr_scan_plain.o: sys_defs.h
 attr_scan_plain.o: vbuf.h
 attr_scan_plain.o: vstream.h
@@ -914,6 +939,8 @@ binhash.o: binhash.h
 binhash.o: msg.h
 binhash.o: mymalloc.h
 binhash.o: sys_defs.h
+check_arg.o: check_arg.c
+check_arg.o: sys_defs.h
 chroot_uid.o: chroot_uid.c
 chroot_uid.o: chroot_uid.h
 chroot_uid.o: msg.h
@@ -1602,8 +1629,6 @@ load_file.o: vbuf.h
 load_file.o: vstream.h
 load_file.o: warn_stat.h
 load_lib.o: load_lib.c
-load_lib.o: load_lib.h
-load_lib.o: msg.h
 load_lib.o: sys_defs.h
 lowercase.o: lowercase.c
 lowercase.o: stringops.h
@@ -1808,14 +1833,18 @@ open_lock.o: vbuf.h
 open_lock.o: vstream.h
 open_lock.o: vstring.h
 pass_accept.o: attr.h
+pass_accept.o: check_arg.h
 pass_accept.o: htable.h
 pass_accept.o: iostuff.h
 pass_accept.o: listen.h
 pass_accept.o: msg.h
+pass_accept.o: mymalloc.h
+pass_accept.o: nvtable.h
 pass_accept.o: pass_accept.c
 pass_accept.o: sys_defs.h
 pass_accept.o: vbuf.h
 pass_accept.o: vstream.h
+pass_accept.o: vstring.h
 pass_trigger.o: connect.h
 pass_trigger.o: events.h
 pass_trigger.o: iostuff.h
@@ -1857,14 +1886,17 @@ readlline.o: vbuf.h
 readlline.o: vstream.h
 readlline.o: vstring.h
 recv_pass_attr.o: attr.h
+recv_pass_attr.o: check_arg.h
 recv_pass_attr.o: htable.h
 recv_pass_attr.o: iostuff.h
 recv_pass_attr.o: listen.h
 recv_pass_attr.o: mymalloc.h
+recv_pass_attr.o: nvtable.h
 recv_pass_attr.o: recv_pass_attr.c
 recv_pass_attr.o: sys_defs.h
 recv_pass_attr.o: vbuf.h
 recv_pass_attr.o: vstream.h
+recv_pass_attr.o: vstring.h
 ring.o: ring.c
 ring.o: ring.h
 safe_getenv.o: safe.h
diff --git a/postfix/src/util/attr.c b/postfix/src/util/attr.c
new file mode 100644 (file)
index 0000000..4fdd925
--- /dev/null
@@ -0,0 +1,48 @@
+/*++
+/* NAME
+/*     attr 3
+/* SUMMARY
+/*     attribute list manipulations
+/* SYNOPSIS
+/*     #include <attr.h>
+/* DESCRIPTION
+/*     This module allocates storage for dummy variables that are
+/*     never referenced. They are used in expressions that are
+/*     discarded by the compiler.  But they are here, just in case.
+/* 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 <sys_defs.h>
+
+ /*
+  * Utility library.
+  */
+#include <attr.h>
+
+ /*
+  * These should never be referenced, but they are here just in case.
+  */
+int     CHECK_VAL_DUMMY(int);
+long    CHECK_VAL_DUMMY(long);
+ssize_t CHECK_VAL_DUMMY(ssize_t);
+int    *CHECK_PTR_DUMMY(int);
+long   *CHECK_PTR_DUMMY(long);
+void   *CHECK_PTR_DUMMY(void);
+const char *CHECK_CONST_PTR_DUMMY(char);
+const void *CHECK_CONST_PTR_DUMMY(void);
+VSTRING *CHECK_PTR_DUMMY(VSTRING);
+HTABLE *CHECK_PTR_DUMMY(HTABLE);
+const HTABLE *CHECK_CONST_PTR_DUMMY(HTABLE);
+NVTABLE *CHECK_PTR_DUMMY(NVTABLE);
+const NVTABLE *CHECK_CONST_PTR_DUMMY(NVTABLE);
index cdaeb79a91074ff8a943fc5ef81428e0bda57bef..9d044e7562c425740f0dc9b0bb70e80cfae65411 100644 (file)
   * Utility library.
   */
 #include <vstream.h>
+#include <vstring.h>
+#include <htable.h>
+#include <nvtable.h>
+#include <check_arg.h>
 
  /*
   * Attribute types. See attr_scan(3) for documentation.
 
 #define ATTR_HASH_LIMIT                1024    /* Size of hash table */
 
+#define SEND_ATTR_INT(name, val)       ATTR_TYPE_INT, CHECK_CONST_PTR(char, (name)), CHECK_VAL(int, (val))
+#define SEND_ATTR_STR(name, val)       ATTR_TYPE_STR, CHECK_CONST_PTR(char, (name)), CHECK_CONST_PTR(char, (val))
+#define SEND_ATTR_HASH(val)            ATTR_TYPE_HASH, CHECK_CONST_PTR(HTABLE, (val))
+#define SEND_ATTR_NV(val)              ATTR_TYPE_NV, CHECK_CONST_PTR(NVTABLE, (val))
+#define SEND_ATTR_LONG(name, val)      ATTR_TYPE_LONG, CHECK_CONST_PTR(char, (name)), CHECK_VAL(long, (val))
+#define SEND_ATTR_DATA(name, len, val) ATTR_TYPE_DATA, CHECK_CONST_PTR(char, (name)), CHECK_VAL(ssize_t, (len)), CHECK_CONST_PTR(void, (val))
+#define SEND_ATTR_FUNC(func, val)      ATTR_TYPE_FUNC, (func), CHECK_CONST_PTR(void, (val))
+
+#define RECV_ATTR_INT(name, val)       ATTR_TYPE_INT, CHECK_CONST_PTR(char, (name)), CHECK_PTR(int, (val))
+#define RECV_ATTR_STR(name, val)       ATTR_TYPE_STR, CHECK_CONST_PTR(char, (name)), CHECK_PTR(VSTRING, (val))
+#define RECV_ATTR_HASH(val)            ATTR_TYPE_HASH, CHECK_PTR(HTABLE, (val))
+#define RECV_ATTR_NV(val)              ATTR_TYPE_NV, CHECK_PTR(NVTABLE, (val))
+#define RECV_ATTR_LONG(name, val)      ATTR_TYPE_LONG, CHECK_CONST_PTR(char, (name)), CHECK_PTR(long, (val))
+#define RECV_ATTR_DATA(name, val)      ATTR_TYPE_DATA, CHECK_CONST_PTR(char, (name)), CHECK_PTR(VSTRING, (val))
+#define RECV_ATTR_FUNC(func, val)      ATTR_TYPE_FUNC, (func), CHECK_PTR(void, (val))
+
+extern int CHECK_VAL_DUMMY(int);
+extern long CHECK_VAL_DUMMY(long);
+extern ssize_t CHECK_VAL_DUMMY(ssize_t);
+extern int *CHECK_PTR_DUMMY(int);
+extern long *CHECK_PTR_DUMMY(long);
+extern void *CHECK_PTR_DUMMY(void);
+extern const char *CHECK_CONST_PTR_DUMMY(char);
+extern const void *CHECK_CONST_PTR_DUMMY(void);
+
+extern VSTRING *CHECK_PTR_DUMMY(VSTRING);
+
+extern HTABLE *CHECK_PTR_DUMMY(HTABLE);
+extern const HTABLE *CHECK_CONST_PTR_DUMMY(HTABLE);
+
+extern NVTABLE *CHECK_PTR_DUMMY(NVTABLE);
+extern const NVTABLE *CHECK_CONST_PTR_DUMMY(NVTABLE);
+
  /*
   * Flags that control processing. See attr_scan(3) for documentation.
   */
@@ -50,7 +87,7 @@
  /*
   * Delegation for better data abstraction.
   */
-typedef int (*ATTR_SCAN_MASTER_FN) (VSTREAM *, int, ...);
+typedef int (*ATTR_SCAN_MASTER_FN) (VSTREAM *, int,...);
 typedef int (*ATTR_SCAN_SLAVE_FN) (ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
 typedef int (*ATTR_PRINT_MASTER_FN) (VSTREAM *, int,...);
 typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
index 6e991e9248c826c0b9efe98f3f74d38929b66bfd..650fd6d7fd277c0cdd8313365cd79cbcd8e3a611 100644 (file)
@@ -222,17 +222,17 @@ int     main(int unused_argc, char **argv)
     htable_enter(table, "foo-name", mystrdup("foo-value"));
     htable_enter(table, "bar-name", mystrdup("bar-value"));
     attr_print0(VSTREAM_OUT, ATTR_FLAG_NONE,
-               ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-               ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
-               ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
-               ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
-               ATTR_TYPE_HASH, table,
+               SEND_ATTR_INT(ATTR_NAME_INT, 4711),
+               SEND_ATTR_LONG(ATTR_NAME_LONG, 1234L),
+               SEND_ATTR_STR(ATTR_NAME_STR, "whoopee"),
+               SEND_ATTR_DATA(ATTR_NAME_DATA, strlen("whoopee"), "whoopee"),
+               SEND_ATTR_HASH(table),
                ATTR_TYPE_END);
     attr_print0(VSTREAM_OUT, ATTR_FLAG_NONE,
-               ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-               ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
-               ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
-               ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
+               SEND_ATTR_INT(ATTR_NAME_INT, 4711),
+               SEND_ATTR_LONG(ATTR_NAME_LONG, 1234L),
+               SEND_ATTR_STR(ATTR_NAME_STR, "whoopee"),
+               SEND_ATTR_DATA(ATTR_NAME_DATA, strlen("whoopee"), "whoopee"),
                ATTR_TYPE_END);
     if (vstream_fflush(VSTREAM_OUT) != 0)
        msg_fatal("write error: %m");
index 6d5850d2528f1cd483230b224dd325961776fa7e..00d945fa3e43456ed070cd443568d7672d11d6db 100644 (file)
@@ -261,17 +261,17 @@ int     main(int unused_argc, char **argv)
     htable_enter(table, "foo-name", mystrdup("foo-value"));
     htable_enter(table, "bar-name", mystrdup("bar-value"));
     attr_print64(VSTREAM_OUT, ATTR_FLAG_NONE,
-                ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
-                ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
-              ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
-                ATTR_TYPE_HASH, table,
+                SEND_ATTR_INT(ATTR_NAME_INT, 4711),
+                SEND_ATTR_LONG(ATTR_NAME_LONG, 1234L),
+                SEND_ATTR_STR(ATTR_NAME_STR, "whoopee"),
+              SEND_ATTR_DATA(ATTR_NAME_DATA, strlen("whoopee"), "whoopee"),
+                SEND_ATTR_HASH(table),
                 ATTR_TYPE_END);
     attr_print64(VSTREAM_OUT, ATTR_FLAG_NONE,
-                ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
-                ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
-              ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
+                SEND_ATTR_INT(ATTR_NAME_INT, 4711),
+                SEND_ATTR_LONG(ATTR_NAME_LONG, 1234L),
+                SEND_ATTR_STR(ATTR_NAME_STR, "whoopee"),
+              SEND_ATTR_DATA(ATTR_NAME_DATA, strlen("whoopee"), "whoopee"),
                 ATTR_TYPE_END);
     if (vstream_fflush(VSTREAM_OUT) != 0)
        msg_fatal("write error: %m");
index 63f294176fa0f2fbc7cc572bc5516e66e5edab07..4edb100d98a9c946060942b3f6bfca6113a2acc8 100644 (file)
@@ -216,17 +216,17 @@ int     main(int unused_argc, char **argv)
     htable_enter(table, "foo-name", mystrdup("foo-value"));
     htable_enter(table, "bar-name", mystrdup("bar-value"));
     attr_print_plain(VSTREAM_OUT, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                    ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
-                    ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
-              ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
-                    ATTR_TYPE_HASH, table,
+                    SEND_ATTR_INT(ATTR_NAME_INT, 4711),
+                    SEND_ATTR_LONG(ATTR_NAME_LONG, 1234L),
+                    SEND_ATTR_STR(ATTR_NAME_STR, "whoopee"),
+              SEND_ATTR_DATA(ATTR_NAME_DATA, strlen("whoopee"), "whoopee"),
+                    SEND_ATTR_HASH(table),
                     ATTR_TYPE_END);
     attr_print_plain(VSTREAM_OUT, ATTR_FLAG_NONE,
-                    ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                    ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
-                    ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
-              ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
+                    SEND_ATTR_INT(ATTR_NAME_INT, 4711),
+                    SEND_ATTR_LONG(ATTR_NAME_LONG, 1234L),
+                    SEND_ATTR_STR(ATTR_NAME_STR, "whoopee"),
+              SEND_ATTR_DATA(ATTR_NAME_DATA, strlen("whoopee"), "whoopee"),
                     ATTR_TYPE_END);
     if (vstream_fflush(VSTREAM_OUT) != 0)
        msg_fatal("write error: %m");
index 0e11c9b35d7b7166291ff76f881449de210113bc..e15ffefe682407d0f985fbffdf71ed76f0b11aa9 100644 (file)
@@ -454,11 +454,11 @@ int     main(int unused_argc, char **used_argv)
     msg_vstream_init(used_argv[0], VSTREAM_ERR);
     if ((ret = attr_scan0(VSTREAM_IN,
                          ATTR_FLAG_STRICT,
-                         ATTR_TYPE_INT, ATTR_NAME_INT, &int_val,
-                         ATTR_TYPE_LONG, ATTR_NAME_LONG, &long_val,
-                         ATTR_TYPE_STR, ATTR_NAME_STR, str_val,
-                         ATTR_TYPE_DATA, ATTR_NAME_DATA, data_val,
-                         ATTR_TYPE_HASH, table,
+                         RECV_ATTR_INT(ATTR_NAME_INT, &int_val),
+                         RECV_ATTR_LONG(ATTR_NAME_LONG, &long_val),
+                         RECV_ATTR_STR(ATTR_NAME_STR, str_val),
+                         RECV_ATTR_DATA(ATTR_NAME_DATA, data_val),
+                         RECV_ATTR_HASH(table),
                          ATTR_TYPE_END)) > 4) {
        vstream_printf("%s %d\n", ATTR_NAME_INT, int_val);
        vstream_printf("%s %ld\n", ATTR_NAME_LONG, long_val);
@@ -473,10 +473,10 @@ int     main(int unused_argc, char **used_argv)
     }
     if ((ret = attr_scan0(VSTREAM_IN,
                          ATTR_FLAG_STRICT,
-                         ATTR_TYPE_INT, ATTR_NAME_INT, &int_val,
-                         ATTR_TYPE_LONG, ATTR_NAME_LONG, &long_val,
-                         ATTR_TYPE_STR, ATTR_NAME_STR, str_val,
-                         ATTR_TYPE_DATA, ATTR_NAME_DATA, data_val,
+                         RECV_ATTR_INT(ATTR_NAME_INT, &int_val),
+                         RECV_ATTR_LONG(ATTR_NAME_LONG, &long_val),
+                         RECV_ATTR_STR(ATTR_NAME_STR, str_val),
+                         RECV_ATTR_DATA(ATTR_NAME_DATA, data_val),
                          ATTR_TYPE_END)) == 4) {
        vstream_printf("%s %d\n", ATTR_NAME_INT, int_val);
        vstream_printf("%s %ld\n", ATTR_NAME_LONG, long_val);
index f94c4b2ff2b4f353ddc99e5159881c2d6baf3d79..52a3ba3fad3b09578cb5b41e90a57e4af6bc19c6 100644 (file)
@@ -513,11 +513,11 @@ int     main(int unused_argc, char **used_argv)
     msg_vstream_init(used_argv[0], VSTREAM_ERR);
     if ((ret = attr_scan64(VSTREAM_IN,
                           ATTR_FLAG_STRICT,
-                          ATTR_TYPE_INT, ATTR_NAME_INT, &int_val,
-                          ATTR_TYPE_LONG, ATTR_NAME_LONG, &long_val,
-                          ATTR_TYPE_STR, ATTR_NAME_STR, str_val,
-                          ATTR_TYPE_DATA, ATTR_NAME_DATA, data_val,
-                          ATTR_TYPE_HASH, table,
+                          RECV_ATTR_INT(ATTR_NAME_INT, &int_val),
+                          RECV_ATTR_LONG(ATTR_NAME_LONG, &long_val),
+                          RECV_ATTR_STR(ATTR_NAME_STR, str_val),
+                          RECV_ATTR_DATA(ATTR_NAME_DATA, data_val),
+                          RECV_ATTR_HASH(table),
                           ATTR_TYPE_END)) > 4) {
        vstream_printf("%s %d\n", ATTR_NAME_INT, int_val);
        vstream_printf("%s %ld\n", ATTR_NAME_LONG, long_val);
@@ -532,10 +532,10 @@ int     main(int unused_argc, char **used_argv)
     }
     if ((ret = attr_scan64(VSTREAM_IN,
                           ATTR_FLAG_STRICT,
-                          ATTR_TYPE_INT, ATTR_NAME_INT, &int_val,
-                          ATTR_TYPE_LONG, ATTR_NAME_LONG, &long_val,
-                          ATTR_TYPE_STR, ATTR_NAME_STR, str_val,
-                          ATTR_TYPE_DATA, ATTR_NAME_DATA, data_val,
+                          RECV_ATTR_INT(ATTR_NAME_INT, &int_val),
+                          RECV_ATTR_LONG(ATTR_NAME_LONG, &long_val),
+                          RECV_ATTR_STR(ATTR_NAME_STR, str_val),
+                          RECV_ATTR_DATA(ATTR_NAME_DATA, data_val),
                           ATTR_TYPE_END)) == 4) {
        vstream_printf("%s %d\n", ATTR_NAME_INT, int_val);
        vstream_printf("%s %ld\n", ATTR_NAME_LONG, long_val);
index a563e7b8792e8d9e4df92bba5f2728ddc9d196a4..9fd5c7c993d0c82dddc3b680af2aebcffb45caa9 100644 (file)
@@ -496,11 +496,11 @@ int     main(int unused_argc, char **used_argv)
     msg_vstream_init(used_argv[0], VSTREAM_ERR);
     if ((ret = attr_scan_plain(VSTREAM_IN,
                               ATTR_FLAG_STRICT,
-                              ATTR_TYPE_INT, ATTR_NAME_INT, &int_val,
-                              ATTR_TYPE_LONG, ATTR_NAME_LONG, &long_val,
-                              ATTR_TYPE_STR, ATTR_NAME_STR, str_val,
-                              ATTR_TYPE_DATA, ATTR_NAME_DATA, data_val,
-                              ATTR_TYPE_HASH, table,
+                              RECV_ATTR_INT(ATTR_NAME_INT, &int_val),
+                              RECV_ATTR_LONG(ATTR_NAME_LONG, &long_val),
+                              RECV_ATTR_STR(ATTR_NAME_STR, str_val),
+                              RECV_ATTR_DATA(ATTR_NAME_DATA, data_val),
+                              RECV_ATTR_HASH(table),
                               ATTR_TYPE_END)) > 4) {
        vstream_printf("%s %d\n", ATTR_NAME_INT, int_val);
        vstream_printf("%s %ld\n", ATTR_NAME_LONG, long_val);
@@ -515,10 +515,10 @@ int     main(int unused_argc, char **used_argv)
     }
     if ((ret = attr_scan_plain(VSTREAM_IN,
                               ATTR_FLAG_STRICT,
-                              ATTR_TYPE_INT, ATTR_NAME_INT, &int_val,
-                              ATTR_TYPE_LONG, ATTR_NAME_LONG, &long_val,
-                              ATTR_TYPE_STR, ATTR_NAME_STR, str_val,
-                              ATTR_TYPE_DATA, ATTR_NAME_DATA, data_val,
+                              RECV_ATTR_INT(ATTR_NAME_INT, &int_val),
+                              RECV_ATTR_LONG(ATTR_NAME_LONG, &long_val),
+                              RECV_ATTR_STR(ATTR_NAME_STR, str_val),
+                              RECV_ATTR_DATA(ATTR_NAME_DATA, data_val),
                               ATTR_TYPE_END)) == 4) {
        vstream_printf("%s %d\n", ATTR_NAME_INT, int_val);
        vstream_printf("%s %ld\n", ATTR_NAME_LONG, long_val);
diff --git a/postfix/src/util/check_arg.h b/postfix/src/util/check_arg.h
new file mode 100644 (file)
index 0000000..b18808d
--- /dev/null
@@ -0,0 +1,91 @@
+#ifndef _CHECK_ARG_INCLUDED_
+#define _CHECK_ARG_INCLUDED_
+
+/*++
+/* NAME
+/*     check_arg 3h
+/* SUMMARY
+/*     type checking/narrowing/widening for unprototyped arguments
+/* SYNOPSIS
+/*     #include <check_arg.h>
+/*
+/*     extern int CHECK_VAL_DUMMY(int);
+/*     extern int *CHECK_PTR_DUMMY(int);
+/*     extern const int *CHECK_CONST_PTR_DUMMY(int);
+/*
+/*     int val;
+/*     int *p1;
+/*     const int *p2;
+/*
+/*     func(CHECK_VAL(int, val), CHECK_PTR(int, p1), CHECK_CONST_PTR(int, p2));
+/* DESCRIPTION
+/*     This module implements wrappers for unprototyped function
+/*     arguments, to enable the same type checking, type narrowing,
+/*     and type widening as for prototyped function arguments. The
+/*     wrappers may also be useful in other contexts.
+/*
+/*     Each non-pointer argument type is handled by a corresponding
+/*     CHECK_VAL(type, value) wrapper (type = int, long, etc.), and
+/*     each pointer argument type is handled by a corresponding
+/*     CHECK_CONST_PTR(type, ptr) or CHECK_PTR(type, ptr) wrapper.
+/*
+/*     A good compiler will report the following problems:
+/* .IP \(bu
+/*     Const pointer argument where a non-const pointer is expected.
+/* .IP \(bu
+/*     Pointer argument where a non-pointer is expected.
+/* .IP \(bu
+/*     Pointer/pointer type mismatches except void/non-void pointers.
+/*     Just like function prototypes, all CHECK_(CONST_)PTR()
+/*     macros cast their result to the desired type.
+/* .IP \(bu
+/*     Non-constant non-pointer argument where a pointer is expected.
+/*. PP
+/*     Just like function prototypes, the CHECK_(CONST_)PTR() wrappers
+/*     handle "bare" numeric constants by casting their argument to
+/*     the desired pointer type.
+/*
+/*     Just like function prototypes, the CHECK_VAL() wrapper cannot
+/*     force the caller to specify a particular non-pointer type and
+/*     casts its argument to the desired type.
+/* IMPLEMENTATION
+/* .ad
+/* .fi
+/*     This implementation uses unreachable assignments to dummy
+/*     variables. Even a basic optimizer will eliminate these
+/*     assignments along with any reference to the dummy assignment
+/*     targets. It should be possible to declare these variables as
+/*     extern only, without any actual definition for storage
+/*     allocation. To avoid surprises with some compilers, it may
+/*     be a good idea to have a definition that allocates storage.
+/* .na
+/* .nf
+
+ /*
+  * Templates for parameter value checks.
+  */
+#define CHECK_VAL(type, v) ((type) (1 ? (v) : (CHECK_VAL_DUMMY(type) = (v))))
+#define CHECK_PTR(type, p) ((type *) (1 ? (p) : (CHECK_PTR_DUMMY(type) = (p))))
+#define CHECK_CONST_PTR(type, p) \
+       ((const type *) (1 ? (p) : (CHECK_CONST_PTR_DUMMY(type) = (p))))
+
+ /*
+  * Templates for dummy assignment targets. These should never be referenced;
+  * only the type information should be used.
+  */
+#define CHECK_VAL_DUMMY(type) check_val_dummy_##type
+#define CHECK_PTR_DUMMY(type) check_ptr_dummy_##type
+#define CHECK_CONST_PTR_DUMMY(type) check_const_ptr_dummy_##type
+
+/* 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
index 44ea370d7bcb0fdff298f6827517a772652e656f..c7f7a403eb7cbcc378f45d769f7e5df4addc2dc2 100644 (file)
@@ -1620,7 +1620,7 @@ typedef int pid_t;
  /*
   * Some gcc implementations don't grok these attributes with pointer to
   * function. Again, wild guess of what is supported. To override, specify
-  * #define PRINTPTRFLIKE  in the system-dependent sections above.
+  * #define PRINTFPTRLIKE  in the system-dependent sections above.
   */
 #ifndef PRINTFPTRLIKE
 #if (__GNUC__ >= 3)                    /* XXX Rough estimate */
index d1ee86f74a18b2fbcc29485422e2f249eaf3393f..f7f09b4fb1374937d84b73f9bf44d2e64f72561d 100644 (file)
@@ -61,6 +61,7 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 verify.o: ../../include/argv.h
 verify.o: ../../include/attr.h
+verify.o: ../../include/check_arg.h
 verify.o: ../../include/cleanup_user.h
 verify.o: ../../include/data_redirect.h
 verify.o: ../../include/deliver_request.h
@@ -81,6 +82,7 @@ verify.o: ../../include/msg.h
 verify.o: ../../include/msg_stats.h
 verify.o: ../../include/myflock.h
 verify.o: ../../include/mymalloc.h
+verify.o: ../../include/nvtable.h
 verify.o: ../../include/post_mail.h
 verify.o: ../../include/recipient_list.h
 verify.o: ../../include/set_eugid.h
index 520566d4fcd6d612f06e6d13d8cf4c8b13162e80..d7642c9fc481fc26ed221f9c843afc15ff7b343a 100644 (file)
@@ -359,9 +359,9 @@ static void verify_update_service(VSTREAM *client_stream)
     long    updated;
 
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
-                 ATTR_TYPE_INT, MAIL_ATTR_ADDR_STATUS, &addr_status,
-                 ATTR_TYPE_STR, MAIL_ATTR_WHY, text,
+                 RECV_ATTR_STR(MAIL_ATTR_ADDR, addr),
+                 RECV_ATTR_INT(MAIL_ATTR_ADDR_STATUS, &addr_status),
+                 RECV_ATTR_STR(MAIL_ATTR_WHY, text),
                  ATTR_TYPE_END) == 3) {
        /* FIX 200501 IPv6 patch did not neuter ":" in address literals. */
        translit(STR(addr), ":", "_");
@@ -369,7 +369,7 @@ static void verify_update_service(VSTREAM *client_stream)
            msg_warn("bad recipient status %d for recipient %s",
                     addr_status, STR(addr));
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, VRFY_STAT_BAD,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, VRFY_STAT_BAD),
                       ATTR_TYPE_END);
        } else {
 
@@ -391,7 +391,7 @@ static void verify_update_service(VSTREAM *client_stream)
                dict_cache_update(verify_map, STR(addr), STR(buf));
            }
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, VRFY_STAT_OK,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, VRFY_STAT_OK),
                       ATTR_TYPE_END);
        }
     }
@@ -427,7 +427,7 @@ static void verify_query_service(VSTREAM *client_stream)
     char   *text;
 
     if (attr_scan(client_stream, ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_ADDR, addr,
+                 RECV_ATTR_STR(MAIL_ATTR_ADDR, addr),
                  ATTR_TYPE_END) == 1) {
        long    now = (long) time((time_t *) 0);
 
@@ -478,9 +478,9 @@ static void verify_query_service(VSTREAM *client_stream)
         * Respond to the client.
         */
        attr_print(client_stream, ATTR_FLAG_NONE,
-                  ATTR_TYPE_INT, MAIL_ATTR_STATUS, VRFY_STAT_OK,
-                  ATTR_TYPE_INT, MAIL_ATTR_ADDR_STATUS, addr_status,
-                  ATTR_TYPE_STR, MAIL_ATTR_WHY, text,
+                  SEND_ATTR_INT(MAIL_ATTR_STATUS, VRFY_STAT_OK),
+                  SEND_ATTR_INT(MAIL_ATTR_ADDR_STATUS, addr_status),
+                  SEND_ATTR_STR(MAIL_ATTR_WHY, text),
                   ATTR_TYPE_END);
 
        /*
@@ -572,7 +572,7 @@ static void verify_service(VSTREAM *client_stream, char *unused_service,
      */
     if (attr_scan(client_stream,
                  ATTR_FLAG_MORE | ATTR_FLAG_STRICT,
-                 ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
+                 RECV_ATTR_STR(MAIL_ATTR_REQ, request),
                  ATTR_TYPE_END) == 1) {
        if (STREQ(STR(request), VRFY_REQ_UPDATE)) {
            verify_update_service(client_stream);
@@ -581,7 +581,7 @@ static void verify_service(VSTREAM *client_stream, char *unused_service,
        } else {
            msg_warn("unrecognized request: \"%s\", ignored", STR(request));
            attr_print(client_stream, ATTR_FLAG_NONE,
-                      ATTR_TYPE_INT, MAIL_ATTR_STATUS, VRFY_STAT_BAD,
+                      SEND_ATTR_INT(MAIL_ATTR_STATUS, VRFY_STAT_BAD),
                       ATTR_TYPE_END);
        }
     }
index d648e9940e84217e5de36cc1a15727003e33af58..c31af594d558429018dbf87f6c5e2c995dcb3ae0 100644 (file)
@@ -62,15 +62,19 @@ depend: $(MAKES)
 # do not edit below this line - it is generated by 'make depend'
 deliver_attr.o: ../../include/argv.h
 deliver_attr.o: ../../include/attr.h
+deliver_attr.o: ../../include/check_arg.h
 deliver_attr.o: ../../include/deliver_request.h
 deliver_attr.o: ../../include/dict.h
 deliver_attr.o: ../../include/dsn.h
 deliver_attr.o: ../../include/dsn_buf.h
+deliver_attr.o: ../../include/htable.h
 deliver_attr.o: ../../include/maps.h
 deliver_attr.o: ../../include/mbox_conf.h
 deliver_attr.o: ../../include/msg.h
 deliver_attr.o: ../../include/msg_stats.h
 deliver_attr.o: ../../include/myflock.h
+deliver_attr.o: ../../include/mymalloc.h
+deliver_attr.o: ../../include/nvtable.h
 deliver_attr.o: ../../include/recipient_list.h
 deliver_attr.o: ../../include/sys_defs.h
 deliver_attr.o: ../../include/vbuf.h
@@ -81,12 +85,14 @@ deliver_attr.o: virtual.h
 mailbox.o: ../../include/argv.h
 mailbox.o: ../../include/attr.h
 mailbox.o: ../../include/bounce.h
+mailbox.o: ../../include/check_arg.h
 mailbox.o: ../../include/defer.h
 mailbox.o: ../../include/deliver_request.h
 mailbox.o: ../../include/dict.h
 mailbox.o: ../../include/dsn.h
 mailbox.o: ../../include/dsn_buf.h
 mailbox.o: ../../include/dsn_util.h
+mailbox.o: ../../include/htable.h
 mailbox.o: ../../include/mail_addr_find.h
 mailbox.o: ../../include/mail_copy.h
 mailbox.o: ../../include/mail_params.h
@@ -97,6 +103,7 @@ mailbox.o: ../../include/msg.h
 mailbox.o: ../../include/msg_stats.h
 mailbox.o: ../../include/myflock.h
 mailbox.o: ../../include/mymalloc.h
+mailbox.o: ../../include/nvtable.h
 mailbox.o: ../../include/recipient_list.h
 mailbox.o: ../../include/safe_open.h
 mailbox.o: ../../include/sent.h
@@ -111,6 +118,7 @@ mailbox.o: virtual.h
 maildir.o: ../../include/argv.h
 maildir.o: ../../include/attr.h
 maildir.o: ../../include/bounce.h
+maildir.o: ../../include/check_arg.h
 maildir.o: ../../include/defer.h
 maildir.o: ../../include/deliver_request.h
 maildir.o: ../../include/dict.h
@@ -118,6 +126,7 @@ maildir.o: ../../include/dsn.h
 maildir.o: ../../include/dsn_buf.h
 maildir.o: ../../include/dsn_util.h
 maildir.o: ../../include/get_hostname.h
+maildir.o: ../../include/htable.h
 maildir.o: ../../include/mail_copy.h
 maildir.o: ../../include/mail_params.h
 maildir.o: ../../include/make_dirs.h
@@ -128,6 +137,7 @@ maildir.o: ../../include/msg.h
 maildir.o: ../../include/msg_stats.h
 maildir.o: ../../include/myflock.h
 maildir.o: ../../include/mymalloc.h
+maildir.o: ../../include/nvtable.h
 maildir.o: ../../include/recipient_list.h
 maildir.o: ../../include/safe_open.h
 maildir.o: ../../include/sane_fsops.h
@@ -144,16 +154,19 @@ maildir.o: virtual.h
 recipient.o: ../../include/argv.h
 recipient.o: ../../include/attr.h
 recipient.o: ../../include/bounce.h
+recipient.o: ../../include/check_arg.h
 recipient.o: ../../include/deliver_request.h
 recipient.o: ../../include/dict.h
 recipient.o: ../../include/dsn.h
 recipient.o: ../../include/dsn_buf.h
+recipient.o: ../../include/htable.h
 recipient.o: ../../include/maps.h
 recipient.o: ../../include/mbox_conf.h
 recipient.o: ../../include/msg.h
 recipient.o: ../../include/msg_stats.h
 recipient.o: ../../include/myflock.h
 recipient.o: ../../include/mymalloc.h
+recipient.o: ../../include/nvtable.h
 recipient.o: ../../include/recipient_list.h
 recipient.o: ../../include/stringops.h
 recipient.o: ../../include/sys_defs.h
@@ -165,15 +178,19 @@ recipient.o: virtual.h
 unknown.o: ../../include/argv.h
 unknown.o: ../../include/attr.h
 unknown.o: ../../include/bounce.h
+unknown.o: ../../include/check_arg.h
 unknown.o: ../../include/deliver_request.h
 unknown.o: ../../include/dict.h
 unknown.o: ../../include/dsn.h
 unknown.o: ../../include/dsn_buf.h
+unknown.o: ../../include/htable.h
 unknown.o: ../../include/maps.h
 unknown.o: ../../include/mbox_conf.h
 unknown.o: ../../include/msg.h
 unknown.o: ../../include/msg_stats.h
 unknown.o: ../../include/myflock.h
+unknown.o: ../../include/mymalloc.h
+unknown.o: ../../include/nvtable.h
 unknown.o: ../../include/recipient_list.h
 unknown.o: ../../include/sys_defs.h
 unknown.o: ../../include/vbuf.h
@@ -183,12 +200,14 @@ unknown.o: unknown.c
 unknown.o: virtual.h
 virtual.o: ../../include/argv.h
 virtual.o: ../../include/attr.h
+virtual.o: ../../include/check_arg.h
 virtual.o: ../../include/deliver_completed.h
 virtual.o: ../../include/deliver_request.h
 virtual.o: ../../include/dict.h
 virtual.o: ../../include/dsn.h
 virtual.o: ../../include/dsn_buf.h
 virtual.o: ../../include/flush_clnt.h
+virtual.o: ../../include/htable.h
 virtual.o: ../../include/iostuff.h
 virtual.o: ../../include/mail_addr_find.h
 virtual.o: ../../include/mail_conf.h
@@ -201,6 +220,8 @@ virtual.o: ../../include/mbox_conf.h
 virtual.o: ../../include/msg.h
 virtual.o: ../../include/msg_stats.h
 virtual.o: ../../include/myflock.h
+virtual.o: ../../include/mymalloc.h
+virtual.o: ../../include/nvtable.h
 virtual.o: ../../include/recipient_list.h
 virtual.o: ../../include/set_eugid.h
 virtual.o: ../../include/sys_defs.h