Exim Functions

def


Has two uses - both checks...

  • does a variable have a value, i.e. not null or blank
  • does a specific header exist in the message

Checking a variable for a value...

${if def:sender_host_address {remote} {local}}

Returns remote if the $sender_host_address is not empty.

Note the absense of the $ character.

Checking for a header...

${if def:header_reply-to:{$h_reply-to:}{$h_from}}

Returns the value of the reply-to header if it exists otherwise it returns the value of the from header.

CREATED 2021-12-21 14:21:56.0

018-00-09-70

UPDATED 2021-12-21 18:11:46.0

eq (Equals)


Compairs two strings for equality after expanding them...

eq{String-1}{String-2}

Returns true it the two strings match and false if they don't.

${if \
   eq{$local_part}{john} \
   {true} \
   {false} \
}

If the local_part matches john return true.

NOTE: the match is case sensitive.

CREATED 2021-12-21 18:11:58.0

018-00-09-7B

UPDATED 2021-12-21 18:12:17.0

Knowledge

L
I
N
K
S

DBID: db.wam

Page Server: Ithica

©2012 Leistware Data Systems

      Hello anonymous