This adjusts the number of days to keep quarantined email etc/MailScanner/defaults /var/www/mailscanner/conf.php days to keep need to be edited in both the above files
IP=”$(echo $SSH_CONNECTION | cut -d ” ” -f 1)”HOSTNAME=$(hostname)NOW=$(date +”%e %b %Y, %a %r”) echo ‘Someone from ‘$IP’ logged into ‘$HOSTNAME’ on ‘$NOW’.’ | mail -s ‘SSH Login Notification’ YOUR_EMAIL_ADDRESS — -f FROM_EMAIL_ADDRESS
The username and password needs to be encoded and sent in BASE64So if using username as the username it would become dXNlcm5hbWU= in BASE64 and a password of password would become cGFzc3dvcmQ= in BASE64 You can use this handy BASE64 encoding tool to do the encoding for you.
# Average CPU Load Notification.# This will email you once when average CPU Load reaches the set CPU Threshold value.# When average CPU Load drops back below CPU Threshold the email notification is reset.# Set up the scheduler to run this at 1-5 second intervals (Sample Rate).# Original credit goes […]
This script will export the config from your mikrotik router and email it to your email address. The scheduled time between exports and email sending can be decided by you. The exported file will take the name of your system identity ending in the extension .rsc /export file="$[/system identity get […]
This needs to be edited and entered in the Exchange Shell, do so at your own risk – I will not be held liable for anything that happens. New-ExchangeCertificate -FriendlyName “SelfSigned Cert” -SubjectName “cn=mail.yourdomain.com” -DomainName your-Server,your-Server.yourlocaldomain.local,mail.yourdomainr.com -PrivateKeyExportable $True I have used this on Server 2008 and Exchange 2007
If you ever loose the “Unread Mail” folder in Outlook a quick way of getting it back is to press “CTRL + Shift + P” this will bring up the following; Click “OK” and you will have just created a search folder that looks for any unread emails in Outlook. You could […]
From time to time the maillog in mysql grows to big and eats up all the space on my mail filter, the end result it stops processing mail 🙁 The problem becomes worse if you have no space left to try and repair the MySQL file, so make sure you […]
I often am faced with deleteing mails from MAILER-DAEMON that are going to non existant domains in my Postfix queue. Rather than manually deleting each email by hand, I now use a little script that does the job for me. All I do now is type in “delmd” without the […]
To check how many emails have been queuing in Postfix (an email server for Linux) and for what period of time you can use the following command #qshape deferred | head The above command will produce the following; The T represents time in minutes The Total represents how many emails have […]
Custom rules can be created for Spamassassin, I use a hand written list thats customised for my needs. The location of the file is /etc/mail/spamassassin/98_myrules.cf The file name is not important, the format of the file is as follows:- body LocalStockRule /putcompanynamehere/ describe LocalStockRule Local Stock Name Block score LocalStockRule […]