# Virtualmin check SPF records?

**URL:** <https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028>\
**Category:** Virtualmin\
**Created:** [November 22, 2021, 10:46am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028 "2021-11-22T10:46:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 22, 2021, 10:46am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/1 "2021-11-22T10:46:10Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| | |
| **OS type and version:** | Centos 7.9 |
| **Webmin version:** | 1.981 |
| **Virtualmin version:** | 6.17.pro |
| **Related products version:** | Spamassassin 3.4.0 |

* * *

I don’t understand why this email has not been stopped by the antispam, theoretically it should check SPF but here it has not done it.

```auto
> Return-Path: <Confirming.bbva@bbva.com>
> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on server
> X-Spam-Flag: YES
> X-Spam-Level: ****
> X-Spam-Status: Yes, score=4.1 required=4.0 tests=BAYES_00,DCC_CHECK,	FSL_BULK_SIG,HTML_MESSAGE,MALW_ATTACH,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,	SPF_FAIL,SPF_HELO_NONE,T_REMOTE_IMAGE,URIBL_BLOCKED,URI_NOVOWEL autolearn=no	autolearn_force=no version=3.4.0
> X-Spam-DCC: x.dcc-servers: server 104; Body=3 Fuz1=38 Fuz2=many
> X-Spam-Pyzor: Reported 0 times.
> X-Spam-Report: * 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.	* See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block	* for more information.	* [URIs: bbva.es]	* 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3)	* [79.172.201.200 listed in wl.mailspike.net]	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%	* [score: 0.0000]	* 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record	* 0.0 SPF_FAIL SPF: sender does not match SPF record (fail)	* [SPF failed: Please see http://www.openspf.net/Why?s=mfrom;id=confirming.bbva%40bbva.com;ip=79.172.201.200;r=server]	* 0.5 URI_NOVOWEL URI: URI hostname has long non-vowel sequence	* 0.0 HTML_MESSAGE BODY: HTML included in message	* 2.0 DCC_CHECK Detected as bulk mail by DCC (dcc-servers.net)	* 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders	* 0.0 FSL_BULK_SIG Bulk signature with no Unsubscribe	* 3.5 MALW_ATTACH Attachment filename suspicious, probable malware exploit	* 0.0 T_REMOTE_IMAGE Message contains an external image
> X-Original-To: barcelona@domain.com
> Delivered-To: barcelona.domain@server.aaa.org
> Received: from third.ysolutions.hu (third.ysolutions.hu [79.172.201.200])	by server.aaa.org (Postfix) with ESMTPS id C21A98138115;	Thu, 18 Nov 2021 13:30:51 +0100 (CET)
> Received: from webmail.ysolutions.hu (localhost [127.0.0.1])	by third.ysolutions.hu (Postfix) with ESMTP id 5880D2180CF5;	Thu, 18 Nov 2021 13:28:57 +0100 (CET)
> DKIM-Filter: OpenDKIM Filter v2.11.0 third.ysolutions.hu 5880D2180CF5
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="=_6806d086efda8946f9ca9f1c6d9e1206"
> Date: Thu, 18 Nov 2021 13:28:57 +0100
> From: Confirming.bbva@bbva.com
> To: undisclosed-recipients:;
> Subject: [SPAM] BBVA-Confirming Factura
> In-Reply-To: <1632203281.192140559@f29.my.com>
> References: <1632203281.192140559@f29.my.com>
> Message-ID: <23248aadf4f5d3bf54eaaee78b5cfab9@bbva.com>
> X-Sender: Confirming.bbva@bbva.com
> User-Agent: Roundcube Webmail/1.3.9
> X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.6.2 (server.aaa.org [0.0.0.0]); Thu, 18 Nov 2021 13:30:51 +0100 (CET)
> X-Spam-Prev-Subject: BBVA-Confirming Factura
> 
> > Blockquote

```

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [November 22, 2021, 12:26pm UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/2 "2021-11-22T12:26:01Z")

</div>

> [@uinfor](#):
>
> I don’t understand why this email has not been stopped by the antispam, theoretically it should check SPF but here it has not done it.

yes it has checked SPF (SPF\_FAIL) and also marked as spam… (X-Spam-Flag: YES)  
not sure what you want to do. (?)

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 22, 2021, 12:40pm UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/3 "2021-11-22T12:40:43Z")

</div>

Simply mark it as spam if it does not comply with spf, for example if it does not comply with spf add 3 or 5 points to the spam level.

```auto
[score: 0.0000]	* 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record	* 0.0 SPF_FAIL SPF: sender does not match SPF record (fail)	

```

Here 0 points fail SPF, i don’t understand why ??

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [November 22, 2021, 12:47pm UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/4 "2021-11-22T12:47:11Z")

</div>

> [@uinfor](#):
>
> `SPF_FAIL`

add your own score in local.cf or elsewhere, eg  
score SPF\_FAIL 3

also it is marked as spam. (x-spam-flag). maybe you want to add rewrite\_subject to also add _ **SPAM** _ to the subject? it’s just another option in spamassassin you can enable…

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 22, 2021, 3:41pm UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/5 "2021-11-22T15:41:51Z")

</div>

What surprises me is that I don’t see any place where I can do this with virtualmin, for me it is something basic.

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 23, 2021, 9:28am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/6 "2021-11-23T09:28:31Z")

</div>

I understand that virtualmin is a product to help manage a hosting and this is basically web and mail, the antispam to mail is like the firewall to the services, how is it possible that you can not manage this in virtualmin?  
@Ilia I’m sorry but Is there any plan to manage this in virtualmin ??

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [November 23, 2021, 10:10am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/7 "2021-11-23T10:10:26Z")

</div>

> [@uinfor](#):
>
> @Ilia I’m sorry but Is there any plan to manage this in virtualmin

I am almost always confused about each mail-related question a user asks. Perhaps, it is just a complex topic.

> I don’t understand why this email has not been stopped by the antispam, theoretically it should check SPF but here it has not done it.

What do you mean by _“hasn’t been stopped”_? What result do you expect to get? The message has spam score header and the subject was prepended with [SPAM]. It was stopped and things evidently work just fine. If you expect this message to be thrown away (or something else) you would need to check configurable options on **virtual-server.name - Server Configuration ⇾ Spam and Virus Delivery** page:

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/2X/3/394696f1a7a12d0b74bb14ac3c5f2d672767b5c6.png)

* * *

It would be useful to check on **Spam and Virus scanning** [documentation](https://www.virtualmin.com/idspam_and_virus_scanning/).

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 23, 2021, 10:29am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/8 "2021-11-23T10:29:14Z")

</div>

> 

```auto
[score: 0.0000]	* 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record	* 0.0 SPF_FAIL SPF: sender does not match SPF record (fail)	

```

Here 0 points fail SPF, i don’t understand why ??

> 

@Ilia This is i don’t understand, SPF its fail but is not adding anything to the counter

I think it would be an easy and great improvement that when SPF fails it would add points to the spam counter, or at least from the panel it could be managed.  
doesn’t it seem logical to you?  
and do not take this as a negative complaint, it is not my intention, but as a contribution to the improvement of the product, which also I think it should not be difficult to implement, don’t you think?

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 23, 2021, 10:59am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/9 "2021-11-23T10:59:13Z")

</div>

and more things to contribute and that I don’t think would cost much and would be of great help would be something as simple as the incorporation of antispam lists from the panel.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [November 23, 2021, 11:43am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/10 "2021-11-23T11:43:59Z")

</div>

> [@uinfor](#):
>
> Simply mark it as spam if it does not comply with spf, for example if it does not comply with spf add 3 or 5 points to the spam level.

This can be setup manually by editing **Servers ⇾ SpamAssassin Mail Filter: Header and Body Tests / Advanced Mode** page:

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/2X/d/da04349a560d5bf0c628956dd961ffea2dbff77c.png)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [November 23, 2021, 11:49am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/11 "2021-11-23T11:49:24Z")

</div>

> [@uinfor](#):
>
> and more things to contribute and that I don’t think would cost much and would be of great help would be something as simple as the incorporation of antispam lists from the panel.

@Jamie What do you think if we made SpamAssassin test scores, in particular **`SPF_`** score, configuration ported to **Server Configuration ⇾ Spam and Virus Delivery** page for simplicity, as I agree it might be hard to configure.

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 23, 2021, 11:56am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/12 "2021-11-23T11:56:52Z")

</div>

Yes this is the config page i know, if you can make this for me its great, and if you could also add the option to add list of anti-spam server filters, it would be perfect. 😍

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 23, 2021, 11:59am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/13 "2021-11-23T11:59:03Z")

</div>

Sorry i view this SPF config now, frankly I had no idea that this option was there and I’ve been looking all these years, maybe in some last update it has been added ?? anyway thanks a lot !!!

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [November 24, 2021, 1:07am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/14 "2021-11-24T01:07:12Z")

</div>

It’s rare that users would want to change the default spamassassin rule scores… I’m surprised that SPF\_FAIL is only scoring 0 points by default.

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 24, 2021, 9:19am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/15 "2021-11-24T09:19:29Z")

</div>

Yes, this is my surprise, SPF\_FAIL 0 points 🤔

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [November 25, 2021, 1:38am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/16 "2021-11-25T01:38:03Z")

</div>

Is that what’s it’s set to in the default SpamAssassin configuration? Or is it overridden in any of the files under /etc/spamassassin ?

---

<div class="post-metadata">

**Author:** ![uinfor](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/u/8e8cbc/32.png) [@uinfor](https://forum.virtualmin.com/u/uinfor)\
**Post date:** [November 25, 2021, 9:31am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/17 "2021-11-25T09:31:55Z")

</div>

@Jamie i don’t remember touch anything about this

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [November 25, 2021, 5:47pm UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/18 "2021-11-25T17:47:37Z")

</div>

On my system, the default scores are in `/usr/share/spamassassin/50_scores.cf`

---

<div class="post-metadata">

**Author:** ![dimitrist](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/dimitrist/32/21546_2.png) [@dimitrist](https://forum.virtualmin.com/u/dimitrist)\
**Post date:** [December 6, 2021, 10:04am UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/19 "2021-12-06T10:04:53Z")

</div>

spamassassin :

> <https://github.com/apache/spamassassin/blob/trunk/rules/50_scores.cf#L781>

debian has same defaults, dont know about centos.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [December 6, 2021, 4:37pm UTC](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028/20 "2021-12-06T16:37:16Z")

</div>

> [@Jamie](#):
>
> score SPF\_FAIL 0 0.919 0 0.001 # n=0 n=2

Try changing default SpamAssassin rule scores using earlier mentioned **Servers ⇾ SpamAssassin Mail Filter: Header and Body Tests / Advanced Mode** page.

[Next page](https://forum.virtualmin.com/t/virtualmin-check-spf-records/113028.md?page=2)
