Hi !!
I suggest:
If the return-path is not empty, check the SPF record for the MAIL FROM
domain and do not check the HELO string.
Otherwise, if the HELO string is not a valid host name with at least one
dot, accept the mail.
Otherwise, if there is an SPF record, check the SPF record.
Otherwise, use the SPF record "v=spf1 a ~all" or "v=spf1 a -all".
why not just use spf to check the mail from and use another protocol
to check the helo. If you have another txt register to show others how
should a certain domain name be used in helo/ehlo you could help others
filter a lot of junk. If you try to make your own rules to check
helo strings you will end either stoping legitimate mail or having
to accept junk messages (or having to filter them with other more
expensive rules).
--
Best regards ...
It's a fine line between fishing & standing still
----------------------------------------------------------------
David Saez Padros http://www.ols.es
On-Line Services 2000 S.L. e-mail david(_at_)ols(_dot_)es
Pintor Vayreda 1 telf +34 902 50 29 75
08184 Palau-Solita i Plegamans movil +34 670 35 27 53
----------------------------------------------------------------