----- Original Message ----- > From: Timo Sirainen <[email protected]> > To: Steve Fatula <[email protected]> > Cc: Dovecot List <[email protected]> > Sent: Monday, September 12, 2011 6:52 AM > Subject: Re: [Dovecot] MySQL, map files > >> The reason I am asking is I have seen web pages that reference all >> sorts of statements within the map statement, and I have no idea where >> they are documented. Specifically, I see an example here (which is >> LDAP), look in section 3: >> >> http://dovecot.org/patches/1.2/ldap/HOWTO_dictldap+extdata.txt >> >> >> You will see lots of statements, not sure which ones can be used for >> MySQL (instead of LDAP). > > That patch's mapping references to Pigeonhole's extdata plugin. If you > install that plugin you can use SQL or flat file for the same maps. >
Ok, so, now we get to the issue. What syntax can be used for the extdata plugin? If I have an existing MySQL table with the structure: username preference value Username would be the dovecot user name. preference would be a constant, and, value is the variable I want to set via the extdata plugin. The primary key is username + preference (constant, in this case, say it's set to "POP3"). I want to use extdata to retrieve that value. Can it be done using extdata and MySQL map syntax, and if so, can you provide an example? Can I specify the query itself (i.e., select value from table t, another table at where....)
