Hi! I am trying to create a log file to send it later via email.
I’ve created a filter rule:

then in logging/rule:

the in logging/actions:

But in “files”, the file cannot be created.
I appreciate any help.
Hi! I am trying to create a log file to send it later via email.
I’ve created a filter rule:

then in logging/rule:

the in logging/actions:

But in “files”, the file cannot be created.
I appreciate any help.
You cannot make log file and then send it to e-mail.
But you can save logs to file or send to e-mail.
To save logs to files, make sure you have firewall logs with prefix block. Probably there are no such logs at the moment, that’s why you do not see created file.
Try to experiment with “info” topics logs.
I’ve tried with “info”, but no way!
Any idea?
Thanks anyway!
Your current rule make logs on disk.
You can see them by selecting “disk” in /log menu or /log print where buffer=disk
To setup logs to file, make sure to configure /system logging> action add disk-file-name=
http://wiki.mikrotik.com/wiki/Manual:System/Log#Logging_to_file
Here is a script that will do it assuming you have the email tool already configured correctly. Change DEST_EMAIL_ADDRESS to your email. Just create new script in winbox and past the contents in the script source box.
#read log
:local logcontent
:foreach int in=[/log find ] do={
:set logcontent (“$logcontent\r\n” .[/log get $int time]. " - " .[/log get $int message])
}
#send email
/tool e-mail send to=“DEST_EMAIL_ADDRESS” subject=([/system identity get name] . " Log " . [/system clock get date]) body=$logcontent