diff -ru postfix-2.0.15/src/smtp/smtp_sasl_glue.c postfix-2.0.15-smtp_sasl_sender_auth/src/smtp/smtp_sasl_glue.c --- postfix-2.0.15/src/smtp/smtp_sasl_glue.c 2002-03-29 23:24:22.000000000 +0100 +++ postfix-2.0.15-smtp_sasl_sender_auth/src/smtp/smtp_sasl_glue.c 2003-09-11 21:52:29.000000000 +0200 @@ -270,8 +270,12 @@ * Look up the per-server password information. Try the hostname first, * then try the destination. */ - if ((value = maps_find(smtp_sasl_passwd_map, state->session->host, 0)) != 0 - || (value = maps_find(smtp_sasl_passwd_map, state->request->nexthop, 0)) != 0) { + if (0 != (value = maps_find(smtp_sasl_passwd_map, + state->request->sender, 0)) || + 0 != (value = maps_find(smtp_sasl_passwd_map, + state->session->host, 0)) || + 0 != (value = maps_find(smtp_sasl_passwd_map, + state->request->nexthop, 0))) { state->sasl_username = mystrdup(value); passwd = split_at(state->sasl_username, ':'); state->sasl_passwd = mystrdup(passwd ? passwd : ""); @@ -282,8 +286,8 @@ return (1); } else { if (msg_verbose) - msg_info("%s: host `%s' no auth info found", - myname, state->session->host); + msg_info("%s: no auth info found (sender=`%s', host=`%s')", + myname, state->request->sender, state->session->host); return (0); } }