Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread Aki Tuomi

On 30.1.2019 8.31, Mark Moseley wrote:
> On Tue, Jan 29, 2019 at 9:58 PM James Brown via dovecot
> mailto:dovecot@dovecot.org>> wrote:
>
> On 30 Jan 2019, at 4:35 pm, Aki Tuomi  > wrote:
>>
>>>
>>> On 30 January 2019 at 07:12 James Brown < jlbr...@bordo.com.au
>>> > wrote:
>>>
>>>
>>> >> My settings:
>>> ...
>>> >> userdb {
>>> >> driver = passwd
>>> >> }
>>> >> userdb {
>>> >> driver = prefetch
>>> >> }
>>> >> userdb {
>>> >> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>>> >> driver = sql
>>> >> }
 Well... there is that usetdb passwd which seems bit extraneous.
 ---
 Aki Tuomi
>>>
>> I'd remove the
>>
>> userdb {
>> driver = passwd
>> }
>>
>> section
>> --- 
>> Aki Tuomi
>
> Thanks Aki - the trick was finding where that setting was! Found
> it in auth-system.conf.ext.
>
> Commented it out and all works perfectly now.
>
> Thanks again Aki,
>
> James.
>
>
>
> I'll throw in my 2 cents that it'd be great for a passdb/userdb block
> to have a setting to suppress that message. I've actually changed my
> mind and *not* used extra userdbs in the past (despite there being
> good reasons to use them) entirely due to that log entry. We've got
> millions of mailboxes and the noise in the logs would be unreal. And
> it would cause no end of confusion for ops people looking at logs. I
> weighed the likelihood that I'd end up being asked a million times why
> a login failed, when in reality it hadn't, and decided it wasn't worth
> the headache.
>
> Or alternatively only log that error when *all* of the passdbs/userdbs
> have failed. Anything would be better than logging what *looks* like
> an error but isn't. And, yes, i see 'info' in the log entry, but
> 'unknown user' is far more eye-catching.
>
> This is the part where someone points out that there already *is* a
> setting for this and I stop talking :)

auth_verbose=no

Aki



Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread Mark Moseley
On Tue, Jan 29, 2019 at 9:58 PM James Brown via dovecot 
wrote:

> On 30 Jan 2019, at 4:35 pm, Aki Tuomi  wrote:
>
>
>
> On 30 January 2019 at 07:12 James Brown < jlbr...@bordo.com.au> wrote:
>
>
> >> My settings:
> ...
> >> userdb {
> >> driver = passwd
> >> }
> >> userdb {
> >> driver = prefetch
> >> }
> >> userdb {
> >> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> >> driver = sql
> >> }
>
> Well... there is that usetdb passwd which seems bit extraneous.
> ---
> Aki Tuomi
>
>
> I'd remove the
>
> userdb {
> driver = passwd
> }
>
> section
> ---
> Aki Tuomi
>
>
> Thanks Aki - the trick was finding where that setting was! Found it in
> auth-system.conf.ext.
>
> Commented it out and all works perfectly now.
>
> Thanks again Aki,
>
> James.
>


I'll throw in my 2 cents that it'd be great for a passdb/userdb block to
have a setting to suppress that message. I've actually changed my mind and
*not* used extra userdbs in the past (despite there being good reasons to
use them) entirely due to that log entry. We've got millions of mailboxes
and the noise in the logs would be unreal. And it would cause no end of
confusion for ops people looking at logs. I weighed the likelihood that I'd
end up being asked a million times why a login failed, when in reality it
hadn't, and decided it wasn't worth the headache.

Or alternatively only log that error when *all* of the passdbs/userdbs have
failed. Anything would be better than logging what *looks* like an error
but isn't. And, yes, i see 'info' in the log entry, but 'unknown user' is
far more eye-catching.

This is the part where someone points out that there already *is* a setting
for this and I stop talking :)


Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread James Brown via dovecot
On 30 Jan 2019, at 4:35 pm, Aki Tuomi mailto:aki.tu...@open-xchange.com>> wrote:
> 
>> 
>> On 30 January 2019 at 07:12 James Brown < jlbr...@bordo.com.au 
>> > wrote:
>> 
>> 
>> >> My settings:
>> ...
>> >> userdb {
>> >> driver = passwd
>> >> }
>> >> userdb {
>> >> driver = prefetch
>> >> }
>> >> userdb {
>> >> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>> >> driver = sql
>> >> }
>>> Well... there is that usetdb passwd which seems bit extraneous.
>>> ---
>>> Aki Tuomi
>> 
> I'd remove the
> 
> userdb {
> driver = passwd
> }
> 
> section
> --- 
> Aki Tuomi

Thanks Aki - the trick was finding where that setting was! Found it in 
auth-system.conf.ext.

Commented it out and all works perfectly now.

Thanks again Aki,

James.

Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread Aki Tuomi


 
 
  
   
  
  
   
On 30 January 2019 at 07:12 James Brown <
jlbr...@bordo.com.au> wrote:
   
   

   
   

   
   
>> My settings:
   
   
>>
   
   
>> $ sudo dovecot -n
   
   
>> Password:
   
   
>> # 2.3.4 (0ecbaf23d): /usr/local/etc/dovecot/dovecot.conf
   
   
>> # OS: Darwin 18.2.0 x86_64 apfs
   
   
>> # Hostname: mail.bordo.com.au <
http://mail.bordo.com.au/> < 
http://mail.bordo.com.au/ <
">http://mail.bordo.com.au/>>
   
   
>> auth_debug = yes
   
   
>> auth_verbose = yes
   
   
>> auth_verbose_passwords = plain
   
   
>> default_internal_user = jlbrown
   
   
>> default_login_user = jlbrown
   
   
>> first_valid_gid = 0
   
   
>> first_valid_uid = 102
   
   
>> last_valid_gid = 501
   
   
>> last_valid_uid = 105
   
   
>> log_path = /var/log/dovecot.log
   
   
>> mail_gid = 102
   
   
>> mail_location = maildir:/usr/local/virtual/%d/%u
   
   
>> mail_uid = 102
   
   
>> namespace inbox {
   
   
>> inbox = yes
   
   
>> location =
   
   
>> mailbox Drafts {
   
   
>> special_use = \Drafts
   
   
>> }
   
   
>> mailbox Junk {
   
   
>> special_use = \Junk
   
   
>> }
   
   
>> mailbox Sent {
   
   
>> special_use = \Sent
   
   
>> }
   
   
>> mailbox "Sent Messages" {
   
   
>> special_use = \Sent
   
   
>> }
   
   
>> mailbox Trash {
   
   
>> special_use = \Trash
   
   
>> }
   
   
>> prefix =
   
   
>> }
   
   
>> passdb {
   
   
>> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   
   
>> driver = sql
   
   
>> }
   
   
>> protocols = imap pop3
   
   
>> service auth {
   
   
>> unix_listener /var/spool/postfix/private/auth {
   
   
>> group = _postfix
   
   
>> mode = 0660
   
   
>> user = _postfix
   
   
>> }
   
   
>> unix_listener auth-userdb {
   
   
>> mode = 0660
   
   
>> user = _vmail
   
   
>> }
   
   
>> }
   
   
>> service imap-login {
   
   
>> process_limit = 512
   
   
>> }
   
   
>> service stats {
   
   
>> fifo_listener stats-mail {
   
   
>> mode = 0666
   
   
>> }
   
   
>> fifo_listener stats-user {
   
   
>> mode = 0666
   
   
>> }
   
   
>> unix_listener stats-writer {
   
   
>> mode = 0666
   
   
>> }
   
   
>> }
   
   
>> ssl_cert = 
   
>> ssl_dh = # hidden, use -P to show it
   
   
>> ssl_key = # hidden, use -P to show it
   
   
>> userdb {
   
   
>> driver = passwd
   
   
>> }
   
   
>> userdb {
   
   
>> driver = prefetch
   
   
>> }
   
   
>> userdb {
   
   
>> args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   
   
>> driver = sql
   
   
>> }
   
   

 Well... there is that usetdb passwd which seems bit extraneous.


 ---


 Aki Tuomi

   
   
Thanks Aki.
   
   

   
   
So just get rid of the:
   
   

   
   
passdb {
   
   
args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   
   
driver = sql
   
   
}
   
   

   
   
Section?
   
   

   
   
James.
   
  
  
   
  
  
   
I'd remove the
   
   

   
   

 userdb {


 driver = passwd


 }


 


 section

   
  
  
   ---
   Aki Tuomi
   
 



Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread Aki Tuomi


 
 
  
   
  
  
   
On 30 January 2019 at 06:37 James Brown via dovecot <
dovecot@dovecot.org> wrote:
   
   

   
   

   
   
On 30 Jan 2019, at 10:57 am, Stephan Bosch <
step...@rename-it.nl step...@rename-it.nl>> wrote:
   
   

 Op 30/01/2019 om 00:06 schreef James Brown via dovecot:


 
  
   On 30 Jan 2019, at 9:24 am, Stephan Bosch <
   step...@rename-it.nl step...@rename-it.nl>> wrote:
  
  
   
  
  
   
  
  
   
  
  
   Op 29/01/2019 om 01:51 schreef James Brown via dovecot:
  
  
   
I’ve set up a new mail server. Auth-worker is giving me this error all the time:
   
   

   
   
auth-worker(11160): Info: passwd(
sa...@bordo.com.au sa...@bordo.com.au> sa...@bordo.com.au sa...@bordo.com.au>>,10.0.0.54,): unknown user - trying the next userdb
   
   

   
  
  
   That is not an error. As the "Info: " prefix indicates, this is an innocuous informational message.
  
  
   
  
  
   Regards,
  
  
   
  
  
   Stephan.
  
  
   
  
 
 
  Thanks Stephan.
 
 
  
 
 
  I know it’s not a major thing, it’s just that it is every third line of my log.
 
 
  
 
 
  Ie I get the auth-worker unknown user, then successful imap-login, then the imap logout.
 
 
  
 
 
  So I’m just trying to figure out what is causing the auth-worker lookup failure so I can fix it. I did not have this in my old mail server, just the new one I’ve setup.
 
 
  
 
 
  Is it a database issue or a Dovecot config issue? If so where?
 


 Ýou can enable auth_verbose and auth_debug to get an idea what Dovecot is doing. You should post your `dovecot -n` to get more help on this issue.


 


 Regards,


 


 Stephan.

   
   
Will look at auth_debug. It is a lot to go through!
   
   

   
   
My settings:
   
   

   
   
$ sudo dovecot -n
   
   
Password:
   
   
# 2.3.4 (0ecbaf23d): /usr/local/etc/dovecot/dovecot.conf
   
   
# OS: Darwin 18.2.0 x86_64 apfs
   
   
# Hostname: mail.bordo.com.au <
http://mail.bordo.com.au/>
   
   
auth_debug = yes
   
   
auth_verbose = yes
   
   
auth_verbose_passwords = plain
   
   
default_internal_user = jlbrown
   
   
default_login_user = jlbrown
   
   
first_valid_gid = 0
   
   
first_valid_uid = 102
   
   
last_valid_gid = 501
   
   
last_valid_uid = 105
   
   
log_path = /var/log/dovecot.log
   
   
mail_gid = 102
   
   
mail_location = maildir:/usr/local/virtual/%d/%u
   
   
mail_uid = 102
   
   
namespace inbox {
   
   
inbox = yes
   
   
location =
   
   
mailbox Drafts {
   
   
special_use = \Drafts
   
   
}
   
   
mailbox Junk {
   
   
special_use = \Junk
   
   
}
   
   
mailbox Sent {
   
   
special_use = \Sent
   
   
}
   
   
mailbox "Sent Messages" {
   
   
special_use = \Sent
   
   
}
   
   
mailbox Trash {
   
   
special_use = \Trash
   
   
}
   
   
prefix =
   
   
}
   
   
passdb {
   
   
args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   
   
driver = sql
   
   
}
   
   
protocols = imap pop3
   
   
service auth {
   
   
unix_listener /var/spool/postfix/private/auth {
   
   
group = _postfix
   
   
mode = 0660
   
   
user = _postfix
   
   
}
   
   
unix_listener auth-userdb {
   
   
mode = 0660
   
   
user = _vmail
   
   
}
   
   
}
   
   
service imap-login {
   
   
process_limit = 512
   
   
}
   
   
service stats {
   
   
fifo_listener stats-mail {
   
   
mode = 0666
   
   
}
   
   
fifo_listener stats-user {
   
   
mode = 0666
   
   
}
   
   
unix_listener stats-writer {
   
   
mode = 0666
   
   
}
   
   
}
   
   
ssl_cert = 
   
ssl_dh = # hidden, use -P to show it
   
   
ssl_key = # hidden, use -P to show it
   
   
userdb {
   
   
driver = passwd
   
   
}
   
   
userdb {
   
   
driver = prefetch
   
   
}
   
   
userdb {
   
   
args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   
   
driver = sql
   
   
}
   
  
  
   
  
  
   Well... there is that usetdb passwd which seems bit extraneous.
  
  
   ---
   Aki Tuomi
   
 



Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread James Brown via dovecot
On 30 Jan 2019, at 10:57 am, Stephan Bosch mailto:step...@rename-it.nl>> wrote:
> 
> Op 30/01/2019 om 00:06 schreef James Brown via dovecot:
>> 
>>> On 30 Jan 2019, at 9:24 am, Stephan Bosch >> > wrote:
>>> 
>>> 
>>> 
>>> Op 29/01/2019 om 01:51 schreef James Brown via dovecot:
 I’ve set up a new mail server. Auth-worker is giving me this error all the 
 time:
 
 auth-worker(11160): Info: passwd(sa...@bordo.com.au 
  >,10.0.0.54,): unknown user  
 - trying the next userdb
 
>>> That is not an error. As the "Info: " prefix indicates, this is an 
>>> innocuous informational message.
>>> 
>>> Regards,
>>> 
>>> Stephan.
>>> 
>> Thanks Stephan.
>> 
>> I know it’s not a major thing, it’s just that it is every third line of my 
>> log.
>> 
>> Ie I get the auth-worker unknown user, then successful imap-login, then the 
>> imap logout.
>> 
>> So I’m just trying to figure out what is causing the auth-worker lookup 
>> failure so I can fix it. I did not have this in my old mail server, just the 
>> new one I’ve setup.
>> 
>> Is it a database issue or a Dovecot config issue? If so where?
> 
> Ýou can enable auth_verbose and auth_debug to get an idea what Dovecot is 
> doing. You should post your `dovecot -n` to get more help on this issue.
> 
> Regards,
> 
> Stephan.

Will look at auth_debug. It is a lot to go through!

My settings:

$ sudo dovecot -n
Password:
# 2.3.4 (0ecbaf23d): /usr/local/etc/dovecot/dovecot.conf
# OS: Darwin 18.2.0 x86_64  apfs
# Hostname: mail.bordo.com.au 
auth_debug = yes
auth_verbose = yes
auth_verbose_passwords = plain
default_internal_user = jlbrown
default_login_user = jlbrown
first_valid_gid = 0
first_valid_uid = 102
last_valid_gid = 501
last_valid_uid = 105
log_path = /var/log/dovecot.log
mail_gid = 102
mail_location = maildir:/usr/local/virtual/%d/%u
mail_uid = 102
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = _postfix
mode = 0660
user = _postfix
  }
  unix_listener auth-userdb {
mode = 0660
user = _vmail
  }
}
service imap-login {
  process_limit = 512
}
service stats {
  fifo_listener stats-mail {
mode = 0666
  }
  fifo_listener stats-user {
mode = 0666
  }
  unix_listener stats-writer {
mode = 0666
  }
}
ssl_cert = 

Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread Stephan Bosch




Op 30/01/2019 om 00:06 schreef James Brown via dovecot:



On 30 Jan 2019, at 9:24 am, Stephan Bosch  wrote:



Op 29/01/2019 om 01:51 schreef James Brown via dovecot:

I’ve set up a new mail server. Auth-worker is giving me this error all the time:

auth-worker(11160): Info: passwd(sa...@bordo.com.au 
,10.0.0.54,): unknown user  - 
trying the next userdb


That is not an error. As the "Info: " prefix indicates, this is an innocuous 
informational message.

Regards,

Stephan.


Thanks Stephan.

I know it’s not a major thing, it’s just that it is every third line of my log.

Ie I get the auth-worker unknown user, then successful imap-login, then the 
imap logout.

So I’m just trying to figure out what is causing the auth-worker lookup failure 
so I can fix it. I did not have this in my old mail server, just the new one 
I’ve setup.

Is it a database issue or a Dovecot config issue? If so where?


Ýou can enable auth_verbose and auth_debug to get an idea what Dovecot 
is doing. You should post your `dovecot -n` to get more help on this issue.


Regards,

Stephan.



Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread James Brown via dovecot



> On 30 Jan 2019, at 9:24 am, Stephan Bosch  wrote:
> 
> 
> 
> Op 29/01/2019 om 01:51 schreef James Brown via dovecot:
>> I’ve set up a new mail server. Auth-worker is giving me this error all the 
>> time:
>> 
>> auth-worker(11160): Info: passwd(sa...@bordo.com.au 
>> ,10.0.0.54,): unknown user  - 
>> trying the next userdb
>> 
> 
> That is not an error. As the "Info: " prefix indicates, this is an innocuous 
> informational message.
> 
> Regards,
> 
> Stephan.
> 
Thanks Stephan.

I know it’s not a major thing, it’s just that it is every third line of my log. 

Ie I get the auth-worker unknown user, then successful imap-login, then the 
imap logout.

So I’m just trying to figure out what is causing the auth-worker lookup failure 
so I can fix it. I did not have this in my old mail server, just the new one 
I’ve setup.

Is it a database issue or a Dovecot config issue? If so where?

Thanks,

James.




Re: "unknown user - trying the next userdb" Info in log

2019-01-29 Thread Stephan Bosch




Op 29/01/2019 om 01:51 schreef James Brown via dovecot:
I’ve set up a new mail server. Auth-worker is giving me this error all 
the time:


auth-worker(11160): Info: passwd(sa...@bordo.com.au 
,10.0.0.54,): unknown 
user  - trying the next userdb




That is not an error. As the "Info: " prefix indicates, this is an 
innocuous informational message.


Regards,

Stephan.


Next line is from imap-login with successful login.

Using MySQL as user database.

Auth-sql.comf.ext is:

passdb {
  driver = sql

  # Path for SQL configuration file, see 
example-config/dovecot-sql.conf.ext

  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}

# "prefetch" user database means that the passdb already provided the
# needed information and there's no need to do a separate userdb lookup.
# 
userdb {
  driver = prefetch
}

userdb {
  driver = sql
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}

# If you don't have any user-specific settings, you can avoid the 
user_query

# by using userdb static instead of userdb sql, for example:
# 
#userdb {
  #driver = static
  #args = uid=vmail gid=vmail home=/var/vmail/%u
#}

Any ideas why it is gives me this error before logging in? Where 
should I look?


Thanks,

James.





"unknown user - trying the next userdb" Info in log

2019-01-28 Thread James Brown via dovecot
I’ve set up a new mail server. Auth-worker is giving me this error all the time:

auth-worker(11160): Info: passwd(sa...@bordo.com.au 
,10.0.0.54,): unknown user  - 
trying the next userdb

Next line is from imap-login with successful login.

Using MySQL as user database.

Auth-sql.comf.ext is:

passdb {
  driver = sql

  # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}

# "prefetch" user database means that the passdb already provided the
# needed information and there's no need to do a separate userdb lookup.
# 
userdb {
  driver = prefetch
}

userdb {
  driver = sql
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}

# If you don't have any user-specific settings, you can avoid the user_query
# by using userdb static instead of userdb sql, for example:
# 
#userdb {
  #driver = static
  #args = uid=vmail gid=vmail home=/var/vmail/%u
#}

Any ideas why it is gives me this error before logging in? Where should I look?

Thanks,

James.