Author Topic: Has anyone encountered this situation?  (Read 2364 times)

0 Members and 3 Guests are viewing this topic.

Offline
*
Has anyone encountered this situation?
« on: December 26, 2023, 08:48:08 AM »
Has anyone encountered this situation?
Currently I have a log file named: imap.log
It's more than 600gb, I don't know what to do with it, I don't know whether to empty it or not.
Has anyone encountered this problem and how did you solve it? It takes up too much space on your server.
Thank you.
[~]# cd /usr/local/cwpsrv/var/services/roundcube/logs/
4.0K carddav.log
6.4M errors.log
601G imap.log
9.3M sendmail.log
4.0K userlogins.log

Offline
****
Re: Has anyone encountered this situation?
« Reply #1 on: December 26, 2023, 09:10:36 AM »
before you delete it, investigate if there are numerous errors in it.  If it's just logging imap connections, you can safely delete it.
Google Hangouts:  rcschaff82@gmail.com

Offline
*****
Re: Has anyone encountered this situation?
« Reply #2 on: December 26, 2023, 10:37:59 PM »
Start over if you are encountering errors; it will make them easier to parse and diagnose. Truncate the log file to zero bytes:
Code: [Select]
truncate -s0 /usr/local/cwpsrv/var/services/roundcube/logs/imap.log

Offline
*
Re: Has anyone encountered this situation?
« Reply #3 on: December 27, 2023, 07:12:13 AM »
Start over if you are encountering errors; it will make them easier to parse and diagnose. Truncate the log file to zero bytes:
Code: [Select]
truncate -s0 /usr/local/cwpsrv/var/services/roundcube/logs/imap.log

Thank you for your help.
I'm wondering if Truncate = 0 will it continue to save to the imap.log file or not?

Offline
*
Re: Has anyone encountered this situation?
« Reply #4 on: December 27, 2023, 07:14:19 AM »
before you delete it, investigate if there are numerous errors in it.  If it's just logging imap connections, you can safely delete it.
Thank you, I don't know what to do with it.

Offline
*****
Re: Has anyone encountered this situation?
« Reply #5 on: December 27, 2023, 05:32:51 PM »
Truncating to zero bytes leaves the file in place with its correct permissions, then the IMAP daemon (dovecot) will continue to log to the file. It will make it more manageable for you to start over from zero.

Offline
*
Re: Has anyone encountered this situation?
« Reply #6 on: December 28, 2023, 08:44:54 AM »
Truncating to zero bytes leaves the file in place with its correct permissions, then the IMAP daemon (dovecot) will continue to log to the file. It will make it more manageable for you to start over from zero.

Thank you, it worked well.
But imap.log works continuously, just after 30 minutes of deleting it has jumped back to nearly 1gb.
For now, just use your method.
Thank you very much.

Offline
****
Re: Has anyone encountered this situation?
« Reply #7 on: December 28, 2023, 12:50:06 PM »
Can you use paste in, and post the last 30 lines of the log, removing any private information
Google Hangouts:  rcschaff82@gmail.com

Offline
*****
Re: Has anyone encountered this situation?
« Reply #8 on: December 28, 2023, 03:40:47 PM »
I wouldn't even mind seeing 100 lines:
Code: [Select]
tail -100 /usr/local/cwpsrv/var/services/roundcube/logs/imap.log

Offline
*
Re: Has anyone encountered this situation?
« Reply #9 on: December 29, 2023, 02:14:03 AM »
Thank you Two bro.
I have a separate inbox with the imap.log file link.
Two bro, please help me see if there's anything strange.
Thank you very much.