Skip to content

Commit

Permalink
Fix failed domain non-retrying.
Browse files Browse the repository at this point in the history
If a domain resolution ends in STATE_BAD (e.g. a SERVFAIL), the code
never retries that domain's resolution again, though it clearly means
to. It marks the domain as bad and says "holding off", but when the
bad domain marker times out, it simply gets again the old resolution
result and repeats marking the domain as bad.

This change removes the domain resolution result when the domain is
marked as bad, so that once the bad domain marker times out, there is
no existing result and a new domain resolution is started.
  • Loading branch information
dracos committed Jan 27, 2014
1 parent cfa79a0 commit 005c976
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/petemaild
Expand Up @@ -1194,6 +1194,7 @@ Log::print('debug', " -> domain $domain not resolved, adding to resolver queue"
if ($r->failed()) {
Log::print('debug', " -> resolution of $domain failed, holding off");
push(@{$self->{baddomains}->{$domain}}, $now);
delete($self->r()->results()->{$domain});
# have another go at the message later
push(@messages_to_requeue, [$msg, $now + MIN_DOMAIN_BAD_INTERVAL]);
next;
Expand Down

0 comments on commit 005c976

Please sign in to comment.