So, it seems that SME does not allow email relay when the source IP address matches the Gateway or router address set in SME. It even does not allow this if using secure SMTPD port 465 and SSL.
I can understand this and normally this is cool. But today I have a different need.
I am using SME server to handle mail for a small hotspot scenario, and the hotspot software is NATTING the users on the router which the SME server uses, so it appears that all emails from the networks listed as local networks come from the gateway. and so it goes and blocks them.
So I would like to enable relay from the gateway.
I have found this fragment:
/etc/e-smith/templates-custom/var/service/qpsmtpd/config/norelayclients/20norelayFromRouter
{
return '' unless $GatewayIP;
# we allow access from the router, but we do not allow relaying
return $GatewayIP;
}
So it occurs to me that if I create a custom template for this I can change the behaviour. Trouble is I dont know anything about perl and cant figure how to edit this template.
Please can somebody help me to edit this template to ALLOW relay from the gateway?
Rgds
Alex