[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mpop-users] filter: how to tell mpop to stop retrieving message headers?



Hi Douglas!

On Thu, 4 Jun 2015 09:09:13 -0300, Douglas A. Augusto wrote:
> On 04/06/2015 at 10:33,
> Martin Lambers <marlam@...1...> wrote:
> 
> > This is not possible yet, because as far as I know it is not
> > guaranteed that mails will be presented to a POP3 client in the
> > same order on each query -- though in practice most if not all POP3
> > servers will not change the order.
> 
> Let me give you another example. Suppose I want to search (on the
> server) for the existence of a message header that contains a given
> string, for instance, a sender e-mail. Of course, if the script finds
> the message header, it would be better if mpop stopped retrieving the
> remaining headers.

OK, I can see that this might have a use case.

However, implementing this is not straightforward. It requires to
disable pipelining for mail filtering because several retrieval
commands might already have been submitted when a filter decides to
cancel retrieval -- we need to clean up this case.

I don't have the time to implement this, but would probably accept
patches if the stopping of retrievals is implemented cleanly.

Regards,
Martin