Use this command to perform maintenance on mail queues by deleting out-of-date messages.
execute maintain mailqueue clear age <time_str>
Enter an age between 1 hour and 10 years. The FortiMail unit deletes mail messages in the mail queues greater than this age. The age consists of an integer appended to a letter that indicates the unit of time:
This example will clear messages that are 23 days old and older.
execute maintain mailqueue clear age 23d
The CLI would display the following message:
Clearing messages in mail queues at least 23 days old.