What's new

Notifications (E-Mail)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I implemented this as another usefull feature and was only getting the bottom part of the message displayed

(the ----- line and beyond)

I had to add another blank line with :

echo "" >>/tmp/mail.txt

between the Date section and the body of the message, then all was fine. Not sure if this is a mail server specific thing!

Regards,
 
Why parse syslog? wan-start gets run whenever the WAN interface comes up, that would be far more efficient.

Ahhh, great if it works like this.
Now the question everybody is afraid to ask:
If I save the script, how do you have to name it and in which folder on the router you have to store it?

With my limited knowledge it should not be in /etc/rcS.d/ because this is only run once when the router boots.
We have a running router that can loose it's WAN connection any time.

Sorry for the n00b question but I really have no clue. :eek:
 
Ahhh, great if it works like this.
Now the question everybody is afraid to ask:
If I save the script, how do you have to name it and in which folder on the router you have to store it?

With my limited knowledge it should not be in /etc/rcS.d/ because this is only run once when the router boots.
We have a running router that can loose it's WAN connection any time.

Sorry for the n00b question but I really have no clue. :eek:

User scripts are explained in the README included in the firmware, and also detailed on the Wiki.
 
Great, thanks for the pointer.

This JFFS is not taken away from RAM correct?
Just some left over unused flash?
 
Great, thanks for the pointer.

This JFFS is not taken away from RAM correct?
Just some left over unused flash?

That's correct. That's why it will survive reboots, and also why it's best to keep a backup of it, as it's not guaranteed to survive a firmware upgrade.
 
Awesome!!

It's working great.
I had to add the same line like garypower said.
There is a small typo on the wiki for this script, echi instead of echo.
(I saved it as "wan-start" not with the .sh extension I was expecting for some reason.)

Thanks for your help RMerlin.
 
Last edited:
It worked a couple of times to send mail to my gmail adress but now I don't receive nothing anymore, strange, instead if I send to my ISP adress it's ok, also on yahoo adress I don't get nothing.
Can anyone confirm this?
 
Last edited:
not really working

I tried to copy and paste the script made it executable and wrote the wan-up.
But whenever i execute the script i get error in line 17 , aut:my_isp_not_found bla bla it comes down there is an error in the script.
How come that with you guys the script just works and it gives me an error ?
All on merlin wrt am i right ?
I would really get this to work, and alter some settings to get the systemlog emailed with it and so on.
An i think this should be documented also i wrote a few guides on merlins wiki, but i need this to work before i am going to explain anything to anyone haha:D

Anybody suggestions ?

Isnt there a software that will help with these scripting ?
Like it detects if a space or a quote is to much ?
 
Last edited:
I tried to copy and paste the script made it executable and wrote the wan-up.
But whenever i execute the script i get error in line 17 , aut:my_isp_not_found bla bla it comes down there is an error in the script.
How come that with you guys the script just works and it gives me an error ?
All on merlin wrt am i right ?
I would really get this to work, and alter some settings to get the systemlog emailed with it and so on.
An i think this should be documented also i wrote a few guides on merlins wiki, but i need this to work before i am going to explain anything to anyone haha:D

Anybody suggestions ?

Hard to tell you based on solely "aut:my_isp_not_found bla bla" :D, but I'll take a bet that you have that one line split in two when it should all be on the same line. Refer to the Wiki post I made for the correct formatting.
 
It worked a couple of times to send mail to my gmail adress but now I don't receive nothing anymore, strange, instead if I send to my ISP adress it's ok, also on yahoo adress I don't get nothing.
Can anyone confirm this?

Heeyyyy this wass what i found out also !
I thougt it was an error in the script, but mine is the same sometimes i get ones
Most of the them i dont get them
 
It worked a couple of times to send mail to my gmail adress but now I don't receive nothing anymore, strange, instead if I send to my ISP adress it's ok, also on yahoo adress I don't get nothing.
Can anyone confirm this?

Spam filtering I guess. The emails sent by this script are far from being full-fledged Emails, lacking a lot of headers, and being sparse in content.
 
Anti SPAM

It's working when I manually disconnect/reconnect the wan but after a router reboot I get an error from email server about time disparity:
2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date
I added -w60 or -w"60" or -w 60 but it's not waiting
This is the full list:
Content analysis details: (11.1 points, 7.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date
3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL
[79.114.51.xxx listed in zen.spamhaus.org]
0.1 MISSING_MID Missing Message-Id: header
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
0.0 HELO_NO_DOMAIN Relay reports its domain incorrectly
1.1 TO_NO_BRKTS_FROM_MSSP Multiple formatting errors
1.0 TO_EQ_FM_DIRECT_MX To == From and direct-to-MX
2.5 TO_NO_BRKTS_DIRECT To: misformatted and direct-to-MX
-0.6 AWL AWL: From: address is in the auto white-list
 
It's working when I manually disconnect/reconnect the wan but after a router reboot I get an error from email server about time disparity:
2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date
I added -w60 or -w"60" or -w 60 but it's not waiting
This is the full list:
Content analysis details: (11.1 points, 7.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1
2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date
3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL
[79.114.51.xxx listed in zen.spamhaus.org]
0.1 MISSING_MID Missing Message-Id: header
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
0.0 HELO_NO_DOMAIN Relay reports its domain incorrectly
1.1 TO_NO_BRKTS_FROM_MSSP Multiple formatting errors
1.0 TO_EQ_FM_DIRECT_MX To == From and direct-to-MX
2.5 TO_NO_BRKTS_DIRECT To: misformatted and direct-to-MX
-0.6 AWL AWL: From: address is in the auto white-list

That makes sense. By the time you first run wan-start, ntp hasn't had a chance to set your clock yet. This would only be an issue if the router was just booted, it shouldn't be a problem if the WAN went down then back up.

You could force an immediate ntp query before sending the Email to avoid this.

Also note the rule hit on Spamhaus - looks like your current IP is blacklisted. That's your biggest issue, that rule having a fairly high score.
 
I have dynamic ip and is not black listed, see here.
How to force an immediate ntp query before sending the Email?
I tried adding this line to wan-start script:
/sbin/ntp -b
But without luck...
 
My router is n66u.I typed ntp and router successfully connected to my ntp server and changed time but to terminate ntp command i have to press ctrl+c. How can I terminate ntp command automatically?

By the way... is there any possibility to send mail with attachment?
I know this: "Other options are silently ignored; -oi -t is implied"
I have tried to install sendmail via ipkg but it doesn't work or I dont know how to turn it on.

By the way... hello all... good job Merlin :)
 
I have dynamic ip and is not black listed, see here.
It's possible that their Zen list is blacklisting entireblocks. Anyway, your SpamAssassin report does mention that your IP was found in the Zen Spamhaus RBL (which comprises multiple Spamhaus RBLs).

How to force an immediate ntp query before sending the Email?

ntpclient -h time.nrc.ca -s

(You can use a different NTP server if you wish)
 
By the way... is there any possibility to send mail with attachment?
I know this: "Other options are silently ignored; -oi -t is implied"
I have tried to install sendmail via ipkg but it doesn't work or I dont know how to turn it on.

You would need tools to convert the attachment into a MIME encoded file, and properly generate the mail file before seinding it. Definitely not something trivial.

There's an Optware package called putmail - see if maybe it allows for an easier way of sending mails with attached files.
 
My router is n66u.I typed ntp and router successfully connected to my ntp server and changed time but to terminate ntp command i have to press ctrl+c. How can I terminate ntp command automatically?

By the way... is there any possibility to send mail with attachment?
I know this: "Other options are silently ignored; -oi -t is implied"
I have tried to install sendmail via ipkg but it doesn't work or I dont know how to turn it on.

By the way... hello all... good job Merlin :)

Try and put the & character behind your command.
This will let it run on the background and should give the prompt back.
 
Try and put the & character behind your command.
This will let it run on the background and should give the prompt back.

You don't want to run the daemon version, but the client version. ntpclient is the proper command to use.
 
Similar threads

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top