Re: Patches from Robert Millan

Magnus Holmgren <[email protected]>
Newsgroups gmane.mail.spam.spf.devel
Organization Lysator ACS
Message-ID <[email protected]>
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)

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=6959932&id_secret=26453524-6625b1
Powered by Listbox: http://www.listbox.com
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBGra4Lk7mRNn1h4+YRAlaOAKD0sGhU11v5I4IpjQO+aqbGu+wVJQCfUFYa
HdU1dPlVQZB5K4FFKmqWO1g=
=6YDc
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.