diff -U4 -r exim-4.67/src/smtp_in.c exim-4.67+fix-localhost-helo/src/smtp_in.c --- exim-4.67/src/smtp_in.c 2007-04-17 14:06:40.000000000 +0100 +++ exim-4.67+fix-localhost-helo/src/smtp_in.c 2007-06-02 17:29:42.000000000 +0100 @@ -3052,8 +3052,15 @@ debug_printf("SMTP>> %s", s); } helo_seen = TRUE; + if (!Ustrcmp(sender_helo_name, US"[127.0.0.1]")) + { + DEBUG(D_any) debug_printf("overwriting bogus helo [127.0.0.1] with [%s]\n", sender_host_address); + sender_helo_name = string_copy_malloc(string_sprintf("[%s]", sender_host_address)); + host_build_sender_fullhost(); /* Rebuild */ + } + /* Reset the protocol and the state, abandoning any previous message. */ received_protocol = (esmtp? protocols[pextend +