Hi,
I'm receiving many spams my antivirus doesn't detect.
In the header I find:
Received-SPF: none
X-SPF-Guess: none
Nothing in log file.
I would like to know how to reject messages if SPF is "none", and if this would be a good solution.
ie I won't miss messages.
In the conf file I have:
================================= begin ============================
.ifdef CHECK_RCPT_SPF
deny
message = [SPF] $sender_host_address is not allowed to send mail from ${if
def:sender_address_domain {$sender_address_domain}{$sender_helo_name}}. \
Please see
http://www.openspf.org/Why?scope=${if def:sender_address_domain
{mfrom}{helo}};identity=${if def:sender_address_domain
{$sender_address}{$sender_helo_name}};ip=$sender_host_address
log_message = SPF check failed.
condition = ${run{/usr/bin/spfquery --ip \"$sender_host_address\" --mail-from \"$sender_address\"}\
{no}{${if eq {$runrc}{1}{yes}{no}}}}
defer
message = Temporary DNS error while checking SPF record. Try again later.
condition = ${if eq {$runrc}{5}{yes}{no}}
warn
message = Received-SPF: ${if eq {$runrc}{0}{pass}{${if eq {$runrc}{2}{softfail}\
{${if eq {$runrc}{3}{neutral}{${if eq {$runrc}{4}{unknown}{${if eq
{$runrc}{6}{none}{error}}}}}}}}}}
condition = ${if <={$runrc}{6}{yes}{no}}
warn
log_message = Unexpected error in SPF check.
condition = ${if >{$runrc}{6}{yes}{no}}
# Support for best-guess (see
http://www.openspf.org/developers-guide.html)
warn
message = X-SPF-Guess: ${run{/usr/bin/spfquery --ip \"$sender_host_address\" --mail-from
\"$sender_address\" \ --helo \"$sender_helo_name\"}\
{pass}{${if eq {$runrc}{2}{softfail}{${if eq {$runrc}{3}{neutral}{${if eq {$runrc}{4}{unknown}\
{${if eq {$runrc}{6}{none}{error}}}}}}}}}}
condition = ${if <={$runrc}{6}{yes}{no}}
defer
message = Temporary DNS error while checking SPF record. Try again later.
condition = ${if eq {$runrc}{5}{yes}{no}}
.endif
================================= end ============================
Thanks in advance
nb