Archive for November, 2010

France Telecom / Orange blocking port 25 email send – fix

France Telecom / Ora...

The solution is here http://www.bergek.com/2007/11/29/making-postfix-listen-to-a-secondary-port/ You may need to install iptables: apt-get install iptables iptables -t nat -A PREROUTING -p tcp --dport 587 -j REDIRECT --to-ports 25 iptables-save Send email
Script to restart Apache when virtual memory too low – run every minute as cron job

Script to restart Ap...

#!/bin/bash free -m | grep Swap | awk '{print $NF}' > /tmp/swapused virt=`cat /tmp/swapused` if [ $virt -le 100 ]; then top -bn1 | mailx -s "Virtual Memory Low - Restarting Apache" test@askmatt.co.uk apache2ctl restart fi rm /tmp/swapused Restart apache when memory low.