has your vet given you any drops to put in his ears?
What breed dog?
How long has this been going on for?
Does he scratch at them? or shake his head?
Is the wax black or brown?
Because it has a very bad odor, I would give your vet a call again and have him checked. He may have an infection brewing that will need antibiotics. It sounds like possibly a yeast problem. The aid in this, you can clean the ears with a 50/50 mixture of white vinegar and water. The acid will kill the yeast. Here is a site that will tell you more about yeast infections and treatments:
Sometimes this happens because of their diet. Try a holistic diet like Eagle Pack Duck and Oatmeal. Hope this helps and hope he feels better soon :)