Harish Jha eConsultant

Delete email using Putty or Command Line – Linux server

harish / / Others

To remove all email older than one year from this account’s Junk folder via the command line, use the following command:

whmapi1 expunge_mailbox_messages account=user@hpiservers.com mailbox=INBOX.Junk query=’savedbefore 52w’

To remove all email older than one year from this account’s INBOX via the command line, use the following command:

whmapi1 expunge_mailbox_messages account=user@hpiservers.com mailbox=INBOX query=’savedbefore 52w’