Sending mails to Junk Folder

Kumar Gaurav 1 Reputation point
2022-06-28T14:37:09.39+00:00

We have created spam detection application to scan emails for spam. Based on result we want the mails to be delivered either in Inbox or Junk folder.
How can we configure exchange so that mail go to respective folder?
Is there any headers provided by microsoft to send mail to Junk folder ?
We have tried with some headers, but microsoft overrides those headers and mail is delivered to Inbox instead of Junk

Headers used by us :-
headerMap.addheader("X-Logged", "Jilter");
headerMap.addheader("X-Spam", "Yes");
headerMap.addheader("X-header", "text");
headerMap.addheader("X-Forefront-Antispam-Report", "CAT:BULK; CAT:MALW; CAT:HSPM; CAT:HPHISH, SFV:SPM");
headerMap.addheader("X-MS-Exchange-Organization-SCL", "9");
headerMap.addheader("X-Microsoft-Antispam-Untrusted:", "BCL:9");
headerMap.addheader("X-MS-Exchange-Organization-PCL:", "9");
headerMap.addheader("X-MS-Exchange-CrossTenant-AuthAs:", "Anonymous");
headerMap.addheader("X-MS-Exchange-CrossTenant-FromEntityHeader:", "Internet");

Can someone please help?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,720 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,072 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,503 questions
{count} votes