Error sending email timeout occurred mikrotik

Mikrotik error sending email timeout occurred Fri Feb 20, 2015 9:08 am I put this Script into Mikrotik : and I have messege error : Error sending e-mail . timeout occured Can anyone explain what is the problem ? Re: System Error sending email timeout occurred Fri Feb 20, 2015 12:34 pm Re: System […]

Содержание

  1. Mikrotik error sending email timeout occurred
  2. Re: System Error sending email timeout occurred
  3. Re: System Error sending email timeout occurred
  4. Re: System Error sending email timeout occurred
  5. Re: System Error sending email timeout occurred
  6. Re: System Error sending email timeout occurred
  7. Re: System Error sending email timeout occurred
  8. Re: System Error sending email timeout occurred
  9. Re: System Error sending email timeout occurred
  10. Re: System Error sending email timeout occurred
  11. Re: System Error sending email timeout occurred
  12. Re: System Error sending email timeout occurred
  13. Re: System Error sending email timeout occurred
  14. Re: System Error sending email timeout occurred
  15. Re: System Error sending email timeout occurred
  16. Re: System Error sending email timeout occurred
  17. Re: System Error sending email timeout occurred
  18. Mikrotik error sending email timeout occurred
  19. Re: e-mail «on-error=»
  20. Re: e-mail «on-error=»
  21. Re: e-mail «on-error=»
  22. Re: e-mail «on-error=»
  23. Re: e-mail «on-error=»
  24. Re: e-mail «on-error=»
  25. Re: e-mail «on-error=»
  26. Re: e-mail «on-error=»
  27. Mikrotik error sending email timeout occurred
  28. Re: v6.28 final RC testing
  29. Re: v6.28 final RC testing
  30. v6.28 final RC testing
  31. Re: v6.28 final RC testing
  32. Re: v6.28 final RC testing
  33. Re: v6.28 final RC testing
  34. Re: v6.28 final RC testing
  35. Re: v6.28 final RC testing
  36. Re: v6.28 final RC testing
  37. Re: v6.28 final RC testing
  38. Re: v6.28 final RC testing
  39. Re: v6.28 final RC testing
  40. Re: v6.28 final RC testing
  41. Re: v6.28 final RC testing
  42. Re: v6.28 final RC testing

Mikrotik error sending email timeout occurred

Fri Feb 20, 2015 9:08 am

I put this Script into Mikrotik :

and I have messege error :
Error sending e-mail . timeout occured

Can anyone explain what is the problem ?

Re: System Error sending email timeout occurred

Fri Feb 20, 2015 12:34 pm

Re: System Error sending email timeout occurred

Fri Feb 20, 2015 3:28 pm

I put this Script into Mikrotik :

and I have messege error :
Error sending e-mail . timeout occured

Can anyone explain what is the problem ?

*your.email@domain.com..* — with receivers mail address (without «*»)
*your-mailserver.domain.com* — with name of mailserver that will send the mail
*user@domain.com* — with username to log on to the mailserver
*mailpassword* — with password used to logon to the mailserver

Re: System Error sending email timeout occurred

Fri Feb 20, 2015 3:34 pm

My email settings is correct
becuase I sent an email form inside mikrotik and it is working

and I will try this new script

Re: System Error sending email timeout occurred

Fri Feb 20, 2015 4:25 pm

I put this Script into Mikrotik :

and I have messege error :
Error sending e-mail . timeout occured

Can anyone explain what is the problem ?

*your.email@domain.com. * — with receivers mail address (without «*»)
*your-mailserver.domain.com* — with name of mailserver that will send the mail
*user@domain.com* — with username to log on to the mailserver
*mailpassword* — with password used to logon to the mailserver

I put this script , and it show me this message :

like message with past script

I tried to send backup file manual, and I went to System > Email
and I make attach for file backup

and it give me same message

I notice all the script work good , but when it arrived to load backup file to attached , it show the message
I thought because size of backup file, but the size is 800kb

Re: System Error sending email timeout occurred

Fri Feb 20, 2015 4:35 pm

Re: System Error sending email timeout occurred

Mon Feb 23, 2015 12:23 am

your Script for Mikrotik System backup
and My Script for user manger bakup

as I said before the problem not in the Script
because I saw the log , and it is work very good
but when it arrived to load backup user manger , to attached to my email
It failed , I don’t know what the reason?

Re: System Error sending email timeout occurred

Mon Mar 02, 2015 11:49 am

Looks like I am effected, too.

Sending e-mail used to work up to and including RouterOS 6.25. My last backup via e-mail is from feb/02/2015.
I updated to RouterOS on feb/04/2015. After that I did not receive a mail from my routerboards.

Re: System Error sending email timeout occurred

Thu Mar 19, 2015 7:36 am

At least in my test configuration exact same script is working correctly:

1) Is this command executed:
*) Through console;
*) Through Script running it form console;
*) Through Script running it by pressing button in Winbox;
*) Through Script running it by Scheduler?
2) What is the size of attached file?
3) What kind of policy options are enabled if command is executed from Script?
4) What kind of policy options are enabled if command is executed from Scheduler?

Re: System Error sending email timeout occurred

Thu Mar 19, 2015 10:59 am

Re: System Error sending email timeout occurred

Wed Mar 25, 2015 10:32 pm

I thought the connection is encrypted and did not try to dump it so far. Just did that now. And guess what? No encryption.

RSET
220 mx.xxxxxxx.de ESMTP Postfix
530 5.7.0 Must issue a STARTTLS command first
QUIT
221 2.0.0 Bye

Red ist from RouterBoard, blue is from mailserver.

The connection is started with RSET, which the mailserver does not like.

Re: System Error sending email timeout occurred

Fri Mar 27, 2015 4:22 pm

—-
A SMTP server that is not publicly referenced may choose to require
that the client perform a TLS negotiation before accepting any
commands. In this case, the server SHOULD return the reply code:

530 Must issue a STARTTLS command first

to every command other than NOOP, EHLO, STARTTLS, or QUIT.
If the client and server are using the ENHANCEDSTATUSCODES
ESMTP extension [RFC2034], the status code to be returned
SHOULD be 5.7.0.
—-

Maybe the problem is that you try to connect to the submission port (587) which does not allow other commands than those referenced in RFC 3207.

Please try to connect using port 25 on.

But, anyway, RouterOS should work using port 587 also.

Re: System Error sending email timeout occurred

Fri Mar 27, 2015 4:26 pm

—-
A SMTP server that is not publicly referenced may choose to require
that the client perform a TLS negotiation before accepting any
commands. In this case, the server SHOULD return the reply code:

530 Must issue a STARTTLS command first

to every command other than NOOP, EHLO, STARTTLS, or QUIT.
If the client and server are using the ENHANCEDSTATUSCODES
ESMTP extension [RFC2034], the status code to be returned
SHOULD be 5.7.0.
—-

Maybe the problem is that you try to connect to the submission port (587) which does not allow other commands than those referenced in RFC 3207.

Please try to connect using port 25 on.

But, anyway, RouterOS should work using port 587 also.

Re: System Error sending email timeout occurred

Mon Mar 30, 2015 5:56 pm

Sending on port 25 fails as well:

220 mx.xxxxx.de ESMTP Postfix
RSET
250 2.0.0 Ok
QUIT
221 2.0.0 Bye

Re: System Error sending email timeout occurred

Wed Apr 01, 2015 3:14 pm

Re: System Error sending email timeout occurred

Thu Apr 02, 2015 3:37 pm

Re: System Error sending email timeout occurred

Sun May 17, 2015 3:51 am

Thank you, version 6.28 did correct the short smtp connection timeout problem. However, other short timeouts now exist within the communication session. On high latency connections (or those with intentional anti-spam post-connection delays), if RouterOS ‘s e-mail tool does not receive a reply within 15 seconds, it will abort the session without generating any error message or attempting a retry. This specific problem only popped up in 6.28.

A 15 second response delay appears to be enough to trigger the behavior. This can be duplicated by configuring a Postfix based mail server using the «sleep» directive. For example the e-mail tool will drop out (without generating syslog error messages) after sending «RCPT TO:» with the remote Postfix mail server configured as follows:

smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
sleep 16,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_helo_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
(etc..)

This is not a critical problem (since removing the sleep line resolves the problem); however, it does introduce a new, undesirable behavior. Increasing the time-out or adding a debug syslog event would be most useful.

Thanks again for fixing the original connection timeout bug

Источник

Mikrotik error sending email timeout occurred

Sat Aug 13, 2016 10:56 pm

Re: e-mail «on-error=»

Mon Aug 15, 2016 3:05 pm

E-mail tool already writes in Log errors about unsuccessful mail deliveries. For example:
11:52:05 system,e-mail,error Error sending e-mail : timeout occurred

E-mail tool itself does not return error in CLI and works in background. On-error is not solution for e-mail tool.

Best regards,
Martins S.

Re: e-mail «on-error=»

Thu Mar 16, 2017 5:35 pm

Hi all,
I encountered the same problem. I need to handle errors generated during sending an email.
How could be possible to catch such error (if ‘on-error’ is not the right solution)?
(My goal is detect error during sending an email and try to resend it again in that case.)

Thank you all in advance.

Re: e-mail «on-error=»

Thu Mar 16, 2017 5:42 pm

Re: e-mail «on-error=»

Thu Mar 16, 2017 6:00 pm

Re: e-mail «on-error=»

Thu Mar 16, 2017 10:08 pm

Re: e-mail «on-error=»

Fri Mar 17, 2017 9:14 am

Re: e-mail «on-error=»

Fri Mar 17, 2017 11:18 am

Re: e-mail «on-error=»

Fri Mar 17, 2017 12:42 pm

=> script tries to resend email every 2 seconds, if last status was not «succeeded».

But let’s suppose there is one email sending in progress with large attachment, so it takes a lot of time to send it (last-status is ‘in-progress’). Now let’s suppose, that another short email is sent while the first one is still in progress. If 2nd email is sent with success, last-status will be updated to ‘succeeded’ and that will terminate first script — so it will not check if first email was sent with success or failure. And if first email crashes with error, first email will not be resent again.
Is that right?

Источник

Mikrotik error sending email timeout occurred

Wed Mar 18, 2015 1:45 pm

We have fixed most important issues and the version will be released this week, if possible, please test this version and let us know of any remaining issues, so we can address them. Thanks!

What’s new in 6.28rc14 (2015-Mar-17 15:41):

*) tile — rare situation when CCR devices failed to auto-negotiate ethernet link (introduced in v6.25);
*) route — using ldp could cause connected routes with
invalid interface nexthop;
*) added support for SiS 190/191 PCI Ethernet adapter;
*) made metarouter work on boards with 802.11ac support or usb LTE;
*) sstp server — allow ADH only when no certificate set;
*) make fat32 disk formatting support disks bigger than 134GiB;
*) fixed tunnels — could crash when clamp-tcp-mss was enabled;
*) added basic counters for ipv4/bridge fast path, also show status weather fast
path is active at all;
*) console — added ‘comment’ parameter for ‘/system script’
*) api — return sentences can have property

that groups values
from commands such as

(with non-zero ‘interval’ value);
*) cloud — add time zone detection feature

/system clock time-zone-autodetect

/ip cloud enabled

/ip cloud ddns-enabled

/ip cloud update-time

/ip cloud ddns-enabled

*) cloud — when setting

/ip cloud ddns-enabled

router will send
message to server to disable DNS name for this routerboard;
*) cloud —

/ip cloud force-update

command now will work also when

/ip cloud ddns-enabled = no

. usefull if user wants to disable DDNS;
*) RB4xxGL — improved ethernet throughput (less dropped packets);
*) trafflow: — fixed crash on disable;
*) pppoe — fixed crash when big ppp packets with were sent over EOIP;
*) tilegx — fixed memory leak when queue settings are changed;
*) ar9888 — fixed crash when hw reports invalid rate;
*) console — fixed «in» operator in console;
*) console — make «/system package update print» work again.

Re: v6.28 final RC testing

Wed Mar 18, 2015 2:35 pm

What’s new in 6.27 (2015-Feb-11 13:24):

*) console — added ‘comment’ parameter for ‘/system script’
*) api — return sentences can have property «.section» that groups values
from commands such as «monitor», «traceroute»,
«print» (with non-zero ‘interval’ value);
*) cloud — add time zone detection feature «/system clock time-zone-autodetect»;
*) cloud — rename «/ip cloud enabled» to «/ip cloud ddns-enabled»;
*) cloud — make «/ip cloud update-time» independent from «/ip cloud ddns-enabled»
*) cloud — when setting «/ip cloud ddns-enabled» to «no» router will send
message to server to disable DNS name for this routerboard;
*) cloud — «/ip cloud force-update» command now will work also when
«/ip cloud ddns-enabled = no». usefull if user wants to disable DDNS;
*) RB4xxGL — improved ethernet throughput (less dropped packets);
*) RouterBOARD — fixed health reporting;
*) check-installation: fixed wrong kernel crc on powerpc boards
*) watchdog: fix software watchdog for x86
*) ssh — check conn state before sending disconnect message;
*) ipsec — fixed crash that happened in specific situation;

What’s new in 6.28rc14 (2015-Mar-17 15:41):

*) tile — rare situation when CCR devices failed to auto-negotiate ethernet link (introduced in v6.25);
*) route — using ldp could cause connected routes with
invalid interface nexthop;
*) added support for SiS 190/191 PCI Ethernet adapter;
*) made metarouter work on boards with 802.11ac support or usb LTE;
*) sstp server — allow ADH only when no certificate set;
*) make fat32 disk formatting support disks bigger than 134GiB;
*) fixed tunnels — could crash when clamp-tcp-mss was enabled;
*) added basic counters for ipv4/bridge fast path, also show status weather fast
path is active at all;
*) console — added ‘comment’ parameter for ‘/system script’
*) api — return sentences can have property

that groups values
from commands such as

(with non-zero ‘interval’ value);
*) cloud — add time zone detection feature

/system clock time-zone-autodetect

/ip cloud enabled

/ip cloud ddns-enabled

/ip cloud update-time

/ip cloud ddns-enabled

*) cloud — when setting

/ip cloud ddns-enabled

router will send
message to server to disable DNS name for this routerboard;
*) cloud —

/ip cloud force-update

command now will work also when

/ip cloud ddns-enabled = no

. usefull if user wants to disable DDNS;
*) RB4xxGL — improved ethernet throughput (less dropped packets);
*) trafflow: — fixed crash on disable;
*) pppoe — fixed crash when big ppp packets with were sent over EOIP;
*) tilegx — fixed memory leak when queue settings are changed;
*) ar9888 — fixed crash when hw reports invalid rate;
*) console — fixed «in» operator in console;
*) console — make «/system package update print» work again.

Re: v6.28 final RC testing

Wed Mar 18, 2015 3:28 pm

v6.28 final RC testing

Wed Mar 18, 2015 5:32 pm

Re: v6.28 final RC testing

Wed Mar 18, 2015 6:14 pm

Sending e-mail is still broken for me. The issue is described here:
System Error sending email timeout occurred

Any chance to get that fixed?

Re: v6.28 final RC testing

Wed Mar 18, 2015 9:22 pm

Sending e-mail is still broken for me. The issue is described here:
System Error sending email timeout occurred

Any chance to get that fixed?

Re: v6.28 final RC testing

Wed Mar 18, 2015 10:54 pm

@jarda: As usual, download, install and hope for the best, sometimes you get lucky. I did today. A little. But yeah, some kind of notification would be nice.

«Good news, dear user! We think that we fixed your ticket. Sincerely, your support.«

Wed Mar 18, 2015 11:19 pm

Re: v6.28 final RC testing

Thu Mar 19, 2015 1:53 pm

Problem in system health on 2011UAS v6.28rc15 (not tested on other boards)

1) From gui menu I see an empty window

2) config export stuck on that with ..

Re: v6.28 final RC testing

Thu Mar 19, 2015 1:58 pm

Re: v6.28 final RC testing

Thu Mar 19, 2015 6:11 pm

Problem in system health on 2011UAS v6.28rc15 (not tested on other boards)

1) From gui menu I see an empty window

2) config export stuck on that with ..

Re: v6.28 final RC testing

Fri Mar 20, 2015 8:44 am

There are no dates on the posts in this thread.

When will .28 be released?

Just updated to .27 from .23 and immediately adopted an Ethernet negotiating issue on my ccr1036.

After two hours it just went off line. Has some FCS errors on my Cooper sfp. No asking of reboots or unplugging recovered it until it randomly decided to come up.

Not good. .23 was very stable but hey, it’s good to update right?

Re: v6.28 final RC testing

Fri Mar 20, 2015 12:46 pm

Error when opening inbox «Couldn’t start — profile already running (6)»

When opening inbox with ROS6.28RC15 CRS125 with profile running
from previous session

Re: v6.28 final RC testing

Sat Mar 21, 2015 4:10 am

Re: v6.28 final RC testing

Sat Mar 21, 2015 7:33 am

Re: v6.28 final RC testing

Sat Mar 21, 2015 7:58 am

me too. i upgraded to 6.27 last night, and 2 hrs later had FCS errors on the uplink/wan port connecting to upstream isp. This resulted in an outage that was devastating. rebooting did not help, reseating did not help. nothing helped. it randomly came back an hour later. Very concerned it was this ‘rare’ issue, but it happened within 2 hours so who knows.

from v23 to v27 did the driver become more sensitive to cabling, have a lower tolerance to cable issues? etc.

using CCR1026 16GB, uplink was sfp+ mikrotik copper module.

basically been waiting for 6.28 and cancelled a trip to make sure i load it in person ‘this week’ as posted in the 1st commend.

Normis, can we still expect it this week? you guys push new updates on saturdays?

Re: v6.28 final RC testing

Sat Mar 21, 2015 9:19 pm

Is this the x27 (introduced in .25) port flapping issue? Taken off upstream switch cisco me3600x, ethernet port, connected to mikrotik sfp+ port on ccr1036 16GB via mikrotik copper sfp

Also note: their port is set to no autonegotiation / 1000M Full
My port would not sync up on autonegotiation unchecked when we first installed it with r23, advertising at 10,100,100M Full only. 2 hours after upgrading to x27 we had the logs occur below. We also saw some FCS errors on the microtik log. We changed MT to only advertise at 1000M Full, still no fixed rate port support.

lasted exactly 1 hour, then came back up without much issue. Is this the bug that is fixed in r28? that was introduced in r25 where r23 was free from this flapping issue?

====
Mar 19 18:06:32.507 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
Mar 19 18:06:33.567 MDT: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to down
Mar 19 18:06:39.707 MDT: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to up
Mar 19 18:06:40.707 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to up
Mar 19 18:08:30.924 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
Mar 19 18:08:31.980 MDT: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to down
Mar 19 18:23:00.743 MDT: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to up
Mar 19 18:23:01.743 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to up
Mar 19 18:23:08.063 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
Mar 19 18:23:09.123 MDT: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to down
Mar 19 19:01:52.168 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to up
Mar 19 19:01:55.112 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
Mar 19 19:06:07.153 MDT: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to up
Mar 19 19:06:08.153 MDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to up
===

Источник

Используя скрипт что приводится в офф вики:
{
:log info «Starting Backup Script…»;
:local sysname [/system identity get name];
:local sysver [/system resource get version];
:local mktmodel [/system resource get board-name];
:log info «Flushing DNS cache…»;
/ip dns cache flush;
:delay 2;
:log info «Deleting last Backups…»;
:foreach i in=[/file find] do={:if ([:typeof [:find [/file get $i name]
«$sysname-backup-«]]!=»nil») do={/file remove $i}};
:delay 2;
:local smtpserv [:resolve «************»];
:local Eaccount «******************»;
:local pass «*****************»;
:local backupfile («$sysname-backup-» .
[:pick [/system clock get date] 7 11] . [:pick [/system
clock get date] 0 3] . [:pick [/system clock get date] 4 6] . «.backup»);
:log info «Creating new Full Backup file…»;
/system backup save name=$backupfile;
:delay 2;
:log info «Sending Full Backup file via E-mail…»;
/tool e-mail send from=»<$Eaccount>» to=$Eaccount server=$smtpserv
port=587 user=$Eaccount password=$pass file=$backupfile
subject=(«$sysname Full Backup (» . [/system clock get date] . «)»)
body=(«$sysname full Backup file see in attachment.nRouterOS version:
$sysver $mktmodelnTime and Date: » . [/system clock get time] . » » .
[/system clock get date]);
:delay 5;
:local exportfile («$sysname-backup-» .
[:pick [/system clock get date] 7 11] . [:pick [/system
clock get date] 0 3] . [:pick [/system clock get date] 4 6] . «.rsc»);
:log info «Creating new Setup Script file…»;
/export file=$exportfile;
:delay 2;
:log info «Sending Setup Script file via E-mail…»;
/tool e-mail send from=»<$Eaccount>» to=$Eaccount server=$smtpserv
port=587 user=$Eaccount password=$pass file=$exportfile
subject=(«$sysname Setup Script Backup (» . [/system clock get date] .
«)») body=(«$sysname Setup Script file see in attachment.nRouterOS version:
$sysver $mktmodelnTime and Date: » . [/system clock get time] . »
» . [/system clock get date]);
:delay 5;
:log info «All System Backups emailed successfully.nBackuping completed.»;
}
где
:local smtpserv [:resolve «************»];
:local Eaccount «******************»;
:local pass «*****************»;
данные от почты(домен использую свой с получением/отправкой писем проблем никаких нет, настройки отправки указаны корректно )
Версия микротика 6.49.2
В логах пишут:Error sending e-mail < (jul/**/20**)>: timeout occured
Error sending e-mail < Setup Script Backup (jul/**/20**)>: timeout occured
Пробывал ручной запуск через system-scripts:во флеш память делает бекап, но на почту не отправляется


  • Вопрос задан

    27 июн. 2022

  • 208 просмотров

Послать письмо с микротика

evgeniy7676

Сообщения: 58
Зарегистрирован: 19 май 2016, 14:52

Re: Послать письмо с микротика

Сообщение

evgeniy7676 » 22 сен 2016, 13:06

Немного не то ,в манглах уже все промаркировано имею два провайдера и при подении первого не получаю письмо из скрипта

Код: Выделить всё

if (($testPrim = false) && ($testPrim != $testPrimOld)) do={

/ip route disable [/ip route find comment="GW1"];
/ip firewall connection remove [find connection-mark=ISP1_in];
/ip firewall connection remove [find connection-mark=ISP1_for];
:delay 3
/log warning "ISP1 chanel is DOWN!!";
/tool e-mail send to=$sendto subject="WARNING mikrotik!" body="ISP1 chanel is DOWN!!";

пишет ошибку Error sending e-mail <WARNING mikrotik!>: timeout occured

Аватара пользователя

Chupaka

Сообщения: 3630
Зарегистрирован: 29 фев 2016, 15:26
Откуда: Минск
Контактная информация:

Re: Послать письмо с микротика

Сообщение

Chupaka » 22 сен 2016, 15:00

Что именно «всё» промаркировано? Телепатов нет, как бы…

При падении первого канала нормально пинг на SMTP-сервер идёт?

evgeniy7676

Сообщения: 58
Зарегистрирован: 19 май 2016, 14:52

Re: Послать письмо с микротика

Сообщение

evgeniy7676 » 22 сен 2016, 16:49

Код: Выделить всё

/interface ethernet
set [ find default-name=sfp1 ] name=ISP1
set [ find default-name=ether6 ] name=ISP2
set [ find default-name=ether1 ] name=LAN

/ip address
add address=192.168.1.200/24 interface=LAN network=192.168.1.0
add address=2.2.2.2/30 interface=ISP2 network=2.2.2.0
add address=1.1.1.1/24 interface=ISP1 network=1.1.1.0

/ip firewall mangle
add action=mark-connection chain=input in-interface=ISP1 new-connection-mark=
    ISP1_in passthrough=yes
add action=mark-routing chain=output connection-mark=ISP1_in 
    new-routing-mark=ISP1_rout passthrough=yes
add action=mark-connection chain=input in-interface=ISP2 new-connection-mark=
    ISP2_in passthrough=yes
add action=mark-routing chain=output connection-mark=ISP2_in 
    new-routing-mark=ISP2_rout passthrough=yes

add action=mark-connection chain=forward in-interface=ISP1 
    new-connection-mark=ISP1_for passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ISP1_for 
    new-routing-mark=ISP1_rout passthrough=yes src-address-list=LocalNet
add action=mark-connection chain=forward in-interface=ISP2 
    new-connection-mark=ISP2_for passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ISP2_for 
    new-routing-mark=ISP2_rout passthrough=yes src-address-list=LocalNet
/ip firewall nat
add action=src-nat chain=srcnat out-interface=ISP1 src-address-list=LocalNet 
    to-addresses=1.1.1.1
add action=src-nat chain=srcnat out-interface=ISP2 src-address-list=LocalNet 
    to-addresses=2.2.2.2
/ip route
add comment=ISP1_rout distance=1 gateway=1.1.1.2 routing-mark=ISP1_rout
add comment=ISP2_rout distance=1 gateway=2.2.2.3 routing-mark=ISP2_rout
add comment=GW1 distance=1 gateway=1.1.1.2
add comment=GW2 distance=2 gateway=2.2.2.3

/ip route rule
add action=lookup-only-in-table routing-mark=ISP1_rout table=ISP1_rout
add action=lookup-only-in-table routing-mark=ISP2_rout table=ISP2_rout

При падении первого канала письмо не приходит ошибка

1aleks23

Сообщения: 29
Зарегистрирован: 18 сен 2018, 05:48

Добрый день!

Настраиваю резервирования интернет канала(когда отваливается основной, переключаются на резерв). Проблема с настройко отправки письма на личгую почту, о том что канал переключился. Ошибка после запуска скрипта одна «timeout occured».
Сам скрипт:

Код: Выделить всё

/ip dns cache flush;
:local smtpserv [:resolve "smtp.yandex.ru"];

/tool e-mail send server=$smtpserv port=465 user= microtiKKMIAC@yandex.ru password=***** to="***** cc=("*****", "******") start-tls=yes from="MIKROTIK" 
subject="MikroTik: $[/system clock get date], $[/system clock get time]" 
body="Switching to the MAIN channelnDate: $[/system clock get date]nTime: $[/system clock get time]";

помогите разобраться, все уже перелазил ни чего не помогает.

1aleks23

Сообщения: 29
Зарегистрирован: 18 сен 2018, 05:48

12 фев 2019, 11:08

KARaS’b писал(а): ↑

12 фев 2019, 10:28


Лично у меня яндекс работает по 587 порту

Поставил порт 587 выдал ошибку «invalid from addres»

KARaS’b

Сообщения: 1199
Зарегистрирован: 29 сен 2011, 09:16

12 фев 2019, 13:02

Сначала я настраивал саму возможность слать мыла в тулз

Код: Выделить всё

/tool e-mail
set address=smtp.yandex.ru from="Mikrotik RB4011 <mail@yandex.ru>" password=password port=587 start-tls=yes user=user

А потом уже отправляю письма вот таким примерно способом

Код: Выделить всё

/tool e-mail send to=mail@mail.ru subject="Gateway changed" body="Gateway changed to beeline"

И у меня все работает.
З.Ы. user должен быть без собаки, а from насколько я понял, обязательно содержать мыло отправителя.

1aleks23

Сообщения: 29
Зарегистрирован: 18 сен 2018, 05:48

12 фев 2019, 13:20

KARaS’b писал(а): ↑

12 фев 2019, 13:02

Код: Выделить всё

/tool e-mail send to=mail@mail.ru subject="Gateway changed" body="Gateway changed to beeline"

И у меня все работает.
З.Ы. user должен быть без собаки, а from насколько я понял, обязательно содержать мыло отправителя.

subject и body это текст письма который будет отправляться в письме?

Попробовал поставил твой скрипт, результат тот же «timeout occured»

KARaS’b

Сообщения: 1199
Зарегистрирован: 29 сен 2011, 09:16

12 фев 2019, 13:27

«Ну вы блин даете…»(с) Сабжект это тема письма, боди текст письма.
Для начала пробуйте на письмах без ваших изысканных переменных, просто что либо отправить, и без вот этого «:local smtpserv [:resolve «smtp.yandex.ru»];» которое должно быть просто забито в настройках e-mail как явное.

1aleks23

Сообщения: 29
Зарегистрирован: 18 сен 2018, 05:48

13 фев 2019, 04:26

KARaS’b писал(а): ↑

12 фев 2019, 13:27


«Ну вы блин даете…»(с) Сабжект это тема письма, боди текст письма.
Для начала пробуйте на письмах без ваших изысканных переменных, просто что либо отправить, и без вот этого «:local smtpserv [:resolve «smtp.yandex.ru»];» которое должно быть просто забито в настройках e-mail как явное.

Как я понимаю проблема не в том что я как-то не правильно заполняю письмо, а в том что у меня микротик просто не может с сервером yandex связаться, поэтому и выдает ошибку в логах «timeout occured».

1aleks23

Сообщения: 29
Зарегистрирован: 18 сен 2018, 05:48

13 фев 2019, 08:27

Вообщем решил я свою проблему настройкой через gmail. Просто сменил почту.

0 / 0 / 0

Регистрация: 08.08.2018

Сообщений: 34

1

19.08.2019, 07:04. Показов 10670. Ответов 5


Добрый день, не получается настроить уведомления через email о падении хоста.

скрин 1, настройки в дуде , SMTP сервер Яндекса 213.180.204.38.
скрин 2 , пытался через веб морду отправить тестовое письмо
В логе вылазит ошибка Error sending e-mail <>: timeout occured

The dude пингует и 213.180.204.38 и smtp.yandex.ru

Миниатюры

Уведомления через email the dude
 

Уведомления через email the dude
 

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Эксперт по компьютерным сетям

4557 / 2004 / 425

Регистрация: 17.10.2015

Сообщений: 8,653

19.08.2019, 08:03

2

ну не знаю, у меня на МТ настроено отправка бэкапов на мыло. В настройках e-mail вот так:

Кликните здесь для просмотра всего текста

Уведомления через email the dude

порт точно 465 должен быть?



0



Модератор

Эксперт по компьютерным сетям

1502 / 595 / 112

Регистрация: 10.06.2009

Сообщений: 2,286

19.08.2019, 10:28

3

Лучший ответ Сообщение было отмечено MetaIhead как решение

Решение

Вроде порт у яндекса 587

Добавлено через 1 минуту
О нашёл где подсмотреть:

Код

/tool e-mail
set address=smtp.yandex.ru from=###@yandex.ru password=password port=587 start-tls=yes user=###@yandex.ru



2



Эксперт по компьютерным сетямЭксперт NIX

12384 / 7223 / 758

Регистрация: 09.09.2009

Сообщений: 28,185

19.08.2019, 10:41

4

номер порта зависит от настроек SMTP-сервера, которому отсылаются письма (самую точную информацию, включая и номер порта, можно получить в документации используемого SMTP-сервиса, описание подключения «других» клиентов). 25-й порт используется нынче редко (шифрованные подключения точно его не используют). кроме того, некоторые SMTP-сервисы (например, гугл) требуют дополнительных разрешений, включаемых В НАСТРОЙКАХ АККАУНТА В ЛИЧНОМ КАБИНЕТЕ НА САЙТЕ СЕРВИСА



0



0 / 0 / 0

Регистрация: 08.08.2018

Сообщений: 34

21.08.2019, 05:47

 [ТС]

5

Я не знаю какой порт должен быть, но настраивал до этого с сервера CRM уведомления по почте, через 465 всё работает

Добавлено через 9 минут
На сайте яндекса написан 465, но 25 тоже не работает

Добавлено через 59 минут
Не понял почему 587 если на сайте указан 465, но так заработало, спасибо)



0



Эксперт по компьютерным сетям

4557 / 2004 / 425

Регистрация: 17.10.2015

Сообщений: 8,653

21.08.2019, 08:44

6

Лучший ответ Сообщение было отмечено MetaIhead как решение

Решение

Цитата
Сообщение от MetaIhead
Посмотреть сообщение

На сайте яндекса написан 465, но 25 тоже не работает

Цитата
Сообщение от MetaIhead
Посмотреть сообщение

Не понял почему 587 если на сайте указан 465, но так заработало, спасибо)

я показал Вам свой скрин настроек. Там указан ip-адрес сервера и 25 порт. У меня все отправляется, почта работает.

Добавлено через 3 минуты

Цитата
Сообщение от MetaIhead
Посмотреть сообщение

Не понял почему 587

вот почему: Порты SMTP Яндекса

Порт без шифрования: 25, 587

Твой МТ не понимал шифрование SSL (465 порт)



2



На этой странице рассмотрена настройка электронной почты  и отправка сообщения через e-mail при неудачной попытке авторизации в роутер MIkroTik. Настройки протестированы для почтовых служб  Яндекс и Гугл. Параметры серверов отправки для этих сервисов можно посмотреть на их сайтах соответственно.

Освоить MikroTik Вы можете с помощью онлайн-куса
«Настройка оборудования MikroTik». Курс содержит все темы, которые изучаются на официальном курсе MTCNA. Автор курса – официальный тренер MikroTik. Подходит и тем, кто уже давно работает с микротиками, и тем, кто еще их не держал в руках. В курс входит 162 видеоурока, 45 лабораторных работ, вопросы для самопроверки и конспект.

Подключаемся в роутер через WinBox.

Настройка электронной почты.

1.В боковом меню выбираем пункт Tools.

2.В выпадающем меню выбираем Email.

В открывшемся окне Email Settings вводим параметры:

3.Server: 77.88.21.158 (или smtp.yandex.ru сервер исходящей почты яндекс)

4.Port: 587

5.Start TLS: yes

6.From: эл.почта отправителя

7.User: почта@yandex.ru (пользователь=email)

8.Password: 12345Password (Пароль электронной почты)

9.Нажимаем кнопку ОК.

Через командную строку терминала:

/tool email set address=smtp.gmail.com port=587 starttls=yes from=mail@yandex.ru user=mail@yandex.ru password=12345Password

Просмотр статуса.

Для тестовой отправки электронного письма нажимаем кнопку Send Email в окне Email Settings.

В открывшемся окне Send Email вводим параметры:

1.Address: 77.88.21.158 (или smtp.yandex.ru сервер исходящей почты яндекс).

2.Port: 587;

3.User: почта@yandex.ru (пользователь=email).

4.Password: 12345Password (Пароль электронной почты).

5.TLS активировано.

6.To: эл.почта получателя письма.

7.From: эл.почта отправителя.

8.Subject: тема письма.

9.Содержание письма.

10.Нажимаем кнопку Send Email.

В случае если отправка не удалась и появилось сообщение об ощибке Couldn’t perform action – AUTH failed.

1.Проверяем правильность ввода данных (логин, пароль, сервер, порт, TLS)

2.Проверяем настройку в сервисе почты.

В почте Яндекс – Почтовые программы.

В аккаунте Гугл — настройка безопасности для надежного приложения.  Надежные приложения. Если Выкл – включаем.

*при тестировании письмо одинаково успешно пришло в Гугл и Яндекс почту

Оповещение на e-mail о попытке подключения к роутеру.

В логе событие о неудачной попытке подключения обозначено system, error, critical.

Настраиваем отправку эл.почты по этому событию.

1.В боковом меню выбираем пункт System.

2.В выпадающем меню выбираем Logging.

3.В открывшемся окне Logging переходим на вкладку Action.

4.Редактируем существующее правило или создаем новое нажав плюс.

В открывшемся окошке Log Action вводим параметры:

5.Name: email (любое понятное имя латинскими буквами).

6.Type: email (выбираем из выпадающего списка).

7.Email: почта@yandex.ru (электронная почта получателя)

8.Start TLS — активируем галочкой.

9.Нажимаем кнопку ОК.

10.Переходим на вкладку Rules в окне Logging.

11.Нажимаем плюс для добовления нового правила.

В окне нового правила указываем:

12.Topics: error и critical (темы событий).

13.Action: email

14.Нажимаем кнопку ОК.

В Prefix можно добавить комментарий.

Через командную строку терминала:

/system logging action add emailstarttls=yes emailto=mail@yandex.ru name=email target=email

/system logging add action=email prefix=«WARNING» topics=error,critical

Чтоб почту не засыпало бесконечным логом событий, сперва все то же самое лучше сделать с указанием вместо Action: email >> Action: echo

В этом случае оповещение будет приходить в терминал.

Ниже отображается неудачная попытка войти в роутер с неверной учетной записью. Запись об этом событии дублируется в Terminal через echo.

Если все устраивает, указываем email вместо echo.

В логе видно, что после неудачной попытки подключения к роутеру было отправлено письмо на email. Вас пытаются взломать. Примите меры.

*у почты gmail возникает проблема авторизации при доставке, письмо не пришло, с почтой Яндекс всё ОК

Освоить MikroTik Вы можете с помощью онлайн-куса
«Настройка оборудования MikroTik». Курс содержит все темы, которые изучаются на официальном курсе MTCNA. Автор курса – официальный тренер MikroTik. Подходит и тем, кто уже давно работает с микротиками, и тем, кто еще их не держал в руках. В курс входит 162 видеоурока, 45 лабораторных работ, вопросы для самопроверки и конспект.

Понравилась статья? Поделить с друзьями:
  • Error sending e mail invalid to address
  • Error sending data 12175 faceit
  • Error sending data 12029
  • Error sending data 12007 не удается разрешить имя или адрес сервера
  • Error sending data 12002 время ожидания операции истекло