F
F
floydback2018-10-19 02:56:40
linux
floydback, 2018-10-19 02:56:40

How to delete invalid emails after mailing?

After mailing, clients regularly receive letters with the subject: Mail delivery failed: returning message to sender and content: invalid mailbox. Local mailbox eliz****.shp***@mail.ru is unavailable:
How can I select all messages with a given subject and extract mail from there using the console or similar manual methods? I use mutt in the console, I don’t know much about it, but apparently it’s just not possible to do it that way.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-10-19
@floydback

I won’t suggest a beautiful solution, but what if we parse maillog through grep + awk + wc?
well, that is, grep invalid /var/log/maillog will spit out all the lines containing the wrong email, and then awk with sorting, m?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question