unchecked_lovers_maps in sql READMEs
Mark Martinec
Mark.Martinec+amavis at ijs.si
Tue Nov 22 20:08:32 CET 2011
TimH,
> There is a new field in the policy table named "unchecked_lovers_maps"
> in the schema provided in the sql readme files. However, it seems like
> it should be "unchecked_lover" in the schemas. The release notes seem
> to agree with me:
> [...]
> So, in order to work correctly, should the provided schemas be changed
> so that the field name is "unchecked_lover"?
> In a nutshell, shouldn't policy.unchecked_lovers_maps be
> policy.unchecked_lover in the SQL schemas?
Indeed, a documentation (schema) bug.
Fixed, thanks!
> Also, should users.local be a boolean instead of a char?
For historical reasons the boolean settings are represented
in SQL fields as char(1), where a values like "N" or 0 are
treated as false, and values like "Y" or 1 are true.
Actually:
# convert values 'N', 'F', '0', ' ' and "\000" to 0
# to allow value to be used directly as a Perl boolean
$match = 0 if $match =~ /^([NnFf ]|0+|\000+)\ *\z/;
I believe you may declare these fields as booleans and the
above logic would still work correctly, but I haven't tried it.
Mark
More information about the amavis-users
mailing list