It means "absurd, ridiculous, or foolish".
While the word isn't Yiddish, its usage in English may have been influenced by the Yiddish word "kokhma", which means "wisdom." This influence is reflected in the fact that "cockamamie" suggests something foolish or lacking in wisdom.