[Dovecot] Dict SQL lookups without username_field

Andrew Beverley andy at andybev.com
Tue May 20 19:15:40 UTC 2014


Dear all,

Is it possible to perform dict lookups with a SQL backend, without
specifying the username_field in the SQL query?

I am using the dict to retrieve a Sieve script. My dict configuration
looks like this:

map {
  pattern = priv/sieve/data/$id
  table = sieve_scripts
  username_field = email
  value_field = data
  fields {
    id = $id
  }
}

I don't want to specify the username though, as the sieve scripts are
valid for all users. However, when I remove "username_field" I get the
error "data with id `1' for script `main script' not found at path
priv/sieve/data/1"

Thanks,

Andy




More information about the dovecot mailing list