I need a script that sends an e-mail when netwatch notice a node is down. The problem is only that my e-mail service provider’s smtp server only accepts authenticated access. Is there any way the script can send authentication?
How can I check the MT OS is actually sending an e-mail. I see no activity if I make a mail-send script to run. Should the log show anything?
yup...
i used first script Update SMTP & Backup scripts than relay to local smtp. and it will retrying to send out when my gateway is on from local smtp one.
hai,
ofcourse, you can use ip smtp of your isp enough, but when your gateway goes down your mail will be gone.
my action script anticipate when smtp or gateway goes down. it mail will queue on local one... nice
You don’t understand. My network has two different gateways to the internet. If one fails the failover script switches to the other gateway. So e-mails always can go out. Later I will even have three or four gateways. E-mails always go out.
All I need a workaround to send e-mail to a smtp server that needs authentication.
But I don’t know if this possible at all..
No, that’s not possible with MT. But MT-ROS has a MTA (=Mail Transfer Agent) and these can always contact the smtp server provided the IP address it comes from is known and whitelisted by the mail provider.
I have the following script running now and it runs great:
name=“Home_ADSL_Down_Mail” owner=“xxxxxxxxxx”
policy=ftp,reboot,read,write,policy,test,winbox,password
last-started=sep/07/2007 09:57:33 run-count=7
source={/tool e-mail send from=“marusol@fastmail.fm” server=“66.111.xx.xx”
body=“The Home ADSL line is down!” subject=“Home ADSL Down!”
to=“xxxxxxxx@fastmail.fm”}
The script is initiated by netwatch.
The xxx can be filled with your data. The server IP is the IP of the smtp server of the mail provider. I use a commercial provider for this, ISP’s teem to go bust at times… and I don’t want to loose my e-mail address. Also, the commercial ones give more and better services.
This server normally needs authentication but I send the provider an e-mail to whitelist my WAN IP addresses and since then it workes fine.
I even sut up e-mail alliasses were I send to and with a forwarding rule to a sms (text) service I cat the message on my mobile! Great!
Thanks.
I think I will talk to my mail provider to whitelist my ip. But hey, that’s me !
I did not knew I can whitelist an ip and send mail without authentication from that one. Guess I’ll go rtfm once again, on the mail server. ( trying to make my own as secure as I could. )
so, for me: read manual, and go practice.
Just gone !