Community discussions

MikroTik App
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 5:29 am

This is a beginner question, not one of those Complex General ones that creep into this hex for dummies forum. :-)
Okay when I had my hex in test mode - attached to second IP of Cable modem was hooked up to my PC, I could send and receive email with ease.
I put the hex in house mode -attached to both FIber and Cable Modem and house LAN and I can no longer SEND emails..........

Prior to the full hookup I did a wireshark capture from my PC which showed a back and forth hello and eventually a goodbye with the email server during a successful send event.
On the hex log, I found the associated allow LAN to WAN forward filter rule from my PC to the EMAIL Server IP of the cable provider. Thus far looked good.

However when I attempted same with full blown setup, no joy on send.

Scenario
ROUTES
VLAN BELL Fiber is distance 1, ping gateway
The route I made dest=0000/0 gateway IP etc........... was reachable.
(I had a successful internet connection with this connection)

EASTLINK CABLE is distance 2
The route I made dest=0000/0 and gateway IP of Eastlink was reachable.

The EMAIL Eastlink Cable Route
I made dest=IP of email server, gateway IP of Eastlink was reachable.

Since I could reach the email without the primary WAN connection I concluded that none of my filter, or raw rules were getting in the way.
Nevertheless I turned them off one by one to ascertain any change but none occurred.

What can I be missing in my logic chain LOL.
(Sob promised me that my magical router would always find a route LOL).
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 1:53 pm

Here's the good news, I suspect your magical router did find a route but is via the VLAN Bell Fibre and your e-mail ISP is blocking the smtp traffic as you are coming from a IP Range that does not belong to them.

So look into your route for your e-mail for resolution, sounds it is not working as expected.

Alternatively, configure smtp authentication on e-mail client, then you can send from anywhere
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 3:58 pm

You missed a lengthy discussion about this in a different thread CZFAN. Originally I had mangled my email traffic to route it, but Sob pointed out that as long as I had the IP route with destination Email Server IP and gateway IP of same provider in the routing table, the router would find the right route BECAUSE of domain name in the outgoing email traffic smtp.eastlink.ca (router would resolve this). Perplexed.............................. and stumped.
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 5:02 pm

I'll deny everything!

But ok, I found the thread, and it was slightly different. That was the one where after a lot of misunderstandings, we explained to you that not every single packet carries target hostname, but only IP address the hostname resolved to. If you ended up with static route for the server, it must work as long as IP address for given hostname doesn't change. I don't think we did any automatic updates for that.

I don't see anything clearly wrong based on your current description.
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 5:34 pm

THe email server IP is constant and does not change for obvious reasons.
So the question is why is the router not able to find the correct routing? Especially if before I hook up the FibreOP all routes are reachable and email send works.
I hook up the FibreOP (primary ISP) and the routes are all reachable but email SEND does NOT WORK.

crickets??????

a. Is it possible the router tries to use the FIbre OP ISP for email routing and if so WHY when smpt.eastlink.ca obviously points to NOT THAT
b. Is it possible that somehow I am blocking the routers ability to resolve the domain name??
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 6:16 pm

You missed a lengthy discussion about this in a different thread CZFAN. Originally I had mangled my email traffic to route it, but Sob pointed out that as long as I had the IP route with destination Email Server IP and gateway IP of same provider in the routing table, the router would find the right route BECAUSE of domain name in the outgoing email traffic smtp.eastlink.ca (router would resolve this). Perplexed.............................. and stumped.

What @Sob said is 100% correct, if there is a more specific route to destination, this specific route will be preferred over the default gateway route.

smtp.eastlink.ca will be resolved to IP Address by the client, i.e. PC, not the router in this case. Should the email be sent from the router, then the router it will resolve by the router using it's DNS config.

There are various reasons why IP Address of e-mail server can change, load balancing, redundancy,maintenance, etc
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 8:25 pm

in other words, no one knows what is going on and nothings resolved.
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 9:33 pm

We have to guess, while you can do some basic debugging and get exact results. Start with traceroute to mail server and see if it goes the right way and if it's able to reach the server. If it succeeds, continue with telnet to used port 25/587 and see if you're able to connect and get welcome message from server. Etc...

So it's your move.
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Sun May 27, 2018 9:47 pm

Yes I will now do wireshark with the offending router as I did before when it worked fine in small setup.
Will reattach to home network and do same test.
Last edited by anav on Mon May 28, 2018 1:49 am, edited 1 time in total.
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Mon May 28, 2018 1:49 am

Okay before doing that I had to sort out two issues, no VOIP and no Email Send.
Turns out both were connected to not properly configuring the primary ISP.
ISP reachable means shit without proper numbers in place.
I figured this out when I put the wrong numbers and the VLAN was not reachable and the router actually THEN switched to my backup and I could get all access.
So basically one of the moral of the stories is to use an external IP ping checker..................

In any case I had NO bell numbers to go by. So what I did was simply use
0.0.0.0/0 and the name of the interface for gateway IP.
Eventually for some reason a DAC entry appeared.
It provided a destination address .0/22 and a preferred source (IM assuming this meant my IP address).
In the past I had used what I had assumed to be the gateway of my IP lets saying ending . 115. I used the same IP with a .1 ending.
So my IP route looked like
/ip route
dstaddress=0.0.0.0/0 gatewayIP = x.x.x.x.1

However this time I went the step further and used the dest address in the DAC

/ip route
dstnaddress=x.x.x.x/22 gatewayIP= x.x.x.1

AND IT WORKS, now its not only reachable but actually connecting properly as both VOIP and email sends work!.

Here is my conundrum or point of misunderstanding. I didnt do the above for my straight cable connection.
Its Route Rule is still 0.0.0.0/0 gatewayIP and it works fine. Why does it work fine for cable and sheite for vlan Bell fiber???

So I want to add actual ping checking to the mix..............
Would this work...............
assume 192.168.1.1 is the gateway IP of my VLAN connection (primary ISP)
assume 10.10.2.1 is the gateway IP of my Cable connection (backup ISP)
/ip route
add distance=1 dst-address=8.8.4.4/32 gateway=192.168.1.1 scope=10 (google)
add distance=2 dst-address=208.67.220.220/32 gateway=192.168.1.1 scope=10 (opendns)
add check-gateway=ping distance=1 gateway=8.8.4.4
add check-gateway=ping distance=2 gateway=208.67.220.220
add distance=10 gateway=10.10.2.1
add dest=emailServerIP gateway IP (of secondary ISP) distance=1
 
p3rad0x
Long time Member
Long time Member
Posts: 637
Joined: Fri Sep 18, 2015 5:42 pm
Location: South Africa
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Mon May 28, 2018 10:45 am

If i understand correctly.

Check gateway will only check if 192.168.1.1 is reachable and not the dst-address
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Email Sorta Works........... Rcve Only :-(

Mon May 28, 2018 2:23 pm

Thanks Paradox, by the way I was too quick. My solution does not work! The router showed VLAN bell reachable but who ismy IP showed my cable IP and thus the primary ISP was not being used at all by the mikrotik. Back to square one! I have opened up another thread for that discussion.

However I would like to nail down this ping gateway approach.

Who is online

Users browsing this forum: Adephx, Bing [Bot], cmmike, uxertxo, WiesiDeluxe and 51 guests