[Dovecot] Store quota on passwd-file?? Not work

/dev/rob0 rob0 at gmx.co.uk
Thu Jul 28 04:28:58 EEST 2011


On Thu, Jul 28, 2011 at 01:37:35AM +0200, Sébastien FOURCADE wrote:
> Hello all, I have installed Dovecot 1.2.15 and Postfix 2.7.1 on
> my Debian 6.This install no include MySQL, I prefer to store 
> Password/User in a file... File /etc/dovecot/passwd contains 
snip
>  What is the correct syntax for my file to use a different
> per-user quota ? This example not work on my Dovecot 

I have no answer for you, having no need for quotas. However, I can 
suggest that you consider sqlite as an alternative. You have the 
speed and availability of a passwd file, with the added benefit of 
having everything fully supported in both Postfix and Dovecot.

I recently upgraded from a setup with a virtual mailbox domain in
passwd file on the Dovecot side. I also had to maintain the 
virtual_mailbox_maps for Postfix, a separate file.

Now I have a sqlite database doing both. It is mode 644 root:root, 
kept as a hardlink in two directories:

$ ls -ld /etc/{postfix,dovecot}/private
drwxr-x--- 2 root dovecot 4096 Jul 16 00:14 /etc/dovecot/private/
drwxr-x--- 2 root postfix 4096 Jul 27 10:45 /etc/postfix/private/

# ls -l /etc/{postfix,dovecot}/private
/etc/dovecot/private:
total 108
-rw-r--r-- 3 root root   574 Jul 18 00:02 README
-rw-r--r-- 2 root root 54129 Jul 14 17:54 harrier.sqlite.sql
-rw-r--r-- 2 root root 46080 Jul 27 10:45 mail.sqlite

/etc/postfix/private:
total 144
-rw-r--r-- 1 root root  34285 Jul 19 04:40 2011-07-19-dump.sql
-rw-r--r-- 3 root root    574 Jul 18 00:02 README
-rw-r--r-- 2 root root  54129 Jul 14 17:54 harrier.sqlite.sql
-rw-r--r-- 2 root root  46080 Jul 27 10:45 mail.sqlite

This keeps sensitive data safe in the absence of a RDBMS' access 
control, and everything seems to work fine. I've got a lot in that 
little database, including per-domain SMTP restrictions. No reason 
you couldn't do a quota in there, and also have Postfix check it as 
check_recipient_access before accepting mail.

I would also suggest newer versions of both Postfix and Dovecot, of 
course, but AFAIK your 1.2.15 should be good enough.
-- 
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header


More information about the dovecot mailing list