delete mail mark as spam in mail relay


I use virtualmin pro (3.65) and the plugin mail relay 1.2 to filter mail with spamassassin and virus for some domains.

I have some questions about this :

  1. How can i automatically remove mails mark as spam with spamassassin with a X-Spam-Score higher than 5 ?
    I saw all the mails tags but they are still delivered.

  2. Is there some tools to analyse maillog file to have some statistics like spam per domain vs clean mails ?

Thanks for your help,



After logging into Virtualmin, if you click Server Configuration -> Spam and Virus Delivery, make sure that "Destination for spam emails" is set to put them into "Write to standard spam Maildir ~/Maildir/.spam/".

Regarding Spam stats, I don’t know of a way to get what you’re after per-domain – but you can get system-wide spam and email stats by going into “System Statistics” (on the bottom-left).

If you’d like to be able to sort those by domain, I’d recommending filing a feature request, Jamie may be able to add that in.


Thanks for your quick answer,…
Unfortunatally this configuration cannot be done when you just configure mail relaying to do spam and virus check.
I just would like to clean mails and then forward to the customer exchange using the mail relay plugin and mimedefang.

Concerning the stats, system statistics don’t show the mails scanned by this mail relay plugin.



I recheck my config but even if i ask in the webmain/spamassassin config to throw away spam mail, they are still deliverd to my domain protected by the mail relay plugin…sounds strange.

I check a mail in the target domain and the x-spam-score tags is in the body.

Some ideas ?