Flying on AF, regardless of where it is purchased, will earn MQMs.
MQDs and RMDs are a different story. If you want those based on ticket price (MQD) and the medallion multiplier (RDM) you will need to purchase through a Delta channel. Delta reservations will most likely be able to match whatever you are seeing on the AF website.
If you want them based on distance flown (or a % thereof) use the chart posted above and book via AF. You will need to do the math to determine the best option for you based on ticket price and distance flown.