Yes. Aki On 29.06.2017 14:07, Evgeniy Korneechev wrote:> And if such a user: > email (from AD) = ivanov.ia at example.com > login (from AD), %n = iivanov > %d = DOM > %u = iivanov at DOM > > ? > > ----- ???????? ????????? ----- >> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi> >> ????: "dovecot" <dovecot at dovecot.org> >> ????????????: ???????, 29 ???? 2017 ? 13:59:05 >> ????: Re: Per-user quota (passwd) >> or use, as I indicated before, auth_username_format = %Ln >> >> Aki >> >> >> On 29.06.2017 13:58, Evgeniy Korneechev wrote: >>> Hi! >>> workaround: >>> administrator:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G >>> userdb_mail=maildir:/var/vmail/glu_vrem/administrator/Maildir >>> administrator at email.dom:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G >>> userdb_mail=maildir:/var/vmail/glu_vrem/administrator/Maildir >>> >>> But this is not a solution for 1000 users ... >>> Maybe is there extra field "userdb_mail=administrator at email.dom" for email to >>> passwd-file? >>> >>> ----- ???????? ????????? ----- >>>> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi> >>>> ????: "dovecot" <dovecot at dovecot.org> >>>> ????????????: ?????, 28 ???? 2017 ? 12:40:48 >>>> ????: Re: Per-user quota (passwd) >>>> On 28.06.2017 12:36, Aki Tuomi wrote: >>>>> On 28.06.2017 12:25, Evgeniy Korneechev wrote: >>>>>> Hello! >>>>>> We have passwd=pam, userdb=passwd. >>>>>> passdb { >>>>>> driver = pam #server was entered domain Active Directory >>>>>> } >>>>>> userdb { >>>>>> driver = passwd >>>>>> override_fields = home=/var/vmail/glu_vrem/%u >>>>>> } >>>>>> >>>>>> How can i use per-user quota? Only passwd-file? >>>>>> >>>>>> I tried: >>>>>> userdb { >>>>>> args = /etc/imap.passwd >>>>>> driver = passwd-file >>>>>> override_fields = home=/var/vmail/glu_vrem/%u >>>>>> } >>>>>> /etc/imap.passwd: >>>>>> administrator:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G >>>>>> >>>>>> Authentication and quota - now OK. But doesn't work sending and receiving >>>>>> mail... >>>>>> postfix say 'Unknown user'... >>>>>> >>>>>> >>>>>> Turn on auth_debug and auth_verbose and see what it says. >>>>>> >>>>>> Aki >>>> Also you can set auth_username_format = %Ln to force usernames into >>>> lowercase without domain. >>>> >>>> Aki
with auth_username_format = %Ln:
Jun 28 14:43:41 auth: Debug: master in: USER 1 iivanov.ia at example.com
service=lda
Jun 28 14:43:41 auth-worker(18369): Debug: passwd(iivanov.ia): lookup
Jun 28 14:43:41 auth-worker(18369): Info: passwd(iivanov.ia): unknown user -
trying the next userdb
Jun 28 14:43:41 auth-worker(18369): Debug: sql(iivanov.ia): SELECT email as
user, maildir as home, CONCAT('maildir:', maildir, '/Maildir')
as mail, uid, gid, \
CONCAT('*:storage=', quota, 'B') AS quota_rule,
CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login =
'iivanov.ia' OR email = 'iivanov.ia')
Jun 28 14:43:41 auth-worker(18369): Info: sql(iivanov.ia): unknown user
Maybe %Lu?
----- ???????? ????????? -----> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi>
> ????: "dovecot" <dovecot at dovecot.org>
> ????????????: ???????, 29 ???? 2017 ? 14:10:07
> ????: Re: Per-user quota (passwd)
> Yes.
>
> Aki
>
> On 29.06.2017 14:07, Evgeniy Korneechev wrote:
>> And if such a user:
>> email (from AD) = ivanov.ia at example.com
>> login (from AD), %n = iivanov
>> %d = DOM
>> %u = iivanov at DOM
>>
>> ?
>>
>> ----- ???????? ????????? -----
>>> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi>
>>> ????: "dovecot" <dovecot at dovecot.org>
>>> ????????????: ???????, 29 ???? 2017 ? 13:59:05
>>> ????: Re: Per-user quota (passwd)
>>> or use, as I indicated before, auth_username_format = %Ln
>>>
>>> Aki
>>>
>>>
>>> On 29.06.2017 13:58, Evgeniy Korneechev wrote:
>>>> Hi!
>>>> workaround:
>>>>
administrator:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G
>>>> userdb_mail=maildir:/var/vmail/glu_vrem/administrator/Maildir
>>>> administrator at
email.dom:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G
>>>> userdb_mail=maildir:/var/vmail/glu_vrem/administrator/Maildir
>>>>
>>>> But this is not a solution for 1000 users ...
>>>> Maybe is there extra field "userdb_mail=administrator at
email.dom" for email to
>>>> passwd-file?
>>>>
>>>> ----- ???????? ????????? -----
>>>>> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi>
>>>>> ????: "dovecot" <dovecot at dovecot.org>
>>>>> ????????????: ?????, 28 ???? 2017 ? 12:40:48
>>>>> ????: Re: Per-user quota (passwd)
>>>>> On 28.06.2017 12:36, Aki Tuomi wrote:
>>>>>> On 28.06.2017 12:25, Evgeniy Korneechev wrote:
>>>>>>> Hello!
>>>>>>> We have passwd=pam, userdb=passwd.
>>>>>>> passdb {
>>>>>>> driver = pam #server was entered domain Active
Directory
>>>>>>> }
>>>>>>> userdb {
>>>>>>> driver = passwd
>>>>>>> override_fields = home=/var/vmail/glu_vrem/%u
>>>>>>> }
>>>>>>>
>>>>>>> How can i use per-user quota? Only passwd-file?
>>>>>>>
>>>>>>> I tried:
>>>>>>> userdb {
>>>>>>> args = /etc/imap.passwd
>>>>>>> driver = passwd-file
>>>>>>> override_fields = home=/var/vmail/glu_vrem/%u
>>>>>>> }
>>>>>>> /etc/imap.passwd:
>>>>>>>
administrator:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G
>>>>>>>
>>>>>>> Authentication and quota - now OK. But doesn't
work sending and receiving
>>>>>>> mail...
>>>>>>> postfix say 'Unknown user'...
>>>>>>>
>>>>>>>
>>>>>>> Turn on auth_debug and auth_verbose and see what it
says.
>>>>>>>
>>>>>>> Aki
>>>>> Also you can set auth_username_format = %Ln to force
usernames into
>>>>> lowercase without domain.
>>>>>
> >>>> Aki
--
WBR, Korneechev Evgeniy
BaseALT/ALTLinux Team
Oh you have multiple db's, I missed that.
Remove auth_username_format, and instead
userdb {
args = /etc/imap.passwd username_format=%Ln
driver = passwd-file
override_fields = home=/var/vmail/glu_vrem/%u
}
On 29.06.2017 14:35, Evgeniy Korneechev wrote:> with auth_username_format = %Ln:
>
> Jun 28 14:43:41 auth: Debug: master in: USER 1 iivanov.ia at
example.com service=lda
> Jun 28 14:43:41 auth-worker(18369): Debug: passwd(iivanov.ia): lookup
> Jun 28 14:43:41 auth-worker(18369): Info: passwd(iivanov.ia): unknown user
- trying the next userdb
> Jun 28 14:43:41 auth-worker(18369): Debug: sql(iivanov.ia): SELECT email as
user, maildir as home, CONCAT('maildir:', maildir, '/Maildir')
as mail, uid, gid, \
> CONCAT('*:storage=', quota, 'B') AS quota_rule,
CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login =
'iivanov.ia' OR email = 'iivanov.ia')
> Jun 28 14:43:41 auth-worker(18369): Info: sql(iivanov.ia): unknown user
>
> Maybe %Lu?
>
> ----- ???????? ????????? -----
>> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi>
>> ????: "dovecot" <dovecot at dovecot.org>
>> ????????????: ???????, 29 ???? 2017 ? 14:10:07
>> ????: Re: Per-user quota (passwd)
>> Yes.
>>
>> Aki
>>
>> On 29.06.2017 14:07, Evgeniy Korneechev wrote:
>>> And if such a user:
>>> email (from AD) = ivanov.ia at example.com
>>> login (from AD), %n = iivanov
>>> %d = DOM
>>> %u = iivanov at DOM
>>>
>>> ?
>>>
>>> ----- ???????? ????????? -----
>>>> ??: "Aki Tuomi" <aki.tuomi at dovecot.fi>
>>>> ????: "dovecot" <dovecot at dovecot.org>
>>>> ????????????: ???????, 29 ???? 2017 ? 13:59:05
>>>> ????: Re: Per-user quota (passwd)
>>>> or use, as I indicated before, auth_username_format = %Ln
>>>>
>>>> Aki
>>>>
>>>>
>>>> On 29.06.2017 13:58, Evgeniy Korneechev wrote:
>>>>> Hi!
>>>>> workaround:
>>>>>
administrator:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G
>>>>>
userdb_mail=maildir:/var/vmail/glu_vrem/administrator/Maildir
>>>>> administrator at
email.dom:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G
>>>>>
userdb_mail=maildir:/var/vmail/glu_vrem/administrator/Maildir
>>>>>
>>>>> But this is not a solution for 1000 users ...
>>>>> Maybe is there extra field "userdb_mail=administrator
at email.dom" for email to
>>>>> passwd-file?
>>>>>
>>>>> ----- ???????? ????????? -----
>>>>>> ??: "Aki Tuomi" <aki.tuomi at
dovecot.fi>
>>>>>> ????: "dovecot" <dovecot at
dovecot.org>
>>>>>> ????????????: ?????, 28 ???? 2017 ? 12:40:48
>>>>>> ????: Re: Per-user quota (passwd)
>>>>>> On 28.06.2017 12:36, Aki Tuomi wrote:
>>>>>>> On 28.06.2017 12:25, Evgeniy Korneechev wrote:
>>>>>>>> Hello!
>>>>>>>> We have passwd=pam, userdb=passwd.
>>>>>>>> passdb {
>>>>>>>> driver = pam #server was entered domain
Active Directory
>>>>>>>> }
>>>>>>>> userdb {
>>>>>>>> driver = passwd
>>>>>>>> override_fields = home=/var/vmail/glu_vrem/%u
>>>>>>>> }
>>>>>>>>
>>>>>>>> How can i use per-user quota? Only passwd-file?
>>>>>>>>
>>>>>>>> I tried:
>>>>>>>> userdb {
>>>>>>>> args = /etc/imap.passwd
>>>>>>>> driver = passwd-file
>>>>>>>> override_fields = home=/var/vmail/glu_vrem/%u
>>>>>>>> }
>>>>>>>> /etc/imap.passwd:
>>>>>>>>
administrator:*:95400500:95400513:Administrator:/home/DOM/administrator:/bin/bash::userdb_quota_rule=*:bytes=10G
>>>>>>>>
>>>>>>>> Authentication and quota - now OK. But
doesn't work sending and receiving
>>>>>>>> mail...
>>>>>>>> postfix say 'Unknown user'...
>>>>>>>>
>>>>>>>>
>>>>>>>> Turn on auth_debug and auth_verbose and see
what it says.
>>>>>>>>
>>>>>>>> Aki
>>>>>> Also you can set auth_username_format = %Ln to force
usernames into
>>>>>> lowercase without domain.
>>>>>>
>>>>>> Aki