I'm using qmail.
I forward all emails from firstname.lastname@example.org to email@example.com to make firstname.lastname@example.org my backup accounts.
I have the below commands to Zip up all qmail backup files.
tar cvf /backup/MyDomain.gz *2 'This command tars only those accounts ending with 2
rm -rf ./*2
I realised this sometimes creates very huge files which are difficult to unzip.
How can I modify it so it goes into every single email account ending with 2 and creates a single .gz file for Each Email Account ending with 2.
tar cvf /backup/MyDomain/EmailAccount2.gz *2
Take note I might repeat the process for different domains.