David Bain
2005-Dec-25 17:13 UTC
[Dovecot] dovecot and virtual mailbox - suggestions please
I've setup postfix to delivered my mail to a maildir located at /var/spool/virtual_mailboxes/mydomain.com/myuser My postgresql database called 'mails' has a user table setup as follows: CREATE TABLE users ( userid VARCHAR(128) NOT NULL, password VARCHAR(128), realname VARCHAR(128), uid INTEGER NOT NULL, gid INTEGER NOT NULL, home VARCHAR(128), mail VARCHAR(255), PRIMARY KEY (userid) ); What would the query look like in my dovecot-pgsql.conf file to retrieve the appropriate INBOX information? mine currently looks like this. user_query = SELECT '/var/spool/virtual_mailboxes/'||home AS home, uid, gid FROM users WHERE userid = '%u' The user authenticates fine via pop, yet I keeping getting the following error. -*ERR No INBOX for user* -------------- next part -------------- An HTML attachment was scrubbed... URL: dovecot.org/pipermail/dovecot/attachments/20051225/c4e26877/attachment.html
Johannes Berg
2005-Dec-25 17:26 UTC
[Dovecot] dovecot and virtual mailbox - suggestions please
On Sun, 2005-12-25 at 10:13 -0500, David Bain wrote:> mine currently looks like this. > user_query = SELECT '/var/spool/virtual_mailboxes/'||home AS home, uid, gid FROM users WHERE userid = '%u' > > > The user authenticates fine via pop, yet I keeping getting the > following error. > -ERR No INBOX for userWhat does your default_mail_env look like? johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 832 bytes Desc: This is a digitally signed message part Url : dovecot.org/pipermail/dovecot/attachments/20051225/41f99197/attachment.pgp
Johannes Berg
2005-Dec-25 17:30 UTC
[Dovecot] dovecot and virtual mailbox - suggestions please
On Sun, 2005-12-25 at 10:13 -0500, David Bain wrote:> What would the query look like in my dovecot-pgsql.conf file to retrieve the appropriate INBOX information? > > mine currently looks like this. > user_query = SELECT '/var/spool/virtual_mailboxes/'||home AS home, uid, gid FROM users WHERE userid = '%u'never mind my question. What does the userid field in the database look like? The full email address? Then this default_mail_env should work: default_mail_env = maildir:/var/spool/virtual_mailboxes/%d/%u/ johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 832 bytes Desc: This is a digitally signed message part Url : dovecot.org/pipermail/dovecot/attachments/20051225/828021d2/attachment.pgp