Re: [qmailtoaster] qmaillog backup script
Yes Janno, I was thinking changing the value of logcount and logsize but then you never know how much traffic you will get today. mail traffic can be increased/decrease depend on various things i.e.: number of account, milists and domains you setup (and recordio if you activate it on purpose) in my toaster: if traffic low I still can see what happen last week, but if traffic is high I only can see logs for 3 days ago. Janno Sannik wrote: Why not just change /var/qmail/logcount to something bigger (I use 100) and logsize to something reasonable (I use 3 000 000, but actually 10MB would be even nice i think). PakOgah wrote: Dear list, since error 451 ... end status 256 happen to me this week and couple weeks ago. I create this little script to backup qmail log, so if I am out of office and users complaining error about mailserver I can trace what happen back w/o have to worry losing qmail log (of course the script should be ran daily) hope this little script could be usefull also for you note to Jake: I dont use tai64nlocal Script name backupqmaillog.sh - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [qmailtoaster] qmaillog backup script
Why not just change /var/qmail/logcount to something bigger (I use 100) and logsize to something reasonable (I use 3 000 000, but actually 10MB would be even nice i think). PakOgah wrote: Dear list, since error 451 ... end status 256 happen to me this week and couple weeks ago. I create this little script to backup qmail log, so if I am out of office and users complaining error about mailserver I can trace what happen back w/o have to worry losing qmail log (of course the script should be ran daily) hope this little script could be usefull also for you note to Jake: I dont use tai64nlocal Script name backupqmaillog.sh #!/bin/bash # # qmaillog backup utility # version 0.1 # [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] # 4 Aug 2007 # this qmaillog backup utility by default will backup # today qmail's send and smtp log into /home/backuplog # and keep it for the next 7 days # enhancement are always welcome # where your qmail log folder # QMAILLOG=/var/log/qmail QMAILLOG=/var/log/qmail # what log is going to backup ? # by default only smtp and send log only # possible log to backup are: # LOGS=authlib clamd imap4 imap4-ssl pop3 pop3-ssl send smtp spamd submission LOGS=send smtp # your backup destination # folder will be created automatically # BACKUP_DEST=/home/backuplog BACKUP_DEST=/home/backuplog # how long you will save the backup # BACKUP_AGE=7 # days BACKUP_AGE=7 # days # # process # DATE=`date +%Y%m%d` TMPFILE=/tmp/backuplist DAILY_AGE=1 # day DAILY_AGE_MINS=$[ $DAILY_AGE * 60 * 24 ] BACKUP_AGE_MINS=$[ $BACKUP_AGE * 60 * 24 ] for i in $LOGS; do mkdir -p $BACKUP_DEST/$i find $QMAILLOG/$i/* -cmin -$DAILY_AGE_MINS -exec ls -1 {} \; $TMPFILE tar czf $BACKUP_DEST/$i/$i-$DATE.tar.gz -T $TMPFILE rm -f $TMPFILE find $BACKUP_DEST/$i/*.tar.gz -cmin +$BACKUP_AGE_MINS -exec rm -f {} \; done - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[qmailtoaster] qmaillog backup script
Dear list, since error 451 ... end status 256 happen to me this week and couple weeks ago. I create this little script to backup qmail log, so if I am out of office and users complaining error about mailserver I can trace what happen back w/o have to worry losing qmail log (of course the script should be ran daily) hope this little script could be usefull also for you note to Jake: I dont use tai64nlocal Script name backupqmaillog.sh #!/bin/bash # # qmaillog backup utility # version 0.1 # [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] # 4 Aug 2007 # this qmaillog backup utility by default will backup # today qmail's send and smtp log into /home/backuplog # and keep it for the next 7 days # enhancement are always welcome # where your qmail log folder # QMAILLOG=/var/log/qmail QMAILLOG=/var/log/qmail # what log is going to backup ? # by default only smtp and send log only # possible log to backup are: # LOGS=authlib clamd imap4 imap4-ssl pop3 pop3-ssl send smtp spamd submission LOGS=send smtp # your backup destination # folder will be created automatically # BACKUP_DEST=/home/backuplog BACKUP_DEST=/home/backuplog # how long you will save the backup # BACKUP_AGE=7 # days BACKUP_AGE=7 # days # # process # DATE=`date +%Y%m%d` TMPFILE=/tmp/backuplist DAILY_AGE=1 # day DAILY_AGE_MINS=$[ $DAILY_AGE * 60 * 24 ] BACKUP_AGE_MINS=$[ $BACKUP_AGE * 60 * 24 ] for i in $LOGS; do mkdir -p $BACKUP_DEST/$i find $QMAILLOG/$i/* -cmin -$DAILY_AGE_MINS -exec ls -1 {} \; $TMPFILE tar czf $BACKUP_DEST/$i/$i-$DATE.tar.gz -T $TMPFILE rm -f $TMPFILE find $BACKUP_DEST/$i/*.tar.gz -cmin +$BACKUP_AGE_MINS -exec rm -f {} \; done - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]