block messages having no subject using acl in exim

10 06 2009

add these lines in your exim.conf

acl_check_data:
deny condition = ${if or
{{!def:h_Date:}{!def:h_Subject:}{!def:h_To:}}{yes}{no}}
message = Message does not conform to RFC2822 standard

deny condition = ${if eq{$h_Subject:}{}{yes}{no}}
message = Messages with blank/empty subjuect line are not accepted





Repairing cPanel Scripts

30 05 2009
wget -O scripts.tar.bz2 http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts.tar.bz2
tar -x -v -C / -j -p -f scripts.tar.bz2
chmod 755 /scripts/cpanelsync
/scripts/cpanelsync httpupdate.cpanel.net /cpanelsync/RELEASE/scripts /scripts
/scripts/upcp --force




FFMPEG installation

30 05 2009

cd /usr/local/src/

DOWNLOAD MODULES

wget www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
wget downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz

EXTRACT MODULES

tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.1.tbz2

mkdir /usr/local/lib/codecs/

yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ruby ncurses-devel -y

DOWNLOAD FFMPEG and MPLAYER

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer

svn update

cd /usr/local/src/
mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

LAME:

cd /usr/local/src/lame-3.97
./configure
make && make install

LIBOGG

cd /usr/local/src/
cd /usr/local/src/libogg-1.1.3
./configure –enable-shared && make && make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

LIBVORBIS

cd /usr/local/src/
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install

FLVTOOL2

cd /usr/local/src/
cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

MPLAYER

cd /usr/local/src/
cd /usr/local/src/mplayer
./configure && make && make install

cd /usr/local/src/

FFMPEG:

cd /usr/local/src/ffmpeg/
./configure –enable-libmp3lame –enable-libvorbis –disable-mmx –enable-shared
make
make install

export LD_LIBRARY_PATH=/usr/local/lib/

ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

FFMPEG-PHP:

cd /usr/local/src/
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize
./configure
make
make install





MySQL optimizaton parameters

30 05 2009

memory = keybuffer + (readbuffer + sort buffer ) max conncetions

max_connections=400
max_user_connections=30
key_buffer=256M (128MB for every 1GB of RAM)
myisam_sort_buffer_size=64M
join_buffer_size=1M
read_buffer_size=1M (1MB for every 1GB of RAM)
sort_buffer_size=1M (1MB for every 1GB of RAM)
table_cache=1500
thread_concurrency=2 (Number of CPUs x 2)
thread_cache_size=128
wait_timeout=10
connect_timeout=5
max_allowed_packet=16M
max_connect_errors=1082.165.248.54190.212.44.109
query_cache_limit=1M
query_cache_size=32M (32MB for every 1GB of RAM)
query_cache_type=1





RED5 installation

30 04 2009

echo " "
echo "Hello ,Please choose  the RED5 version : (1,2,3 or 4)"
echo " "
echo "1.  RED5 0.7.0"
echo "2.  RED5 0.6.3"
echo "3.  RED5 0.5  "
echo "                     Press Any other key to install 1. RED5 0.7.0"
read ver
cd /usr/src
echo ""
echo ""
echo "Downloading and installing   jpackage utils rpm......."
echo ""
echo ""
wget -c --tries=inf http://mirrors.dotsrc.org/jpackage/1.7/generic/free/RPMS/jpackage-utils-1.7.5-1jpp.noarch.rpm
rpm -Uvh jpackage-utils-1.7.5-1jpp.noarch.rpm
echo ""
echo ""
echo "Downloading and installing   JDK 1.6 update 5 ..........."
echo ""
echo ""
wget -c --tries=inf http://69.72.132.53/jdk-6u5-linux-i586.rpm
rpm -Uvh jdk-6u5-linux-i586.rpm
echo ""
echo ""
echo "Downloading and installing   Apache Ant 1.7  ..........."
echo ""
echo ""
wget -c --tries=inf http://apache.mirror.facebook.com/ant/binaries/apache-ant-1.7.0-bin.tar.gz
tar -xzvf apache-ant-1.7.0-bin.tar.gz
mv apache-ant-1.7.0 /usr/local/ant
echo ""
echo ""
echo "Exporting Paths and Variables for Ant  ..........."
echo ""
echo ""
echo 'export PATH=$PATH:/usr/local/ant/bin'>>/etc/profile
echo 'export ANT_HOME=/usr/local/ant'>>/etc/profile
export PATH=$PATH:/usr/local/ant/bin
export ANT_HOME=/usr/local/ant
echo ""
echo ""
echo "Downloading and installing   RED 5  ..........."
echo ""
echo ""
case $ver in
2)
wget -c --tries=inf http://dl.fancycode.com/red5/0.6.3/src/red5-0.6.3.tar.gz
tar -xzvf red5-0.6.3.tar.gz
mv red5-0.6.3 /usr/local/red;;
3)
wget -c --tries=inf http://dl.fancycode.com/red5/red5-0.5.tar.gz
tar -xzvf red5-0.5.tar.gz
mv red5-0.5 /usr/local/red;;
1|*)
wget -c --tries=inf http://red5.nl/installer/red5-0.7.0.tar.gz
mkdir red5
mv red5-0.7.0.tar.gz red5/
cd red5
tar -xzvf red5-0.7.0.tar.gz
rm -rf red5-0.7.0.tar.gz
cd ..
mv red5 /usr/local/red;;
esac
wget -c --tries=inf http://69.72.132.53/red5
mv red5 /etc/init.d/
chmod 755 /etc/init.d/red5
cd /usr/local/red
chmod 755 red5.sh
ant -v
./red5.sh




MRTG installation in cpanel

19 04 2009

# Move to your download folder.
cd /root/downloads
rpm -e mrtg
wget  http://www.dedicated-resources.com/files/mrtg-2.9.17-1cpanel.i386.rpm
Installing the app
rpm -Uvh mrtg-2.9.17-1cpanel.i386.rpm

Moving libpng
cd /usr/lib
mv libpng.so.2 libpng.so.2.OLD
# Creating the symlink
ln -s libpng.so.3 libpng.so.2
# Edit language at and specify only “en_US”
pico /etc/sysconfig/i18n

# Restarting MRTG
service mrtg restart

# Configurating MRTG to allow only our local IP to see the reports at
http://IP/mrtg

vi /usr/local/apache/conf/httpd.conf

#Search for the line (CTRL+W):
# It should look like this:

Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all

#After the last line () paste this and change allowed IPs:

order deny,allow
allow from [ SERVER IP ]
allow from [YOUR LOCAL IP]
deny from all

# Restarting httpd
service httpd restart
chkconfig –level 0123456 mrtg on

# Edit file:
pico /etc/mrtg/check-email

# Change to “*-H” “* -H”.
————————————————————————–





ffmpeg-php error

19 04 2009

While compiling ffmpeg-php Error: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_toGDImage’: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function) /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.) /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_ffmpeg_frame’: /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function) ————————————————————————————–

Fix: With the latest version of ffmpeg-php (0.6.0), update ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32

vi ffmpeg_frame.c

:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32

:w :q!

./configure make make install add extension=”ffmpeg.so” inside php.ini .





Kiranz Collection

15 03 2009

Hey friends..here s ma list of tunes..and if u re interested in tryn out anythn you can download it..i am linking each one to its torrents…

Jens Gad:

Achillea series :-

Tha Nine Worlds – download torrent

Amedas Estrellas – download torrent

Le Spa Sonique – download torrent

Enigma Series:-

Seven Lives Many faces – download torrent

A posteriori – download torrent

Massive Attack:-

Download all the 4 Albums:

Massive Attack - Blue Lines

    1. Safe From Harm
    2. One Love
    3. Blue Lines
    4. Be Thankful For What You've Got
    5. Five Man Army
    6. Unfinished Sympathy
    7. Daydreaming
    8. Lately
    9. Hymn Of The Big Wheel

Massive Attack - Protection

    1. Protection
    2. Karmacoma
    3. Massive Attack
    4. Weather Storm
    5. Spying Glass
    6. Better Things
    7. Eurochild
    8. Sly
    9. Heat Miser
   10. Light My Fire (Live)

Massive Attack - Mezzanine

    1. Angel
    2. Risingson
    3. Teardrop
    4. Inertia Creeps
    5. Exchange
    6. Dissolved Girl
    7. Man Next Door
    8. Black Milk
    9. Mezzanine
   10. Group Four
   11. (Exchange)

Massive Attack - 100th Window

    1. Future Proof
    2. What Your Soul Sings
    3. Everywhen
    4. Special Cases
    5. Butterfly Caught
    6. A Prayer For England
    7. Small Time Shot Away
    8. Name Taken
    9. Antistar

Massive Attack - Unleashed (Soundtrack)

    1. Opening Title
    2. Atta' Boy
    3. P is for Piano
    4. Simple Rules
    5. Polaroid Girl
    6. Sam
    7. One Thought at a Time
    8. Confused Images
    9. Red Light Means Go
   10. Collar Stays On
   11. You've Never Had a Dream
   12. Right Way to Hold a Spoon
   13. Everybody's Got a Family
   14. Two Rocks and a Cup of Water
   15. Sweet is Good
   16. Montage
   17. Everything About You is New
   18. The Dog Obeys
   19. Danny the Dog
   20. I am Home
   21. The Academy
   22. Baby Boy (by Thea)
   23. Unleash Me (by RZA feat. Prodigal Son and Christbearer Of Northstar)







Prevent Spamming in Exim ) cPanel

7 03 2009

(You will have to do this through WHM if you want to make the changes permanent, otherwise any changes will be overwritten during the next WHM/Cpanel update Main >> Service Configuration >> Exim Configuration Editor >> Advanced Editor. You may want to make a copy from the command line first just in case you mess things up ‘cp /etc/exim.conf /etc/exim.conf.bak’)

RBL, or Real-time Blackhole Lists, are lists of IP addresses from known spammers. You can use these lists in Exim to reject email from said spammers using the steps below;

Scroll down to the three text input boxes just below “begin acl”
In the *middle* box find the line ” accept hosts = :” and just after that line insert the following

#**# RBL List Begin
#**#
#
# Always accept mail to postmaster & abuse
#
accept domains = +local_domains
local_parts = postmaster:abuse
#
# Check sending hosts against DNS black lists.
# Reject message if address listed in blacklist.
deny message = ${sender_host_address} is listed at ${dnslist_domain}; See ${dnslist_text}
!hosts = +relay_hosts
!authenticated = *
dnslists = zen.spamhaus.org : bl.spamcop.net
!domains = +local_domains
#**#
#**# RBL List End

Spamassasin
————————

# vi /etc/mail/spamassassin/local.cf ‘ you will see the line;

# trusted_networks 212.17.35.

You can uncomment that line and add the IP address of your mailserver and localhost (and whatever other IPs you want to trust);

trusted_networks 127.0.0.1
trusted_networks 66.249.0.28

The other setting I found was whitelist_auth. You can add this anywhere in the /etc/mail/spamassassin/local.cf. ‘whitelist_auth’ will only work if you are using SPF, DKIM, or DomainKeys to verify senders.

whitelist_auth dave@example.com
whitelist_auth *@spry.com

For more info type ‘perldoc Mail::SpamAssassin::Conf’ from the command line.

These settings will help lower the amount of mail that Spamassassin has to process by ignoring all mail coming from your server and any other trusted IP.

——————————————————————————————–

Change all default/catchall addresses from :blackhole: to :fail:

Then to change all default addresses to :fail: we’ll need to run two commands, one to change any :blackhole: settings and the other to change any default addresses that forward to another email address. First run this command in SSH …

Quote:
replace ‘:blackhole:’ ‘:fail:’ — /etc/valiases/*

… this will change any :blackhole: setting to the desired :fail: setting.

Change all default/catchall addresses to :fail:

Then the second command …

Quote:
sed -i ’s/^\*: [^ ]*$/*: :fail: ADDRESS DOES NOT EXIST/g’ /etc/valiases/*

… this will change any setting which sends the unrouted mail to another email address to the desired :fail: setting.

Now, running this command again should reveal no results because we have just changed all settings to :fail: …

Quote:
grep ‘*:’ /etc/valiases/* | egrep -v ‘:fail:’





How to close open DNS severs???

5 03 2009

Close Open DNS Servers

For those of you who check your nameservers and other DNS related issues using the popular site dnsreport you’re probbaly seeing Fail Open DNS Servers. We’ll show you have to fixed named to close open dns servers.

How do I check my system?
Go to www.dnsreport.com and enter your domain name, eg webhostgear.com

You’re safe if you see:
PASS Open DNS servers

You need to follow this tutorial if you see:
FAIL Open DNS servers

Closing Open DNS Servers Tutorial

1) Login to your server and su to root.

2) Edit the /etc/named.conf file such as:# vi /etc/named.conf

Look for:

key “rndckey” {
};

After this add the following, replacing mainIP and secondaryIP with your systems nameservers.

acl “trusted” {
mainIP;secondaryIP;127.0.0.1;
};

3) After that’s done you want to add the section that says only the trusted is allowed for certain functions. Check your options area and make sure you add the following:

allow-recursion { trusted; };
allow-notify { trusted; };
allow-transfer { trusted; };

So the final result looks something like:

options {
directory “/var/named”;
allow-recursion { trusted; };
allow-notify { trusted; };
allow-transfer { trusted; };
dump-file “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below.  Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

4) Save the changes and restart the named service: service named restart

5) Recheck your site at dnsreport.com, you should be good!

Cheers