Re: dovecot quota-warning detection mail

2020-10-29 Thread Gedalya
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=-...@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::
>> :{CRAM-MD5}b09a26aedaddd0e66901eb4bc146b81930aac8be0dac96d1c83bb652fd4f7
>> 451/var/home/xxx/::
>> -ccc-ddd:{CRAM-MD5}b09a15aedaddd0e55901eb4bc146b81930aac8be0dac96d1c83bb
>> 652fd4f7451/home/vhosts/ddd/-ccc-ddd::
>> -fff-ggg:{CRAM-MD5}f4c336c68f063d1bbc2a1e32ae32bc9c978d0d2565eae42b4485d
>> 50370d157cd/home/vhosts/ggg/-fff-ggg::
>> -iii-jjj:{CRAM-MD5}78b337b326d57d564454d8019ed22b5d5cd181437aff77988e2c3
>> a12ec2d8490/home/vhosts/jjj/-iii-jjj::
>>   :
>>   :
>> 
>> -
>>
>> cat /etc/dovecot/users (Excerpt from change)
>> 
>> -
>> root:/root::
>> :/var/home/xxx/::
>> -...@ddd.example.com:/home/vhosts/ddd/-ccc-ddd::
>> -...@ggg.example.net:/home/vhosts/ggg/-fff-ggg::
>> hhhh-...@jjj.example.co.jp:/home/vhosts/jjj/-iii-jjj::
>>   :
>>   :
>> 
>> -
>>
>> -Original Message-
>> From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Gedalya
>> Sent: Thursday, October 29, 2020 2:27 PM
>> To: dovecot@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-boun...@dovecot.org] On Behalf Of 
>>> Gedalya
>>> Sent: Thursday, October 29, 2020 1:17 PM
>>> To: dovecot@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-u...@example.co.jp".
>>>> (There is no "sekkei" in the address.)
>>>>
>>>> Or just add "@example.co.jp"?
>>>> When it comes to "abc-xyz-unyo-sek...@example.co.jp"
>>>> I can't send a mail.
>>>>
>>>> Thank you.
>>>>
>>>> morikawa




Re: dovecot quota-warning detection mail

2020-10-29 Thread Gedalya
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=-...@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::
> :{CRAM-MD5}b09a26aedaddd0e66901eb4bc146b81930aac8be0dac96d1c83bb652fd4f7
> 451/var/home/xxx/::
> -ccc-ddd:{CRAM-MD5}b09a15aedaddd0e55901eb4bc146b81930aac8be0dac96d1c83bb
> 652fd4f7451/home/vhosts/ddd/-ccc-ddd::
> -fff-ggg:{CRAM-MD5}f4c336c68f063d1bbc2a1e32ae32bc9c978d0d2565eae42b4485d
> 50370d157cd/home/vhosts/ggg/-fff-ggg::
> -iii-jjj:{CRAM-MD5}78b337b326d57d564454d8019ed22b5d5cd181437aff77988e2c3
> a12ec2d8490/home/vhosts/jjj/-iii-jjj::
>   :
>   :
> 
> -
>
> cat /etc/dovecot/users (Excerpt from change)
> 
> -
> root:/root::
> :/var/home/xxx/::
> -...@ddd.example.com:/home/vhosts/ddd/-ccc-ddd::
> -...@ggg.example.net:/home/vhosts/ggg/-fff-ggg::
> -...@jjj.example.co.jp:/home/vhosts/jjj/-iii-jjj::
>   :
>   :
> 
> -------------
>
> -Original Message-
> From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Gedalya
> Sent: Thursday, October 29, 2020 2:27 PM
> To: dovecot@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-boun...@dovecot.org] On Behalf Of 
>> Gedalya
>> Sent: Thursday, October 29, 2020 1:17 PM
>> To: dovecot@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-u...@example.co.jp".
>>> (There is no "sekkei" in the address.)
>>>
>>> Or just add "@example.co.jp"?
>>> When it comes to "abc-xyz-unyo-sek...@example.co.jp"
>>> I can't send a mail.
>>>
>>> Thank you.
>>>
>>> morikawa
>



Re: dovecot quota-warning detection mail

2020-10-29 Thread Gedalya
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-boun...@dovecot.org] On Behalf Of Gedalya
> Sent: Thursday, October 29, 2020 1:17 PM
> To: dovecot@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-u...@example.co.jp".
>> (There is no "sekkei" in the address.)
>>
>> Or just add "@example.co.jp"?
>> When it comes to "abc-xyz-unyo-sek...@example.co.jp"
>> I can't send a mail.
>>
>> Thank you.
>>
>> morikawa




Re: dovecot quota-warning detection mail

2020-10-29 Thread Gedalya
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-u...@example.co.jp".
> (There is no "sekkei" in the address.)
>
> Or just add "@example.co.jp"?
> When it comes to "abc-xyz-unyo-sek...@example.co.jp"
> I can't send a mail.
>
> Thank you.
>
> morikawa



Re: dovecot quota-warning detection mail

2020-10-29 Thread Gedalya
It should only affect users who authenticate with a username only, without a 
domain.
The only effect is to add the domain name to the username.
You could perhaps test, by logging in as just "user" and then as 
"u...@example.co.jp" and make sure everything behaves the same.
If everything behaves the same, then setting auth_default_realm should not do 
any harm.
In other words, the question is: does any functionality actually depend on 
having a username without a domain.

On 10/29/20 8:18 AM, 森川 孝司 wrote:
> Gedalya-san
>
> I have a question.
> Currently, there are thousands of users. (In multi-domain)
> The setting of "auth_default_realm = example.co.jp" is
> Is it possible to set without affecting the current user?
>
> Thank you.



RE: dovecot quota-warning detection mail

2020-10-29 Thread 森川 孝司
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::
:{CRAM-MD5}b09a26aedaddd0e66901eb4bc146b81930aac8be0dac96d1c83bb652fd4f7
451/var/home/xxx/::
-ccc-ddd:{CRAM-MD5}b09a15aedaddd0e55901eb4bc146b81930aac8be0dac96d1c83bb
652fd4f7451/home/vhosts/ddd/-ccc-ddd::
-fff-ggg:{CRAM-MD5}f4c336c68f063d1bbc2a1e32ae32bc9c978d0d2565eae42b4485d
50370d157cd/home/vhosts/ggg/-fff-ggg::
-iii-jjj:{CRAM-MD5}78b337b326d57d564454d8019ed22b5d5cd181437aff77988e2c3
a12ec2d8490/home/vhosts/jjj/-iii-jjj::
  :
  :

-

cat /etc/dovecot/users (Excerpt from change)

-
root:/root::
:/var/home/xxx/::
-...@ddd.example.com:/home/vhosts/ddd/-ccc-ddd::
-...@ggg.example.net:/home/vhosts/ggg/-fff-ggg::
-...@jjj.example.co.jp:/home/vhosts/jjj/-iii-jjj::
  :
  :

-

-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Gedalya
Sent: Thursday, October 29, 2020 2:27 PM
To: dovecot@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-boun...@dovecot.org] On Behalf Of 
> Gedalya
> Sent: Thursday, October 29, 2020 1:17 PM
> To: dovecot@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-u...@example.co.jp".
>> (There is no "sekkei" in the address.)
>>
>> Or just add "@example.co.jp"?
>> When it comes to "abc-xyz-unyo-sek...@example.co.jp"
>> I can't send a mail.
>>
>> Thank you.
>>
>> morikawa




RE: dovecot quota-warning detection mail

2020-10-28 Thread 森川 孝司
Gedalya-san

Thank you for the information.

It seems to be difficult...

morikawa
-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Gedalya
Sent: Thursday, October 29, 2020 1:17 PM
To: dovecot@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-u...@example.co.jp".
> (There is no "sekkei" in the address.)
>
> Or just add "@example.co.jp"?
> When it comes to "abc-xyz-unyo-sek...@example.co.jp"
> I can't send a mail.
>
> Thank you.
>
> morikawa



RE: dovecot quota-warning detection mail

2020-10-28 Thread 森川 孝司
Gedalya-san

You are currently logged in without a domain name.

Currently, "abc-xyz-unyo-sekkei" users have been converted to
"abc-xyz-u...@example.co.jp".
(There is no "sekkei" in the address.)

Or just add "@example.co.jp"?
When it comes to "abc-xyz-unyo-sek...@example.co.jp"
I can't send a mail.

Thank you.

morikawa
-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Gedalya
Sent: Thursday, October 29, 2020 11:55 AM
To: dovecot@dovecot.org
Subject: Re: dovecot quota-warning detection mail

It should only affect users who authenticate with a username only, without a
domain.
The only effect is to add the domain name to the username.
You could perhaps test, by logging in as just "user" and then as
"u...@example.co.jp" and make sure everything behaves the same.
If everything behaves the same, then setting auth_default_realm should not
do any harm.
In other words, the question is: does any functionality actually depend on
having a username without a domain.

On 10/29/20 8:18 AM, 森川 孝司 wrote:
> Gedalya-san
>
> I have a question.
> Currently, there are thousands of users. (In multi-domain) The setting 
> of "auth_default_realm = example.co.jp" is Is it possible to set 
> without affecting the current user?
>
> Thank you.



RE: dovecot quota-warning detection mail

2020-10-28 Thread 森川 孝司
Gedalya-san

I have a question.
Currently, there are thousands of users. (In multi-domain)
The setting of "auth_default_realm = example.co.jp" is
Is it possible to set without affecting the current user?

Thank you.
-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of 森川 孝司
Sent: Wednesday, October 28, 2020 4:16 PM
To: 'Gedalya' ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

Hi Gedalya-san

I would like to set "auth_default_realm = example.co.jp".

I'm just replacing from older server to new server, Older servers also had
this problem.

So, we decided to proceed with server replacement in this state.
As another task, we will start and set up this issue.

Therefore, it takes time to set and confirm.
If we can confirm it, we will report it again.

Thank you.




Re: dovecot quota-warning detection mail

2020-10-28 Thread Gedalya
On 10/28/20 12:19 PM, 森川 孝司 wrote:
> "
> "Recipient address rejected: User unknown in local recipient table"

If abc-xyz-unyo-sekkei is supposed to be abc-xyz-unyo-sek...@example.co.jp then 
you could try to set in dovecot configuration:

auth_default_realm = example.co.jp

Then %u will contain the domain part too.

Otherwise, you could try to configure postfix to qualify unqualified addresses 
with the appropriate domain.

Finally, you could just prohibit users from authenticating with an unqualified 
username (without a domain).




RE: dovecot quota-warning detection mail

2020-10-28 Thread Koga Hayashi
Morikawa-san,

Okey, then your conf should be right.

Did you try the conf below which was noticed by Gedalya?

auth_default_realm = example.co.jp

Kouga

-Original Message-
From: 森川 孝司  
Sent: Wednesday, October 28, 2020 4:28 PM
To: 林 宏河 ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

kouga-san

After copying and pasting, something went wrong.
Actually "quota_warning = storage=95%% quota-warning 95 %u"
It is set in.
(In fact, I usually receive a notification email.)

Thank you.
-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Koga Hayashi
Sent: Wednesday, October 28, 2020 1:58 PM
To: 森川 孝司 ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

Morikawa-san,

Your conf is wrong.

Should be:
   quota_warning = storage = 95 %% quota-warning 95 %u Your conf:
  quota_warning = storage = 95 %% quota-warning 95% u

There's a space between % and u.

First of all, try the above and let us know if it changes.

Kouga



RE: dovecot quota-warning detection mail

2020-10-28 Thread 森川 孝司
kouga-san

After copying and pasting, something went wrong.
Actually "quota_warning = storage=95%% quota-warning 95 %u"
It is set in.
(In fact, I usually receive a notification email.)

Thank you.
-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Koga Hayashi
Sent: Wednesday, October 28, 2020 1:58 PM
To: 森川 孝司 ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

Morikawa-san,

Your conf is wrong.

Should be:
   quota_warning = storage = 95 %% quota-warning 95 %u Your conf:
   quota_warning = storage = 95 %% quota-warning 95% u

There's a space between % and u.

First of all, try the above and let us know if it changes.

Kouga



RE: dovecot quota-warning detection mail

2020-10-28 Thread 森川 孝司
Hi Gedalya-san

I would like to set "auth_default_realm = example.co.jp".

I'm just replacing from older server to new server,
Older servers also had this problem.

So, we decided to proceed with server replacement in this state.
As another task, we will start and set up this issue.

Therefore, it takes time to set and confirm.
If we can confirm it, we will report it again.

Thank you.




RE: dovecot quota-warning detection mail

2020-10-28 Thread Koga Hayashi
Morikawa,

What do you mean by "logged-in user"?

%u stands for the username.
If, for an example, user "morikawa" exists in your dovecot server (I mean as 
local user), your quota warning configuration should be fine.
But if user "morikawa" does not exist in your server, and, dovecot can't 
resolve the username to the mail address, then the quota warning mail be 
rejected because dovecot can't find the "username" in local recipient table.

A little more information about your server environment will be appreciated.

Kouga
-Original Message-
From: dovecot  On Behalf Of 森川 孝司
Sent: Wednesday, October 28, 2020 10:17 AM
To: dovecot@dovecot.org
Subject: dovecot quota-warning detection mail

Hi, all.
we use quota-warning emails to notify you of quotas.

In rare cases, the email address has changed to the logged-in user.
(Because the address of %u is passed as the logged-in user.)

So I couldn’t send the email with “Recipient address rejected: User unknown in 
local recipient table”.

Why does my email address change to a logged-in user?
%u of "quota_warning = storage = 95 %% quota-warning 95% u"
The output is the logged-in user.

By Morikawa



RE: dovecot quota-warning detection mail

2020-10-27 Thread Koga Hayashi
Morikawa-san,

Your conf is wrong.

Should be:
   quota_warning = storage = 95 %% quota-warning 95 %u
Your conf:
   quota_warning = storage = 95 %% quota-warning 95% u

There's a space between % and u.

First of all, try the above and let us know if it changes.

Kouga

-Original Message-
From: 森川 孝司  
Sent: Wednesday, October 28, 2020 1:20 PM
To: 林 宏河 ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

Hi,Kouga-san

When quota-warning works normally
I'm sending an email to "From:  to = 
"

When it doesn't work
An email was sent to "From:  to = 
"
"Recipient address rejected: User unknown in local recipient table"

It will be.

cat /etc/dovecot/conf.d/90-quota.conf
--  plugin {
   quota_warning = storage = 95 %% quota-warning 95% u
   quota_warning1 = storage = 90 %% quota-warning 90% u
   quota_warning2 = storage = 85 %% quota-warning 85% u
   quota_warning3 = storage = 80 %% quota-warning 80% u }

service quota-warning {
   executable = script /usr/local/bin/quota-warning.pl
   user = dovecot
   unix_listener quota-warning {
 user = vmail
   }
}
-- -

And it is set.

Thank you.

-Original Message-
From: Koga Hayashi [mailto:haya...@progdence.co.jp]
Sent: Wednesday, October 28, 2020 12:50 PM
To: 森川 孝司 ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

Morikawa,

What do you mean by "logged-in user"?

%u stands for the username.
If, for an example, user "morikawa" exists in your dovecot server (I mean as 
local user), your quota warning configuration should be fine.
But if user "morikawa" does not exist in your server, and, dovecot can't 
resolve the username to the mail address, then the quota warning mail be 
rejected because dovecot can't find the "username" in local recipient table.

A little more information about your server environment will be appreciated.

Kouga
-Original Message-
From: dovecot  On Behalf Of 森川 孝司
Sent: Wednesday, October 28, 2020 10:17 AM
To: dovecot@dovecot.org
Subject: dovecot quota-warning detection mail

Hi, all.
we use quota-warning emails to notify you of quotas.

In rare cases, the email address has changed to the logged-in user.
(Because the address of %u is passed as the logged-in user.)

So I couldn’t send the email with “Recipient address rejected: User unknown in 
local recipient table”.

Why does my email address change to a logged-in user?
%u of "quota_warning = storage = 95 %% quota-warning 95% u"
The output is the logged-in user.

By Morikawa



RE: dovecot quota-warning detection mail

2020-10-27 Thread 森川 孝司
Hi,Kouga-san

When quota-warning works normally
I'm sending an email to "From:  to =
"

When it doesn't work
An email was sent to "From:  to =
"
"Recipient address rejected: User unknown in local recipient table"

It will be.

cat /etc/dovecot/conf.d/90-quota.conf
-- 
plugin {
   quota_warning = storage = 95 %% quota-warning 95% u
   quota_warning1 = storage = 90 %% quota-warning 90% u
   quota_warning2 = storage = 85 %% quota-warning 85% u
   quota_warning3 = storage = 80 %% quota-warning 80% u
}

service quota-warning {
   executable = script /usr/local/bin/quota-warning.pl
   user = dovecot
   unix_listener quota-warning {
 user = vmail
   }
}
-- -

And it is set.

Thank you.

-Original Message-
From: Koga Hayashi [mailto:haya...@progdence.co.jp]
Sent: Wednesday, October 28, 2020 12:50 PM
To: 森川 孝司 ; dovecot@dovecot.org
Subject: RE: dovecot quota-warning detection mail

Morikawa,

What do you mean by "logged-in user"?

%u stands for the username.
If, for an example, user "morikawa" exists in your dovecot server (I mean as
local user), your quota warning configuration should be fine.
But if user "morikawa" does not exist in your server, and, dovecot can't
resolve the username to the mail address, then the quota warning mail be
rejected because dovecot can't find the "username" in local recipient table.

A little more information about your server environment will be appreciated.

Kouga
-Original Message-
From: dovecot  On Behalf Of 森川 孝司
Sent: Wednesday, October 28, 2020 10:17 AM
To: dovecot@dovecot.org
Subject: dovecot quota-warning detection mail

Hi, all.
we use quota-warning emails to notify you of quotas.

In rare cases, the email address has changed to the logged-in user.
(Because the address of %u is passed as the logged-in user.)

So I couldn’t send the email with “Recipient address rejected: User
unknown in local recipient table”.

Why does my email address change to a logged-in user?
%u of "quota_warning = storage = 95 %% quota-warning 95% u"
The output is the logged-in user.

By Morikawa



dovecot quota-warning detection mail

2020-10-27 Thread 森川 孝司
Hi, all.
we use quota-warning emails to notify you of quotas.

In rare cases, the email address has changed to the logged-in user.
(Because the address of %u is passed as the logged-in user.)

So I couldn’t send the email with “Recipient address rejected: User
unknown in local recipient table”.

Why does my email address change to a logged-in user?
%u of "quota_warning = storage = 95 %% quota-warning 95% u"
The output is the logged-in user.

By Morikawa