Syncing junk mail filter with my Mac Mail


How can I sync the junk mail filter on my iPhone's Mail program with Mac Mail on my iMac? I have the same account set up on both devices but none of the junk gets filtered on my phone.
From what I understand, your phone works in conjunction with iMap accounts with your filters set up in web mail. If you have iCloud, set up your filters on line, and your phone will duplicate what is set.

You can do it manually by selecting edit on your phone and sending it to the Junk folder, but I am not sure the Mail on iPhone learns.