Koozali.org: home of the SME Server

Mail server on another server inside LAN

Offline nogero

  • *
  • 8
  • +0/-0
Mail server on another server inside LAN
« on: December 26, 2015, 11:11:04 PM »
I am running SME 9.1 as a gateway. In addition I have a Kerio mail server running on the LAN that uses this gateway. I do not want the SME server doing mail, just passing it to internal server. Therefore on SME setup I put my LAN IP address in the SME field "Address of internal mail server"

It delivers mail to the internal server just fine, but in the mail server logs it shows sender IP address as the SME server instead of real sender IP. Sender IP is useful info for blocking, etc.

Is there a way to stop SME from making sender IP address the LAN SME address?


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Mail server on another server inside LAN
« Reply #1 on: December 26, 2015, 11:23:01 PM »
Is there a way to stop SME from making sender IP address the LAN SME address?

You can use port forwarding.

Offline nogero

  • *
  • 8
  • +0/-0
Re: Mail server on another server inside LAN
« Reply #2 on: December 26, 2015, 11:28:22 PM »
I tried port forwarding, but it appears SME overrides it. Is there a way to shutdown all email services on SME? Then maybe port forward would work.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Mail server on another server inside LAN
« Reply #3 on: December 27, 2015, 12:14:24 PM »
I tried port forwarding, but it appears SME overrides it.

What makes you say that? i.e. what exactly did you observe when you tried it?

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Mail server on another server inside LAN
« Reply #4 on: December 27, 2015, 05:48:43 PM »
I don't know of any easy way to disable all SME email functionality.

You might achieve what you want by:
* changing the default port for smtpd and ssmtpd
* port forwarding ports 25 & 465 to the Kerio server
* disabling the SMTP proxy (which otherwise intercepts all outbound email)

[untested]
# reset the default ports for smtp and ssmtp
config setprop smtpd TCPPort 2525
config setprop ssmtpd TCPPort 2465

# this might activate your new port settings (or you might need to reboot)
signal-event remoteaccess-update
[/untested]


In server-manager:
* disable the smtp proxy
* create two port forwarding rules - one for port 25 and one for port 465 - pointing to your Kerio server.

If you get SMTP working you may also want to change imaps and pop3s...


I am unaware of any spam-fighting technique available to Kerio that is not also availble to your SME -- is there a reason you don't want to use the SME server itself for RBL and RHSBs services?

Here are my current RBLList & SBLList settings:
Code: [Select]
config setprop qpsmtpd RBLList 'zen.spamhaus.org:bl.spamcop.net:bl.nosolicitado.org'
config setprop qpsmtpd SBLList 'dbl.spamhaus.org:badconf.rhsbl.sorbs.net:nomail.rhsbl.sorbs.net'