Hi, I am using postgresql for my password and user databases. The problem is, that the information needed in the user database is held in more than one table. But it seems to me that dovecot expects to get all the information for mailbox, uid, gid and home in _one_ query. Is there a way to get around this? Maybe even getting some of this information by another way than pgsql (this is more a rethorical question, since I have this information in the DB, but sometimes it is useful to get, for example the location of the mailbox by another way than the uid and gid). But my primary question is if I can set these fields in different queries. Regards Marco -- Every word is like an unnecessary stain on silence and nothingness. -- Marco Herrn _ ___ o ' (_)< _ _ _>(__'> o 0 (_X % >(_`> O o _; _;'7^'_ \;\ % (GnuPG/PGP-encrypted mail preferred) _;\ _.\ _.';;) ;,;_/; Key ID: 0x94620736 _ _'./_\('))_; );/\)}/`fsc
* Marco Herrn [2004-12-09 22:03]:> I am using postgresql for my password and user databases. The problem > is, that the information needed in the user database is held in more > than one table. But it seems to me that dovecot expects to get all the > information for mailbox, uid, gid and home in _one_ query. Is there a > way to get around this?CREATE VIEW -- They make a desert and call it peace. -- Tacitus
Hi Marco, I cheat by doing: user_query = SELECT '/mailboxes/%d/%n' as home, uid, gid FROM users WHERE username = '%u' I'm using MySQL, but I think the postgresql should be the same. Regards Andrew Marco Herrn wrote:>Hi, > >I am using postgresql for my password and user databases. The problem >is, that the information needed in the user database is held in more >than one table. But it seems to me that dovecot expects to get all the >information for mailbox, uid, gid and home in _one_ query. Is there a >way to get around this? Maybe even getting some of this information by >another way than pgsql (this is more a rethorical question, since I >have this information in the DB, but sometimes it is useful to get, >for example the location of the mailbox by another way than the uid >and gid). > >But my primary question is if I can set these fields in different >queries. > >Regards >Marco > >-- Andrew Hutchings Systems Operator / Developer / Linux Guru Netserve Consultants Ltd. http://www.domaincity.co.uk/
Sorry, I meant: user_query = SELECT '/mailboxes/%d/%n' AS home, 500 AS uid, 500 AS gid Regards Andrew Marco Herrn wrote:>Hi, > >I am using postgresql for my password and user databases. The problem >is, that the information needed in the user database is held in more >than one table. But it seems to me that dovecot expects to get all the >information for mailbox, uid, gid and home in _one_ query. Is there a >way to get around this? Maybe even getting some of this information by >another way than pgsql (this is more a rethorical question, since I >have this information in the DB, but sometimes it is useful to get, >for example the location of the mailbox by another way than the uid >and gid). > >But my primary question is if I can set these fields in different >queries. > >Regards >Marco > >-- Andrew Hutchings Systems Operator / Developer / Linux Guru Netserve Consultants Ltd. http://www.domaincity.co.uk/