http://www.shaunfreeman.co.uk/install-fail2ban-on-centos-6-with-plesk/
http://forum.parallels.com/showthread.php?72464-Shell-script-for-checking-mail-queue
http://www.devcu.com/forums/topic/274-locking-down-postfix-against-spam/
#!/bin/bash | |
# geoip on firewall in centos 7 | |
# this file: /etc/cron.weekly/bogonsblocks.sh | |
# sudo chmod +x /etc/cron.weekly/bogonsblocks.sh | |
## create tmp dir | |
# sudo mkdir /var/tmp/ipbogons | |
## create list on ipset | |
# sudo ipset create bogonslist hash:net maxelem 1000000 | |
## create rule on firewall-cmd |
#!/usr/bin/lua | |
--[[ | |
This script can be used to inspect uploaded files for viruses | |
via ClamAV. To implement, use with the following ModSecurity rule: | |
SecRule FILES_TMPNAMES "@inspectFile /opt/modsecurity/bin/modsec-clamscan.lua" "phase:2,t:none,log,deny" | |
Author: Angelo Conforti (based on Josh Amishav-Zlatin code) | |
Requires the clamav-server and clamav-scanner | |
smtpd_recipient_restrictions = | |
reject_invalid_hostname, | |
reject_unknown_recipient_domain, | |
reject_unauth_pipelining, | |
permit_mynetworks, | |
permit_sasl_authenticated, | |
reject_non_fqdn_recipient, | |
reject_unauth_destination, | |
reject_unverified_recipient, | |
reject_non_fqdn_sender, |
# SMTPD Restrictions v2015-06-02 | |
# NOTE: Overiding restrictions are in master.cf for submission and other services | |
smtpd_helo_required = yes | |
disable_vrfy_command = yes | |
smtpd_recipient_restrictions = | |
permit_mynetworks, | |
permit_sasl_authenticated, | |
permit_dnswl_client list.dnswl.org=127.0.[2..14].[2..3], |
biff = no | |
myhostname = mail.mysite.org | |
mydomain = mysite.org | |
myorigin = /etc/mailname | |
mydestination = $myhostname, localhost.$mydomain, localhost | |
relayhost = | |
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 | |
mailbox_size_limit = 0 | |
recipient_delimiter = + | |
inet_interfaces = all |
Ref Links: | |
============= | |
https://jvulinux.wordpress.com/2014/12/26/commands-to-check-spamming-in-postfix-mail-server/ | |
https://www.cyberciti.biz/tips/howto-postfix-flush-mail-queue.html | |
============= | |
Commands to check spamming in POSTFIX mail server | |
1. To see the mail queue: |
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
############################################################################################################### | |
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a | |
# power failure. | |
# works with apc smartups 750xl and esxi 5.5u1 | |
############################################################################################################### | |
0# make a new VM and install Ubuntu-Server on it | |
1# install apcupsd | |
apt-get install apcupsd |