V
V
Vasily2017-03-17 10:29:23
Exim
Vasily, 2017-03-17 10:29:23

How to remove only attachments from emails from the server?

Good day.
There is a task to clean up the e-mail server. Here's the idea. Sales managers send out a huge number of letters every day with large attachments. They really need the letters themselves in Sent to understand who and what they wrote about. But they don’t need attachments at all, because it’s always clear from the context what was sent.
Thus, a Bash script is needed that would only remove attachments from certain users from sent emails older than 14 days, leaving the emails themselves intact.
Please tell me the best way to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-03-17
@NeiroNx

Attachments are stored not as files, but as base64 code in the body of the letter. Most likely you need an email parser to cut attachments.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question