Strange thing on log rotation front

2018-01-19 Thread Luciano Mannucci

Hi all!

I've decided to rotate the dovecot logs automatically on my freebsd
10.4 server using the system's newsyslog feature. I started with
logfile.info putting the line

/var/log/dovecot/logfile.info  600  31*@T16  ZCU 
/var/run/dovecot/master.pid 30

which should send a SIGUSER to the master process, which it seems to
do for I see in the log file:

master: Warning: Sent SIGKILL to 1 log processes
master: Warning: Killed with signal 15 (by pid=69871 uid=0 code=kill)

though the log process doesn't die.

What did I do wrong?

my doveconf -n says:
root@baobab:/var/log/dovecot # doveconf -n 
# 2.2.28 (bed8434): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.17 (e179378)
# OS: FreeBSD 10.4-RELEASE-p3 amd64  ufs
auth_cache_size = 3 k
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 1228
default_vsz_limit = 712 M
disable_plaintext_auth = no
first_valid_gid = 0
first_valid_uid = 100
info_log_path = /var/log/dovecot/logfile.info
listen = *
log_path = /var/log/dovecot/logfile
login_greeting = Dovecot at Baobab ready.
login_trusted_networks = 127.0.0.0/8 212.45.144.0/24 192.168.134.0/24
mail_location = 
mbox:/var/spool/mailboxes/%u:INBOX=/var/spool/mail/%u:DIRNAME=mbox:INDEX=/var/dovecot_indexes/%u
maildir_copy_with_hardlinks = no
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date index ihave duplicate 
mime foreverypart extracttext
mbox_lock_timeout = 443 secs
namespace {
  inbox = yes
  location = 
  prefix = 
  separator = .
  type = private
}
passdb {
  driver = pam
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size
}
protocols = pop3 imap
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  user = root
}
service imap-login {
  inet_listener imaps {
address = *
  }
  process_limit = 512
}
service pop3-login {
  chroot = 
  executable = pop3-login -D
  inet_listener pop3s {
address = *
  }
  process_limit = 512
}
ssl_ca = http://www.lesassaie.IT/


Re: Questions about SPECIAL-USE IMAP extension

2018-01-19 Thread Tanstaafl
On Wed Jan 17 2018 15:56:39 GMT-0500 (Eastern Standard Time), Joseph Tam
 wrote:
> Thanks.  How does this manifests itself: the client gets an inconsistent
> view of the outgoing mailbox that depends on which mailbox the client
> is using, or the optimization is broken and dovecot keeps having to
> (re)read the mailbox to acquire the IMAP STATUS?

The way I think this should work is simple...

If the Client doesn't request one of the pre-defined 'aliases' for a
special use folder, then it simply does what it does now - uses what it
wants (creates it if it doesn't exist).

As far as I can tell, this would require dovecot to add some 'smarts'
with respect to virtual folders, and be able to create these on the fly
for clients, as virtual folders is how I think these special-use aliases
should be presented to the client, unless someone has a better idea.

So, for example, if a client asks for a special use folder that did not
use to be pre-defined (Admin added it sometime after the client
connected before), it moves any emails currently residing in the real
version of what will be the new 'alias' (virtual) folder to the alias
target (the real special use folder on the filesystem), deletes the real
version, then creates and subscribes to the new virtual folder.

As I said, properly coded, this could be painless and mostly invisible
to the client.


Re: [BUG] dovecot 2.3.0 - service(lmtp) killed with signal 11 when user is overquota

2018-01-19 Thread Stephan Bosch
Op 1/17/2018 om 2:22 PM schreef Marco Giunta:
> Hi,
> I'm using dovecot 2.3.0 installed on a new CentOS 7.4 with rpm from
> Dovecot repo. When I use LMTP to deliver an email to an overquota
> user, lmtp service hangs with a segfault:
>
> Jan 17 13:39:45 server-02.example.com kernel: lmtp[5099]: segfault at
> 0 ip 563599e372c2 sp 7ffeaa4fdc80 error 4 in
> lmtp[563599e31000+b000]
> Jan 17 13:39:45 server-02.example.com dovecot[5089]: lmtp(5099):
> Fatal: master: service(lmtp): child 5099 killed with signal 11 (core
> dumped)
>
> If I try to deliver a mail with 'dovecot-lda' on the same overquota
> user, email was rejected, as expected:
>
> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
> lda(USERNAME)<6773>: Debug: Mailbox stdin:
> Opened mail UID=1 because: copying
> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
> lda(USERNAME)<6773>: msgid=unspecified: save
> failed to INBOX: Quota exceeded (mailbox for user is full)
> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
> lda(USERNAME)<6773>: msgid=unspecified:
> rejected: Quota exceeded (mailbox for user is full)
> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
> lda(USERNAME)<6773>: msgid=: Return-Path
> missing, rejection reason: Quota exceeded (mailbox for user is full)
>
> If user is no more overquota, LTMP delivery works:
>
> Jan 17 14:13:16 server-02.example.com dovecot[8651]:
> lmtp(usern...@example.com)<8665>: Debug:
> Mailbox : Opened mail UID=1 because: copying
> Jan 17 14:13:16 server-02.example.com dovecot[8651]:
> lmtp(usern...@example.com)<8665>: Debug:
> INBOX: Mailbox opened because: quota count
> Jan 17 14:13:16 server-02.example.com dovecot[8651]:
> lmtp(usern...@example.com)<8665>: sieve:
> msgid=<151619479629.10128.16766154794856971...@client.example.com>:
> stored mail into mailbox 'INBOX'
>
> Attached my dovecot configuration and a backtrace from gdb.

Fix pending:

https://github.com/stephanbosch/dovecot-core/tree/fix-lmtp-quota-excess

Regards,

Stephan.



Re: PDFs getting mangled

2018-01-19 Thread Adam Weinberger

On 19 Jan, 2018, at 4:39, Aki Tuomi  wrote:



On 19.01.2018 04:35, Adam Weinberger wrote:

Since upgrading to 2.3.0 / 0.5.0.1, incoming PDFs are getting mangled.
It seems to be happening when I use vnd.dovecot.filter. When I comment
out the block, things come through fine.

My filter block looks like this:
   require "vnd.dovecot.filter";
   filter "bogofilter_filter";

if header :contains "X-Bogosity" [
"Spam, tests=bogofilter, spamicity=1.00",
"Spam, tests=bogofilter, spamicity=0.99"
] {
fileinto "spam/totally";
stop;
}
elsif header :contains "X-Bogosity" "Spam," {
fileinto "spam/probably";
stop;
}
elsif header :contains "X-Bogosity" "Unsure," {
fileinto "spam/maybe";
stop;
}

filter/bogofilter_filter looks like this:
#!/bin/sh
cat /dev/stdin | /usr/local/bin/bogofilter -p -e -c 
/path/to/bogofilter.cf

Images seem to come through fine. I didn't have this problem before the
upgrade. It could easily be a problem with bogofilter, but I figured
that I'd check here first to see if anybody else has an
attachment-mangling issue with vnd.dovecot.filter.

# Adam


--
Adam Weinberger
ad...@adamw.org
http://www.adamw.org

It might work better with

exec /usr/local/bin/bogofilter -p -e -c /path/to/bogofilter.cf

Aki


Thank you! While that didn't fix the problem, it did clue me into trying  
just "cat /dev/stdin" to conclude that it's bogofilter that's misbehaving.


# Adam


--
Adam Weinberger
ad...@adamw.org
http://www.adamw.org




Re: Questions about SPECIAL-USE IMAP extension

2018-01-19 Thread Joseph Tam

Aki Tuomi writes:


https://wiki2.dovecot.org/Plugins/MailboxAlias


There is also gotcha that MailboxAlias is not compatible with
mailbox_list_index=yes setting.


Thanks.  How does this manifests itself: the client gets an inconsistent
view of the outgoing mailbox that depends on which mailbox the client
is using, or the optimization is broken and dovecot keeps having to
(re)read the mailbox to acquire the IMAP STATUS?

Joseph Tam 


Re: PDFs getting mangled

2018-01-19 Thread Aki Tuomi


On 19.01.2018 04:35, Adam Weinberger wrote:
> Since upgrading to 2.3.0 / 0.5.0.1, incoming PDFs are getting mangled.
> It seems to be happening when I use vnd.dovecot.filter. When I comment
> out the block, things come through fine.
>
> My filter block looks like this:
>require "vnd.dovecot.filter";
>filter "bogofilter_filter";
>
> if header :contains "X-Bogosity" [
> "Spam, tests=bogofilter, spamicity=1.00",
> "Spam, tests=bogofilter, spamicity=0.99"
> ] {
> fileinto "spam/totally";
> stop;
> }
> elsif header :contains "X-Bogosity" "Spam," {
> fileinto "spam/probably";
> stop;
> }
> elsif header :contains "X-Bogosity" "Unsure," {
> fileinto "spam/maybe";
> stop;
> }
>
> filter/bogofilter_filter looks like this:
> #!/bin/sh
> cat /dev/stdin | /usr/local/bin/bogofilter -p -e -c 
> /path/to/bogofilter.cf
>
> Images seem to come through fine. I didn't have this problem before the
> upgrade. It could easily be a problem with bogofilter, but I figured
> that I'd check here first to see if anybody else has an
> attachment-mangling issue with vnd.dovecot.filter.
>
> # Adam
>
>
> --
> Adam Weinberger
> ad...@adamw.org
> http://www.adamw.org
It might work better with

exec /usr/local/bin/bogofilter -p -e -c /path/to/bogofilter.cf

Aki



PDFs getting mangled

2018-01-19 Thread Adam Weinberger
Since upgrading to 2.3.0 / 0.5.0.1, incoming PDFs are getting mangled.
It seems to be happening when I use vnd.dovecot.filter. When I comment
out the block, things come through fine.

My filter block looks like this:
   require "vnd.dovecot.filter";
   filter "bogofilter_filter";

if header :contains "X-Bogosity" [
"Spam, tests=bogofilter, spamicity=1.00",
"Spam, tests=bogofilter, spamicity=0.99"
] {
fileinto "spam/totally";
stop;
}
elsif header :contains "X-Bogosity" "Spam," {
fileinto "spam/probably";
stop;
}
elsif header :contains "X-Bogosity" "Unsure," {
fileinto "spam/maybe";
stop;
}

filter/bogofilter_filter looks like this:
#!/bin/sh
cat /dev/stdin | /usr/local/bin/bogofilter -p -e -c 
/path/to/bogofilter.cf

Images seem to come through fine. I didn't have this problem before the
upgrade. It could easily be a problem with bogofilter, but I figured
that I'd check here first to see if anybody else has an
attachment-mangling issue with vnd.dovecot.filter.

# Adam


--
Adam Weinberger
ad...@adamw.org
http://www.adamw.org


Re: Error: Corrupted dbox file

2018-01-19 Thread Webert de Souza Lima
Hello Florent,

How did you proceed with the upgrade? Did you follow the recommended steps
guide to upgrade ceph? (mons first, then OSDs, then MDS)
Did you interrupt dovecot before upgrading the MDS specially? Did you
remount the filesystem? Did you upgrade the ceph client too?

Give people the complete scene and someone might be able to help you. Ask
on ceph-users list too.



Regards,

Webert Lima
DevOps Engineer at MAV Tecnologia
*Belo Horizonte - Brasil*
*IRC NICK - WebertRLZ*

On Thu, Jan 18, 2018 at 8:41 AM, Florent B  wrote:

> Hi list,
>
> I'm sorry to come back with my problem. I'm pretty sure it's not
> dovecot-related, but can someone help me to bring some debug information
> to Ceph developers ?
>
> For example, how writes are handled in Dovecot, and what kind of
> corruption it is according to error messages ?
>
>
> On 13/12/2017 16:19, Florent B wrote:
> > Hi,
> >
> > I use Dovecot (last released version), 2 backends and 1 director, each
> > user account handled by a single assigned backend.
> >
> > I use CephFS filesystem for messages (FUSE client).
> >
> > Since Ceph upgrade from Kraken to Luminous, I have a lot of erreurs
> > "Error: Corrupted dbox file" on a single (large) mail account.
> >
> > I know the problem seems to come from Ceph, but maybe someone here can
> > help me diagnose the situation.
> >
> > The error is exactly : EOF reading msg header (got 0/30 bytes)
> >
> > Dovecot backends are configured like this :
> >
> > mmap_disable = yes
> > mail_fsync = optimized
> > mail_nfs_storage = no
> > mail_nfs_index = no
> > mdbox_rotate_size = 12M
> >
> > CephFS supports file locking, and 2 backends never write the same file
> > because each user is assigned to a backend.
> >
> > Did you ever see this problem with others FS maybe ?
> >
> > It seems problem disappeared when I disable pagecache for the Fuse mount.
> >
> > Thank you for your help.
> >
> >
>
>


Re: [BUG] dovecot 2.3.0 - service(lmtp) killed with signal 11 when user is overquota

2018-01-19 Thread Marco Giunta

On 2018-01-18 08:01, Aki Tuomi wrote:

Hi!

This is fixed with
https://github.com/dovecot/core/commit/2bf919786518d138cc07d9cc21e14ad5e07e5e56.patch

Aki Tuomi



yes, it works.

Thanks,
  Marco


--



Re: Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed:

2018-01-19 Thread Aki Tuomi


On 18.01.2018 11:32, Thomas Robers wrote:
> Hi,
>
> after updating Dovecot to version 2.3 I get a lot of core-dumps like:
>
>> Jan 18 10:08:20 mail dovecot:
>> imap(b...@tutech.de)<18200>: Panic: file
>> ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed:
>> (zstream->ostream.finished || zstream->ostream.ostream.stream_errno
>> != 0)
>> Jan 18 10:08:20 mail dovecot:
>> imap(b...@tutech.de)<18200>: Error: Raw backtrace:
>> /usr/lib64/dovecot/libdovecot.so.0(+0xc71da) [0x7f9b510c81da] ->
>> /usr/lib64/dovecot
>> /libdovecot.so.0(+0xc7766) [0x7f9b510c8766] ->
>> /usr/lib64/dovecot/libdovecot.so.0(+0x3be11) [0x7f9b5103ce11] ->
>> /usr/lib64/dovecot/lib20_zlib_plugin.so(+0x4ffb) [0x7f9b4fc21ffb] ->
>> /usr/lib64/dovecot/libdovecot.so.0(+0xed3a6) [0x7f9b510ee3a6] ->
>> dovecot/imap(client_disconnect+0x4f) [0x7f9b518f3a1f] ->
>> dovecot/imap(cmd_logout+0x5b) [0x7f9b518ede5b] ->
>> dovecot/imap(command_exec+0x65) [0x7f9b518f7585] ->
>> dovecot/imap(+0x1a7b0) [0x7f9b518f47b0] -> dovecot/imap(+0x1a848)
>> [0x7f9b518f4848] -> dovecot/imap(client_handle_input+0x1d5)
>> [0x7f9b518f4c35] -> dovecot/imap(client_input+0x6e) [0x7f9b518f517e]
>> -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x55)
>> [0x7f9b510deec5] -> /usr/lib64/dovecot
>> /libdovecot.so.0(io_loop_handler_run_internal+0xbf) [0x7f9b510e0dcf]
>> -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0x55)
>> [0x7f9b510defb5] -> /usr/lib64/dovecot
>> /libdovecot.so.0(io_loop_run+0x38) [0x7f9b510df1d8] ->
>> /usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13)
>> [0x7f9b5105eab3] -> dovecot/imap(main+0x33e) [0x7f9b51903cee] ->
>> /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f9b50c8bd1d] ->
>> dovecot/imap(+0xe339) [0x7f9b518e8339]
>> Jan 18 10:08:20 mail dovecot:
>> imap(b...@tutech.de)<18200>: Fatal: master:
>> service(imap): child 18200 killed with signal 6 (core dumped)
>
>
> The gdb backtrace is:
>
>
>> gdb /usr/libexec/dovecot/imap /var/core/18200
>> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
>> Copyright (C) 2010 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> 
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>> copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-redhat-linux-gnu".
>> For bug reporting instructions, please see:
>> ...
>> Reading symbols from /usr/libexec/dovecot/imap...done.
>> [New Thread 18200]
>> Reading symbols from /usr/lib64/dovecot/libdovecot-storage.so.0...done.
>> Loaded symbols for /usr/lib64/dovecot/libdovecot-storage.so.0
>> Reading symbols from /usr/lib64/dovecot/libdovecot.so.0...done.
>> Loaded symbols for /usr/lib64/dovecot/libdovecot.so.0
>> Reading symbols from /lib64/libc.so.6...(no debugging symbols
>> found)...done.
>> Loaded symbols for /lib64/libc.so.6
>> Reading symbols from /lib64/librt.so.1...(no debugging symbols
>> found)...done.
>> Loaded symbols for /lib64/librt.so.1
>> Reading symbols from /lib64/libdl.so.2...(no debugging symbols
>> found)...done.
>> Loaded symbols for /lib64/libdl.so.2
>> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging
>> symbols found)...done.
>> Loaded symbols for /lib64/ld-linux-x86-64.so.2
>> Reading symbols from /lib64/libpthread.so.0...(no debugging symbols
>> found)...done.
>> [Thread debugging using libthread_db enabled]
>> Loaded symbols for /lib64/libpthread.so.0
>> Reading symbols from /usr/lib64/dovecot/lib01_acl_plugin.so...done.
>> Loaded symbols for /usr/lib64/dovecot/lib01_acl_plugin.so
>> Reading symbols from /usr/lib64/dovecot/lib02_imap_acl_plugin.so...done.
>> Loaded symbols for /usr/lib64/dovecot/lib02_imap_acl_plugin.so
>> Reading symbols from /usr/lib64/dovecot/lib15_notify_plugin.so...done.
>> Loaded symbols for /usr/lib64/dovecot/lib15_notify_plugin.so
>> Reading symbols from /usr/lib64/dovecot/lib20_mail_log_plugin.so...done.
>> Loaded symbols for /usr/lib64/dovecot/lib20_mail_log_plugin.so
>> Reading symbols from /usr/lib64/dovecot/lib20_zlib_plugin.so...done.
>> Loaded symbols for /usr/lib64/dovecot/lib20_zlib_plugin.so
>> Reading symbols from /lib64/libz.so.1...(no debugging symbols
>> found)...done.
>> Loaded symbols for /lib64/libz.so.1
>> Reading symbols from /lib64/libbz2.so.1...(no debugging symbols
>> found)...done.
>> Loaded symbols for /lib64/libbz2.so.1
>> Reading symbols from
>> /usr/lib64/dovecot/lib30_imap_zlib_plugin.so...done.
>> Loaded symbols for /usr/lib64/dovecot/lib30_imap_zlib_plugin.so
>> Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols
>> found)...done.
>> Loaded symbols for /lib64/libgcc_s.so.1
>> Core was generated by `dovecot/imap'.
>> Program terminated with signal 6, Aborted.
>> #0  0x7f9b50c9f495 in raise () from /lib64/libc.so.6
>> Missing separate debuginfos, use: debuginfo-install
>> dovecot23-2.3.0-3.gf.el6.x86_64
>
>
> My 

Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed:

2018-01-19 Thread Thomas Robers

Hi,

after updating Dovecot to version 2.3 I get a lot of core-dumps like:

Jan 18 10:08:20 mail dovecot: imap(b...@tutech.de)<18200>: Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed: (zstream->ostream.finished || 
zstream->ostream.ostream.stream_errno != 0)

Jan 18 10:08:20 mail dovecot: imap(b...@tutech.de)<18200>: 
Error: Raw backtrace: /usr/lib64/dovecot/libdovecot.so.0(+0xc71da) [0x7f9b510c81da] -> 
/usr/lib64/dovecot
/libdovecot.so.0(+0xc7766) [0x7f9b510c8766] -> /usr/lib64/dovecot/libdovecot.so.0(+0x3be11) [0x7f9b5103ce11] -> /usr/lib64/dovecot/lib20_zlib_plugin.so(+0x4ffb) [0x7f9b4fc21ffb] -> 
/usr/lib64/dovecot/libdovecot.so.0(+0xed3a6) [0x7f9b510ee3a6] -> dovecot/imap(client_disconnect+0x4f) [0x7f9b518f3a1f] -> dovecot/imap(cmd_logout+0x5b) [0x7f9b518ede5b] -> 
dovecot/imap(command_exec+0x65) [0x7f9b518f7585] -> dovecot/imap(+0x1a7b0) [0x7f9b518f47b0] -> dovecot/imap(+0x1a848) [0x7f9b518f4848] -> dovecot/imap(client_handle_input+0x1d5) 
[0x7f9b518f4c35] -> dovecot/imap(client_input+0x6e) [0x7f9b518f517e] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x55) [0x7f9b510deec5] -> /usr/lib64/dovecot

/libdovecot.so.0(io_loop_handler_run_internal+0xbf) [0x7f9b510e0dcf] -> 
/usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0x55) [0x7f9b510defb5] -> 
/usr/lib64/dovecot
/libdovecot.so.0(io_loop_run+0x38) [0x7f9b510df1d8] -> /usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f9b5105eab3] -> dovecot/imap(main+0x33e) [0x7f9b51903cee] -> 
/lib64/libc.so.6(__libc_start_main+0xfd) [0x7f9b50c8bd1d] -> dovecot/imap(+0xe339) [0x7f9b518e8339]

Jan 18 10:08:20 mail dovecot: imap(b...@tutech.de)<18200>: 
Fatal: master: service(imap): child 18200 killed with signal 6 (core dumped)



The gdb backtrace is:



gdb /usr/libexec/dovecot/imap /var/core/18200
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/libexec/dovecot/imap...done.
[New Thread 18200]
Reading symbols from /usr/lib64/dovecot/libdovecot-storage.so.0...done.
Loaded symbols for /usr/lib64/dovecot/libdovecot-storage.so.0
Reading symbols from /usr/lib64/dovecot/libdovecot.so.0...done.
Loaded symbols for /usr/lib64/dovecot/libdovecot.so.0
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols 
found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /usr/lib64/dovecot/lib01_acl_plugin.so...done.
Loaded symbols for /usr/lib64/dovecot/lib01_acl_plugin.so
Reading symbols from /usr/lib64/dovecot/lib02_imap_acl_plugin.so...done.
Loaded symbols for /usr/lib64/dovecot/lib02_imap_acl_plugin.so
Reading symbols from /usr/lib64/dovecot/lib15_notify_plugin.so...done.
Loaded symbols for /usr/lib64/dovecot/lib15_notify_plugin.so
Reading symbols from /usr/lib64/dovecot/lib20_mail_log_plugin.so...done.
Loaded symbols for /usr/lib64/dovecot/lib20_mail_log_plugin.so
Reading symbols from /usr/lib64/dovecot/lib20_zlib_plugin.so...done.
Loaded symbols for /usr/lib64/dovecot/lib20_zlib_plugin.so
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libbz2.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libbz2.so.1
Reading symbols from /usr/lib64/dovecot/lib30_imap_zlib_plugin.so...done.
Loaded symbols for /usr/lib64/dovecot/lib30_imap_zlib_plugin.so
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Core was generated by `dovecot/imap'.
Program terminated with signal 6, Aborted.
#0  0x7f9b50c9f495 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install 
dovecot23-2.3.0-3.gf.el6.x86_64



My Dovecot configuration is:

---snip---
# 2.3.0 (c8b89eb): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.0.1 (d33dca20)
# OS: Linux 2.6.32-696.3.1.el6.x86_64 x86_64 CentOS release 6.9 (Final) ext4
auth_debug = yes
auth_debug_passwords = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_verbose = yes

Re: Fatal: nfs flush requires mail_fsync=always

2018-01-19 Thread Aki Tuomi


On 19.01.2018 11:55, Søren Skou wrote:
> Hiya all,
>
> I'm seeing this "Fatal: nfs flush requires mail_fsync=always" error on
> my testbed. The issue is that from what I can see, mail_fsync is set
> to always :
>
> # doveconf -n | grep mail_fs
> mail_fsync = always
>
> The result is that the client does not connect at all, which is not
> really what I wanted to happen :)
>
> Any idea what is going wrong here?
>
> Best regards
> Søren P. Skou
>
> doveconf -n
>
> # 2.3.1.alpha0 (bdfa22623) [XI:2:2.3.1~alpha0-1~auto+14]:
> /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.1.alpha0 (d5f710e0)
> # OS: Linux 4.9.0-4-amd64 x86_64 Debian 9.3 nfs
> auth_worker_max_count = 200
> dict {
>   expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
>   quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
>   sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
> }
> disable_plaintext_auth = no
> lock_method = dotlock
> mail_fsync = always
> mail_location = maildir:/mnt/virtual_mail/%d/%n
> mail_nfs_index = yes
> mail_nfs_storage = yes
> mail_plugins = quota
> mailbox_list_index = no
> metric imap_select_no {
>   event_name = imap_command_finished
>   filter {
> name = SELECT
> tagged_reply_state = NO
>   }
> }
> mmap_disable = yes
> namespace inbox {
>   inbox = yes
>   location =
>   mailbox Drafts {
> special_use = \Drafts
>   }
>   mailbox Junk {
> auto = subscribe
> special_use = \Junk
>   }
>   mailbox Sent {
> special_use = \Sent
>   }
>   mailbox "Sent Messages" {
> special_use = \Sent
>   }
>   mailbox Trash {
> special_use = \Trash
>   }
>   prefix =
> }
> passdb {
>   args = /etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> plugin {
>   quota = dict:User quota::proxy::sqlquota
>   quota_grace = 10%%
>   quota_rule = *:storage=1000m:messages=30
>   quota_rule2 = Trash:storage=+10%%:messages=+10%%
>   quota_rule3 = Junk:storage=+20%%:messages=+20%%
>   quota_status_nouser = DUNNO
>   quota_status_overquota = 552 5.2.2 Mailbox is full
>   quota_status_success = DUNNO
>   quota_warning = storage=75%%:messages=75%% quota-warning 75 %u
>   quota_warning2 = storage=95%%:messages=95%% quota-warning 95 %u
>   quota_warning3 = -storage=100%%:messages=100%% quota-warning below %u
>   sieve = /etc/dovecot/sieve/default.sieve
>   sieve_global_dir = /etc/dovecot/sieve
> }
> protocols = " imap pop3"
> service dict {
>   unix_listener dict {
> mode = 0600
> user = vmail
>   }
> }
> service imap {
>   executable = imap
> }
> service quota-status {
>   client_limit = 1000
>   executable = quota-status -p postfix
>   inet_listener {
> address = 127.0.0.1
> port = 12340
>   }
> }
> service quota-warning {
>   executable = script /usr/local/bin/quota-warning.sh
>   user = vmail
> }
> ssl_ca = /etc/ssl/certs/ca-root.crt
> ssl_cert =  ssl_cipher_list = TLSv1+HIGH !SSLv2 !RC4 !aNULL !eNULL !3DES-CBC !3DES 
> @STRENGTH
> ssl_dh =  # hidden, use -P to show it
> ssl_key =  # hidden, use -P to show it
> userdb {
>   args = uid=2000 gid=2000 home=/mnt/virtual_mail/%d/%n
>   driver = static
> }
> protocol lmtp {
>   mail_plugins = quota
> }
> protocol lda {
>   mail_plugins = quota
> }
> protocol imap {
>   mail_plugins = quota imap_quota
>   rawlog_dir = /tmp/rawlog/%u
> }

Hi!

Thanks, we'll look into it.

Aki


Re: [BUG] dovecot 2.3.0 - service(lmtp) killed with signal 11 when user is overquota

2018-01-19 Thread Aki Tuomi


On 17.01.2018 15:23, Aki Tuomi wrote:
>
> On 17.01.2018 15:22, Marco Giunta wrote:
>> Hi,
>> I'm using dovecot 2.3.0 installed on a new CentOS 7.4 with rpm from
>> Dovecot repo. When I use LMTP to deliver an email to an overquota
>> user, lmtp service hangs with a segfault:
>>
>> Jan 17 13:39:45 server-02.example.com kernel: lmtp[5099]: segfault at
>> 0 ip 563599e372c2 sp 7ffeaa4fdc80 error 4 in
>> lmtp[563599e31000+b000]
>> Jan 17 13:39:45 server-02.example.com dovecot[5089]: lmtp(5099):
>> Fatal: master: service(lmtp): child 5099 killed with signal 11 (core
>> dumped)
>>
>> If I try to deliver a mail with 'dovecot-lda' on the same overquota
>> user, email was rejected, as expected:
>>
>> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
>> lda(USERNAME)<6773>: Debug: Mailbox stdin:
>> Opened mail UID=1 because: copying
>> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
>> lda(USERNAME)<6773>: msgid=unspecified: save
>> failed to INBOX: Quota exceeded (mailbox for user is full)
>> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
>> lda(USERNAME)<6773>: msgid=unspecified:
>> rejected: Quota exceeded (mailbox for user is full)
>> Jan 17 13:38:26 server-02.example.com dovecot[6773]:
>> lda(USERNAME)<6773>: msgid=: Return-Path
>> missing, rejection reason: Quota exceeded (mailbox for user is full)
>>
>> If user is no more overquota, LTMP delivery works:
>>
>> Jan 17 14:13:16 server-02.example.com dovecot[8651]:
>> lmtp(usern...@example.com)<8665>: Debug:
>> Mailbox : Opened mail UID=1 because: copying
>> Jan 17 14:13:16 server-02.example.com dovecot[8651]:
>> lmtp(usern...@example.com)<8665>: Debug:
>> INBOX: Mailbox opened because: quota count
>> Jan 17 14:13:16 server-02.example.com dovecot[8651]:
>> lmtp(usern...@example.com)<8665>: sieve:
>> msgid=<151619479629.10128.16766154794856971...@client.example.com>:
>> stored mail into mailbox 'INBOX'
>>
>> Attached my dovecot configuration and a backtrace from gdb.
>>
>> Thanks,
>>   Marco
>>
>>
>>
> Thank you for your report, we'll look into it.
>
> Aki

Hi!

This is fixed with
https://github.com/dovecot/core/commit/2bf919786518d138cc07d9cc21e14ad5e07e5e56.patch

Aki Tuomi


Fatal: nfs flush requires mail_fsync=always

2018-01-19 Thread Søren Skou
Hiya all,

I'm seeing this "Fatal: nfs flush requires mail_fsync=always" error on
my testbed. The issue is that from what I can see, mail_fsync is set
to always :

# doveconf -n | grep mail_fs
mail_fsync = always

The result is that the client does not connect at all, which is not
really what I wanted to happen :)

Any idea what is going wrong here?

Best regards
Søren P. Skou

doveconf -n

# 2.3.1.alpha0 (bdfa22623) [XI:2:2.3.1~alpha0-1~auto+14]:
/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.1.alpha0 (d5f710e0)
# OS: Linux 4.9.0-4-amd64 x86_64 Debian 9.3 nfs
auth_worker_max_count = 200
dict {
  expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
lock_method = dotlock
mail_fsync = always
mail_location = maildir:/mnt/virtual_mail/%d/%n
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = quota
mailbox_list_index = no
metric imap_select_no {
  event_name = imap_command_finished
  filter {
name = SELECT
tagged_reply_state = NO
  }
}
mmap_disable = yes
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = dict:User quota::proxy::sqlquota
  quota_grace = 10%%
  quota_rule = *:storage=1000m:messages=30
  quota_rule2 = Trash:storage=+10%%:messages=+10%%
  quota_rule3 = Junk:storage=+20%%:messages=+20%%
  quota_status_nouser = DUNNO
  quota_status_overquota = 552 5.2.2 Mailbox is full
  quota_status_success = DUNNO
  quota_warning = storage=75%%:messages=75%% quota-warning 75 %u
  quota_warning2 = storage=95%%:messages=95%% quota-warning 95 %u
  quota_warning3 = -storage=100%%:messages=100%% quota-warning below %u
  sieve = /etc/dovecot/sieve/default.sieve
  sieve_global_dir = /etc/dovecot/sieve
}
protocols = " imap pop3"
service dict {
  unix_listener dict {
mode = 0600
user = vmail
  }
}
service imap {
  executable = imap
}
service quota-status {
  client_limit = 1000
  executable = quota-status -p postfix
  inet_listener {
address = 127.0.0.1
port = 12340
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  user = vmail
}
ssl_ca = /etc/ssl/certs/ca-root.crt
ssl_cert =