On Monday 23 July 2007 15:55, Magnus Holmgren wrote: > SPF_request_set_helo_dom() calls SPF_request_set_env_from(), with the HELO > domain unmodified, if the helo_dom field hasn't been set yet, which causes > env_from to be filled in with "postmaster@" plus the HELO domain, and > env_from_lp and env_from_dp accordingly. This *should* (I think) cause the > HELO domain to be used in all cases where it should, *provided* that > SPF_request_set_env_from() isn't called with an empty envelope sender. > Hence the bug can be seen as the fact that the documentation doesn't > mention that fact and/or that SPF_request_set_env_from() doesn't complain > against, or ignore, an empty envelope sender.
I've tested this and indeed, calling SPF_request_set_helo_dom() but not SPF_request_set_env_from() gives the desired result. However, that approach doesn't work if one wants to reuse the same SPF_request_t for several queries, where the empty sender is not the first one. I suggest that this logic if (sr->env_from == NULL) SPF_request_set_env_from(sr, dom); be moved from SPF_request_set_helo_dom() to SPF_request_set_env_from(). -- Magnus Holmgren [EMAIL PROTECTED] (No Cc of list mail needed, thanks)
pgpxcqCujAajb.pgp
Description: PGP signature