Step 1: Sign into your Office admin account via https://portal.office.com
Step 2: Navigate to Exchange admin center.
Step 3: On the left pane, scroll down and click More features.
Step 4: Click open under Permissions.
Step 5: Click Protection on the left pane.
Step 6: Switch to the spam filter tab.
Step 7: Double-click on the default policy.
Step 8: Click on spam and bulk actions.
Step 9: Under the quarantine section, in the Retain spam for (days): box, enter the number of days and click Save.