Spam Folder Name

I recently enabled Spam and Antivirus scanning through Virtual min (it was previously done with amavis-new). One of the reason’s I made the switch was to take advantage of (not only the per domain and per user settings), but also the ability to have SPAM delivered to a “Spam” folder.

The issue I discovered is that Virtualmin is configured to use “Maildir/.spam” with a lowercase “S”, but many IMAP clients pre-create a “Spam” folder with a capital “S”. What happens is that procmail creates a “Maildir/.spam” folder even though a “Maildir/.Spam” folder already exists.

I’ve considered changing the Virtualmin Configuration to use “Maildir/.Spam”, but the same problem will happen (in the opposite way).

The end result is the possibility of a user having TWO spam folders causing confusion and the idea of “lost mail”.

What can be done to resolve this somewhat serious issue?

I’ve noticed exactly the same issue and would like to know how to resolve it…

I suppose since both sides, the server and the client, make assumptions here about what the other side is going to use as spam folder name, there is no “real solution” for this.

In my view, the client should conform to the server in this case. Email clients should not blindly use or assume the spam folder to be named “Spam”, if the server wishes to name it otherwise. The client should rather be configured to use the folder that the server uses, since on the server, scripts and configurations may rely on the correct naming.

Yeah, I’m not entirely certain how to solve the problem that some clients default to “Spam”, and others default to “spam”.

I mean, the users could certainly configure which one to look for in their clients, but that may be a lot to ask from users who aren’t all that interested in messing with mail client settings.

I’m not sure what sort of trouble this idea might cause, but if the Spam vs spam thing bothers you, it might be worth trying :slight_smile: One possible option is to symlink $HOME/Maildir/.Spam to $HOME/Maildir/.spam.

That has the downside of making it look like there’s two spam folders. But since most clients won’t subscribe to IMAP folders by default, that probably won’t matter in most cases.

If you try that, let us know if it works, and if you notice it causing anything unusual :slight_smile:


You could also try the following in Virtuamin:

  • Select the domain from the left menu
  • Open the Server Configuration category and click on Spam and Virus Delivery
  • Change the settings to whatever you want

@snapmin: Unfortunately, there’s no option to write the spam to a directory different from “.spam”, only to another file. Not sure if mailfiles can also serve as IMAP “folders” in this regard. This might be worth checking out and/or adding in a future Virtualmin version. :slight_smile:

Oops, it looked promising, but I didn’t try it actually :slight_smile: Thanks for clarifying!