<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Hosting</title>
        <link>http://www.sharpdeveloper.net/content/category/2.aspx</link>
        <description>Hosting related articles on cleaning up your mail queue, tips to running your server smoothly, and other beneficial tidbits of information only a server admin would know.</description>
        <language>en-US</language>
        <copyright>Sameer Alibhai</copyright>
        <managingEditor>abdullah.adam@gmail.com</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Server security and PHP Safe mode</title>
            <link>http://sharpdeveloper.net/content/archive/2008/07/04/server-security-and-php-safe-mode.aspx</link>
            <description>Last weekend was a bit of a disaster.  One of the servers I was maintaining was hacked, big time.  How did the (not so nice word) guys do it?  Well, first of all, I learned hackers think they are doing good deeds.  They did me a favor by hacking my server and by not "deleting all the files".  They only defaced some 30 something sites and caused me lots of misery and site cleanup.  Why do I say this?  Based on the hacker's signatory message - "Owned by nEtDeViL .. Just testing your Security .. Peace ! .. net_devil@.......com"&lt;br /&gt;
&lt;br /&gt;
So Mr. hacker dude, if you really want to just "test" my security, why don't you send me a kind email stating that you found some security holes and how to fix them?  That would be a real gem of a good deed :)&lt;br /&gt;
&lt;br /&gt;
Anyway, there is always light at the end of the tunnel, good always comes from bad, if you are patient and learn from your mistakes.&lt;br /&gt;
&lt;br /&gt;
Here is what I learned - &lt;span style="FONT-WEIGHT: bold"&gt;TURN ON PHP SAFE MODE&lt;/span&gt;!  The hacker exploited some old postNuke script in the albums folder uploaded some old Russian hack script called r57shell.php .  This script allowed him to install some rootkits which basically log everything you do on the server and all sorts of crap.  Which caused me to have to get a new server, yada yada.. :( &lt;br /&gt;
&lt;br /&gt;
Now the first reason they managed to achieve this, is I didn't have php safe mode on.  I didn't want to inconvenience my buddies on the server (ya right, dumb move.)  So even if they managed to upload it, they can't do much with PHP safe mode on.  But with PHP safe mode off, well sorry buddy, even your own pals on the server can use this script to take over the server if you didn't give your friends full rights to run stuff on it and they get mad at you (you know what they say.... keep your friends close and your enemies ....)&lt;br /&gt;
&lt;br /&gt;
Second thing, I went all out and installed &lt;a href="javascript:void(0);/*1215213932151*/"&gt;Suhosin&lt;/a&gt; (grown out of what was known as PHP Hardening Patch).  I don't know how much this will help me, but at the least it didn't break anything on the server, so I'm leaving it there for good measure.&lt;br /&gt;
&lt;br /&gt;
There is also Mod_Security for Apache but that's a bit difficult cuz it will slow down your server by checking every single request plus it will break a bunch of scripts so you will have to keep tweaking the regular expressions to get it to work nicely especially if you have tons of apps on the server.&lt;br /&gt;
&lt;br /&gt;
Related reading - Forum Post: &lt;a href="javascript:void(0);/*1215213665698*/"&gt;Tightening your PHP Security&lt;/a&gt; (just a few easy tips on how to tighten your security)&lt;br /&gt;
&lt;br /&gt;
PS.. this server is running Microsoft Windows so don't even &lt;span style="FONT-WEIGHT: bold"&gt;bother &lt;/span&gt;trying to hack it ;) -- okay don't laugh&lt;img src="http://sharpdeveloper.net/content/aggbug/70.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/07/04/server-security-and-php-safe-mode.aspx</guid>
            <pubDate>Fri, 04 Jul 2008 23:27:47 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/70.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/07/04/server-security-and-php-safe-mode.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/70.aspx</wfw:commentRss>
        </item>
        <item>
            <title>20% Extra Security is Enough To Stop Kiddie Hackers</title>
            <link>http://sharpdeveloper.net/content/archive/2008/05/05/20-extra-security-is-enough-to-stop-kiddie-hackers.aspx</link>
            <description>&lt;p&gt;Here's a security problem for you.&lt;/p&gt;
&lt;p&gt;How do we stop people from using brute force attacks on our logon page?&lt;br /&gt;
Well, simple... just add a captcha.&lt;/p&gt;
&lt;p&gt;Well, umm.. captcha is already broken.  Even if it isn't, they can hire someone overseas to sit there all day and crack away at it.. right ?&lt;br /&gt;
Well, umm... fine, so we'll set up this security scanner, and add that vulnerability protector, and automatically ban this and that, and let's do this.. and that, and this, and that, and so on, and so forth, until we have a fortress.&lt;/p&gt;
&lt;p&gt;Tell you the truth.  Unless your site is heavily targetted, captcha is probably good enough.  In fact, my experiences is that you just put in 20% effort and you will stop 80% of the hackers (there's that 80/20 rule again...!).  For example, I had a web server that was getting daily hack attempts on the ssh port (port 21).   I had done lots of security tightening on it.  For example, I disabled root login, I added an automatic email that was sent to me on root logon, and so on... As well I had a software installed that would ban them after a certain number of failed logins, and would send me an email.   This software was called &lt;a href="http://rfxnetworks.com/bfd.php"&gt;BFD (Brute Force Detection)&lt;/a&gt;.  After getting these daily hack attempts, I decided I had enough, and I changed the port to a random value (say 561).   Since that day, I haven't received hardly one or two hack attempts.  Seems most hackers were the kiddy hackers that didn't really bother to try hard enough.  A simple port scan would have revealed my SSH port.  However.. by putting in that 20% effort, I got rid of 80% of the losers.&lt;/p&gt;
&lt;p&gt;I eventually re-enabled direct root logon, since I realized this simple step was enough.&lt;/p&gt;
&lt;p&gt;Now if your site is going to be targetted by hackers, no matter what you do, catpcha or no captcha, IP blocking or not, if they want to get in, they will get in.  The best way to stop those hackers is to hire some l33t hackers yourself to try to break their way in and then block it.  You will need to do some security audits and close any open holes you might have.&lt;/p&gt;
&lt;p&gt;But in the end, the idea is, just put in a little extra security, don't just leave your login page open for brute force attacks, because you never know,....&lt;strong&gt;they might have already hacked your site (scary.. isn't it?)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Update - I found a good example of this in action - take a look at this quote from &lt;a href="http://www.emailspoofer.net/"&gt;EmailSpoofer.NET&lt;/a&gt;:&lt;br /&gt;
&lt;/p&gt;
&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt;
&lt;p&gt;Your Javascript sucks, I can decode it in 5min, why is it so easy to decode? &lt;br /&gt;
&lt;br /&gt;
All javascript can be decoded. Its a matter of how much time/resources you want to devote to it. However, in this case, the javascript isn't meant to be difficult to be decoded by humans. It's meant to be difficult to be decoded by spambots. That being said, if you see some improvements I could make to the javascript routine, feel free to send them to me. I’d love to incorporate them into the control. However, please don't send me scripts that is someone else's work. Please send your original. Thanks! &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Keep in mind that the 20% is always increasing. Hackers get smarter over time, and so you need to keep up with this minimum 20%. Take a look at how I was hacked in &lt;a href="http://www.sharpdeveloper.net/content/archive/2008/07/04/server-security-and-php-safe-mode.aspx"&gt;Server Security and PHP Safe mode&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/65.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2008/05/05/20-extra-security-is-enough-to-stop-kiddie-hackers.aspx</guid>
            <pubDate>Mon, 05 May 2008 22:39:30 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/65.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2008/05/05/20-extra-security-is-enough-to-stop-kiddie-hackers.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/65.aspx</wfw:commentRss>
        </item>
        <item>
            <title>70GB of Files Uploaded Because of a Trojan Virus</title>
            <link>http://sharpdeveloper.net/content/archive/2007/07/17/41.aspx</link>
            <description>The name 'trojan' came from a historical concept known as a 'Trojan Horse'.  It was actually a giant wooden horse that was given as a gift to some town or castle, but in reality it was not a gift but had soldiers inside it who jumped out and attacked and ramsacked the town or castle.  This word has now come to mean a program that gets inside and attacks your computer!  It could be an innocent looking software that you install that has this on it.&lt;br /&gt;
&lt;br /&gt;
Recently I was dealing with a server that was compromised by the Trojan Wollf Virus... &lt;br /&gt;
&lt;br /&gt;
According to Symantec, "Backdoor.Wollf.16 is a Backdoor Trojan Horse that installs itself as a server and allows unauthorized access to an infected computer.."&lt;br /&gt;
&lt;br /&gt;
According to Sophos, it:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Allows others to access the computer &lt;/li&gt;
    &lt;li&gt;Steals information &lt;/li&gt;
    &lt;li&gt;Downloads code from the internet &lt;/li&gt;
    &lt;li&gt;Records keystrokes &lt;/li&gt;
    &lt;li&gt;Installs itself in the Registry &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now.. the hacker who gained access to the serve,r he managed to upload some 70GB of personal files - apps, warez, mp3s, illegally copied movies, etc on this server&lt;br /&gt;
&lt;br /&gt;
Take a look for yourself!  &lt;a href="http://www.sharpdeveloper.net/source/sharpdeveloper-backdoor-updated-files.txt"&gt;Backdoor uploaded files&lt;/a&gt; (331kb)  &lt;/p&gt;
&lt;p&gt;Here is a snippet:&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt; Directory of C:\System Volume Information\catalog.wci\bin\DVDR&lt;br /&gt;
&lt;br /&gt;
06/03/2007  10:54 AM    &amp;lt;DIR&amp;gt;          .&lt;br /&gt;
06/03/2007  10:54 AM    &amp;lt;DIR&amp;gt;          ..&lt;br /&gt;
05/26/2007  10:01 AM    &amp;lt;DIR&amp;gt;          Borat.2006.PAL.MULTISUBS.DVDR-RUSH&lt;br /&gt;
06/03/2007  03:40 AM    &amp;lt;DIR&amp;gt;          FaTz&lt;br /&gt;
06/03/2007  01:25 PM    &amp;lt;DIR&amp;gt;          Heroes.S01.INTERNAL.HDTV.XviD-SCT&lt;br /&gt;
05/26/2007  01:56 PM    &amp;lt;DIR&amp;gt;          Smokin.Aces.PAL.NORDIC.DVDR-RUSH&lt;br /&gt;
05/26/2007  11:22 AM    &amp;lt;DIR&amp;gt;          The.Fountain.2006.PAL.PROPER.MULTISUBS.DVDR-SSB&lt;br /&gt;
               0 File(s)              0 bytes&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;I created this list from command prompt by typing "dir /s &amp;gt; output.txt"&lt;/p&gt;
&lt;p&gt;These were uploaded to a dedicated windows machine that had its Windows Update set to "automatically download but let me choose when to install"&lt;br /&gt;
&lt;br /&gt;
I cleaned it up with the following steps:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Never turn off Automatic Windows update unless you are going to watch it like a Hawk&lt;/li&gt;
    &lt;li&gt;If you are infected with a trojan, check your hard disk for large files as you may have been used as a file server&lt;/li&gt;
    &lt;li&gt;Install &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=435BFCE7-DA2B-4A6A-AFA4-F7F14E605A0D"&gt;Microsoft Defender&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Install Spybot Search &amp;amp; Destroy&lt;/li&gt;
    &lt;li&gt;Install Lavasoft Adaware&lt;/li&gt;
    &lt;li&gt;Install &lt;a href="http://www.clamwin.com/"&gt;ClamWin&lt;/a&gt; (will only search) or AVG antivirus (AVG cannot be used for free on servers though)&lt;/li&gt;
    &lt;li&gt;Download &lt;a href="http://vil.nai.com/vil/stinger/stinger.htm"&gt;Mcafee Stinger&lt;/a&gt;, a free tool to clean viruses from your machine&lt;/li&gt;
    &lt;li&gt;Run &lt;a href="http://www.microsoft.com/security/malwareremove/default.mspx"&gt;Microsoft Malicious Software Removal Tool&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Make sure your Windows Firewall is enabled, or better yet, get ZoneAlarm or some other software firewall&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Any comments?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/41.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai, Ashiq Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/07/17/41.aspx</guid>
            <pubDate>Wed, 18 Jul 2007 03:16:03 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/41.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/07/17/41.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/41.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Sql Injections and Securing Clipshare Vulnerabilities</title>
            <link>http://sharpdeveloper.net/content/archive/2007/07/02/fix-clipshare-the-easy-way.aspx</link>
            <description>&lt;span style="font-weight: bold;"&gt;Tags: Clipshare, PHPNuke, SQL Injection, SQL Injection Vulnerability&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;
&lt;br /&gt;
Just last week I was informed that two &lt;a href="http://www.clip-share.com/"&gt;Clipshare&lt;/a&gt; (Youtube clone) sites were hacked.  The culprit was a SQL injection vulnerability in the code.  This article will explain a creative way of securing your site without really fixing the underlying code.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;What is a SQL Injection and how do you fix it?&lt;/h2&gt;
&lt;br /&gt;
It means that the code was executing code that looked like this:&lt;br /&gt;
&lt;br /&gt;
ExecuteSQL("Select salary from employees where ID = $_GET['id']");&lt;br /&gt;
&lt;br /&gt;
Where $_GET['id'] means the querystring parameter ID which is passed in as follows:&lt;br /&gt;
&lt;br /&gt;
http://www.yoursite.com/index.php?id=5&lt;br /&gt;
&lt;br /&gt;
However, because we are not "sanitizing" the data before sending it to the sql server, someone can load the URL:&lt;br /&gt;
&lt;br /&gt;
http://www.yoursite.com/index.php?&lt;span style="font-weight: bold;"&gt;id=5 OR 1=1&lt;/span&gt; (or http encoded as http://www.yoursite.com/index.php?&lt;span style="font-weight: bold;"&gt;id=5%20OR%201=1&lt;/span&gt;&lt;br /&gt;
What that means is the SQL statement that will be executed is&lt;br /&gt;
&lt;br /&gt;
ExecuteSQL("Select salary from employees where ID = 5 OR 1=1");&lt;br /&gt;
&lt;br /&gt;
When you say that to the database, return salaries for employees if 1=1 (which is always), thus it will return all records for all employees&lt;br /&gt;
&lt;br /&gt;
Even worse can be done, such as when you are checking a login and password, we had a live site that executed the following SQL and checked if the user and password was correct if a record was returned:&lt;br /&gt;
&lt;br /&gt;
string sql = 'select * from users where login = ' + login + ' and password = ' + password; (C#)&lt;br /&gt;
&lt;br /&gt;
you could put the login as "admin --" and anything for the password, and the password part was commented out and it would load the following:&lt;br /&gt;
&lt;br /&gt;
select * from users where login = admin &lt;span style="font-style: italic;"&gt;-- and password = asidasdsad&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
the &lt;span style="font-style: italic;"&gt;--&lt;/span&gt; indicates that the rest is a comment and should be ignored by the SQL server, thus it will only execute:&lt;br /&gt;
&lt;br /&gt;
select * from users where login = admin&lt;br /&gt;
&lt;br /&gt;
Now the ClipShare software is full of these vulnerabilities.  To fix them (in PHP), you have to call &lt;a href="http://www.php.net/manual/en/function.mysql-real-escape-string.php"&gt;mysql_real_escape_string()&lt;/a&gt; on your querystring and form post variables.&lt;br /&gt;
&lt;br /&gt;
So if we have &lt;br /&gt;
&lt;br /&gt;
ExecuteSQL("Select salary from employees where ID = $_GET['id']");&lt;br /&gt;
&lt;br /&gt;
you can change this to:&lt;br /&gt;
&lt;br /&gt;
ExecuteSQL("Select salary from employees where ID = ' + mysql_real_escape_string($_GET['id']));&lt;br /&gt;
&lt;br /&gt;
If you want to fix it, you can try to see if there is an upgrade that resolves these problems.  If you have heavily modified the script, or you cannot upgrade, this might not be an option.  &lt;br /&gt;
You can try to fix it yourself, but I looked like every single page was vulnerable.  &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;How to fix your Clipshare software the easy way!&lt;br /&gt;
&lt;/h2&gt;
&lt;br /&gt;
There is another solution that is stronger.  This is not the 100% foolproof solution, but it is an easy way to fix it without having to fix your entire bad codeset.  What you can do is change the actual database table name from 'adminusers' which everyone knows, to something like 'purpleadmins'. It doesn't fix the underlying problem (the door is still wide open), but the wallet is hidden somewhere else in the house and nobody can find it, even if they can get in.&lt;br /&gt;
&lt;br /&gt;
Here is how you can do it.&lt;br /&gt;
It's been about a year and this method has worked extremely well and my vulnerable PHP Nuke installation (version 7.1) has not been hacked again yet!&lt;br /&gt;
This also worked on two clipshare installations.&lt;br /&gt;
&lt;br /&gt;
First you have to execute some SQL code to change the table name.&lt;br /&gt;
&lt;br /&gt;
1) Rename your column (MySQL code)&lt;br /&gt;
&lt;pre class="programlisting"&gt;ALTER TABLE oldAdminTableName RENAME newAdminTableName;&lt;/pre&gt;
&lt;br /&gt;
2)  Then you have to execute a search and replace on the actual PHP code.  &lt;br /&gt;
This will only work if you have the full source code (Some applications such as &lt;a href="http://www.whoiscart.net"&gt;whois.cart&lt;/a&gt; are encoded and you cannot see the source code).  To replace in files you can run the following Linux command:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;perl -e "s/SEARCH/REPLACE/g;" -pi.save $(find ./*.php -type f)&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;
&lt;br /&gt;
3) To verify that it actually worked, search for files (linux again)
&lt;pre&gt;&lt;span style="font-weight: bold;"&gt;find . -name "*.c" -exec grep -i "find me" {} /dev/null \;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
References:&lt;br /&gt;
&lt;div style="margin-left: 40px;"&gt;&lt;a href="http://forums.devshed.com/unix-help-35/unix-find-and-replace-text-within-all-files-within-a-146179.html"&gt;Unix find and replace text within all files within a directory (forum)&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.csm.ornl.gov/~hinkel/tips/totw.3.3.96.html"&gt;Greg Hinkel's UNIX Tip of the Week&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/36.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/07/02/fix-clipshare-the-easy-way.aspx</guid>
            <pubDate>Mon, 02 Jul 2007 20:07:24 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/36.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/07/02/fix-clipshare-the-easy-way.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/36.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Delete Spam from Exim Queue</title>
            <link>http://sharpdeveloper.net/content/archive/2007/06/05/delete-spam-from-exim-queue.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;Spam is a major cause of headache for many people in the world.  Especially server administrators.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Here is a tip to clean up your exim mail queue if its getting to large and full of spam.&lt;/p&gt;
&lt;p&gt;Please keep in mind that some legitimate emails may get deleted by this method.  Please use it carefully.  I had more than 2000 emails in my queue, and it was reduced to about 50 after running a few of these.&lt;/p&gt;
&lt;p&gt;First, run&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;strong&gt; grep -R -l &lt;font style="background-color: rgb(255, 255, 0);"&gt;[SPAM]&lt;/font&gt; /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;The highlighted word will be used in a grep search and replace and all messages matching that will be deleted.  If you also want to remove frozen messages from your queue, run the following&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;font face="Arial"&gt;&lt;strong&gt;grep -R -l '*** Frozen' /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;font face="Arial"&gt;You can perform one more that will also clean your exim queue some more&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;
&lt;font face="Arial"&gt;&lt;strong&gt;grep -R -l 'The recipient cannot be verified' /var/spool/exim/msglog/*|cut -b26-|xargs exim -Mrm&lt;br /&gt;
&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial"&gt;&lt;font face="Arial"&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;font face="Arial"&gt;Second tip - if you are using CPanel, set up your mails to default to &lt;a href="http://www.configserver.com/free/fail.html"&gt;:fail: rather than :blackhole:&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;References:&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Thank you to Khalid for his regular expression on his blog post &lt;a href="http://khalid.blogspot.com.pk/2006/03/19/deleting-mails-in-exim/"&gt;Deleting Emails in Exim&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/18.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai, Ashiq Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/06/05/delete-spam-from-exim-queue.aspx</guid>
            <pubDate>Tue, 05 Jun 2007 12:49:20 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/18.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/06/05/delete-spam-from-exim-queue.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/18.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Successful Server Migration using the HOSTS file</title>
            <link>http://sharpdeveloper.net/content/archive/2007/05/29/using-the-hosts-file-to-test-your-site-before-repointing.aspx</link>
            <description>&lt;div&gt;When migrating your site from one server to another there are many factors involved in having a successful and transparent migration with no down time.&lt;br /&gt;
&lt;br /&gt;
One of the tricks you can use to test your site after you have moved servers is to edit your Windows HOSTS file in order to 'trick' your machine into thinking that your site is actually somewhere else, even before updating the nameservers.&lt;br /&gt;
&lt;br /&gt;
For example, you have your live site - sharpdeveloper.net on a server with IP address 72.52.15.51, but you are moving it to another server now because you have outgrown your original server.&lt;br /&gt;
&lt;br /&gt;
Say you already have uploaded the files to the new server and as well populated your mySql or Sql Server databases.&lt;br /&gt;
&lt;br /&gt;
Now, before updating the A record on the nameservers, you can update your local machine to point to the new server, say 81.51.11.51 by editing the file &lt;span style="font-weight: bold;"&gt;C:\WINDOWS\system32\drivers&lt;/span&gt;&lt;wbr style="font-weight: bold;"&gt;&lt;/wbr&gt;&lt;span style="font-weight: bold;"&gt;\etc\HOSTS &lt;/span&gt;(its a simple text file, you can use notepad to edit it)&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
Simply add one line&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;81.51.11.51           sharpdeveloper.net&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;that way your local machine will know the new IP address and you can make sure the site is working perfectly before updating the nameservers to point to the new address.&lt;br /&gt;
&lt;br /&gt;
Questions?&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://sharpdeveloper.net/content/aggbug/8.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Sameer Alibhai, Ashiq Alibhai</dc:creator>
            <guid>http://sharpdeveloper.net/content/archive/2007/05/29/using-the-hosts-file-to-test-your-site-before-repointing.aspx</guid>
            <pubDate>Tue, 29 May 2007 14:17:49 GMT</pubDate>
            <wfw:comment>http://sharpdeveloper.net/content/comments/8.aspx</wfw:comment>
            <comments>http://sharpdeveloper.net/content/archive/2007/05/29/using-the-hosts-file-to-test-your-site-before-repointing.aspx#feedback</comments>
            <wfw:commentRss>http://sharpdeveloper.net/content/comments/commentRss/8.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>