[Dovecot] Store quota on passwd-file?? Not work
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 :user2@domain.com:{CRAM-MD5}::::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:bytes=300M File /etc/dovecot/users :user2@domain.com::3000:3000::/home/vmail/domain.com/user2/:/bin/false:: What is the correct syntax for my file to use a different per-user quota ? This example not work on my Dovecot :user2@domain.com:{CRAM-MD5}:3000:3000::/home/vmail/domain.com/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200Muser2@domain.com:{CRAM-MD5}:3000:3000::/home/vmail/domain.com/user2::userdb_quota_rule=*:bytes=200M Thx.
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
/dev/rob0, SQLite can be an alternative! I use virtual users only on Postfix and Dovecot. Can you give me an example of using SQLite in Dovecot / Postfix (.conf file)?? I'm really interested !! I'll test the version 2 of Dovecot. But I prefer the version 1.2.X as easier to configure, only one file :) What is the advantage of new version 2 ?Thx
participants (2)
-
/dev/rob0
-
Sébastien FOURCADE