For the record I have a working solution:


I changed the fetchmail settings to leave a copy of the emails on the server.

I used a procmail to filter emails containing the notification that ATP was being used.

Once a year I intend to mass delete on the server by hand since I can't get fetchmail to do this for me.



It's 99% effective - the 0 byte case is a rarity and I ignore it. The biggest problem now is that ATP occasionally decides to issue the ATP notification message in a foreign language (presumably detecting the language encoding of the sender and forgetting that it is the recipient that has to read the message).


>

> Switch email provider??


Well... I would if I could but I can't.  Sadly the people making the decisions are impressed with these theatrics and there's basically nothing you can do under these circumstances because they can't fix things without admitting it was silly in the first place.





On Tuesday, 17 October 2023 01:08:08 BST Volker Kuhlmann wrote:

> > Is there a simple way in procmail that I can use to trap the second

> > case (0 byte length attachment(s))? I simply don't want the first

> > (useless) message and want to divert these to a holding pen.

>

> I don't think procmail has ever been good at digging into attachments.

> An external program would be more reliable.

>

> reformime (part of maildrop, courier imap) is good with extracting

> attachments, or just displaying information on them. It's not difficult

> to run from procmail, but if you eg need to parse its output it's easier

> from procmail to put it into a short bash script.

>

> Other options may be mimencode/mmencode (part of metamail), or metamail.

> There must be others.

>

> Switch email provider??

>

> Volker

>

> --

> Volker Kuhlmann

> http://volker.top.geek.nz/    Please do not CC list postings to me.

> ____________________________________________________________

> procmail mailing list -- procmail@lists.rwth-aachen.de   Procmail homepage: http://www.procmail.org/

> To unsubscribe send an email to procmail-leave@lists.rwth-aachen.de

> https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de

>