Jump to content
Froxlor Forum

[solved] Dovecot Mail Quota / Debian Squeeze


frontline

Recommended Posts

Hello.

 

I have a server with Debian 6 Squeeze, and webmail client (using IMAP) does not display mail quota (Disk usage: unknown).

About the same setup on Debian Lenny works.

 

Froxlor is correctly setup (I think), using same configurations as for Debian Lenny.

 

- Debian 5.0 Lenny: Postfix 2.5.5 with Dovecot 1.0.15, Froxlor 0.9.16 (with recommended settings for Postfix/Dovecot)

- Debian 6.0 Lenny: Postfix 2.7.1 with Dovecot 1.2.15, Froxlor 0.9.17 (with recommended settings for Postfix/Dovecot)

 

Any hints ?

 

Regards,/

Sorin

Link to comment
Share on other sites

I think is something about Dovecot SQL configuration.

 

User authentication is working fine, POP3 and IMAP.

 

I do have some strange lines in /var/log/mail.err:

 

Feb  6 17:46:07 cp01 dovecot: deliver(www-data): mail_location not set and autodetection failed: Mail storage autodetection failed with home=/var/www
Feb  6 17:46:07 cp01 dovecot: deliver(www-data): Fatal: Namespace initialization failed

 

Regards,

/Sorin

Link to comment
Share on other sites

Hello.

 

Froxlor -> Setttings: Debian 5.0 (Lenny) ? Mailserver (IMAP/POP3) ? Dovecot

 

/etc/dovecot/dovecot-sql.conf

user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE (username = '%u' OR email = '%u')

 

Running this query, with an existing account on Froxlor's database give no result (Squeeze, Froxlor 0.9.17):

SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE (username = 'user@domain.tld' OR email = 'user@domain.tld')

 

Running exact same query on the other server (Lenny, Froxlor 0.9.16) gives me 1 result.

 

Any help ?

 

Regards,

/Sorin

Link to comment
Share on other sites

Nope, I'm wrong, the SQL it's ok and the results are good. My bad :rolleyes:

 

Both server versions are in the initial post:

- Debian 5.0 Lenny: Postfix 2.5.5 with Dovecot 1.0.15

- Debian 6.0 Squeeze: Postfix 2.7.1 with Dovecot 1.2.15

 

Is there a way to debug this ?

 

Btw, for Froxlor running Squeeze I should use Debian 5.0 (Lenny) configuration or Ubuntu 10.04 (Lucid) ?

 

Regards,

/Sorin

Link to comment
Share on other sites

Is there a way to debug this ?

 

debug what? where is the problem? I still can't find a 'real issue description' here...i don't know what doesn't work and where the problem is exactly. Please describe detailed!

 

Btw, for Froxlor running Squeeze I should use Debian 5.0 (Lenny) configuration or Ubuntu 10.04 (Lucid) ?

 

I heard from some guys that Lenny configurations work pretty well. But it's best to check the default configs if newer versions of the services have been installed. Squeeze configurations will be in 0.9.18 or 0.9.19

Link to comment
Share on other sites

Just found http://wiki.dovecot.org/Upgrading/1.1

 

The configuration is done differently for v1.0 and v1.1:

* v1.0 quota configuration: http://wiki.dovecot.org/Quota/1.0

* v1.1 quota configuration: http://wiki.dovecot.org/Quota/1.1

 

No success so far for password_query and user_query.

 

Anyone with a working Dovecot 1.1 ? :)

 

Regards,

/Sorin

Link to comment
Share on other sites

Hello.

 

After about 1 hour of testing, this is what I have (partially working):

 

Dovecot 1.0 (from Froxlor)

user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE (username = '%u' OR email = '%u')
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid,  CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp')

 

Dovecot 1.1

user_query = SELECT uid, gid, concat('*:storage=', (quota*1024), 'B') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
password_query = select username as user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, CONCAT('maildir:', homedir, maildir) AS userdb_mail, uid as userdb_uid, gid as userdb_gid, concat('*:bytes=', (quota*1024*2014)) as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp')

 

Quota is displayed in webmail, but the account can't receive mail:

deliver(account@domain.tld): mail_location not set and autodetection failed: Mail storage autodetection failed with home=(not set)

 

Any idea what am I missing ?

 

Regards,

/Sorin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...