This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need help getting mail to my internal mail server

ASG V8
I have looked and thought I did everything I needed to do but.....
Lets start by saying I use DynDns so I can have such things as a mail and web server.  Dyn Dns is sending out the mail on port 2525 because Comcast blocks port 25.  This mail is going to come from "IP Range = 216.146.32.0 - 216.146.33.255" or as I have it set up as "216.146.32.0 / 255.255.254.0".
I set up the internal network.
Packet Filter = 
Source = Internal (Network)
Service = Email Messaging + port 2525 I made my own including port 2525
Destination = Any

NAT = 
Traffic Source = Any
Traffic Service = Email Messaging + port 2525
Traffic Destination = External (WAN) (Network)
NAT mode = (DNAT) Destination
Destination = Mail Server set up like this
-- Type = Host
-- Interface = Any
-- IpAddress = 192.168.0.XX

Destination Service = Empty

I am not getting any emails that I have sent to it by external means.

I came from the IPCop Community and really like this product so please give me some guidance.


This thread was automatically locked due to age.
  • Traffic Destination = External (WAN) (Network)

    This should  be: 'Traffic Destination = External (WAN) (Address)'

    Cheers - Bob
  • Ok.  Thanks.  I have changed it.
    I will get back in a few minutes to see if this works.

    Also is there a place to specify the addresses that are coming from DYNDNS.

    I created on just like the mail server but changed the Traffic Source to my DYN rule.
    Traffic Source = DYNDNS = 
    --Type = Network
    --Interface = External WAN
    --IPv4 Address: = 216.146.32.0
    --Netmask =  255.255.254.0
    Traffic Service = Email Messaging + port 2525
    Traffic Destination = External (WAN) (Network)  ??Change This also??
    NAT mode = (DNAT) Destination
    Destination = Destination = Mail Server set up like this
    -- Type = Host
    -- Interface = Any
    -- IpAddress = 192.168.0.XX
  • Still nothing.  What is weird is I am getting all of my outgoing messages from the postfix log and nothing seems to be coming in at all.
  • Also is there a place to specify the addresses that are coming from DYNDNS.

    Sorry, I don't understand what you are trying to accomplish with this.

    Is this a home-use situation?  If so, you should configure Mail Security instead, but, back to your question...

    One basic philosophy of using networking devices is that the first part of NAT, packet filter, policy route and other rules is the traffic selector, and that determines whether the packet will be selected for that rule.  If the packet is selected, no further rules of that type are considered.

    The traffic selector for your mailserver DNAT depends on what traffic you are expecting from where.  In your case, it appears that you are using a DynDNS service to relay port-25 emails to you on port 2525.  I would expect that you would create a new 'Definition >> Services' named "SMTP-Alt" = 2525, and that your traffic selector would be:

    {host definition for the IP of DynDNS service} -> SMTP-Alt -> External (WAN) Address



    So, your DNAT would look like:

    Traffic Source = {host definition with IP of the DynDNS service}
    Traffic Service = SMTP-Alt
    Traffic Destination = External (WAN) (Address)

    NAT mode = (DNAT) Destination

    Destination = {host definition for mailserver}
    Destination Service = {Empty or SMTP, depending on your server's configuration}


    Cheers - Bob
  • I have done that for the rule you specified.

    Now to your first statement about setting up through Mail Security.
    So I do not need to add any rules through the system or are you saying my problem Now should be able to be solved in Mail Security?

    Thanks.
  • The approach you're using now, with the DNAT, is the one to use if you aren't going to use the SMTP Proxy with Mail Security.

    If you want to use Mail Security, it's really simple.  The steps for your situation are:
    [LIST=1]
    • From the 'Global' tab of 'Mail Security >> SMTP', enable the Proxy in 'Simple' mode.
    • On the 'Routing' tab, add your domain name, yourdomain.com, select 'Route by :' "Static host list" and put {the host definition for mailserver} in the 'Host list'
    • On the 'Relaying' tab, in the 'Upstream host list', put {the host definition for the IP of DynDNS service}, and you probably will want to check the 'Allow upstream/relay hosts only' box.
    • Still on the 'Relaying' tab, put {the host definition for mailserver} in 'Allowed hosts/networks'
    • On your mailserver, change it to listen & talk on port 25 instead of 2525, and where it points to the DynDNS service, put in the IP of the Astaro's "Internal (Address)"
    • Finally, change the DNAT that you created to:

      Traffic Source = {host definition with IP of the DynDNS service}
      Traffic Service = SMTP-Alt
      Traffic Destination = External (WAN) (Address)

      NAT mode = (DNAT) Destination

      Destination = {Empty!}
      Destination Service = SMTP


    • Create another NAT rule for outbound emails:

      Traffic Source = External (Address)
      Traffic Service = SMTP
      Traffic Destination = {host definition with IP of the DynDNS service}

      NAT mode = (SNAT) Source

      Source = {Empty!}
      Source Service = SMTP-Alt


    [/LIST]
    I think that's all the steps, but please post back here if there's something else you had to do to make it work.

    Cheers - Bob
  • WOW!

    Ok I did all that you asked.  I have a question  "Imagine that"

    ""On your mail server, change it to listen on port 25 instead of 2525, and where it points to the DynDNS service, put in the IP of the Astaro's "Internal (Address)"""

    Postfix is already listening on both ports
    Put in Astaro's internal address.

    Is that the standard 
    MyNetworks = 192.168.0.1, 127.0.0.1
    or the proxy = Comcast's address DHCP

    Also disable just the DNAT or both DNAT and packet Filter.
  • Ok did everything you asked am still not sure about the packet filter but I did leave it in place.

    Still nothing in my mail server.
  • Here is the log for my connections

    14:54:20  Default DROP  TCP 
    216.146.33.208  :  64920
    → 
    68.55.240.176  :  2525

    [SYN]  len=60  ttl=54  tos=0x00  srcmac=0:1:5c:32:1a:c1  dstmac=0:a0:cc:61:ac:2
    14:54:23  Default DROP  TCP 
    216.146.33.208  :  64920
    → 
    68.55.240.176  :  2525

    [SYN]  len=60  ttl=54  tos=0x00  srcmac=0:1:5c:32:1a:c1  dstmac=0:a0:cc:61:ac:2
    14:54:26  Default DROP  TCP 
    216.146.33.208  :  64920
    → 
    68.55.240.176  :  2525

    [SYN]  len=60  ttl=54  tos=0x00  srcmac=0:1:5c:32:1a:c1  dstmac=0:a0:cc:61:ac:2
    14:54:27  Default DROP  TCP 
    216.146.33.20  :  60036
    → 
    68.55.240.176  :  2525

    What is this telling us??
  • When delivered, the Astaro is set to 192.168.0.1 = "Internal (Address)".  "Interface (Address)" is a host object created by WebAdmin when "Interface" is created.  If you ever plan to VPN into it or set up a site-to-site, you should change to something random like 192.168.123.1 with subnet /24.

    In any case, 192.168.0.1 (or 192.168.123.1) is what should replace the IP of the DynDNS service in Postfix.  Instead of speaking directly to DynDNS, Postfix will do its transfers with the Astaro, and the Astar will now work with the DynDNS service.  Don't leave the packet filter rule enabled.

    Please go back to the previous post.  I numbered it instead of using bullets, corrected steps 5 and 6 and added a step.

    Cheers - Bob