diff -U4 -r exim-4.63/src/receive.c exim-4.63+authenticated-id/src/receive.c --- exim-4.63/src/receive.c 2006-07-31 15:19:48.000000000 +0100 +++ exim-4.63+authenticated-id/src/receive.c 2006-08-26 14:05:53.000000000 +0100 @@ -3310,10 +3310,15 @@ if (sender_host_authenticated != NULL) { s = string_append(s, &size, &sptr, 2, US" A=", sender_host_authenticated); - if (authenticated_id != NULL) - s = string_append(s, &size, &sptr, 2, US":", authenticated_id); + if (authenticated_id != NULL && Ustrlen(authenticated_id) > 0) + { + if (Ustrchr(authenticated_id, ' ') != NULL) + s = string_append(s, &size, &sptr, 3, US":\"", authenticated_id, US"\""); + else + s = string_append(s, &size, &sptr, 2, US":", authenticated_id); + } } sprintf(CS big_buffer, "%d", msg_size); s = string_append(s, &size, &sptr, 2, US" S=", big_buffer);