diff -urN ../exim-4.86.orig/src/spam.c ./src/spam.c --- ../exim-4.86.orig/src/spam.c 2015-07-24 00:20:37.000000000 +0300 +++ ./src/spam.c 2018-05-01 19:29:12.750868000 +0300 @@ -212,6 +212,9 @@ uschar *spamd_address_work; spamd_address_container * sd; +int try_count = 3; +next_attempt: + /* stop compiler warning */ result = 0; @@ -522,6 +525,11 @@ /* reading done */ (void)close(spamd_sock); +if (spamd_buffer[0] == 0) { + try_count--; + if (try_count > 0) goto next_attempt; +} + if (sd->is_rspamd) { /* rspamd variant of reply */ int r;