Using Virtualmin / Webmin as Spam Filter for another email server ?

Hello everyone,

I am trying to find out if I can use the Spam Filtering capabilities of the setup on Virtualmin with SpamAssassin to filter spam out for another server I have on the local network ??? I do use the Postfix email functions on my Virtualmin platform for certain domains… some of my users though prefer to have their email serviced on Exchange… but I would still need to filter out SPAM before it gets to the Exchange server… Since Virtualmin does such a good job at it with SpamAssassin I was hoping there is a way to get the spam to be filtered through Virtualmin / SpamAssassin and then passed on to the Exchange server…

Is this at all possible to setup and how ?? Any help would be greatly appreciated!



Yes and no. The default AV/spam configuration in Virtualmin uses a delivery agent (procmail) to process the mail…that requires a local user to work. So, you’d need to set up spam/AV to always run, instead. Possibly using something like Mailscanner or amavisd-new (and maybe disable the per-user stuff in Virtualmin since you probably don’t want to scan mail twice).

Then you’d need to get mail forwarded to the right place.

The most obvious, and probably best, way to do this is to setup your Virtualmin server as a mail-forwarder for the domain(s) hosted by the Exchange server.

This can be done with specificity (i.e. only some mail) using transport maps.

So, you’d create/edit /etc/postfix/transport:

.exchange-domain.tld smtp:exchange-hostname.tld

And, add that to your postfix config:

transport_maps = hash:/etc/postfix/transport

Here’s the transport map docs:

It’s possible to use procmail to do the forwarding, and have things processed using the normal Virtualmin path, but it’s pretty messy. It’s not how I would do it; it’d be more work to keep using the Virtualmin spam/AV scanning than to just install something like Mailscanner system-wide.

Oh, and you may find that it’s easier just to stand up a dedicated mail scanning server.