- spf_sender_domain = (sender_host_name == NULL) ? sender_helo_name : sender_host_name;
- uschar *subdomain = spf_sender_domain;
- int count = 0;
- while (subdomain && *subdomain != '.')
- {
- subdomain++;
- count++;
- }
- /* If parsed characters in temp var "subdomain" and is pointing to
- * a period now, get rid of the period and use that. Otherwise
- * will use whatever was first set in spf_sender_domain. Goal is to
- * generate a sane answer, not necessarily the right/best answer b/c
- * at this point with a null sender, it's a bounce message, making
- * the spf domain be subjective. */
- if (count > 0 && *subdomain == '.')
- {
- subdomain++;
- spf_sender_domain = subdomain;
- }