Totally lost, trying to use OpenWrt router as inbound smtp av/spam filter

I've got openwrt 18.06 installed and running on a banana pi R1 (also known as a lamobo R1). This is the web-facing router connected directly to a cable-modem.

I've got an email server inside my network, listening on port 25 and have port 25 forwarded from openwrt to my server. Emails are being received by the server and that part is all good. I want to implement a/v and spam scanning before the emails are forwarded on to the server

I have installed the clamav, clamsmtp packages as well as bogofilter.

Can anybody point me in the right direction for what settings I need to accomplish my goal? I have acchieved this setup before, many years ago by using ipcop and copfilter (although the spam was handled by spamassassin rather than bogof)

why not do it on the email server?

e.g. i would assume your internet will start lagging once your router is busy scanning mail

1 Like

Because reasons :slight_smile:

as soon as I get it working, the email server is being relocated. This is a testing setup environment where the goal is as stated above. The a\v and spam scanner is to be located on a different machine to the mail server as it will be on a separate network\isp connection

The workload will be so light, that lags won't be experienced.