SME log files are already size-limited. Most SME services use multilog, which rotates logs according to file size rather than date (keep x log files with maximum size y). If you are attacked you risk losing log file depth but not disk space. The largest log file collection on any of my SME servers is just over 500MB.
For more info take a look at http://wiki.contribs.org/Log_Files
I have been looking at the link, but i cannot find anything on size limits, but a lot of other useful information though.
Yeah - each service is configured individually, and the only one I've examined deeply (qpsmtpd) is not templated so changing the defaults gets tricky.
multilog keeps the last 10 logs by default; you can change this by adding "n##" to the desired /var/service/*/log/run file. The default size for each logfile is 5,000,000 bytes. This can be changed by editing the existing "s5000000" in the same /var/service/*/log/run files.
Here is the output of
grep /usr/local/bin/multilog /var/service/*/log/run/var/service/clamd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/cvm-unix-local/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/dhcpd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/dnscache.forwarder/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/dnscache/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/freshclam/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/ftp/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/httpd-admin/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/imap/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/imaps/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/ippp/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/mysqld/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/nmbd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/ntpd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/pop3/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/pop3s/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/pptpd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/proftpd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/qmail/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/qpsmtpd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/radiusd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/raidmonitor/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/smbd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/smtp-auth-proxy/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/spamd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/sqpsmtpd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/squid/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/sshd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/tinydns/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/ulogd/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/wan/log/run: /usr/local/bin/multilog t s5000000 \
/var/service/yum/log/run: /usr/local/bin/multilog t s5000000 \
Here's a note on how I changed the number of log files retained from 10 to 50 a while ago:
http://forums.contribs.org/index.php?topic=32853.msg139334#msg139334New question:
I have successfully been able to restore a SME server using Darryl's backup2ws, but this tool doesn't give a very fine grained control of what to restore. Say if i would restore a couple of mails from a single user that lies on an old backup, how can i do that?. I have looked under the /home/e-smith/users/username/, but i cant figure out what to copy where. If I could figure this out, then SME
Each user's email is stored in /home/e-smith/files/users/<username>/Maildir
Under Maildir you will have 3 directories - "cur", "tmp" and "new". Everything you've ever seen in your email client will be in the "cur" folder.
Other IMAP folders you create will be under Maildir with a name beginning with a dot. "junkmail" will be in the .../Maildir/.junkmail folder, for example. Inside each folder you will again have "cur", "tmp" and "new".
I haven't used backup2ws lately, so I'm not sure how to restore an email or two. If I remember correctly, backup2ws creates a gzip'ed tar file and puts it on your workstation. If I wanted just a few emails I'd try:
* opening the backup using a current copy of 7zip or pkzip, then see if I can locate the desired files and use WinSCP to put them back into the user's mail folder. (perhaps they should go into "new" so that the IMAP indexes get properly maintained - but that's a complete guess).
* If that didn't work I'd copy the backup file onto my SME and try to learn enough about tar to extract just a few files, or I'd load up cygwin on my Windows workstation and try to extract the emails there.
* If I had a spare system around, or a vmware image of SME, I might restore the backup to the spare or virtual server, then use
imapcopy to copy the desired emails.
Personally, I use
Affa for backups, so I could just browse to the backup folder containing my emails and copy them wherever I want...
And of course, once you find the
right solution, document it somewhere appropriate in the Wiki
