I am planning on killing non-secure IMAP4 service on my server. So I ran this command in the log file location:
grep -i 'INFO: LOGIN' * > imap4user.log
This gave me a list of all the emails that have logged into regular IMAP. Pasting that into Excel I was able to create a nice, no duplicates list pretty quickly.
But my log files don’t go back that far, so I was wondering if I could change this so I could get a wider range of emails, then after I could set it back to normal log retention.
This way I can alert my user that they need to switch to SSL.
Hi Justin
Good question, which I think has been asked before
I think you need to look at logrotate.conf (/etc/logrotate.conf), and change rotate to the number of logs to be left, which is set to 1, so 1 log should be left after rotation I believe. Setting this say to 4, would leave 4 logs after rotation.
I know IW use logrotation is used, but may also be listed in cron folders
I could be wrong though, as it is early here and my little brain cell has not woken up fully sorry.
I hope that helps
Many thanks
John
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
So doesn’t seem to be on the same page as my IMAP logs.
Rsync idea is brilliant though! This is normally the stuff I come up with and didn’t even occur to me. I can just rsync it to my other drive every 12 hours or so and keep a full history for as long as I want!