Problems with getting through router to mail server

Hello!

I have just setup up a MikroTik router (RouterOS 2.9), and everything works fine (everyone in the subnet can get to Internet and so on).. But I cannot get the e-mail server working.

I tried to open ports in Firewall - NAT (ports 25 and 100), but I still cannot get througt it. I suppose, I have done the port openning wrong.

So, how should I open those ports, that e-mai could be sent and received? I can ping the mail server. It has static IP address (for example 192.168.0.13).

Please, help, I am new to this OS and tomorrow everything should work (after 8 hours :slight_smile: ).

Thanks.

Janis.

any help?.. please?.. :frowning:
I am lost.. :frowning:

okay, that’s life. :slight_smile:

Why port 100?

Can you post your config?

Sorry, I tried to open port 110. My mistake.. A question: How can I paste my configuration? I am trully new to this kind of router and I just can’t find the solution about tje mails.

If I show to Outlook Express the local address for the outgoing and incoming mails, everything works fine.. But, when I show the prediscribed name (like mail.mycompany.lv), nothing hapens..

Anyway, I am hoping to your help.. So, how can I paste my config? Actually I am using Winbox, but I could try to connect to router with telnet, if it is easier for you. :slight_smile:

Hi again!

Here is the script according to mails:

/ ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade comment=“” disabled=no
add chain=dstnat dst-address=62.85.71.2 protocol=tcp dst-port=5900
action=dst-nat to-addresses=172.16.59.14 to-ports=5900 comment=“”
disabled=no
add chain=dstnat dst-address=62.85.71.2 protocol=tcp dst-port=25
action=dst-nat to-addresses=172.16.59.13 to-ports=25 comment=“”
disabled=no
add chain=dstnat dst-address=62.85.71.2 protocol=udp dst-port=25
action=dst-nat to-addresses=172.16.59.13 to-ports=25 comment=“”
disabled=no
add chain=dstnat dst-address=62.85.71.2 protocol=tcp dst-port=110
action=dst-nat to-addresses=172.16.59.13 to-ports=110 comment=“”
disabled=no
add chain=dstnat dst-address=62.85.71.2 protocol=udp dst-port=110
action=dst-nat to-addresses=172.16.59.13 to-ports=110 comment=“”
disabled=no
/ ip firewall connection tracking
set enabled=yes tcp-syn-sent-timeout=1m tcp-syn-received-timeout=1m
tcp-established-timeout=1d tcp-fin-wait-timeout=10s
tcp-close-wait-timeout=10s tcp-last-ack-timeout=10s
tcp-time-wait-timeout=10s tcp-close-timeout=10s udp-timeout=10s
udp-stream-timeout=3m icmp-timeout=10s generic-timeout=10m

It is strange, that suddenly I can send mails, but cannot receive.. Any Ideas?

If your mailserver is on the inside of your netwrl you will not need to portfoward port 110

okay, but if I need to get to in from out side?

yes, the mail server is inside local network. but still, if I use, for example mail.mycompany.lv, the Mail Browser is trying to connect to from outside, so I can’t get througt the router.

But, if I use local address in the mail browser, everything works just fine.. But that’s the problem.. I need to setup the router, so I could get to mails from outside world..

Any suggestions?

Try to move masquerade rule to the bottom.

Hi!

I got the Router work as it should. And, the 25 and 110 ports are opened as well.

It very strange: one moment I wanted to move back to my company’s old router, but - mystics - it wasn’t working any more.. I hadn’t changed anything in the old router’s configuration.. It just sudenlly stoped working.

So, I put back the old router.. And huge was my suprise, that everything was working fine! Ports were and still are open and I was able to send and receive meils.. What a relief! :slight_smile:)

But I did the reboot of the router few times before, but only the long time of inactivity solved the problem.

Any way, many thanks for those, who tried to help me! I owe (am I spelling it right? :slight_smile:) u! :slight_smile: