Delete or remove file from multiple email messages in storage

344 views Asked by At

I manage a Linux mail server (qmail) for a small office employees thought well to make a signature with 4 logos, one of which is 2 Mb. No one noticed until the mail service began to finish the space.

Now I find myself thousands of email sent containing this logo.

I would like to leave the emails and attachments intact and remove this logo or alternatively replace it with a lighter logo.

Is there a way to delete a specific attached file from a mail via Linux bash ?

file

-rw -r - r-- 1 root root 2551077 20 Jun 11:56 1528905708.M14375P5208.32432, S = 2551077, W = 2586131: 2, S
-rw -r - r-- 1 root root 2815315 20 Jun 11:56 1528911188.M719953P6580.234, S = 2815315, W = 2854016: 2, S

This is a part of mail:

Content-Type: image / gif;
    name = "image008.gif"
Content-Transfer-Encoding: base64
Content-ID: <part5.A1202B56.2A25453C @ *****>
Content-Disposition: inline;
    filename = "image008.gif"

dsfkldslkfjdslkfjdklsfjdlskfjdlskfjdlsk

Can I only remove this image for ALL MAIL (I think I use loop bash) ?

If you need another information please write.

Thanks.

0

There are 0 answers