Hi,
There is no such command to delete all the emails via command line. But for your information all the emails are saved in:
For all read emails:
Quote /var/local/vmail/{DOMAIN_NAME}/{USERNAME}/Maildir/cur/
So you can use the following command to delete emails for a email ID using folllowing command:
Code rm -rf /var/local/vmail/{DOMAIN_NAME}/{USERNAME}/Maildir/cur/*
For Eg: Say your email id is admin@admin.com than your email directory shall be:
Quote /var/local/vmail/admin.com/admin/Maildir/cur/
and to delete all the emails for the above user you can use the following command:
Code rm -rf /var/local/vmail/{DOMAIN_NAME}/{USERNAME}/Maildir/cur/*
Edited by nikhil89 : August 8, 2017, 11:27 am |