Expected default Spam delivery behavior?

🛈 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

@rexdog1,

Check out…

Virtualmin > System Settings > Virtualmin Configuration > Spam Filtering Options

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:

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.

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?

@rexdog1,

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

1 Like

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?

@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.

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…

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


Maybe that helps.

Steve

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

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

Steve

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…

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

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


sorry wrong one

Are you seeing anything in the mail logs

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

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

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.