Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

[SOLVED] dovecot: No log rotation bug

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 15x
Web: apache + nginx
[SOLVED] dovecot: No log rotation bug
  • Quote

Post by Felix » Sun Feb 21, 2016 5:31 pm

I have some VESTA CP [ 0.9.8 (amd64)] installations, all on Ubuntu 14.04.

Today I noticed that dovecot log files in /var/log/dovecot.log (in every server) have grown quite large. I also noticed that there are no other dovecot.* files in /var/log and that lead me thinking that there is no log rotation for dovecot.

Based on the above I would like to ask two things:
  • Is this behavior (not rotating the logs) by design and if so why? To my understanding, not rotating logs seems more like a bug...
  • How can I setup log rotation for dovecot?
EDIT: While looking for a solution to this problem I noticed that fail2ban is failing to work correctly. It is banning clients up to a past point. After that certain point in time in the past no ban occurs. I suspect that this has to do with the dovecot log file size which is in the hundreds of MiB. As it seems, no log rotation for dovecot means no fail2ban for dovecot sooner or later.
Last edited by Felix on Mon Feb 22, 2016 11:27 am, edited 4 times in total.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: dovecot: No log rotation
  • Quote

Post by tjebbeke » Sun Feb 21, 2016 10:18 pm

I have checked this on CentOS, and there I see the same behavior. You can try to change this manually:
https://www.digitalocean.com/community/ ... untu-12-10
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: dovecot: No log rotation
  • Quote

Post by Felix » Mon Feb 22, 2016 11:18 am

Thanks tjebbeke for the useful reply. I read the guide you suggested along with the following:
Setup a mail server with Postfix and Dovecot on Ubuntu / Debian
HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples
Dovecot Wiki: Logging

Then I setup log rotation for dovecot as follows:
  • created the file /etc/logrotate.d/dovecot with the following content

    Code: Select all

    /var/log/dovecot*.log {
      missingok
      notifempty
      delaycompress
      sharedscripts
      postrotate
        doveadm log reopen
      endscript
    }
    
  • To force log rotation (for all logs) I run the command

    Code: Select all

    logrotate --force -s logrotate.status /etc/logrotate.conf
DEVS, please correct this problem in the next update. Log rotation is vital for server operation and security.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: [SOLVED] dovecot: No log rotation bug
  • Quote

Post by skurudo » Fri Apr 15, 2016 1:43 pm

Seems like a bug, we'll check this.
https://bugs.vestacp.com/issues/207

Thanks you for topic and detail answers.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password