diff -urN ../exim-4.89.orig/src/exim.c ./src/exim.c --- ../exim-4.89.orig/src/exim.c 2017-03-04 23:21:35.000000000 +0200 +++ ./src/exim.c 2017-06-24 19:42:32.337717000 +0300 @@ -3092,7 +3092,14 @@ /* -oMr: Received protocol */ - else if (Ustrcmp(argrest, "Mr") == 0) received_protocol = argv[++i]; + else if (Ustrcmp(argrest, "Mr") == 0) + + if (received_protocol) + { + fprintf(stderr, "received_protocol is set already\n"); + exit(EXIT_FAILURE); + } + else received_protocol = argv[++i]; /* -oMs: Set sender host name */ @@ -3188,7 +3195,15 @@ if (*argrest != 0) { - uschar *hn = Ustrchr(argrest, ':'); + uschar *hn; + + if (received_protocol) + { + fprintf(stderr, "received_protocol is set already\n"); + exit(EXIT_FAILURE); + } + + hn = Ustrchr(argrest, ':'); if (hn == NULL) { received_protocol = argrest;