Well, back to topic, the solution is actually easy, but requires some work:
With SCP, we got the lovely turret-set-target-order-SEXP
link to wiki.
So, you simply set target order for your anti-bomb-turrets to bombs only:
turret-set-target-order
- shipname
- turretname
- bombs
And, if all other guns should ignore bombs:
turret-set-target-order
-shipname
-turretname
-ships
-asteroids
This works fine for me, I'm using a rapid firing "laser" (-> actually a machinegun) to fend of fighters or bombs in my own mod. Same way you can force huge guns to ignore bombs completely (atm, if you activate "Huge turrets ignore bombs", they don't fire at bombs, but they target bombs and so stop firing at enemy ships).