Re: dovecot update from 2.1.16 to 2.2.36.4 but I have a trouble.

2019-12-12 Thread Aki Tuomi


 
 
  
   
  
  
   
On 13/12/2019 07:41 
ir...@peach.ocn.ne.jp wrote:
   
   

   
   

   
   
Hi,I have a troble and can not resolve it. Please help me.
   
   

   
   
I updated dovecot from 2.1.16 to 2.2.36.4.
   
   
As a result, I had a client who could not access via imap.
   
   
The client showed his logs (- folder not exists:INBOX )
   
   
I did not change dovecot config files.
   
   

   
   
So I searched a difference between 2.1.16 and 2.2.36.4,
   
   
I discovered . Please refer below results.
   
   

   
   
[2.1.16]
   
   
a03 list "" "*"
   
   
* LIST (\HasChildren) "." "INBOX"
   
   
* LIST (\HasNoChildren) "." "INBOX.Drafts"
   
   
* LIST (\HasNoChildren) "." "INBOX.Sent"
   
   
* LIST (\HasNoChildren) "." "INBOX.Spam"
   
   
* LIST (\HasNoChildren) "." "INBOX.Trash"
   
   

   
   
[2.2.36.4]
   
   
a03 list "" "*"
   
   
* LIST (\HasChildren) "." INBOX
   
   
* LIST (\HasNoChildren) "." INBOX.Drafts
   
   
* LIST (\HasNoChildren) "." INBOX.Sent
   
   
* LIST (\HasNoChildren) "." INBOX.Spam
   
   
* LIST (\HasNoChildren) "." INBOX.Trash
   
   

   
   
For example, I noticed INBOX and "INBOX".
   
   
2.2.36.4 dovecot is no [""].
   
   

   
   
What should I do?
   
  
  
   
  
  
   This appears to be a client bug. Maybe the user should attempt to upgrade the client?
  
  
   ---
Aki Tuomi
   
 



dovecot update from 2.1.16 to 2.2.36.4 but I have a trouble.

2019-12-12 Thread iriya
Hi,I have a troble and can not resolve it. Please help me.

I updated dovecot from 2.1.16 to 2.2.36.4.
As a result, I had a client who could not access via imap.
The client showed his logs (- folder not exists:INBOX )
I did not change dovecot config files.

So I searched a difference between 2.1.16 and 2.2.36.4,
I discovered . Please refer below results.

[2.1.16]
a03 list "" "*"
* LIST (\HasChildren) "." "INBOX"
* LIST (\HasNoChildren) "." "INBOX.Drafts"
* LIST (\HasNoChildren) "." "INBOX.Sent"
* LIST (\HasNoChildren) "." "INBOX.Spam"
* LIST (\HasNoChildren) "." "INBOX.Trash"

[2.2.36.4]
a03 list "" "*"
* LIST (\HasChildren) "." INBOX
* LIST (\HasNoChildren) "." INBOX.Drafts
* LIST (\HasNoChildren) "." INBOX.Sent
* LIST (\HasNoChildren) "." INBOX.Spam
* LIST (\HasNoChildren) "." INBOX.Trash

For example, I noticed INBOX and "INBOX".
2.2.36.4 dovecot is no [""].

What should I do?


Re: v2.2.36 to v2.3.8 maildirlock bug

2019-12-12 Thread Martynas Bendorius
I'm attaching you an example :) #!/bin/sh
#VERSION=0.0.2
# This script is written by Martynas Bendorius and DirectAdmin
# It is used to gzip all emails in Maildir directory
# Official DirectAdmin webpage: http://www.directadmin.com
# Usage:
# ./dovecot_compress.sh 
MYUID=`/usr/bin/id -u`
if [ "${MYUID}" != 0 ]; then
echo "You require Root Access to run this script";
exit 0;
fi

if [ $# -lt 1 ]; then
echo "Usage:";
echo "$0 /home/user/imap/domains/domain.com/email/Maildir";
echo "you gave #$#: $0 $1";
exit 0;
fi

MAILDIR_PATH="${1}"
if ! echo "${MAILDIR_PATH}" | grep -m1 -q '/Maildir$'; then
echo "Path does not end with /Maildir: ${MAILDIR_PATH}. Exiting.."
exit 1
fi

if [ ! -d "${MAILDIR_PATH}/cur" ]; then
echo "${MAILDIR_PATH}/cur does not exist, exiting..."
exit 1
fi

cd "${MAILDIR_PATH}"
if [ $? -ne 0 ]; then
echo "Failed to cd to ${MAILDIR_PATH}. Exiting..."
exit 1
fi

echo "Checking for directories in ${MAILDIR_PATH}..."

# https://wiki.dovecot.org/Plugins/Zlib
find . -maxdepth 1 -mindepth 1 -type d -print0 | while read -d $'\0' directory; 
do {
if [ "${directory}" = "tmp" ]; then
continue
fi
cd "${MAILDIR_PATH}/${directory}"
if [ $? -ne 0 ]; then
echo "Failed to cd to ${MAILDIR_PATH}/${directory}. Skipping..."
continue
fi
if [ ! -d "${MAILDIR_PATH}/${directory}/tmp" ]; then
mkdir -p ${MAILDIR_PATH}/${directory}/tmp
chown --reference=${MAILDIR_PATH}/${directory} 
${MAILDIR_PATH}/${directory}/tmp
fi
find ./tmp/ -maxdepth 1 -group mail -type f -delete
# ignore all files with "*,S=*" (dovecot needs to know the size of the 
email, when it's gzipped) and "*,*:2,*,*Z*" (dovecot recommends adding Z to the 
end of gzipped files just to know which ones are gzipped) in their names, also 
skip files that are also compressed (find skips all other 'exec' after first 
failure)
# dovecot: Note that if the filename doesn't contain the ',S=' 
before compression, adding it afterwards changes the base filename and thus the 
message UID. The safest thing to do is simply to not compress such files.
find . -type f -name "*,S=*" ! -name "*,*:2,*,*Z*" ! -exec gzip -t {} 
2>/dev/null \; -exec sh -c 'gzip --best --stdout $1 > ./tmp/$1' x {} \; -exec 
sh -c 'chown --reference=$1 ./tmp/$1' x {} \; -exec sh -c 'chmod --reference=$1 
./tmp/$1' x {} \; -exec sh -c 'touch --reference=$1 ./tmp/$1' x {} \;
#if there are any compressed files, maildirlock the directory
if ! find ./tmp -maxdepth 0 -type d -empty | grep -m1 -q '\.'; then
echo "Size before compression: `du -sh 
\"${MAILDIR_PATH}/${directory}\" | awk '{print $1}'`"
MAILDIRLOCK=/usr/libexec/dovecot/maildirlock
if [ ! -x ${MAILDIRLOCK} ]; then
MAILDIRLOCK=/usr/lib/dovecot/maildirlock
fi
if [ ! -x ${MAILDIRLOCK} ]; then
echo "Unable to find ${MAILDIRLOCK}, exiting..."
find ./tmp/ -maxdepth 1 -group mail -type f -delete
exit 2
fi
# If we're able to create the maildirlock, then continue with 
moving compressed emails back
#MAILDIRLOCK had a bug, which is patched in CB 2.0
if PIDOFMAILDIRLOCK=`${MAILDIRLOCK} 
"${MAILDIR_PATH}/${directory}" 10`; then
# Move email only if it exists in destination folder, 
otherwise it's been removed at the time we converted it
find ${MAILDIR_PATH}/${directory}/tmp -maxdepth 1 -type 
f -exec sh -c "if [ -s \"\${1}\" ]; then mv -f \${1} 
${MAILDIR_PATH}/${directory}/; fi" x {} \;
kill ${PIDOFMAILDIRLOCK}
echo "Compressed ${MAILDIR_PATH}/${directory}..."
# Remove dovecot index files to have no issues with 
mails
find "${MAILDIR_PATH}" -type f -name dovecot.index\* 
-delete
echo "Size after compression: `du -sh 
\"${MAILDIR_PATH}/${directory}\" | awk '{print $1}'`"
else
echo "Failed to lock: ${MAILDIR_PATH}/${directory}" >&2
find ./tmp/ -maxdepth 1 -group mail -type f -delete
fi
fi
};
done
exit 0

--
Best regards,
Martynas Bendorius


> On 2019-12-08, at 15:21, @lbutlr via dovecot  wrote:
> 
> On 08 Dec 2019, at 05:58, @lbutlr  wrote:
>> On 06 Dec 2019, at 16:28, Martynas Bendorius  wrote:
>>> when zlib compression is enabled in dovecot, old emails remain untouched
>> 
>> I’ve been considering doing this, or at least looking into how much space 
>> we’d save (answer so far, less than you might think), but I am hesitant to 
>> “alter” the user’s mail stores without a bit more guidance.
>> 
>> 

Re: Dovecot 2.3 repo for CentOS 8.

2019-12-12 Thread Remo Mattei
Agree

> Il giorno 12 dic 2019, alle ore 10:47, Alexander Dalloz  
> ha scritto:
> 
> Am 12.12.2019 um 11:31 schrieb Reio Remma:
>> On 09/12/2019 17:25, Aki Tuomi via dovecot wrote:
> On 09/12/2019 17:20 Reio Remma via dovecot  wrote:
>> 
>> [ ... ]
>> 
>> I tried rebuilding the RPM for CentOS 8 but I see it's missing some notable 
>> required packages like tcp wrappers and quota-devel. Managed to rebuild by 
>> switching these off in the spec file (--without-libwrap), but that's 
>> probably not a good idea. :)
>> Reio
> 
> TCP wrappers got dropped for RHEL 8 by purpose, following that step of fedora.
> 
> https://fedoraproject.org//wiki/Changes/Deprecate_TCP_wrappers
> 
> There is no real need nowadays and from my experience not many admins make 
> use of it.
> 
> Alexander



Re: Dovecot 2.3 repo for CentOS 8.

2019-12-12 Thread Alexander Dalloz

Am 12.12.2019 um 11:31 schrieb Reio Remma:

On 09/12/2019 17:25, Aki Tuomi via dovecot wrote:

On 09/12/2019 17:20 Reio Remma via dovecot  wrote:


[ ... ]

I tried rebuilding the RPM for CentOS 8 but I see it's missing some 
notable required packages like tcp wrappers and quota-devel. Managed to 
rebuild by switching these off in the spec file (--without-libwrap), but 
that's probably not a good idea. :)


Reio


TCP wrappers got dropped for RHEL 8 by purpose, following that step of 
fedora.


https://fedoraproject.org//wiki/Changes/Deprecate_TCP_wrappers

There is no real need nowadays and from my experience not many admins 
make use of it.


Alexander


Re[4]: Lightweight LMTP daemon to avoid overkill MTA

2019-12-12 Thread William Edwards


I ended up 'hacking' LMTP support into the external spam filter. Someone else 
already contributed 'real' patches to implement LMTP support, so once I go live 
with this mail platform it should be stable.


Met vriendelijke groeten,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl




 
- Original Message -
From: Marc Roos (m.r...@f1-outsourcing.eu)
Date: 12/11/19 19:14
To: dovecot (dovecot@dovecot.org), wedwards (wedwa...@cyberfusion.nl)
Subject: RE: Re[2]: Lightweight LMTP daemon to avoid overkill MTA

Yes I am running sendmail next to dovecot on backend servers. That works
ok. I have some problems with re-routing mail in a proxy setup.



-Original Message-
To: Marc Roos; dovecot
Subject: Re[2]: Lightweight LMTP daemon to avoid overkill MTA


Hi,

I was unclear in my question. The spam filter is only able to deliver
mail over SMTP, not over LMTP.. So I would still need some kind of
daemon that listens for SMTP and then offers incoming email to Dovecot's
LMTP socket.


Met vriendelijke groeten,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl





- Original Message -
From: Marc Roos (m.r...@f1-outsourcing.eu)
Date: 12/11/19 18:59
To: dovecot (dovecot@dovecot.org), wedwards (wedwa...@cyberfusion.nl)
Subject: RE: Lightweight LMTP daemon to avoid overkill MTA

Yes dovecot, /etc/dovecot/conf.d/20-lmtp.conf ;)

service lmtp {
chroot =
client_limit = 1
drop_priv_before_exec = no
executable = lmtp
extra_groups = $default_internal_group
group =
idle_kill = 0
inet_listener lmtp {
  address =
  haproxy = no
  port = 24
  reuse_port = no
  ssl = no
}
privileged_group =
process_limit = 0
process_min_avail = 0
protocol = lmtp
service_count = 0
type =
unix_listener lmtp {
  group =
  mode = 0666
  user =
}
user =
vsz_limit = 18446744073709551615 B
}


-Original Message-
To: dovecot@dovecot.org
Subject: Lightweight LMTP daemon to avoid overkill MTA

Hi,

My situation is as follows.

-An internet-facing spam filter relays email to destination mail server
(Dovecot) with SMTP.
- Dovecot should take email and deliver it to user's mailboxes. I guess
I'd need LMTP for this.
- An external SMTP relay is already in place. I am thinking of using
Dovecot submission to relay to the external relaying cluster.

So, both relaying and routing are done externally - the Dovecot machine
should only store mail. Of course, there should also be a mechanism that
takes care of local delivery to Dovecot, like LMTP. Usually, I would use
an MTA like Exim to take care of local delivery. I feel like a
fully-featured MTA is overkill, though, as all other roles such an MTA
would fulfill - relaying and spam filtering - are fulfilled on external
servers.

Q: Does anyone know of a lightweight LMTP daemon that can take care of
local delivery to Dovecot without the need for a full MTA?

With kind regards,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl



















RE: Re[4]: Lightweight LMTP daemon to avoid overkill MTA

2019-12-12 Thread Marc Roos


Maybe nice to share some details? 


-Original Message-
To: Marc Roos; dovecot
Subject: Re[4]: Lightweight LMTP daemon to avoid overkill MTA


I ended up 'hacking' LMTP support into the external spam filter. Someone 
else already contributed 'real' patches to implement LMTP support, so 
once I go live with this mail platform it should be stable.


Met vriendelijke groeten,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl




 
- Original Message -
From: Marc Roos (m.r...@f1-outsourcing.eu)
Date: 12/11/19 19:14
To: dovecot (dovecot@dovecot.org), wedwards (wedwa...@cyberfusion.nl)
Subject: RE: Re[2]: Lightweight LMTP daemon to avoid overkill MTA

Yes I am running sendmail next to dovecot on backend servers. That works 
ok. I have some problems with re-routing mail in a proxy setup.



-Original Message-
To: Marc Roos; dovecot
Subject: Re[2]: Lightweight LMTP daemon to avoid overkill MTA


Hi,

I was unclear in my question. The spam filter is only able to deliver 
mail over SMTP, not over LMTP.. So I would still need some kind of 
daemon that listens for SMTP and then offers incoming email to Dovecot's 
LMTP socket.


Met vriendelijke groeten,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl





- Original Message -
From: Marc Roos (m.r...@f1-outsourcing.eu)
Date: 12/11/19 18:59
To: dovecot (dovecot@dovecot.org), wedwards (wedwa...@cyberfusion.nl)
Subject: RE: Lightweight LMTP daemon to avoid overkill MTA

Yes dovecot, /etc/dovecot/conf.d/20-lmtp.conf ;)

service lmtp {
chroot =
client_limit = 1
drop_priv_before_exec = no
executable = lmtp
extra_groups = $default_internal_group
group =
idle_kill = 0
inet_listener lmtp {
  address =
  haproxy = no
  port = 24
  reuse_port = no
  ssl = no
}
privileged_group =
process_limit = 0
process_min_avail = 0
protocol = lmtp
service_count = 0
type =
unix_listener lmtp {
  group =
  mode = 0666
  user =
}
user =
vsz_limit = 18446744073709551615 B
}


-Original Message-
To: dovecot@dovecot.org
Subject: Lightweight LMTP daemon to avoid overkill MTA

Hi,

My situation is as follows.

-An internet-facing spam filter relays email to destination mail server
(Dovecot) with SMTP.
- Dovecot should take email and deliver it to user's mailboxes. I guess 
I'd need LMTP for this.
- An external SMTP relay is already in place. I am thinking of using 
Dovecot submission to relay to the external relaying cluster.

So, both relaying and routing are done externally - the Dovecot machine 
should only store mail. Of course, there should also be a mechanism that 
takes care of local delivery to Dovecot, like LMTP. Usually, I would use 
an MTA like Exim to take care of local delivery. I feel like a 
fully-featured MTA is overkill, though, as all other roles such an MTA 
would fulfill - relaying and spam filtering - are fulfilled on external 
servers.

Q: Does anyone know of a lightweight LMTP daemon that can take care of 
local delivery to Dovecot without the need for a full MTA?

With kind regards,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl





















Re: Dovecot 2.3 repo for CentOS 8.

2019-12-12 Thread Reio Remma

On 12/12/2019 13:01, fil...@centrum.cz wrote:

Hello,
I have builded some dovecot packages for CentOS 8 in my personal
repository:
http://repo.joomhosting.eu/centos/8/x86_64/
and SRPMS are in
http://repo.joomhosting.eu/centos/8/SRPMS/

I you want you can try it.

With best regards,
Filip Bartmann


Thanks! Will have a look. :)

Reio



On Thu, 12 Dec 2019 12:31:45 +0200
Reio Remma  wrote:


On 09/12/2019 17:25, Aki Tuomi via dovecot wrote:

On 09/12/2019 17:20 Reio Remma via dovecot 
wrote:

   
Hello!


Are there any plans for an official Dovecot repo for CentOS 8?

Thanks,
Reio

(sorry for duplicate, user error in earlier one...)

Yes. There are plans for the repo, unfortunately there are still
technical problems due to how CentOS8 repositories are organized.
But soon.

Aki

I tried rebuilding the RPM for CentOS 8 but I see it's missing some
notable required packages like tcp wrappers and quota-devel. Managed
to rebuild by switching these off in the spec file
(--without-libwrap), but that's probably not a good idea. :)

Reio



--
Tervitades
Reio Remma


MR Stuudio 25 aastat

*MR Stuudio OÜ*
Tondi 17b, 11316, Tallinn
Tel +372 650 4808
Mob +372 56 22 00 33
r...@mrstuudio.ee
www.mrstuudio.ee





Re: Dovecot 2.3 repo for CentOS 8.

2019-12-12 Thread filbar
Hello,
I have builded some dovecot packages for CentOS 8 in my personal
repository:
http://repo.joomhosting.eu/centos/8/x86_64/ 
and SRPMS are in
http://repo.joomhosting.eu/centos/8/SRPMS/

I you want you can try it.

With best regards,
Filip Bartmann

On Thu, 12 Dec 2019 12:31:45 +0200
Reio Remma  wrote:

> On 09/12/2019 17:25, Aki Tuomi via dovecot wrote:
> >> On 09/12/2019 17:20 Reio Remma via dovecot 
> >> wrote:
> >>
> >>   
> >> Hello!
> >>
> >> Are there any plans for an official Dovecot repo for CentOS 8?
> >>
> >> Thanks,
> >> Reio  
> > (sorry for duplicate, user error in earlier one...)
> >
> > Yes. There are plans for the repo, unfortunately there are still
> > technical problems due to how CentOS8 repositories are organized.
> > But soon.
> >
> > Aki  
> 
> I tried rebuilding the RPM for CentOS 8 but I see it's missing some 
> notable required packages like tcp wrappers and quota-devel. Managed
> to rebuild by switching these off in the spec file
> (--without-libwrap), but that's probably not a good idea. :)
> 
> Reio


Re: Dovecot 2.3 repo for CentOS 8.

2019-12-12 Thread Reio Remma

On 09/12/2019 17:25, Aki Tuomi via dovecot wrote:

On 09/12/2019 17:20 Reio Remma via dovecot  wrote:

  
Hello!


Are there any plans for an official Dovecot repo for CentOS 8?

Thanks,
Reio

(sorry for duplicate, user error in earlier one...)

Yes. There are plans for the repo, unfortunately there are still technical 
problems due to how CentOS8 repositories are organized. But soon.

Aki


I tried rebuilding the RPM for CentOS 8 but I see it's missing some 
notable required packages like tcp wrappers and quota-devel. Managed to 
rebuild by switching these off in the spec file (--without-libwrap), but 
that's probably not a good idea. :)


Reio