As far as I know there isn't a simple switch that would accomplish this. But you can certainly write a script that you set up as a cron task that connects to your mailbox and deletes all email.
Relevant clipped bits from a python script I use to access an IMAP mailbox dedicated to receiving bounced messages:
import imaplib
import ssl
# connect to mailbox.
ctx = ssl.create_default_context()
server = imaplib.IMAP4_SSL(host=imaphost, ssl_context=ctx)
server.login(mailbox,passwd)
# choose which messages you want.
server.select()
resp, items = server.search(None, "ALL")
# get all the message ids.
items = items[0].split()
for i in items:
# Mark for deletion (sets the IMAP delete flag on the message).
server.store(i, '+FLAGS', '\\Deleted')
# Physically remove the messages.
server.expunge()
server.logout()
Hope that helps get you started,