Skip to content

Instantly share code, notes, and snippets.

@aymencis
aymencis / spamcheck.sh
Created June 25, 2015 18:17
SPAM CHECK ON POSTFIX MAIL QUEUE
#!/bin/sh
NB=$(/usr/sbin/postqueue -p | wc -l)
[email protected]
MAIL="/tmp/mailspam"
LIMIT=600
echo START CHECKING SPAM $(date) > $MAIL
echo "" >> $MAIL
if [ $NB -gt $LIMIT ]
then
@aymencis
aymencis / backup.sh
Created June 25, 2015 18:01
OVH NFS BACKUP
#!/bin/sh
# BACKUP SCRIPT
CONTACT="[email protected]"
MAIL="/tmp/mail"
if [ -e "/var/lock/backup.lock" ]
then
echo " BACKUP ALREADY STARTED !!" > $MAIL