[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?
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.
Hi Martin,
Thanks for your reply.
In my case respecting the order is not a requirement. I hash each message
header retrieved by mpop and add it, along with its received date, into a
database. Then, when I want to prune old messages from the server, I run my
filter script, which will for each message header match the local and remote
hashs and delete it if it was received by more than a certain period (a
parameter). But I would like to tell mpop to stop retrieving headers as soon as
I kill a few messages.
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.
--
Douglas A. Augusto