Re: Multidrop retrievers: run filter before sorting ?

Charles Cazabon <[email protected]> Sat, 14 Aug 2021 23:29:03 -0600
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
Bigaunti - Arcor <[email protected]> wrote:
> 
> Hope to get hints from you how to change the Getmail (version 5.13) script
> in /usr/bin/getmail such that a multidrop retriever will run a filter before
> it starts sorting the emails.
> Such that sorting is done based on the header of the filtered result.
> And not on the header in the email as it was retrieved.
> 
> Background:


> Since long I'm using the multidrop retriever to sort emails based on a
> header "X-Original-To:".
> 
> Until my provider was swallowed by some big brother that thought it a good
> idea (I suspect) to stimulate users to buy their high cost services.
> So they removed that header component without any usefull replacement.

If I understand you correctly, the original envelope recipient address is not
recorded in any (stable) header field?  Then you no longer have a
multidrop/domain mailbox.  It's just a regular mailbox that has "catchall"
behaviour.

That really sucks.  You should complain to them more, or change to another
provider if you can.

> So I composed some shell script to sort things out.
> Which adds such header like "X-Original-To:".
> So not removing anything, just adding.

So... what does it put in the new X-Original-To: field?  You just said the
envelope recipient is not recorded, so what can the script be doing to
recreate it?

The original part of your question:

> Hope to get hints from you how to change the Getmail (version 5.13) script
> in /usr/bin/getmail such that a multidrop retriever will run a filter before
> it starts sorting the emails.

... is very much a "how do I use a chocolate-covered banana to accomplish the
integration of European currency systems?" type of question.
http://jdebp.info/FGA/put-down-the-chocolate-covered-banana.html

I'll reserve the rest of my answer until after you've answered the above so I
know what actually needs to be done.

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at:               http://pyropus.ca/software/
-----------------------------------------------------------------------