What does Mail.app use to decide if an email is Junk Mail? Does anyone know how Mail decide junk message, in addition to trusting spamassassin header? For example, if I mark a message as junk, what criteria does Mail create?
Mail.app uses more than one approach to junk mail.


Some spam gets reported by other users.


You can forward your junk mail to spam@icloud.com and it gets added to Apple's filtering system.

Mail servers sometimes mark messages as spam.


When a tool like spam assassin has marked an incoming message as junk, Mail.app respects that and passes it to the junk folder automatically.

Mail.app also supports custom filters.


You can make your own filters that will direct junk mail into the junk folder.