The problem with Exim, when I do a mailing list, is a box with a delivery error, for example, the email does not exist or is not written correctly. As a result, a queue is created and delivery is slowed down. It is necessary to constantly clear the list of frozen letters, how to solve such a problem, for example, can I make it possible to automatically create a similar list which I will then process and add these boxes to the block list so that the delivery of letters to them does not pass. Or maybe it is a crutch and there is some more simple solution to this problem?
|
1 answer
For example, using the exiqgrep script (bundled with Exim ), you can get a list in this form ( -b
is the brief format that is most convenient for processing):
$ sudo exiqgrep -b 1bMyOW-0004uM-RT From: <> To: fluoridesp6@yahoo.com 1bMxBR-0003hp-NO From: <proofreadingtn10@gmail.com> To: smb@something.ru 1bMwlb-0003H8-6Z From: <notepaperevb@gmail.com> To: anna@some.ru;anna2@some.ru
I gave a few examples to make it clearer how to extract the recipient and split it into lines if there are several recipients:
$ sudo exiqgrep -b | sed 's/.* To: //;s/;/\n/g' | sort -u
the last part of the pipeline, sort -u
, is sorting and removing duplicates.
The option -o секунды
, which allows displaying only those messages that are older than the specified number of seconds, may also be useful in this case as an option to the exiqgrep script. for example, display messages older than two days:
$ sudo exiqgrep -b -o $((2*24*60*60))
see the documentation for man exiqgrep
.
|