# Expected default Spam delivery behavior?

**URL:** <https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949>\
**Category:** Help! (Home for newbies)\
**Created:** [February 10, 2022, 6:13pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949 "2022-02-10T18:13:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 10, 2022, 6:13pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/1 "2022-02-10T18:13:05Z")

</div>

| 🛈 SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Ubuntu 20.04.3D |
| Virtualmin version | 6.17-3 |

_Apologies in advance for all the Newb questions over the last few days and next week or so. Please bare with me as I am new to Web/Virtualmin and getting used to it…_

Is the default install behavior of the Spam system to NOT deliver spam classified emails to the spam folder in the individual email accounts boxes? I see that Servers/Spamassassin/Procmail Spam Delivery has: `"Append to mbox-format mail file .. $HOME/spam"` checked.

I have the ‘Enable Spam’ & ‘Enable Virus’ checkboxes checked for the virtual server, and the same enabled on all user/email accounts.

I was under the (possibly wrong) assumption Spam would be delivered to the users ‘spam’ folders.  
If that is wrong, and I indeed want spam delivered to the individual users ‘spam’ folders, should I change the Servers/Spamassassin/Procmail Spam Delivery setting to ‘Deliver Normally’?

Thanks

---

<div class="post-metadata">

**Author:** ![tpnsolutions](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/tpnsolutions/32/69_2.png) [@tpnsolutions](https://forum.virtualmin.com/u/tpnsolutions)\
**Post date:** [February 10, 2022, 7:46pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/2 "2022-02-10T19:46:20Z")

</div>

@rexdog1,

Check out…

`Virtualmin > System Settings > Virtualmin Configuration > Spam Filtering Options`

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 10, 2022, 8:57pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/3 "2022-02-10T20:57:16Z")

</div>

Ok it has checked:  
**Other file or email address:** $HOME/Maildir/.spam/

So, in theory any spam should be delivered to the ‘spam’ folder correct?

I am testing it by sending the ‘GTUBE’ email from another account on a different server. Does the GTUBE get filtered on its way out so its never leaving the source server?

FYI heres the email:

```auto
This is the GTUBE, the
    Generic
    Test for
    Unsolicited
    Bulk
    Email

If your spam filter supports it, the GTUBE provides a test by which you
can verify that the filter is installed correctly and is detecting incoming
spam. You can send yourself a test mail containing the following string of
characters (in upper case and with no white spaces and line breaks):

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

You should send this test mail from an account outside of your network.

```

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 11, 2022, 6:19pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/4 "2022-02-11T18:19:28Z")

</div>

Ok it has checked:  
**Other file or email address:** $HOME/Maildir/.spam/

So, in theory any spam should be delivered to the ‘spam’ folder correct?

---

<div class="post-metadata">

**Author:** ![tpnsolutions](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/tpnsolutions/32/69_2.png) [@tpnsolutions](https://forum.virtualmin.com/u/tpnsolutions)\
**Post date:** [February 11, 2022, 7:00pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/5 "2022-02-11T19:00:19Z")

</div>

@rexdog1,

Yes, that’s the default location, unless you messed with the settings somewhere else.

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 11, 2022, 9:02pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/6 "2022-02-11T21:02:39Z")

</div>

Is it correct for spam emails to be written to a text file instead of delivered to the spam mailbox?

The text file located here has the test spam emails I have been sending written to it:  
/home/mydomain/homes/username/spam

The setting you mentioned above:  
Virtualmin \> System Settings \> Virtualmin Configuration \> Spam Filtering Options:  
**Other file or email address:** $HOME/Maildir/.spam/

I found that  
Virtualmin \> Server Configuration \> Spam and Virus Delivery has:  
**Write to standard spam:** Maildir ~/Maildir/.spam/

Webmin \> Servers \> Spamassassin Mail Filter:  
**Append to mbox-format mail file …** $HOME/spam

Are these all correct?

Maybe the last one (Webmin…) is not right?

---

<div class="post-metadata">

**Author:** ![tpnsolutions](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/tpnsolutions/32/69_2.png) [@tpnsolutions](https://forum.virtualmin.com/u/tpnsolutions)\
**Post date:** [February 12, 2022, 10:48pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/7 "2022-02-12T22:48:38Z")

</div>

@rexdog1,

Unless you plan on managing things manually do not adjust via Webmin module. Do everything when possible through Virtualmin side of panel.

Sounds to me you’ve done something manually at some point.

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 12, 2022, 10:52pm UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/8 "2022-02-12T22:52:33Z")

</div>

Thanks for that tip, now I know. But really this can’t be completely true, there are Usermin/Webmin display settings etc that can be set for personal taste… IP access control etc, 2FA settings, adding BCC/razor/pyzor, resource control etc…

I could still use some help getting this back to proper settings…

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 1:35am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/9 "2022-02-13T01:35:55Z")

</div>

> [@rexdog1](#):
>
> Webmin \> Servers \> Spamassassin Mail Filter:  
> **Append to mbox-format mail file …** $HOME/spam
> 
> Are these all correct?
> 
> Maybe the last one (Webmin…) is not right?

I’ve never edited Webmin config, this should be default

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/2X/6/6833ccc06be5c1ea864a32d548e54e177a909426.png)  
Maybe that helps.

Steve

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 13, 2022, 3:01am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/10 "2022-02-13T03:01:17Z")

</div>

Thank you for the help, but in that location my config file is :/etc/spamassassin/local.cf and has these 3 lines:

ifplugin Mail::SpamAssassin::Plugin::Shortcircuit

endif # Mail::SpamAssassin::Plugin::Shortcircuit  
rewrite\_header subject _ **Spam** _

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 3:13am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/11 "2022-02-13T03:13:56Z")

</div>

> [@rexdog1](#):
>
> ifplugin Mail::SpamAssassin::Plugin::Shortcircuit

If this is a new setup, might be best to do a clean install following instructions at [https://www.virtualmin.com/download/](https://www.virtualmin.com/download/)  
DO NOT install webmin first, let the install script do it for you.

Steve

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 13, 2022, 3:18am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/12 "2022-02-13T03:18:27Z")

</div>

Thats how I did the install originally.

Problem is now that i have a dozen users/email address with 40k + emails in the system. If I reinstall thats years of email gone.

Im not averse to it, and I may have to do it eventually, but that will take major backing up of files first with lost emails to users in the meantime.

As of the past hour, no mail is coming through now… Im at my whits end…

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 3:39am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/14 "2022-02-13T03:39:58Z")

</div>

so Deliver Normally dosn’t allow the mail to flow?

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

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 13, 2022, 3:48am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/15 "2022-02-13T03:48:36Z")

</div>

It does… (now… I restarted the server and of some reason postfix & Dovecot didn’t startup). Im receiving mail now).

Can you do me a favor and tell me what you have set here:

Webmin \> Servers \> SpamAssassin Mail Filter \> Procmail Spam Delivery

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 3:51am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/16 "2022-02-13T03:51:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 3:53am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/17 "2022-02-13T03:53:11Z")

</div>

sorry wrong one

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

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 3:55am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/18 "2022-02-13T03:55:22Z")

</div>

Are you seeing anything in the mail logs

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 13, 2022, 3:57am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/19 "2022-02-13T03:57:19Z")

</div>

I am receiving mail and it is being identified as spam, but being delivered to the inbox ( I expected it to go to the spam folder, but maybe that is incorrect?)

Thanks for posting the 2 screenshots, I am confirming my setting match right now

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [February 13, 2022, 4:12am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/20 "2022-02-13T04:12:08Z")

</div>

well spam should go to .spam folder, the file structure is like this

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

---

<div class="post-metadata">

**Author:** ![rexdog1](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@rexdog1](https://forum.virtualmin.com/u/rexdog1)\
**Post date:** [February 13, 2022, 4:26am UTC](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949/21 "2022-02-13T04:26:22Z")

</div>

My procmail filter settings are the same, except for the last entry which says:

Append to file $DEFAULT Match regexp ^X-Spam-Status: Yes

> well spam should go to .spam folder, the file structure is like this

Mine are not, they are going to the INBOX.

[Next page](https://forum.virtualmin.com/t/expected-default-spam-delivery-behavior/113949.md?page=2)
