Amazon SES postfix relay on centos

Posted by EvolutionCrazy on Apr 15, 2014 in howto

Following at the letter the amazon SES tutorial:

but auth is not working and giving errors like

No worthy mechs found
SASL authentication failed; cannot authenticate to server

and so on?

Make sure you have the proper auth libs installed

yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5

Tags: , , ,


Processing mysql dumps in hurry (convert single insert to extended insert)

Posted by EvolutionCrazy on Jan 5, 2013 in howto, snippets

Most time there’s little time, sometime there’s NO TIME!

A few days ago I had no time, and had to manipulate a badly exported database (2million+ single myisam insert statements) tuning mysqld was useless, insert delayed useless, increasing buffers useless… and so on… import was taking hours (many hours) on the target box due to impressively high disk io!

So I just fired up a vmware instance with 32gb of ram, 10gb hdd and 8cpu cores (of a xeon L56xx) and did everything in ram.
What was going to take hours on the target box took just 2minutes on the vmware instance…
Then I did a proper “mysqldump –opt” and imported it back into the target box in just 20seconds 😀

yum upgrade -y
wget -q -O - http://www.atomicorp.com/installers/atomic | sh
mkdir -p /var/lib/mysql && mount -v -t tmpfs -o size=24G none /var/lib/mysql
yum install mysql mysql-server -y
nano -w /etc/my.cnf

tune it up a little, in my case


was enough 🙂

service mysqld restart

and you are good to go!

import the bad export and after that export it making use of all the proper settings (extended queries, locking and so on) … –opt handles all of them by default 🙂

So yes… sometime I make use of “the cloud” too :O

PS: I do the same (storage on ramdisk) when I’ve to compile a linux kernel.

Tags: ,


wget ftp download specific directory content – no recursion

Posted by EvolutionCrazy on Jan 4, 2013 in snippets

This one command allows you to download the content of a directory to a local directory without doing recuirsive searches

wget -np -N --cut-dirs=1 -A .dem ftp://user:password@host.tld/tf2/orangebox/tf/*

specifically this one downloads all the “.dem” (-A .dem) (team fortress demo files) located into the remote “/tf2/orangebox/tf/” directory.
Files are saved into the current directory (–cut-dirs=1)

Additionally it makes use of timestamping (-N) in order to not download already existing files when doing a subsequent run.



Munin 2 CGI graphs generation cpu usage

Posted by EvolutionCrazy on Oct 16, 2012 in snippets

This is what happens when you move a munin master node from CRON to CGI graphs:


Tags: ,


Softlayer private network routing on centos6

Posted by EvolutionCrazy on Sep 29, 2012 in snippets
echo ' via' > /etc/sysconfig/network-scripts/route-eth0
service network restart

where is your private network ip gw and eth0 is your private network interface

Tags: ,


Upgrading munin from 1.4.6 to 1.4.7 – re-enabling lost plugins

Posted by EvolutionCrazy on Apr 12, 2012 in howto

Upgrading munin on CentOS/RHEL/Scientific Linux using the rpm from EPEL repositories results in an empty plugin list on the nodes:

ls -al /etc/munin/plugins/

easy fix:

munin-node-configure --suggest --shell | sh ; service munin-node restart

to verify what was detected just run:

ls -al /etc/munin/plugins/

Tags: ,


Linux fix wrong date/time hwclock

Posted by EvolutionCrazy on Mar 25, 2012 in howto

If your clock is wrong you might have a wrong hwclock set…

yum install ntp
ntpdate -s it.pool.ntp.org
hwclock -w

on a side note to change the timezone on RHEL 6.x adjust the clock settings config file:

nano -w /etc/sysconfig/clock

set it as you wish:


then set the localtime

cp /usr/share/zoneinfo/Europe/Rome /etc/localtime



BFD vsftpd script

Posted by EvolutionCrazy on Mar 29, 2011 in howto, snippets

BFD is an easy to use brute force detection script that plays very nicely when combined with APF…

currently it does support certain daemons out of the box… but vspftd is not one of those 🙁
This a *very basic* (it does not pass the offending username to bfd) script to add VSFTPD support to BFD.

You just need to create a file named “vsftpd” into the BFD ./rules/ directory and paste this content into it:

if [ -f "$REQ" ]; then
 #Mon Mar 28 23:57:38 2011 [pid 9897] [asdasd] FAIL LOGIN: Client ""
 ARG_VAL=`$TLOG_PATH $LP $TLOG_TF | grep -w 'FAIL LOGIN' | sed -r 's/^.{0,}Client .//' | sed 's/"/:vsftpd/g'`

This script refers to the standard vsftpd rhel/centos installation…
If the logfile is placed elsewhere (vsftpd_log_file) or if the option “syslog_enable” in vsftpd.conf has been enabled it needs to be adjusted 🙂

PS: this was a NON-WORKING test (usernames with a space in it where making it fail):

ARG_VAL=`$TLOG_PATH $LP $TLOG_TF | grep -w 'FAIL LOGIN' | awk '{print $12":"$8}' | tr '[]"'`

Tags: , ,


Remote CentOS 6 install with VNC

Posted by EvolutionCrazy on Oct 21, 2008 in howto

*POST UPDATED – now referring to centos6*
I get in touch with many people related to centos reinstall… I’m aware in certain conditions it’s a pain to have it rolling properly…
I do this for work, just contact me if you want it done for a small fee 😉

There are some ISPs in the dedicated servers market that are offering crappy CentOS installs…

With “crappy” I mean: broken/modifed images…

The worst example I had the opportunity to try was OVH.
OVH is in general a very good dedicated hosting provider offering very nice services at an impressive low price… but they have the bad attitude to install custom operating systems that many times cannot be reverted back to the original kernels 🙁

One of them is their CentOS 5 install… Lucky for us it’s not a big problem as, most times, it’s possible to do a clean CentOS install 😉

Read more…

Tags: ,

Copyright © 2018 evcz.tk All rights reserved. Theme by Laptop Geek.