Re: [Dovecot] dovecot 1.2 quota with local users

2011-03-17 Thread iti

> On Wed, 2011-03-16 at 11:38 +0100, i...@promax.media.pl wrote:
>> I got problem with setting quota from mysql for local users. In database
>> are only information with quota. Password are store in passwd/shadow.
>
> You mean you only want quota limits to be listed in SQL, right? Then you
> don't need to use dict quota at all (or especially not sql dict).

Yes, only information in sql should be about quota.
E.g my table is:

Select * from quota;

+---+---+--+
| username  | bytes | messages |
+---+---+--+
| user@test com  |  3000 | 1000 |
+---+---+--+

All other information are now sourced from PAM ( users info, passwords etc.).
Is that possible to deliver some information about user as it is now (PAM)
and only quota information in sql table?

>
> So what you need to use is passdb pam and userdb sql. In userdb sql you
> need to specify the user_query. You didn't give much information about
> your current setup that I'd assume is already working without working
> quota. http://wiki2.dovecot.org/AuthDatabase/SQL anyway has information
> about user_query (you can ignore the password_query).
>

You mean:

userdb sql {
  args = /etc/dovecot/dovecot-sql.conf
}


How should look like sql query in dovecot-sql.conf for table above ?

regards,



[Dovecot] dovecot 1.2 quota with local users

2011-03-16 Thread iti
Hello,
I got problem with setting quota from mysql for local users. In database
are only information with quota. Password are store in passwd/shadow.


My database have only simple info like in wiki description. Table created
with:


CREATE TABLE quota (
  username varchar(100) not null,
  bytes bigint not null default 0,
  messages integer not null default 0,
  primary key (username)
);

In dovecot.conf like in description is:


dict {
  quotadict = mysql:/etc/dovecot-dict-sql.conf
}

plugin {
  # v1.2 + SQL:
  quota = dict:user::proxy::quotadict
  # v1.2 + file:
  quota = dict:user::file:%h/Maildir/dovecot-quota

  quota_rule = *:storage=10M:messages=1000
}


File dovecot-dict-sql.conf has:


# v1.2+ only:
connect = host=localhost dbname=mails user=sqluser password=sqlpass
map {
  pattern = priv/quota/storage
  table = quota
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota
  username_field = username
  value_field = messages
}


With corrected values about databasename, user and password.

Where should to add information about sql query when autorization is not
via myqsl (only shadow/password).
There are in description info about additional file with user_query:
dovecot-mysql.conf. Can anybody know how it should it look like and where
to add it in config?







Re: [Dovecot] Dovecot LDA and Postfix/local for local users.

2011-03-09 Thread iti
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 03/09/2011 10:07 AM, i...@promax.media.pl wrote:
>> Hello,
>> I would like to configure dovecot lda for local users.  My dovecot
>> vesion
>> is 1.2.15. Dovecot documentation for  System users says that only thing
>> I
>> should add to main.cf is:
>>
>> mailbox_command = /usr/local/libexec/dovecot/deliver (path to deliver)
>>
>> After that should I commented postfix/local process from master cf ?
>>
>
> I've the same setup, and no, you don't need to comment anything in
> master.cf, since those are just "definitions", you decide the actual use
> via the main.cf (at least as regards the delivery).
>
When commented local in master.cf
#local unix  -   n   n   -   -   local

I got errors:

[...]
Mar  8 15:18:19 test-box1 postfix/error[13361]: 686A0422EB:
to=, relay=none, delay=2191, delays=2191/0.01/0/0.02,
dsn=4.3.0, status=deferred (mail transport unavailable)
[...]


When uncommented I can see in logs that although deliver is using - local
is used somewhere. Can anyone explain how it works and why postfix/local
is needed? Logs with uncomended local:

Mar  9 14:16:21 test-box1 postfix/qmgr[14717]: 7F805422D1:
from=, size=1916, nrcpt=1 (queue active)
Mar  9 14:16:21 test-box1 dovecot: deliver(user):
msgid=:
saved mail to INBOX
Mar  9 14:16:21 test-box1 postfix/local[14745]: 7F805422D1:
to=, relay=local, delay=4674,
delays=4674/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to command:
/usr/lib64/dovecot/deliver)







[Dovecot] Dovecot LDA and Postfix/local for local users.

2011-03-09 Thread iti
Hello,
I would like to configure dovecot lda for local users.  My dovecot vesion
is 1.2.15. Dovecot documentation for  System users says that only thing I
should add to main.cf is:

mailbox_command = /usr/local/libexec/dovecot/deliver (path to deliver)

After that should I commented postfix/local process from master cf ?


regards,
Jarek