Re: Multidrop retrievers: run filter before sorting ?

Bigaunti - Arcor <[email protected]> Mon, 16 Aug 2021 20:17:16 +0200
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
Goodafternoon Charles, and thank you once more for responding so quickly.

 > However, you're still comitting the error that I linked to

Stupid and sadly enough I'm not even beware of it.
So there I apparently do have a fundamental problem myself.

To put my request the problem way:

The problem is: I'm collecting emails from my provider in 2 steps by 
running Getmail twice after each other.
This should be possible in one step.

This happens now: first, retrieve them all (SimpleIMAPSSLRetriever), let 
the filter run, then send all to a temp box.
Second, retrieve them again from that temp box (now using the 
MultidropIMAPSSLRetriever) to deliver them to the respective recipients.

I would like it this way: retrieve them all with the 
MultidropIMAPSSLRetriever, run the filter, then deliver them to the 
respective recipients based on the output of the filter.

What the filter is doing:

- it copies the email into a file called "emailcontents"
- reads that file
- cuts of the message body part
- searches in the remaining header for occurances of the sequence " 
for<[email protected]> "
- strips off all characters so only the email address remains
- discards all email addresses, if present, that do no match the domain 
specified as argument to the filter when it's called
- strip off the domain part
- if different users are found in the remaining local parts then count 
which one occurs most (can't remember this really happened)
- finaly state the resulting user to be the original recipient by adding 
"X-Original-To: [email protected]" to that file "emailcontents"
- write out the file "emailcontents" to Getmail

 > This is a huge red flag.

Indeed I worded it clumsy - the value for the substring %(recipient) is 
ofcourse provided by the multidrop retriever itself.
I should have said: ... to determine what %(recipient) shall be checked 
against.

Again best regards, sincerely.

Gert