Re: Frequent Out of Memory for service(config)

2019-05-17 Thread Root Kev via dovecot
Hi Aki,

I put  in the line that you recommended as well as the " echo
'DAEMON_COREFILE_LIMIT="unlimited"' >> /etc/sysconfig/dovecot".
Unfortunately, the logs are saying that core dumps are still disabled.

May 17 13:30:17 config: Fatal: pool_system_malloc(8192): Out of memory
May 17 13:30:17 pop3(emx-echoworx): Error: Error reading configuration:
read(/var/run/dovecot/config) failed: EOF
May 17 13:30:17 config: Fatal: master: service(config): child 11530 killed
with signal 6 (core dumps disabled -
https://dovecot.org/bugreport.html#coredumps)

On Wed, May 15, 2019 at 4:34 AM Aki Tuomi 
wrote:

>
> On 13.5.2019 22.56, Root Kev via dovecot wrote:
> > Hello Group,
> >
> > We have dovecot deployed as solely a Pop3 service that is used by our
> > applications to pass mail from one application to another internally.
> > We have roughly 4 applications that connect to the Pop3 service every
> > 2 seconds, to check for new messages and pop them for processing if
> > they are present.  Depending on the site, we have between 1024-2048MB
> > of memory set for default_vsz_limit.  In all systems we see the Out of
> > memory alert several times a day. We previously did not see this at
> > all when running on CentOS6, with less memory.
> >
> > We have tried increasing the memory to the vsz_limit up to 2gb without
> > success.
> >
> > We are running on CentOS 7 servers, running dovecot 2.3.6 (7eab80676)
> > (from the dovecot repo).
> >
> > Can anyone advise any other settings that could be modified in order
> > to correct these out of memory issues?
> >
> > # dovecot -n
> > # 2.3.6 (7eab80676): /etc/dovecot/dovecot.conf
> > # OS: Linux 3.10.0-957.5.1.el7.x86_64 x86_64 CentOS Linux release
> > 7.6.1810 (Core)
> > # Hostname: ** #
> > auth_cache_size = 10 M
> > auth_verbose = yes
> > default_vsz_limit = 1 G
> > instance_name = Pop3 Mail Service
> > listen = 10.*.*.* #
> > log_path = /var/log/dovecot.log
> > login_greeting = Pop3 Mail Service
> > login_trusted_networks = 10.*.*.* 10.*.*.* 10.*.*.* 10.*.*.* 10.*.*.*
> > #
> > mail_location = maildir:~/Maildir
> > 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 = cache_key=#hidden_use-P_to_show#
> >   driver = pam
> > }
> > protocols = pop3
> > ssl_cert =  > ssl_key = # hidden, use -P to show it
> > userdb {
> >   driver = passwd
> > }
> > verbose_ssl = yes
> >
> > May 10 06:44:05 config: Fatal: pool_system_malloc(8192): Out of memory
> > May 10 06:44:05 config: Fatal: master: service(config): child 27887
> > returned error 83 (Out of memory (service config { vsz_limit=1024 MB
> > }, you may need to increase it) - set CORE_OUTOFMEM=1 environment to
> > get core dump)
>
> Can you try setting
>
> import_environment = $import_environment CORE_OUTOFMEM=1
>
> and see if it causes coredump?
>
> Aki
>
>


Find last day of login

2019-05-17 Thread Lefteris Tsintjelis via dovecot
I am using dovecot virtual maildir accounts. Is it possible to find last 
day of login for an account by checking the last modification time of 
the maildir files?


Lefteris


Re: How to continuously gather statistics?

2019-05-17 Thread Aki Tuomi via dovecot

On 17.5.2019 13.46, Roel van Duijnhoven via dovecot wrote:
> Hello,
>
> I recently upgraded to the latest version of Dovecot, and want to use
> the newly introduced logging / event system. I want to fetch the
> statistics every couple of seconds, and push those to our logging
> platform. Metrics such as: number of IMAP commands, average time they
> took, etc.
>
> However the metrics as reported by Dovecot continously increment. So I
> see two solutions:
>
>   * Our solution could keep track of the previous values. But that
> could also break if the statistics are reset for some reason (e.g.
> threshold reached).
>   * My second thought was to use "stats -r". That /should/ clear the
> statistics directly after fetching them. And thus, give a better
> picture. However I am not sure if this gives me actual useful results.
>
> Or is there maybe a better approach to fetch statistics that I overlooked?
>
> Thanks a lot.
>
> Best,
> Roel van Duijnhoven


For the new metrics, we are working on exporting features, which are not
yet finished.

For old stats you can use carbon protocol.

Aki



How to continuously gather statistics?

2019-05-17 Thread Roel van Duijnhoven via dovecot
Hello,

I recently upgraded to the latest version of Dovecot, and want to use the
newly introduced logging / event system. I want to fetch the statistics
every couple of seconds, and push those to our logging platform. Metrics
such as: number of IMAP commands, average time they took, etc.

However the metrics as reported by Dovecot continously increment. So I see
two solutions:

   - Our solution could keep track of the previous values. But that could
   also break if the statistics are reset for some reason (e.g. threshold
   reached).
   - My second thought was to use "stats -r". That *should* clear the
   statistics directly after fetching them. And thus, give a better picture.
   However I am not sure if this gives me actual useful results.

Or is there maybe a better approach to fetch statistics that I overlooked?

Thanks a lot.

Best,
Roel van Duijnhoven