summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhil Pennock <pdp@exim.org>2012-06-07 13:08:35 -0400
committerPhil Pennock <pdp@exim.org>2012-06-07 13:08:35 -0400
commit11d7e4fae0bce3557473177ce4b312dd0970cead (patch)
tree7e93559ff2b3272ed486f293a95b8a889240ca05 /src
parent5e55c7a9d988e1feac17015d4428b723f6ebe3e1 (diff)
Expand $sender_host_dnssec and add vtype_bool
Diffstat (limited to 'src')
-rw-r--r--src/src/expand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/src/expand.c b/src/src/expand.c
index 70bd86fc1..05361a3ef 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -351,6 +351,7 @@ enum {
vtype_ino, /* value is address of ino_t (not always an int) */
vtype_uid, /* value is address of uid_t (not always an int) */
vtype_gid, /* value is address of gid_t (not always an int) */
+ vtype_bool, /* value is address of bool */
vtype_stringptr, /* value is address of pointer to string */
vtype_msgbody, /* as stringptr, but read when first required */
vtype_msgbody_end, /* ditto, the end of the message */
@@ -562,6 +563,7 @@ static var_entry var_table[] = {
{ "sender_helo_name", vtype_stringptr, &sender_helo_name },
{ "sender_host_address", vtype_stringptr, &sender_host_address },
{ "sender_host_authenticated",vtype_stringptr, &sender_host_authenticated },
+ { "sender_host_dnssec", vtype_bool, &sender_host_dnssec },
{ "sender_host_name", vtype_host_lookup, NULL },
{ "sender_host_port", vtype_int, &sender_host_port },
{ "sender_ident", vtype_stringptr, &sender_ident },
@@ -1522,6 +1524,10 @@ while (last > first)
sprintf(CS var_buffer, "%ld", (long int)(*(uid_t *)(var_table[middle].value))); /* uid */
return var_buffer;
+ case vtype_bool:
+ sprintf(CS var_buffer, "%s", *(BOOL *)(var_table[middle].value) ? "yes" : "no"); /* bool */
+ return var_buffer;
+
case vtype_stringptr: /* Pointer to string */
s = *((uschar **)(var_table[middle].value));
return (s == NULL)? US"" : s;