Hello,
seems that you need to deactivate relay from local network but not from localhost.
First let's try this to check if it is really your needs:
vim /var/service/qpsmtpd/config/relayclients
remove every lines after 127.0.0.1 (except 127.0.0.1)
then
service qmail restart
check if it works good for you.
if not revert with this
signal-event email-update
if yes you will have to make a template custom, like this :
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients
cp /etc/e-smith/templates/var/service/qpsmtpd/config/relayclients/80relayFromLocalNetwork \ /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80relayFromLocalNetwork
then modify it:
mcedit /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80relayFromLocalNetwork
foreach my $prefix ( @prefixes )
{
my $dot = ( $prefix =~ /\d+\.\d+\.\d+\.\d+/ ) ? : '.';
# $OUT .= $prefix . $dot . "\n";
$OUT .="# $prefix $dot :rem to avoid relay from local network remove template customs to revert\n";
}
}
Notes :
As far as i guess :
your sme is server only and is hosting mails,
the commercial box recieve public email from outside, and works as your MX, and then send it back to SME.
Are you certain SME spamfilter would not do the trick with some tune up ? Because as far as i see your problem is that
your commercial filtering box is accepting more spam than SME alone would accept ( sad isn't it ?), as it would not relay mail to accounts that do not exists. A good way would be to have this box to accept the content of /var/service/qpsmtpd/config/goodrcptto to refuse everything that is not in the list.
SME server with some tune up like activating spamassassin anf clamav, file filtering, enabling bayesian learning, enabling whitelisting and blacklisting or even grey listing is really really efficient !!!