dovecot quota-warning detection mail

Gedalya gedalya at gedalya.net
Thu Oct 29 08:12:42 EET 2020


Let me just add, of course you should play around with some test entries.
You don't want problems with dovecot finding the home directory, users suddenly seeing an empty mailbox, or LMTP delivering to the wrong place.
Just in case this isn't obvious :-)

On 10/29/20 2:08 PM, Gedalya wrote:
> Very good.
>
> See https://doc.dovecot.org/configuration_manual/authentication/passwd_file/
>
> You can add the "user" field as an "extra field"
>
> In users.auth, just add in the end "user=bbbb-ccc at ddd.example.com" to match the respective entry in /etc/dovecot/users
>
> Good luck!
>
>
> On 10/29/20 2:02 PM, 森川 孝司 wrote:
>> OK. "passdb/userdb" Setting part
>>
>> $ dovecot -n (Excerpt from change)
>> ----------------------------------------------------------------------------
>> ---------------------
>> passdb {
>>   args = scheme=CRYPT username_format=%u /etc/dovecot/users.auth
>>   driver = passwd-file
>> }
>>
>> userdb {
>>   args = username_format=%u /etc/dovecot/users.auth
>>   driver = passwd-file
>> }
>> protocol lmtp {
>>   info_log_path = /var/log/lmtplog
>>   mail_plugins = " quota quota sieve"
>>   userdb {
>>     args = username_format=%u /etc/dovecot/users
>>     driver = passwd-file
>>     name =
>>   }
>> }
>> ----------------------------------------------------------------------------
>> ---------------------
>>
>> cat /etc/dovecot/users.auth (Excerpt from change)
>> ----------------------------------------------------------------------------
>> ---------------------
>> root:*::::/root::
>> aaaa:{CRAM-MD5}b09a26aedaddd0e66901eb4bc146b81930aac8be0dac96d1c83bb652fd4f7
>> 451::::/var/home/xxx/aaaa::
>> bbbb-ccc-ddd:{CRAM-MD5}b09a15aedaddd0e55901eb4bc146b81930aac8be0dac96d1c83bb
>> 652fd4f7451::::/home/vhosts/ddd/bbbb-ccc-ddd::
>> eeee-fff-ggg:{CRAM-MD5}f4c336c68f063d1bbc2a1e32ae32bc9c978d0d2565eae42b4485d
>> 50370d157cd::::/home/vhosts/ggg/eeee-fff-ggg::
>> hhhh-iii-jjj:{CRAM-MD5}78b337b326d57d564454d8019ed22b5d5cd181437aff77988e2c3
>> a12ec2d8490::::/home/vhosts/jjj/hhhh-iii-jjj::
>>   :
>>   :
>> ----------------------------------------------------------------------------
>> ---------------------
>>
>> cat /etc/dovecot/users (Excerpt from change)
>> ----------------------------------------------------------------------------
>> ---------------------
>> root:::::/root::
>> aaaa:::::/var/home/xxx/aaaa::
>> bbbb-ccc at ddd.example.com:::::/home/vhosts/ddd/bbbb-ccc-ddd::
>> eeee-fff at ggg.example.net:::::/home/vhosts/ggg/eeee-fff-ggg::
>> hhhh-iii at jjj.example.co.jp:::::/home/vhosts/jjj/hhhh-iii-jjj::
>>   :
>>   :
>> ----------------------------------------------------------------------------
>> ---------------------
>>
>> -----Original Message-----
>> From: dovecot [mailto:dovecot-bounces at dovecot.org] On Behalf Of Gedalya
>> Sent: Thursday, October 29, 2020 2:27 PM
>> To: dovecot at dovecot.org
>> Subject: Re: dovecot quota-warning detection mail
>>
>> Perhaps if you share some information about your passdb / userdb
>> authentication setup, I or others might be able to help further.
>>
>>
>> On 10/29/20 12:51 PM, 森川 孝司 wrote:
>>> Gedalya-san
>>>
>>> Thank you for the information.
>>>
>>> It seems to be difficult...
>>>
>>> morikawa
>>> -----Original Message-----
>>> From: dovecot [mailto:dovecot-bounces at dovecot.org] On Behalf Of 
>>> Gedalya
>>> Sent: Thursday, October 29, 2020 1:17 PM
>>> To: dovecot at dovecot.org
>>> Subject: Re: dovecot quota-warning detection mail
>>>
>>> Aha. Then it's not a straightforward case of just adding the domain 
>>> name to the same username, you need to transform the username too.
>>> Dovecot's userdb / authdb allows you to return a "user" field, which 
>>> sets a new username for dovecot to use.
>>> Depending on what you use as your authentication backend, you may be 
>>> able to do the transformation at that layer.
>>>
>>> https://doc.dovecot.org/configuration_manual/authentication/user_extra
>>> _field
>>> /
>>>
>>> On 10/29/20 12:06 PM, 森川 孝司 wrote:
>>>> Gedalya-san
>>>>
>>>> You are currently logged in without a domain name.
>>>>
>>>> Currently, "abc-xyz-unyo-sekkei" users have been converted to 
>>>> "abc-xyz-unyo at example.co.jp".
>>>> (There is no "sekkei" in the address.)
>>>>
>>>> Or just add "@example.co.jp"?
>>>> When it comes to "abc-xyz-unyo-sekkei at example.co.jp"
>>>> I can't send a mail.
>>>>
>>>> Thank you.
>>>>
>>>> morikawa




More information about the dovecot mailing list