[Exim] feature request: unseen=boolean, expanded

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Matt Bernstein
Fecha:  
A: exim-users
Asunto: [Exim] feature request: unseen=boolean, expanded
As above. I'm moving our forward files to a MySQL database, and I thought
I could get away with (simplified):

mysql_forward:
  driver = redirect
  condition = ${lookup mysql{SELECT FWD_ACTIVE FROM MAILPREFS \
    WHERE LOGIN='$local_part'}}
  data = ${lookup mysql{SELECT FWD_DATA FROM MAILPREFS \
    WHERE LOGIN='$local_part'}}
  unseen = ${lookup mysql{SELECT KEEP_A_COPY FROM MAILPREFS \
    WHERE LOGIN='$local_part'}}


..where FWD_ACTIVE and KEEP_A_COPY are ENUM('0','1') as MySQL has no real
BOOLEAN type.. ..but although "condition" and "data" both expand fine, it
looks like I need to duplicate the router with an extra "condition =" to
achieve the "unseen" semantics.

A look at the spec (not the source yet..) shows that condition is "string,
expanded", so I'm guessing there's a problem with "boolean, expanded"
(probably to cope with returning any of {0,1,no,yes,false,true}). This is
unfortunate, because setting unseen to a string will no doubt break
"no_unseen" (or just "unseen" for that matter).

Difficult? Or am I being awkward again? :)

Matt