Take the rims somewhere and have them BEAD blasted, NOT sandblasted to remove all of the factory coatings and dirt etc. Next use sandpaper (fine grit) to buff up the bad scratches etc. Once you have the rims prepped good wipe them down with acetone and let dry just before shooting the primer.
If bead blasting is not an option you can do the same with sandpaper, just takes a while. You need to be sure and get both the factory coatings off as well as scratch the surface of the aluminium for paint adhesion.
A Zinc Chromate primer tends to work best for priming bare aluminium, but it's hard to come by nowadays. Talk to your local paint store that handles auto refinish stuff, they should be ale to point you in the right direction.