Is virtualmin checking INCOMING mails for SPF records?

Hi all,

I am using Virtualmin GPL and I have no problems with creating SPF records for the domains hosted in the server. What about blocking incoming emails that do not match the SPF records set by their owners? Is virtualmin do it that or something must be installed on top?

My virtualmin was installed via the script on a minimal Centos 6.4

N

Howdy,

One of the tests that SpamAssassin performs is to check for SPF, and if invalid, will raise the spam score of an incoming email.

-Eric

Can you please explain then why the following happened?

I used this online tool: https://www.wormly.com/test_smtp_server

I put the server IP, as a sender an invalid email address (from a domain which IS hosted inside), and as the recipient a valid email address of a domain hosted inside the server.

The sender’s domain has SPF record which allows only the IP of the server and no others.
The email was sent and received at the destination mailbox. Shouldn’t this be disallowed ??

Well, it’s not disallowed, it just increases the spam score.

If you look at the X-Spam-Status header in that email, what spam tests were positive?

You can always increase the score of a spam test, in order to make it more likely that the email will be marked as spam.

-Eric

Those are the only X headers.

X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
server.domainremoved.com
X-Spam-Level:
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID
autolearn=no version=3.3.1
X-Original-To: existing-username@existing-domain.com

I don’t see anything here related to SPF… shouldn’t this be indicated?

What if I want to completely deny emails that fail SPF check?

If you look in “/etc/mail/spamassassin/init.pre”, do you see any references in there to an SPF plugin being loaded?

-Eric

This is the full content of that file (excluding the initial comments):

# RelayCountry - add metadata for Bayes learning, marking the countries # a message was relayed through # # Note: This requires the IP::Country::Fast Perl module # # loadplugin Mail::SpamAssassin::Plugin::RelayCountry

URIDNSBL - look up URLs found in the message against several DNS

blocklists.

loadplugin Mail::SpamAssassin::Plugin::URIDNSBL

Hashcash - perform hashcash verification.

loadplugin Mail::SpamAssassin::Plugin::Hashcash

SPF - perform SPF verification.

loadplugin Mail::SpamAssassin::Plugin::SPF

This is as per default installation. I have not made any changes.
Is it correct/enough?

Rgds

The below is true on CentOS 5 & 6, I am not sure about other OSes …

After much head-scratching I have figured out why SPF isn’t working, if you run spamassassin in debug mode on a test message, it tries to do the SPF check, but their is a missing perl SPF module. I grabbed them from another repository and poof SPF works perfectly.

Also on another note, is something wrong with the forum/site, everything in the forums appears in italics for me.

Yeah, you could try installing the SPF Perl module if it’s not currently installed.

The version here should work well if there isn’t one in the main CentOS repo:

http://dl.fedoraproject.org/pub/epel/6/i386/repoview/perl-Mail-SPF.html

I’m not sure about the forums being in italics though, they show up normally for me…

-Eric