fetchmail-friends
[Top] [All Lists]

[fetchmail] Re: Fetchmail repeatedly processing the same mail

2002-11-19 12:18:40
Michael Abbott wrote:

I don't know what the right answer is, but the current behaviour is
not good.

The current behaviour is absolutely right. You surely don't want
fetchmail to throw away mail only because your MTA (or resolver) has a
temporary problem.
If you really want, put "antispam 451" in your fetchmailrc (untested and
strongly discouraged from).
A much better approach would be to disable domain resolving in your
sendmail configuration, with FEATURE(`accept_unresolvable_domains').
Usually our mail provider would already block such mail (all of mine
do), so there is no pain with this.

This is a good and helpful answer, but I'm going to argue with your
contention that
The current behaviour is absolutely right.

I presume that fetchmail is designed with the following three goals in
mind:
1.  To deliver mail without losing it;
2.  To deliver each item of mail once only;
3.  To deliver mail in a timely manner.

Obviously when POP3 is the source of mail and one or more e-mails cannot
be delivered, there is a problem, and the current implementation of
fetchmail "resolves" this by abandoning goals 2&3.
    The underlying problem, as I understand it, is the fact that a POP3
session must either be abandoned and re-run from the top, or else must be
run to completion.  In either case it is necessary for fetchmail to
maintain a memory of something if it can't process every mail received.
    In truth, a full solution would involve fetchmail hanging onto each
undeliverable mail and retrying the transmission in its own time.  This
approach obviously has undesireable implications, but seems to me the only
complete solution.

I can think of a variety of other approaches that fetchmail might try to
handle this problem, and I suspect that many of them are preferable to the
current approach.  (For example, a new envelope could be put around mail
generating a 451 response, or such mail could be forwarded to the
postmaster, again with a new envelope if required.)

However, I probably will try your suggestion of enabling
        FEATURE(`accept_unresolvable_domains')
though I fear that I will receive even more spam as a consequence.  The
reason, of course, is that mail.araneidae.co.uk is hosted by the same copy
of sendmail that fetchmail is posting to.

Thank you for the helpful advice!