Koozali.org: home of the SME Server

Address of internal mail server

Offline matthewj

  • 3
  • +0/-0
Address of internal mail server
« on: September 12, 2007, 08:00:36 AM »
SME Server v7.1, new install, server / gateway.
I'm trying to use sme as spam & virus filter, then pass email to internal mail server, for all addresses for 2 domains.
Other posts & doco say it's easy, and suggest to:
1. put the ip address of the internal mail server in the "Address of internal mail server" field, to relay all mail.
2. use "db domains setprop domain.name MailServer ip.address" to relay individual domain mail.
I've tried both of these and the mail does not get through.
I have a router between my sme box and internal mail server - does this make any difference?
I have set a port forward on the internal router for port 25, forwarding it to the internal mail server, but it doesn't help.
If if set a port forward for port 25 on the sme box, and forward it to the internal router, the mail does get through, but I wanted to get the spam/virus pass on the sme box first.
I do not have any users set up on the sme box (don't want to maintain users in 2 places).
This looked really easy in the posts and in the doco.
I must be missing something obvious.
Anyone have any idea?
Thanks.

Offline matthewj

  • 3
  • +0/-0
Re: Address of internal mail server
« Reply #1 on: September 12, 2007, 01:15:38 PM »
I would certainly appreciate any suggestions.
I have been on this for 2 days now.
I'm sure it's probably simple for you experts, but I'm a novice at this.
I have both domains setup.

Any suggestions of how to even track this down would be appreciated.
I send mail from gmail and that's the end of it.
And v7.1 doesn't have the nice console Alt-F5 log messages window, so I can't see if there's anything happening.

Thanks.

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Address of internal mail server
« Reply #2 on: September 12, 2007, 02:41:10 PM »
From a command prompt on the SME server, type this in and see what happens:

telnet w.x.y.z smtp

where "w.x.y.z" is the ip address of the internal mail server (specifically, this command needs to work for the ip address you have configured for your 'Internal Mail Server'.

I understand you to be saying that your network is configures like this:
Internet
    |
SMEServer
    | (a.b.c.0)
 Router
    | (w.x.y.0)
MailServer


The configuration requirements for this would be:

SME Server:
  • server-manager::Configuration::E-mail::Change e-mail reception settings
    --> be sure E-mail retrieval mode is 'Standard (SMTP)'
  • server-manager::Configuration::E-mail::Change email delivery settings
    --> set 'Address of internal mail server' correctly (see below)
  • server-manager::Configuration::Domains
    -->By default, SME will reject email for any recipient whose domain is not listed on this page

Routing and IP Addresses:
  • If the 'router' is really a 'router' then you MUST use different network addresses for the SME LAN and the MailServer network (a.b.c.0 and w.x.y.0 in my diagram)
  • If the 'router' is performing NAT on outbound packets, then you need to configure it to forward traffic on port 25 to 'MailServer' and configure your SME's 'internal mail server' with the a.b.c.? address of the router, not with the address of the MailServer.
    • If the router is *not* performing NAT, you need to tell the SME how to route traffic for the w.x.y.0 network using:
      server-manager::Security::Local networks::Add network
      Create an entry where:
      Network address = w.x.y.0
      Subnet mask = (the correct subnet mask for the network containing MailServer)
      Router = a.b.c.? (the a.b.c.? address of the Router)

    Virus / Spam scanning as you are doing uses the following subsystems:
    • external server connects to your SME.  SME accepts the email using 'qpsmtpd', logging the transaction information in /var/log/qpsmtpd/current
    • qpsmtpd runs the incoming email through various checks (dnsbl, spamassassin, clamav) (NOTE: NONE OF THESE ARE ENABLED BY DEFAULT) and delivers it to qmail on the SME server
    • qmail delivers (or attempts to deliver) the email to the 'internal mail server' you have configured, logging the transaction information in /var/log/qmail/current
    More information:

Offline matthewj

  • 3
  • +0/-0
Re: Address of internal mail server
« Reply #3 on: September 12, 2007, 03:43:44 PM »
Hey, it works!
Thank you so much for making it so clear.
You got it spot on.
I think my problem was in both the ip address the sme server was sending to, and the ip address the internal mail server was receiving from!
I wasn't sure how to handle the router basically.
Thanks again!
And now to the auto-learning etc you suggest.