12 de fev de 2014

Mikrotik: send email without stunnel

Send e-mail to internet mail provider using Mikrotik or even The Dude without stunnel is a simple task. This will work especially for The Dude installed on RB. For that, pay attention on:

1st limitation: Send e-mail only to the domain
For example, you have a email account like mail@sample.com you can only send email to mail@sample.com (valid for gmail, yahoo etc).

2nd limitation: Your IP MUST NOT be in a spammer list
Check your public IP at: http://wtfismyip.com/text than test that ip against http://mxtoolbox.com/blacklists.aspx. If you get some red you certainly will not send any emails directly. If you receive all green, it may be possible that you also can not send any email directly. Email's providers use their own rules to filter SPAM and throw your emails in to the /dev/null (limbo).

3rd limitation: Your email will be sent to SPAM box (Gmail and Yahoo do that)
Go to your acount and mark that (and others) No Spam. Works greate using Gmail. I have no idea about others mail providers.

4th limitation: Server provider will change MX recorders without any notice.
I check the email account every day and if I don't have a expected mail I first check the MX record :)

Ok, so lets go. Simple steps:

1 - Find the MX of the domain:
Using web tools like http://mxtoolbox.com/ enter your domain name. Like if you have a mail@sample.com, enter sample.com at the site and get the first IP address from the list.

2 - Configure your Mikrotik/The Dude with that IP:
For instance, using a Gmail account, that could be like this picture.

3 - Send a test email:
The Dude has that natively. Using Mikrotik script you can run that once. Please note that you MUST send email only to your account. Also note that the sender MUST be something link anyname@your_public_ip like the picture above. Some server will send to /dev/null your email if you use a incorrect sender IP. Some times you have to use the reverse name of your IP. This is a server restriction and you can complain to your email provider.
4 - Check your webmail SPAM folder and mark that as No Spam.



That is it. Good look.


Note: I'm not affiliate or participate to any of the services described here. I just link to them as a 1st Google search choice for the question. If any of the links are broken,  Google is your friend.


Postar um comentário