Is there a way to make the mikrotik email out on one of my smtp servers to an email address that I specify telling me when and who is signing on with certain usernames I specify?
Thanks for all your help guys!
Is there a way to make the mikrotik email out on one of my smtp servers to an email address that I specify telling me when and who is signing on with certain usernames I specify?
Thanks for all your help guys!
Yes. You can action a script when a user logs in. We used to use this for when a user clicked on the ‘trial’ link on our hotspot. Each new trial user made the hotspot send us an automated email telling us they had just logged in.
Awesome can you give me a bit of direction on how to go about doing this? Thanks for your help!
Examine the ‘Hotspot user profile’ tab in winbox. You will see Scripts tab, then in that scripts tab there is “on login” and “on logout”. In there you can type in the name of a script that is actioned whenever someone logs in or out. It is for you to write the script to decide what information you want to send!
Been reading thru this page http://www.mikrotik.com/testdocs/ros/2.9/system/scripting.php and I’m not exactly seeing how to start up an email session either via telnet on port 25, or however the script allows for it. Any chance someone could paste a sample script that works in here for me to study? Thanks.
/tool e-mail send to="your email address" body="Someone just connected to your system" subject="connection alert"
You need to have already inputted your SMTP email server first, where 1.2.3.4 is your (or your ISP’s) SMTP server
/tool e-mail set server=1.2.3.4 from="your systems email address"
Once that works, then use the wiki and the docs to write some code to extract the data from your hotspot that you can also include inside the email, either as an attached file or actually inside the body as that would also then save you from logging into your hotspot to find out what/who triggered it. Do this one step at a time and learn as you go along.
ah sweet. but is there no way to provide username and password for secure outgoing servers? I looked at the set var and those 2 that you listed are all it shows.
No. I believe that is being worked on for a future release.