Has anyone encountered this situation?

Started by andylau123, December 26, 2023, 08:48:08 AM

Previous topic - Next topic

andylau123

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

rcschaff

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

overseer

Start over if you are encountering errors; it will make them easier to parse and diagnose. Truncate the log file to zero bytes:
truncate -s0 /usr/local/cwpsrv/var/services/roundcube/logs/imap.log

andylau123

Quote from: overseer 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:
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?

andylau123

Quote from: rcschaff 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.
Thank you, I don't know what to do with it.

overseer

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.

andylau123

Quote from: overseer 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.

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.

rcschaff

Can you use paste in, and post the last 30 lines of the log, removing any private information
Google Hangouts:  rcschaff82@gmail.com

overseer

I wouldn't even mind seeing 100 lines:
tail -100 /usr/local/cwpsrv/var/services/roundcube/logs/imap.log

andylau123

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.