Re: dovecot disk space settings

2019-10-22 Thread Joseph Tam via dovecot

On Tue, 22 Oct 2019, Plutocrat wrote:


I recently wrote a script to check disk space every week and email me
an alert if there was less than 5G.


Every week?  Unless you're using a telephone modem, an out of control mail
loop or being the victim of a joe-job can consume 5Gb of space in no time.
I recommend a more frequent interval if you're in the single digit Gb's.


MAILSPACE=$( df -h | grep "/dev/sdd" | awk '{ print $4 }' | sed 's/G//g' )
if [ "$MAILSPACE" -lt "5" ] ; then


If free space dips below 1Gb, (e.g. 900M), this will either fail
or do the opposite of what you want.  Maybe

MAILSPACE=$( df -k | awk '/\/dev\/sdd/{print int($4/(1024*1024)}' )

Joseph Tam 


Re: Using attachment_dir with plugin zlib corrupt mails

2019-10-22 Thread telsch via dovecot



at least for me it didn't fix. still see in logs:
Error: lzma.read(/var/spool/mail/telsch/storage/m.11800): corrupted
data at 110015

before i upgrade from 2.3.4.1 to 2.3.8 + your patch i noticed i can
access the mails with alpine and roundcube but not with thunderbird.

On 10.10.19 11:38, Timo Sirainen via dovecot wrote:

Can you test if
https://github.com/dovecot/core/commit/5068b11e594ad7cc1f7cedf2bd9280520e0e534d.patch
 fixes
it for you?


On 10 Oct 2019, at 11.34, MAREN ZUBIZARRETA via dovecot
mailto:dovecot@dovecot.org>> wrote:

Hello:
  I have found the same problem reported above by Patrick Cernko
affecting our system and corrupting our messages. Even worse, Outlook
2016 will no synchronize and the clients cannot see any message, even
if there is only one corrupted mail per mailbox.
  I cannot figure out a feasible workaround for our system, and I can
see that in new version 2.38 the bug is not fixed.
Will this issue be treated soon?
Thanks a lot
 Maren Zubizarreta


  WARNING: using attachment_dir with plugin zlib can corrupt mails

*Patrick Cernko*pcernko at mpi-klsb.mpg.de

/Fri Jul 19 17:52:37 EEST 2019/

  * Previous message: index worker 2.3.7 undefined symbol errors

  * Next message: Address family not supported by protocol

  * *Messages sorted by:*[ date ]
[
thread ]
[
subject ]
[
author ]



Hello list, hello Dovecot developers,
this week, I discovered a serious bug in Dovecot, that lead to several
broken mails on our servers. The bug corrupts the first few characters
of the mail header during saving. On our setup, it was almost always
only the very first line of text, that was corrupted.
Depending on the IMAP client (they seem to request different header
fields, ... during mail access), the bug causes the imap process to hang
up the TCP connection and log errors like this:
>/imap(USERNAME)<4767>: Error: Corrupted record in
index cache file
/IMAP/mail/mailboxes/USERNAME/mdbox/mailboxes/Trash/dbox-Mails/dovecot.index.cache:
UID 489113: Broken fields in mailbox Trash:
read(attachments-connector(zlib(/IMAP/mail/mailboxes/USERNAME/mdbox/storage/m.813))):
FETCH BODY[HEADER.FIELDS (RETURN-PATH SUBJECT)] got too little data: 2
vs 122/
In our case that finally grabbed my attention, the client was the users
iphone that did not display any new messages but his Thunderbird did.
The bug seems to be triggered by a bad "interaction" of attachment_dir
option and zlib plugin. If you use both, you most likely are affected,
too, except you only use zlib plugin for reading previously compressed
stored mails. That's also the workaround we use now: zlib plugin only
enabled in mail_plugins but no plugin/zlib_save set.
The bug occurs on very specific mails. Due to privacy reasons I could
not provide sample mails here. Storing such mails seems to trigger the
bug reproducible.
I attached a very minimal doveconf -n config, that can be used to
trigger the bug. If one of the developers is interested, I can try to
generate an "anonymized" version of such a specific mail that still
causes the issue. I discovered the bug on our productive systems,
running latest Dovecot 2.2 release, but the latest 2.3 I used during
debugging is affected, too.
During debugging, I also found one hint, that might help find the bug:
If you store a problematic mail with zlib_save=gz (or zlib_save=bz2) and
then disable the zlib plugin in mail_plugins, you can call
doveadm fetch -u test hdr all | grep -v ^hdr: | gzip --decompress
on test's mailbox with only that one broken mail.
This will display the beginning of the rfc822 mail text until gzip
terminates with "gzip: stdin: unexpected end of file", approximately
after twice the length of the mail HEADER. This might indicate, that
dovecot stores the uncompressed size of the header in it's data
structures although the mail is stored compressed.
I also found a very efficient way to find all affected mails in our setup:
doveadm -f flow fetch -A 'user guid mailbox uid seq flags hdr' all | \
   grep -a "^[^ ]+ user=" | \
   grep -avF ' hdr=Return-path: ' | \
   grep -av '.* hdr=[[:print:][:space:]]*$'
(runtime for ~6M mails on our servers was 20-30min)
This can be even more optimized if you have a powerful storage system
with GNU parallel:
>/doveadm user '*' | parallel "doveadm -f flow fetch -u '{}' 'user guid
mailbo

dovecot.conf from problem installation

2019-10-22 Thread Steve Matzura via dovecot

*** dovecot.conf ***


## Dovecot configuration file

# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration

# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.

# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, 
put the

# value inside quotes, eg.: key = "# char and trailing whitespace "

# Most (but not all) settings can be overridden by different protocols 
and/or
# source/destination IPs by placing the settings inside sections, for 
example:

# protocol imap { }, local 127.0.0.1 { }, remote 10.0.0.0/8 { }

# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. 
namespace {})

# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on 
configure

# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var

# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol

# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
#listen = *, ::

# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/

# Name of this instance. In multi-instance setup doveadm and other commands
# can use -i  to select which instance is used (an 
alternative

# to -c ). The instance name is also added to Dovecot processes
# in ps output.
#instance_name = dovecot

# Greeting message for clients.
#login_greeting = Dovecot ready.

# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =

# Space separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets =

# With proxy_maybe=yes if proxy destination matches any of these IPs, 
don't do
# proxying. This isn't necessary normally, but may be useful if the 
destination

# IP is e.g. a load balancer's IP.
#auth_proxy_self =

# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no

# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes

# If non-zero, run mail commands via this many connections to doveadm 
server,

# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server

# Space separated list of environment variables that are preserved on 
Dovecot

# startup and passed down to all of its child processes. You can also give
# key=value pairs to always set specific settings.
#import_environment = TZ

##
## Dictionary server settings
##

# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::".

dict {
  #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 
00-prefixes

# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf

# A config file can also tried to be included without giving an error if
# it's not found:
!include_try local.conf
log_path = /var/log/dovecot.log

passdb {
   driver = static
   args = noauthenticate temp_user=%u user=%Ln
}

passdb {
   driver  = pam
}

passdb {
   driver = static
   args = noautenticate user=%{passdb:temp_user}
   skip = unauthenticated
}

*** End ***


If I try to start the daemon, or even attempt 'dovecot -n output', I get:


# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf 
line 107: Expecting '{'



Line 107 is where the first passdb block begins.


If I remove the 

Re: dovecot disk space settings

2019-10-22 Thread Benny Pedersen via dovecot

marcel bendler via dovecot skrev den 2019-10-22 10:52:

I don't want to restrict each mailbox size. It's just to prevent 
running

out space completely.


dovecot quotas policy server can limit out of space problems, the trick 
is to not allow more then storages can hold, if this test is done in 
postfix its only for postfix queue dir, not neseserly same partion that 
dovecot use to storage, but postfix can call dovecot policy service to 
check its not out of space, the dovecot policy service can still be 
optimised for this propose


Re: dovecot disk space settings

2019-10-22 Thread Plutocrat via dovecot
On 22/10/2019 6:38 PM, Marc Roos via dovecot wrote:
> Ok, what about placing a dummy file of 5GB or so on the partition, that 
> you can remove when necessary?

I recently wrote a script to check disk space every week and email me an alert 
if there was less than 5G. Would that be an approach for you? Enclosing below 
as an example. You'd need to adapt to your own environment. 

#!/bin/bash

MAILSPACE=$( df -h | grep "/dev/sdd" | awk '{ print $4 }' | sed 's/G//g' )

if [ "$MAILSPACE" -lt "5" ] ; then
MESSAGE="Alert, only $MAILSPACE Gb of space left on Mail Drive"
df -h > /tmp/diskalert.txt
mutt -s "$MESSAGE" m...@example.com < /tmp/diskalert.txt 
else
# Uncomment to debug 
MESSAGE="Safe for now: $MAILSPACE Gb of space left on Mail Drive"
#echo $MESSAGE
fi




Re: dovecot disk space settings

2019-10-22 Thread Giles Coochey via dovecot




-Original Message-
Subject: Re: dovecot disk space settings



I don't want to restrict each mailbox size. It's just to prevent

running out space completely.

Why? (If I may ask)



To provide mailboxes with unlimited space. And to make it easier to
administrate.
My question is about an emergency option if someone has forgotten to
migrate to new hardware. It's possible but a bit harder if the partition
is out of space and there is no free byte left.

Best,

Marcel



On 22/10/2019 11:38, Marc Roos via dovecot wrote:
  


Ok, what about placing a dummy file of 5GB or so on the partition, that
you can remove when necessary?

Or just monitor your disk space availability with a monitoring program 
(Nagios, CheckMK, whatever) and manage your disk space accordingly, you 
don't want to stop receiving email for your users, nor do you want to 
run out of disk space, and unless you have elastic storage in the cloud 
or something, you actually need to make decisions on managing available 
space (i.e. impose user limits, archive off old emails, buy new storage) 
and those decisions are not usually something that can be done 
automatically, unless you're using managed storage in the cloud.


--
Giles Coochey



RE: dovecot disk space settings

2019-10-22 Thread Marc Roos via dovecot
 

Ok, what about placing a dummy file of 5GB or so on the partition, that 
you can remove when necessary?



-Original Message-
Subject: Re: dovecot disk space settings


>> I don't want to restrict each mailbox size. It's just to prevent
> running out space completely.
> 
> Why? (If I may ask)
> 
>

To provide mailboxes with unlimited space. And to make it easier to 
administrate.
My question is about an emergency option if someone has forgotten to 
migrate to new hardware. It's possible but a bit harder if the partition 
is out of space and there is no free byte left.

Best,

Marcel




Re: dovecot disk space settings

2019-10-22 Thread Gerald Galster via dovecot
> 
> is there an option to leave some disk space free?
> Let's say, don't store new mails if the storage mount point has less
> than 1% free disk space.
> What's the way to go?
> 
> I don't want to restrict each mailbox size. It's just to prevent running
> out space completely.

emails are often accepted by an mta like postfix before handed over to dovecot.
You could configure a postfix policy service that checks your disk usage and
temporarily rejects new emails.

On the server you should check your filesystem: ext4 reserves 5% of storage
for root by default. If dovecot does not need root to deliver mails, you already
might have some space left.

Or you might use linux system quota. If all your mailusers are in the same group
you can set a group quota.

Another alternative would be to create a big dummy file that you can delete
if necessary. E.g. truncate -s 20g /var/mail/DELETEME   (man truncate)

Best regards
Gerald 

Re: More on problems with new install

2019-10-22 Thread Steve Matzura via dovecot

It's really pretty empty; would  you rather see some of the 10-*.conf files?


## Dovecot configuration file

# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration

# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.

# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, 
put the

# value inside quotes, eg.: key = "# char and trailing whitespace "

# Most (but not all) settings can be overridden by different protocols 
and/or
# source/destination IPs by placing the settings inside sections, for 
example:

# protocol imap { }, local 127.0.0.1 { }, remote 10.0.0.0/8 { }

# Default values are shown for each setting, it's not required to uncomment
# those. These are exceptions to this though: No sections (e.g. 
namespace {})

# or plugin settings are added by default, they're listed only as examples.
# Paths are also just examples with the real defaults being based on 
configure

# options. The paths listed here are for configure --prefix=/usr
# --sysconfdir=/etc --localstatedir=/var

# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol

# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
#listen = *, ::

# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/

# Name of this instance. In multi-instance setup doveadm and other commands
# can use -i  to select which instance is used (an 
alternative

# to -c ). The instance name is also added to Dovecot processes
# in ps output.
#instance_name = dovecot

# Greeting message for clients.
#login_greeting = Dovecot ready.

# Space separated list of trusted network ranges. Connections from these
# IPs are allowed to override their IP addresses and ports (for logging and
# for authentication checks). disable_plaintext_auth is also ignored for
# these networks. Typically you'd specify your IMAP proxy servers here.
#login_trusted_networks =

# Space separated list of login access check sockets (e.g. tcpwrap)
#login_access_sockets =

# With proxy_maybe=yes if proxy destination matches any of these IPs, 
don't do
# proxying. This isn't necessary normally, but may be useful if the 
destination

# IP is e.g. a load balancer's IP.
#auth_proxy_self =

# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no

# Should all processes be killed when Dovecot master process shuts down.
# Setting this to "no" means that Dovecot can be upgraded without
# forcing existing client connections to close (although that could also be
# a problem if the upgrade is e.g. because of a security fix).
#shutdown_clients = yes

# If non-zero, run mail commands via this many connections to doveadm 
server,

# instead of running them directly in the same process.
#doveadm_worker_count = 0
# UNIX socket or host:port used for connecting to doveadm server
#doveadm_socket_path = doveadm-server

# Space separated list of environment variables that are preserved on 
Dovecot

# startup and passed down to all of its child processes. You can also give
# key=value pairs to always set specific settings.
#import_environment = TZ

##
## Dictionary server settings
##

# Dictionary can be used to store key=value lists. This is used by several
# plugins. The dictionary can be accessed either directly or though a
# dictionary server. The following dict block maps dictionary names to URIs
# when the server is used. These can then be referenced using URIs in format
# "proxy::".

dict {
  #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 
00-prefixes

# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf

# A config file can also tried to be included without giving an error if
# it's not found:
!include_try local.conf
log_path = /var/log/dovecot.log




Re: More on problems with new install

2019-10-22 Thread Aki Tuomi via dovecot
Yes, well, can you paste your entire dovecot.conf file then? Remember to
redact passwords.

Aki

On 22.10.2019 12.01, Steve Matzura via dovecot wrote:
> It was the three passdb blocks you sent me.
>
>
> On 10/22/2019 4:43 AM, Aki Tuomi via dovecot wrote:
>> Can you show what you ended up pasting?
>>
>> Aki
>>
>> On 22.10.2019 11.34, Steve Matzura via dovecot wrote:
>>> I pasted that block at the end of dovecot.conf, restarted, and got the
>>> following in syslog:
>>>
>>> Oct 22 08:24:32 tgvprod dovecot[7290]: doveconf: Fatal: Error in
>>> configuration file /etc/dovecot/dovecot.conf line 106: Expecting '{'
>>> Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Main process
>>> exited, code=exited, status=89/n/a
>>> Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Failed with
>>> result 'exit-code'.
>>>
>>> On 10/22/2019 4:00 AM, Aki Tuomi via dovecot wrote:
>>> block quote
>>> On 22.10.2019 10.33, Steve Matzura via dovecot wrote:
>>> block quote
>>> Sorry for having lost the original chain of this problem. It's been a
>>> very long day.
>>>
>>> block quote end
>>> 
>>>
>>> block quote
>>> There is no user 'rock', it's just a Postfix mailbox.
>>> block quote end
>>> You problem stems from dovecot doing user lookup using
>>> 'r...@theglobalvoice.info'
>>> which is why it breaks.
>>>
>>> So, to fix this, and retain what you have configured you need to do bit
>>> silly config (this is hopefully getting fixed in 2.3 series at some
>>> point).
>>>
>>> passdb {
>>>  driver = static
>>>  args = noauthenticate temp_user=%u user=%Ln
>>> }
>>>
>>> passdb {
>>>  driver  = pam
>>> }
>>>
>>> passdb {
>>>  driver = static
>>>  args = noautenticate user=%{passdb:temp_user}
>>>  skip = unauthenticated
>>> }
>>>
>>> Aki
>>> block quote end
>>>


Re: More on problems with new install

2019-10-22 Thread Steve Matzura via dovecot

It was the three passdb blocks you sent me.


On 10/22/2019 4:43 AM, Aki Tuomi via dovecot wrote:

Can you show what you ended up pasting?

Aki

On 22.10.2019 11.34, Steve Matzura via dovecot wrote:

I pasted that block at the end of dovecot.conf, restarted, and got the
following in syslog:

Oct 22 08:24:32 tgvprod dovecot[7290]: doveconf: Fatal: Error in
configuration file /etc/dovecot/dovecot.conf line 106: Expecting '{'
Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Main process
exited, code=exited, status=89/n/a
Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Failed with
result 'exit-code'.

On 10/22/2019 4:00 AM, Aki Tuomi via dovecot wrote:
block quote
On 22.10.2019 10.33, Steve Matzura via dovecot wrote:
block quote
Sorry for having lost the original chain of this problem. It's been a
very long day.

block quote end


block quote
There is no user 'rock', it's just a Postfix mailbox.
block quote end
You problem stems from dovecot doing user lookup using
'r...@theglobalvoice.info'
which is why it breaks.

So, to fix this, and retain what you have configured you need to do bit
silly config (this is hopefully getting fixed in 2.3 series at some
point).

passdb {
     driver = static
     args = noauthenticate temp_user=%u user=%Ln
}

passdb {
     driver  = pam
}

passdb {
     driver = static
     args = noautenticate user=%{passdb:temp_user}
     skip = unauthenticated
}

Aki
block quote end



RE: dovecot disk space settings

2019-10-22 Thread Marc Roos via dovecot



> I don't want to restrict each mailbox size. It's just to prevent 
running out space completely.

Why? (If I may ask)







dovecot disk space settings

2019-10-22 Thread marcel bendler via dovecot
Hi,

is there an option to leave some disk space free?
Let's say, don't store new mails if the storage mount point has less
than 1% free disk space.
What's the way to go?

I don't want to restrict each mailbox size. It's just to prevent running
out space completely.

Thanks!

Best regards,

Marcel




Re: More on problems with new install

2019-10-22 Thread Aki Tuomi via dovecot
Can you show what you ended up pasting?

Aki

On 22.10.2019 11.34, Steve Matzura via dovecot wrote:
> I pasted that block at the end of dovecot.conf, restarted, and got the
> following in syslog:
>
> Oct 22 08:24:32 tgvprod dovecot[7290]: doveconf: Fatal: Error in
> configuration file /etc/dovecot/dovecot.conf line 106: Expecting '{'
> Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Main process
> exited, code=exited, status=89/n/a
> Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Failed with
> result 'exit-code'.
>
> On 10/22/2019 4:00 AM, Aki Tuomi via dovecot wrote:
> block quote
> On 22.10.2019 10.33, Steve Matzura via dovecot wrote:
> block quote
> Sorry for having lost the original chain of this problem. It's been a
> very long day.
>
> block quote end
> 
>
> block quote
> There is no user 'rock', it's just a Postfix mailbox.
> block quote end
> You problem stems from dovecot doing user lookup using
> 'r...@theglobalvoice.info'
> which is why it breaks.
>
> So, to fix this, and retain what you have configured you need to do bit
> silly config (this is hopefully getting fixed in 2.3 series at some
> point).
>
> passdb {
>     driver = static
>     args = noauthenticate temp_user=%u user=%Ln
> }
>
> passdb {
>     driver  = pam
> }
>
> passdb {
>     driver = static
>     args = noautenticate user=%{passdb:temp_user}
>     skip = unauthenticated
> }
>
> Aki
> block quote end
>


Re: More on problems with new install

2019-10-22 Thread Steve Matzura via dovecot
I pasted that block at the end of dovecot.conf, restarted, and got the 
following in syslog:


Oct 22 08:24:32 tgvprod dovecot[7290]: doveconf: Fatal: Error in 
configuration file /etc/dovecot/dovecot.conf line 106: Expecting '{'
Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Main process 
exited, code=exited, status=89/n/a
Oct 22 08:24:32 tgvprod systemd[1]: dovecot.service: Failed with result 
'exit-code'.


On 10/22/2019 4:00 AM, Aki Tuomi via dovecot wrote:
block quote
On 22.10.2019 10.33, Steve Matzura via dovecot wrote:
block quote
Sorry for having lost the original chain of this problem. It's been a
very long day.

block quote end


block quote
There is no user 'rock', it's just a Postfix mailbox.
block quote end
You problem stems from dovecot doing user lookup using
'r...@theglobalvoice.info'
which is why it breaks.

So, to fix this, and retain what you have configured you need to do bit
silly config (this is hopefully getting fixed in 2.3 series at some point).

passdb {
    driver = static
    args = noauthenticate temp_user=%u user=%Ln
}

passdb {
    driver  = pam
}

passdb {
    driver = static
    args = noautenticate user=%{passdb:temp_user}
    skip = unauthenticated
}

Aki
block quote end



Re: More on problems with new install

2019-10-22 Thread Aki Tuomi via dovecot


On 22.10.2019 10.33, Steve Matzura via dovecot wrote:
> Sorry for having lost the original chain of this problem. It's been a
> very long day.
>
>




> There is no user 'rock', it's just a Postfix mailbox.
>

You problem stems from dovecot doing user lookup using
'r...@theglobalvoice.info' which is why it breaks.

So, to fix this, and retain what you have configured you need to do bit
silly config (this is hopefully getting fixed in 2.3 series at some point).


passdb {
   driver = static
   args = noauthenticate temp_user=%u user=%Ln
}

passdb {
   driver  = pam
}

passdb {
   driver = static
   args = noautenticate user=%{passdb:temp_user}
   skip = unauthenticated
}


Aki


More on problems with new install

2019-10-22 Thread Steve Matzura via dovecot
Sorry for having lost the original chain of this problem. It's been a 
very long day.



New output from 'dovecot -n output', including the contents of 
dovecot.conf, conf.d/10-master.conf, conf.d/10-mail.conf and 
conf.d/10-ssl.conf:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-64-generic x86_64 Ubuntu 18.04.3 LTS ext4
auth_debug = yes
auth_debug_passwords = yes
first_valid_gid = 109
first_valid_uid = 105
last_valid_gid = 109
last_valid_uid = 105
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = postfix
mail_location = maildir:/var/mail/vmail/%d/%n
mail_uid = postfix
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 {
  driver = pam
}
protocols = " imap lmtp"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
  process_min_avail = 0
  service_count = 1
}
service lmtp {
  unix_listener lmtp {
    mode = 0666
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
service pop3 {
  process_limit = 1024
}
ssl = required
ssl_cert = The two key files are where it says they are, although the hidden one 
isn't shown, it's there and properly owned and permissioned.



Here's the only thing from tailing the log:


Oct 22 07:24:50 master: Info: Dovecot v2.2.33.2 (d6601f4ec) starting up 
for imap, lmtp (core dumps disabled)



This may help - from a message delivery failure email:


*** Begin ***


Message Delivery Failure
  This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed permanently:

   *
r...@theglobalvoice.info


Reason: There was an error while attempting to deliver your message with 
[Subject: "Testing again"] to

r...@theglobalvoice.info.
MTA p3plsmtpa11-09.prod.phx3.secureserver.net received this response 
from the destination host IP - 95.142.174.193 -  550 , 550 5.1.1

:
Recipient address rejected: User unknown in local recipient table
.

Reporting-MTA: dns; p3plsmtpa11-09.prod.phx3.secureserver.net 
[68.178.252.101]

Received-From-MTA: dns; [192.168.1.140] [108.41.57.11]
Arrival-Date: Mon, 21 Oct 2019 23:39:25 -0700


Final-recipient: rfc822;
r...@theglobalvoice.info

Diagnostic-Code: smtp; 550 5.1.1
:
Recipient address rejected: User unknown in local recipient table

Last-attempt-Date: Tue, 22 Oct 2019 00:23:38 -0700


Received: from [192.168.1.140] ([108.41.57.11])
    by :SMTPAUTH: with ESMTPSA
    id MnpFiaSdxUnHgMnpFiYE6m; Mon, 21 Oct 2019 23:39:25 -0700
To:
r...@theglobalvoice.info

From: Steve Matzura


Subject: Testing again
Message-ID:
<61b4f0c2-89fa-c4de-8288-871a8708f...@noisynotes.com>

Date: Tue, 22 Oct 2019 02:39:26 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-CMAE-Envelope: 
MS4wfC8H5kkZhXB1zicGDqvcQlC1Tl3lMTOcElvh0Efz70YGRgQalgb4N6/9XVLjnqOVd5XtxwgTWuvuCEhwp/JZ2oHrdLkl4d7unSyOefbSkgcd/M5tlQn5

 
m+FMjUC5HJopO89WJXHQNp0ruK6VmVwHwxMAn0YDVu4FQQqVIUkN6KVyOfdC/TYD6t6vxOqv2OUxKQ==


Subject: Testing again
From: Steve Matzura 
Date: 10/22/2019, 2:39 AM
To: r...@theglobalvoice.info
Let's see   what happens now.

*** End ***


There is no user 'rock', it's just a Postfix mailbox.