GoDaddy 554 Error gone horribly wrong

Short and sweet, if and when I am found to be in error let me know so I can update.

Define the players:

  • Email thread between me and 2 other people me@somegodaddyhostedemail.com and person1@gmail.com and person2@hotmail.com
  • Also, there is a site referred to as referencedsite-inmessagebody.com – copied and pasted in the discussion.

Timeline, crude but true:

  1. Email string gets big, 10+ responses
  2. Suddenly email only yeilds massive 554 errors from GoDaddy – no option to avoid fail
  3. Email programs and (my) IP address changes with no effect on the final outcome.
  4. Call GoDaddy, they scan the issue email.
  5. Answer: referencedsite-inmessagebody.com has an associated PBL entry (http://www.spamhaus.org/pbl/) via the IP address associated with the domain.

We now stop and look at the problem.

The site referencedsite-inmessagebody.com is associated with an ip address that has a PBL listing.  In short it could be said that referencedsite-inmessagebody.com sent spam or had mail flagged as spam and made it on the naughty list.

Moving forward with the assumption that referencedsite-inmessagebody.com is not one of the real offenders of spam on the net. We have to ask WTF?

Well, the WTF turns out to be just plain evil wrapped in evil.

I drop a WhoIs on referencedsite-inmessagebody.com and find out they are on a large shared (virtual) host. We all use similar services.

I happen to know this host, I use them.  Generally I think the company runs 200+ clients per server.

What follows is a wild summary of the conversation I had with the tech at GoDaddy (he was cool and honest).

Any idiot on a virtual host can start spamming, get busted, loose account and flag the (shared) IP . That means  referencedsite-inmessagebody.com is  pretty much doomed along with any emails associated to that domain name, regardless of the location of the email server (as far as IP address goes).

Doomed to the point where (the actually broken GoDaddy protocol) is blocking my email because my message body has a “flagged” http address (with associated PBL flagged IP address).

Is there anything to be done – Nope. I asked they guy straight up, should I just move my emails off or is there something we can  do such as petitions.

His response was “don’t even try”.

My Solution is to move all these email accounts onto a leased server with dedicated IP address I can get unflagged if ever necessary and run no risk of colliding with “some idiot”.

Ever wonder why certain stuff will NEVER EVER make it from one email to another, this is a clear outline of a protocol that will (often silently) kill your communication.

Emergency Workarounds are available and cumbersome for the low-tech.  I suggest instant messaging and file sharing sites.  You can create a real time one-to-one connection with your target and provide information to get the data.

File sharing services (of the professional type) are also a good alternative for moving files, but this is not a solution for general text communication over email.

Let’s close out with a list of things you should not do:

  • Do not use shared hosting with out a dedicated IP
  • Do not use any service like GoDaddy who utilizes services like SpamHaus
  • Do not reference any website in your email or only write them as “domain[dot]com”

And one more important “beware“:

  • Beware the dynamic IP address. (Who knows how many IP’s we all share are flagged and/or associated with strange shit)

With that in mind email becomes a rather difficult form of communication.

I was taking no responses personally when they were dying or errored out. Going to have to meet people face to face  to talk.

OMG.

Posted in Off Topic, Programming, Web | Tagged , , , | 1 Comment

CSS Compression with nothing more than your brain

Right now I am compressing some CSS into a slimmer package. This is only one of a few steps, but this little bit of planning and thought will save a lot of time in the end.  Especially when your CSS file is 2000+ lines and already formatted in line to decrease line count.

The original:

#iz_catnav {
    background: url(/add/images/left_nav_rpt.png) repeat;
    width:185px;
    padding:4px 0px 4px 0px;
    overflow:hidden;
}
#catNavCap {
    height:30px;
    width:185px;
    background: url(/add/images/left_nav_cap.png) no-repeat;
    margin:0px;
    padding:0px;
}
#catNavBase {
    height:30px;
    width:185px;
    background: url(/add/images/left_nav_base.png) no-repeat;
}

compacted:

#iz_catnav, #catNavCap, #catNavBase  {
    background: url(/add/images/left_nav_rpt.png) repeat;
    width:185px;
    padding:4px 0px;
}
#catNavCap, #catNavBase {
    height:30px;
    margin:0px;
    padding:0px;
}
#catNavCap, #catNavBase {
    background: url(/add/images/left_nav_cap.png) no-repeat;
}
#catNavBase {
    background: url(/add/images/left_nav_base.png) no-repeat;
}

So, minor gain, a 2 line reduction. From 18 lines to 16 lines. Just over 10% reduction.  Think about that on the scale of thousands of lines of CSS. Then compound that with “smart” design and setting up better patterns in your CSS including Object-Orientated CSS where standard attributes are wrapped up in a well defined document.

How many times are you Floating?  What if there was compressed style sheet with all your common needs defined in classes.  Nice huh? That is the idea behind OO-CSS – more reusable objects (classes).

Posted in Programming, Web, Wordpress | Tagged , , , , | Leave a comment

Comcast + NBC = World Destruction

Now that I got your attention, think about this -

Comcast’s purchase of NBC must be stopped!  The information Comcast has relating to delivery of content creates a destructive and unethical loophole for them to control content and media.

Just like priming search results.

Remember, Comcast delivers “cable tv” to much of America. The trends, habits, and other KEY demographic and statistical information is the sole property of Comcast.  This gives Comcast an unethical and (should be and probably is) illegal advantage in competition.

This is not illegal as far as I know. Only because our  government is too tied up in abortion and killing terrorists to deal with domestic issues.

We really need to get the word out that this behavior is wrong, unethical, and should be stopped.  Let’s focus some energy on getting the current batch of old fart worthless dirty politicians out of office and get some intelligent people in there.

This is serious business, am I the only one who sees this stuff?

Posted in Off Topic | Tagged , , , | Leave a comment

Magento E-Commerce bare as all hell navigation

Need to get the Product categories output for custom scripts (like I am doing).  Here is a basic prototype to begin:

// Nevermind - this will not make subcats, the children are all from the main
$obj = new Mage_Catalog_Block_Navigation();
$store_cats    = $obj->getStoreCategories();
$current_cat     = $obj->getCurrentCategory();
$current_cat    = (is_object($current_cat) ? $current_cat->getName() : '');

foreach ($store_cats as $cat) {
  echo '1- '.$obj->getCategoryUrl($cat).' 2- '.$cat->getName().' - -';
  foreach ($obj->getCurrentChildCategories() as $subcat) {
    echo 'A- '.$this->getCategoryUrl($subcat).' B- '.$subcat->getName();
  }
}

// author : @marwei / datamafia.com / interzonemultimedia.com
// Check this out! for one level deep cat menu that you can place anywhere

// get your object
$navobj = new Mage_Catalog_Block_Navigation();
$store_cats    = $navobj->getStoreCategories();

// open the list
$ret = '<ul id="corpDesMageNav">';
// parent cat loop
foreach ($store_cats as $cat) {
 $ret .= '<li>'.$cat->getRequestPath().' - '.$cat->getName().'</li>';
 $subcats = $cat->getChildren();
 // one deep subcategory
 $subCtr = 0; // for counting in the next foreach
 $closeUL = false;
 // reset the trigger // Child cat / one deep loop
 foreach($subcats as $kid){
 if ($subCtr==0) { // first itteration opens the (nested) <ul>
 $ret .= '<ul style="margin-left:20px;"><!-- Only a helper for the subcat -->';
 $closeUL = true;
 }
 $subCtr++;
 $ret .= '<li> [sub cat] '.$kid->getRequestPath().' + '.$kid->getName().'</li>';
 }
 if ($closeUL == true) { // close the ul based on event trigger
 $ret .= '</ul>';
 }
}
$ret .= '</ul>';
echo $ret;

Notes on the (revised) above content. Most (but not all???) of the methods from the Class work (Magento reference).  The above example provides you with the big pieces of information. The Cat Name and the Cat Link.

More importantly – this method allows you to use the menu system ANYWHERE! You are not working with $this->stuff, instead you are dropping isolated instances. My need arised because we are switching in important legacy information and programs in the middle of Magento.   Trust me when I say No ecommerce software was ready for what we are doing.

So I can drop in custom scripting in the content pane using a simple content controller and variable sniffer inside the Magento system and then drop menus and such with out head ache.

The example is FAR from your final output, but this is enough for a programmer with medium skill to get a custom navigation going.  My output has some “garbage” in there to help look at the category information. It should only take a minute to clean it up and check Strict.

And, as a friendly reminder, watch your “default category”.  Magento (at the time of this post) reads from the top level category, no exceptions.  There is plenty of documentation on this topic in the forums.

I hope this helps, let me know if you need more!

/*
 ONE FINAL EXAMPLE - 3 levels deep!!!!
 If anyone wants to write this into a fully recursive function/class let me know. I only need 3 deep
Adding another nested foreach is easier than a unit test on recursion.
*/

// get your object
$navobj = new Mage_Catalog_Block_Navigation();
$store_cats    = $navobj->getStoreCategories();

// open the list
$ret = '<ul id="corpDesMageNav">';
foreach ($store_cats as $cat) {
 $ret .= '<li>'.$cat->getRequestPath().' - '.$cat->getName().'</li>';
 $subcats = $cat->getChildren();
 // one deep subcategory
 $subCtr = 0; // for counting in the next foreach
 $closeUL = false;
 foreach($subcats as $kid){
 if ($subCtr==0) { // first itteration opens the (nested) <ul>
  $ret .= '<ul>';
  $closeUL = true;
 }
 $subCtr++;
 $ret .= '<li style="margin-left:10px;"> [sub cat] '.$kid->getRequestPath().' + '.$kid->getName().'</li>';
 // ome more deep - we got children?
 $subSubCtr = 0;
 $closeSubUL = false;
 if($kid->hasChildren()==1){
  $subSubCat = $kid->getChildren();
  foreach($subSubCat as $grandKid){
   if ($subSubCtr==0) { // itteration opens the (nested) <ul>
   $ret .= '<ul>';
   $closeSubUL = true;
  }         
  $ret .= '<li style="margin-left:20px;"> [sub sub cat] '.$grandKid->getRequestPath().' + '.$grandKid->getName().'</li>';
 }
 if ($closeSubUL == true) { // close the ul based on event trigger
  $ret .= '</ul>';
 }
}
}
 if ($closeUL == true) { // close the ul based on event trigger
 $ret .= '</ul>';
 }
}
$ret .= '</ul>';
echo $ret;
Posted in Magento commerce, Programming, Web | Tagged , , , | Leave a comment

Programmer begins to go crazy when coffee is too weak

Working on some application and I wrote this comment:

include $_SERVER['DOCUMENT_ROOT'].'/######.#####.php';
/* this file includes switching and error handles/ This has to be on the
root (or you will need to hire a song and dance man with a one trick
pony, a knife, 2 avocados, an icepick, and a pastry blender)

Comments are the programmers legacy.  Some people consider the program to be the legacy (Caprica even referenced this idea).  The comments are the communication to the piers.  The piers need to know where you stand.  Sometimes this standing is honesty in stating

/* I know this is a bad way to do things, but the pay was not
enough to do this correct. When the database catches on
fire tell the boss they should have found another $500 */

More to come, coffee on the way.

Posted in Programming, Web | Tagged , , | Leave a comment

How to make money selling phone apps 101

The way to make a fair dollar with many apps is simple. You will need scrolling.

This same method is the dividing point between what should be a killer ap on the Droid and what you would expect on the iPhone. The exact app is not important.

Droid: App is free and works great but scrolling is a dog.

iPhone: App is $3.99 and scrolls nice.

Is scrolling worth the $3.99 or $0.99 or however the dev sets it?

Probably.

Yeah, most of the time.

Also, it is no longer an iPhone, Android, Blackberry, or whatever thing. I say this with the anticipation of Adobe Flash in CS5 firing out files for iPhone,  and I imagine more to come. Bonus – ECMA 5 was recently finalized.

So imagine one common language, guided by a larger common model, allowing multiple platforms to receive from a single codex.

Hmm, the circuit you run on is much getting less important.

Oh yeah, remember there is JQuery Touch (demo). So the walls are closing in on some ideas, but generally opening up for the masses.

So, that money thing. Free gets the crap scroll.

Paid gets the smooth glide.

Posted in Apple, Programming | Tagged , , , , | Leave a comment

No, really Rackspace is good.

My history with Rackspace is growing.  New work puts me on a new dedicated server and in direct connection with the “fanatical” support.  So my problem was with the .htaccess file and mod_rewrite (Apache) functionality.

After spending the evening looking up “Rackspace htaccess” searches most information comes in relating to the cloud hosting (also referred to as Mosso). Not the same thing. I have reached success and I wanted to put my $0.02 into the blog-o-sphere.
Continue reading

Posted in Programming, Web | Tagged , , | Leave a comment

Health Care Solved!

Simple solution, non-partisan, scientific in basis, and self motivating for positive change.

Through some process we create a (non-static) formula to determine food quality.

Something as simple as:

  • -Percent of bad fat in food per ounce
  • -Concentration of sugar per ounce (high fructose corn syrup, etc)
  • -Empty calories, bad chemicals (cancer linked), etc.

The results of this analysis dictates taxation of food, all of it.

So, by this formula, a stick of celery has zero tax while a Big Mac is taxed like cigarettes (sin tax anyone?).

Simple solutions, simple outcomes.

Expanding on the idea, we admit that much of obesity, diabetes, and other poor diet decisions are a great burden on our health (hell-th) care system. We are dropping too much money into keeping people alive or happy who arrive at the doctor on a “Rascal Scooter” with a stop before and after at the McDonald’s drive through. So much is preventable through good diet.

If you tax the Big Mac like a pack of cigarettes what will happen?

1. McDonalds will be pissed (well, they are not contributing to health care as much as they are costing IMHO)
2. The Big Mac will get healthier (to lower the tax imposed)
3. People will stop eating junk food as primary nutritional source.
4. People will loose weight, decrease diabetes, etc
5. Farmers (local farmers in particular) will gain profit and encouragement to grow food for consumption (like apples and vegetables that would be tax free) as the diet of the American (and world scope) changes for the better.
6. People with uncontrollable health issues are covered in a fair manner without the stigma assigned to insurance cost for preexisting conditions (diseases like MS).

Government can not solve the problem, mostly because of the politics. The red versus blue will make any and all solutions fail. All the while Big Mac’s are shoveled out to unhealthy masses with unprecedented efficiency.

There are many subtle stipulations in this type of legation to handle money, funding, analysis, abuse, and reevaluation cycles. Also, this type of legislation should only be applied to businesses of a certain minimum size. We do not want to put the local confectioner out of business through taxation and unnecessary analysis expense.

Yeah this is not perfect. The local burger joint pretty much falls through the cracks, but at least the obesity needs fuels local business growth.

As I listen to everyone complain on the health care crisis I ask the same question:

“Do you have a better idea?”

This type of solution will indirectly tax the part of the population that costing us money in the poor health they tender. We also decrease the punishment of people with persistent health conditions they can not control (leukemia, broken bones, asthma, MS, genetic conditions, work related injuries, etc).

How do I know I am correct? I have been slowly increasing the quality of my diet for over a decade. I am a vegetarian and when I eat a diet consisting of 75% salad and yogurt I feel better.

And you could too.

Posted in Off Topic | Tagged , | Leave a comment

Tables are Back?

Yes, one man (Guido van Rossum), greater than ALL the CSS layout people combined said:

http://twitter.com/gvanrossum/status/3454080762

To quote:

I’ve abandoned the “don’t use tables for layout” meme. The CSS contortions to replace it really aren’t worth it

What to say?

Posted in Web | Tagged | Leave a comment

Handy php function to check file extension

I am wrapping up the Ableton Denver site and I found myself checking the file extension rather often. Like most programmers, if you do something more than one time you write a function. I wish I could write a function for grocery shopping, any who, here is a tidy snippet for anyone who might need this type of thing:
Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

Simple Snippet to find instance of a text string in all tables of WordPress

In looking for this script I assembled a simple snippet to do the work for me suspecting I will need to do this again.  This could make a good plugiin for admins and web people – hmm…

The script – reasonably well commented, Intended to be used on the site root assuming that the WP install is also on the site root. If  this is not the case, change the require on the top of the script. Not tested on multi-site WP yet.

<?php
// datamafia.com the wordpress ninja
// This script rolls through the WP DB and finds all fo the tables
// For each table found every column is extracted
// then in each column we perform 3 MYSQL like searches in the style of :
// "%target word or phrase%"
// "%target word or phrase"
// "target word or phrase%"
// The output is then printed to screen with a noticeable text flag and in bold

// ### THE ONE USER FONGIURATION ###
$target_text = 'and'; // set this to the string you want to find
// ### END USER CONFIGURATION ###

define('WP_USE_THEMES', false); // no theme-o-la
require_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php'); // get the WP coex in the scroipt
global $wpdb; // for use in function / etc

$sql = "SHOW TABLES FROM ".DB_NAME.";"; //tables
$result  = $wpdb->get_results($sql);
echo '<p>Results for text `'.$target_text.'` in '.DB_NAME.'</p>'; // WTF you are doing
foreach($result as $row){
 $obj1 = 'Tables_in_'.DB_NAME;
 $sql2 = "show columns from `".$row->$obj1."`;";
 $result2 = $wpdb->get_results($sql2);
 foreach($result2 as $row2){
 $sql3 = "select count(*) as dacount from `".DB_NAME."`.`".$row->$obj1."` where ".$row2->Field." like '%$target_text%' or ".$row2->Field." like '$target_text%' or ".$row2->Field." like '%$target_text'; ";
 $result3 = $wpdb->get_results($sql3);
 $strong = $strong2 = null;
 if($result3[0]->dacount/*)>0*/){ // triggered for results
 $strong = '<br /><br /><strong>BOOM!----------------------------------------------<br />';
 $strong2 = '</strong><br /><br />';
 }
 echo $strong.
 "Table: ".$row->$obj1."<br />"
 . "&nbsp;&nbsp;COL: ".$row2->Field
 . '<br />&nbsp;&nbsp;&nbsp;&nbsp; count : ('.$result3[0]->dacount.')'.$strong2.'<br />';
 }
}
?>

Enjoy!

Release : Finally Listed on WordPress.org

My Dash Note plugin (a little Saturday afternoon scripting) is finally live on WordPress.org here. The biggest hurdle was getting in line with the dev and marketplace guidelines for WordPress. With that done migration for more work to the WP site is in line.

My local supprt page for this plug-in is here.  Thanks for your support and drop mad stars on my script

Demistifying Search Engine Experts

With each passing year I fear Search Engine “Experts” more and more. I rank them as modern snake oil sales*, at best. Typically a project brings in an “Expert” who has the personality of gum stuck to my shoe and siphons money from my employers riding on the results of others and contributing little.

* Large enterprise SEO not withstanding. I am talking about the various fly-by-night SEO companies who come in using destructive methods to get fast results at the expense of the small business.

In this post I want to discuss how search engines work and why I advocate against using SEO “experts” until a site is live for 6-12 months minimum with a rich collection of valid content.

Assumption : You have a web programmer and coder like me who will write solid code, coach the staff, and encourage good work.

Meta Tags & Description :

Truth : Not too valuable. Estimated at 5% of overall ranking calculation
(more…)

Apple OSX

I use a Mac.

The OS(X) is just a nightmare with only a few exceptions.

This is not one of the exceptions.

The Problem: In learning C++ (C Plus Plus) and want to compile and execute some simple programs – math and text manipulation mostly.
(more…)