-/* $Cambridge: exim/src/src/expand.c,v 1.8 2004/12/16 15:11:47 tom Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.13 2005/02/17 11:58:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2005 */
/* See the file NOTICE for conditions of use and distribution. */
vtype_host_lookup, /* value not used; get host name */
vtype_load_avg, /* value not used; result is int from os_getloadavg */
vtype_pspace, /* partition space; value is T/F for spool/log */
- vtype_pinodes /* partition inodes; value is T/F for spool/log */
+ vtype_pinodes /* partition inodes; value is T/F for spool/log */
};
/* This table must be kept in alphabetical order. */
{ "exim_uid", vtype_uid, &exim_uid },
#ifdef WITH_OLD_DEMIME
{ "found_extension", vtype_stringptr, &found_extension },
-#endif
+#endif
{ "home", vtype_stringptr, &deliver_home },
{ "host", vtype_stringptr, &deliver_host },
{ "host_address", vtype_stringptr, &deliver_host_address },
{ "host_data", vtype_stringptr, &host_data },
+ { "host_lookup_deferred",vtype_int, &host_lookup_deferred },
{ "host_lookup_failed", vtype_int, &host_lookup_failed },
{ "inode", vtype_ino, &deliver_inode },
{ "interface_address", vtype_stringptr, &interface_address },
{ "local_user_uid", vtype_uid, &local_user_uid },
{ "localhost_number", vtype_int, &host_number },
{ "log_inodes", vtype_pinodes, (void *)FALSE },
- { "log_space", vtype_pspace, (void *)FALSE },
+ { "log_space", vtype_pspace, (void *)FALSE },
{ "mailstore_basename", vtype_stringptr, &mailstore_basename },
#ifdef WITH_CONTENT_SCAN
{ "malware_name", vtype_stringptr, &malware_name },
{ "received_for", vtype_stringptr, &received_for },
{ "received_protocol", vtype_stringptr, &received_protocol },
{ "recipient_data", vtype_stringptr, &recipient_data },
- { "recipient_verify_failure",vtype_stringptr,&recipient_verify_failure },
+ { "recipient_verify_failure",vtype_stringptr,&recipient_verify_failure },
{ "recipients", vtype_recipients, NULL },
{ "recipients_count", vtype_int, &recipients_count },
#ifdef WITH_CONTENT_SCAN
{ "sender_host_port", vtype_int, &sender_host_port },
{ "sender_ident", vtype_stringptr, &sender_ident },
{ "sender_rcvhost", vtype_stringptr, &sender_rcvhost },
- { "sender_verify_failure",vtype_stringptr, &sender_verify_failure },
+ { "sender_verify_failure",vtype_stringptr, &sender_verify_failure },
+ { "smtp_active_hostname", vtype_stringptr, &smtp_active_hostname },
{ "smtp_command_argument", vtype_stringptr, &smtp_command_argument },
{ "sn0", vtype_filter_int, &filter_sn[0] },
{ "sn1", vtype_filter_int, &filter_sn[1] },
#endif
{ "spool_directory", vtype_stringptr, &spool_directory },
{ "spool_inodes", vtype_pinodes, (void *)TRUE },
- { "spool_space", vtype_pspace, (void *)TRUE },
+ { "spool_space", vtype_pspace, (void *)TRUE },
#ifdef EXPERIMENTAL_SRS
{ "srs_db_address", vtype_stringptr, &srs_db_address },
{ "srs_db_key", vtype_stringptr, &srs_db_key },
s[ptr] = 0; /* string_cat() leaves room */
}
return s;
-
+
case vtype_pspace:
{
int inodes;
- sprintf(CS var_buffer, "%d",
- receive_statvfs((BOOL)(var_table[middle].value), &inodes));
+ sprintf(CS var_buffer, "%d",
+ receive_statvfs(var_table[middle].value == (void *)TRUE, &inodes));
}
return var_buffer;
-
+
case vtype_pinodes:
{
int inodes;
- (void) receive_statvfs((BOOL)(var_table[middle].value), &inodes);
+ (void) receive_statvfs(var_table[middle].value == (void *)TRUE, &inodes);
sprintf(CS var_buffer, "%d", inodes);
}
return var_buffer;
/* If there are no following strings, we substitute the contents of $value for
lookups and for extractions in the success case. For the ${if item, the string
-"true" is substituted. In the fail case, nothing is substituted for all three
+"true" is substituted. In the fail case, nothing is substituted for all three
items. */
while (isspace(*s)) s++;
{
if (type[0] == 'i')
{
- if (yes) *yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, US"true", 4);
+ if (yes) *yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, US"true", 4);
}
else
- {
+ {
if (yes && lookup_value != NULL)
*yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, lookup_value,
Ustrlen(lookup_value));