Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34

Thread: Email from router

  1. Quote Originally Posted by sodb View Post
    Code:
    echo -e "From: test@test.com\nSubject: this is the subject\nReply-to: reply@server.com\nHere goes the mail body" | mini_sendmail -fnotused@ -ssmtp.server.com recipient@testide.com
    where -e option in echo interprets special \n character as a newline. The -f option in mini_sendmail does not seem to be used at all.
    I still can't get - how authentication's done? Or should I look for an smtp serv over internet which does not require authentication?

    btw, trying to get logrotate working - probably shouldn't and everything's already done? :-)

  2. #17
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    SMTP uses no authentication.
    Just use addresses of a server where you have an email account. The server should not be spam protected with grey listing or something similar.

  3. Quote Originally Posted by oleo View Post
    SMTP uses no authentication.
    Just use addresses of a server where you have an email account. The server should not be spam protected with grey listing or something similar.
    I believe this is not correct. As far as I'm concerned smtp protocol does not HAVE authentication feature, which does not mean it does not require to do it. Some servers (like mail.ru) require a user to login to pop3 server first, and some require starttsl (like gmail.com). Correct me if I'm wrong.

    anyway, I tried just what you recommend, and can't send a message and if I turn on verbose servers tell me that I have to do with authentication.

  4. #19
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    pop3 is not smtp. pop3 is for fetching mail only. Basic smtp uses no authentication. Reasonable servers only accept mail for their domains. If TLS is used or some filtering is ongoing on server, I recommend to create account on some free mail server and configure mail forwarding.

  5. Quote Originally Posted by oleo View Post
    pop3 is not smtp. pop3 is for fetching mail only. Basic smtp uses no authentication. Reasonable servers only accept mail for their domains. If TLS is used or some filtering is ongoing on server, I recommend to create account on some free mail server and configure mail forwarding.
    Believe it or not - didn't know that :-) Thanks a lot!

  6. #21
    What kind of command in script should I use to send info about lack of power (router's restart)? I have running sendmail very well. I need to know only command for that.

  7. Quote Originally Posted by Jarex View Post
    What kind of command in script should I use to send info about lack of power (router's restart)? I have running sendmail very well. I need to know only command for that.

    Code:
    echo -e "From: test@test.com\nSubject: this is the subject\nReply-to: reply@server.com\nHere goes the mail body" | mini_sendmail -fnotused@ -ssmtp.server.com recipient@testide.com

  8. #23
    Entire form i know very well. I need to know only command to use in script to send info about router's restart and how to tell CRON to start script after restart of router? Is "-fnotused@" the one? Looks strange...I do not get it.

    I use esmtp and sendmail command (in script) instead of mini-sendmail. I am able to add a topic to email etc.
    Last edited by Jarex; 17-12-2006 at 11:01.

  9. Quote Originally Posted by Jarex View Post
    Entire form i know very well. I need to know only command to use in script to send info about router's restart and how to tell CRON to start script after restart of router? Is "-fnotused@" the one? Looks strange...I do not get it.

    I use esmtp and sendmail command (in script) instead of mini-sendmail. I am able to add a topic to email etc.
    Put a script in cron.5mins that cheks uptime and if it is less than 5 mins, run mini_sendmail. I'm not a guru who can write a script just like that, but I presume this is very simple, one conditional command call. I don't have linux at my hands right now, so you're on you're own...

  10. #25
    Thx m8. That is a good point to build a script with uptime. I am not script guru either but will try make one for my own purpose.


    Finally I made it. It works superb!
    Last edited by Jarex; 18-12-2006 at 10:40.

  11. #26
    Join Date
    Jun 2006
    Location
    Slovenia
    Posts
    26
    Hi

    I want to send email when router is powered on. I put this line in my post-mount script
    Code:
    /opt/sbin/sendmail sendto@gmail.com -f myemail@gmail.com < /tmp/harddisk/mimofile
    Post-mount is OK and is exectable. Problem is that mail is not send. But when I put this line manualy via telnet console it works.
    So where can I see logs of post-boot to get what goes wrong.

  12. #27
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    add >> /tmp/startup.log 2>&1 at the end of commands you wish to debug. eg.
    Code:
    /opt/sbin/sendmail sendto@gmail.com -f myemail@gmail.com < /tmp/harddisk/mimofile > /tmp/startup.log 2>&1
    and also
    echo "mini_sendmail status $?" >> /tmp/startup.log"
    after command in question.

    What about post-firewall?

  13. #28
    Join Date
    Jun 2006
    Location
    Slovenia
    Posts
    26
    This is not working for me

    Post-firewall is never executed. Don't know why

    Router is in access point mode
    Last edited by georgij; 03-03-2007 at 16:06.

  14. #29
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    no post-firewall in AP mode!

  15. #30
    Join Date
    Jun 2006
    Location
    Slovenia
    Posts
    26
    As I undrestand, I am not able to use post-firewall when in AP mode.
    But post-mount & post-boot are not usable for programs which uses network

    So what should I do. I just need to run program after router is configured.
    Maby cron can be hacked somehow

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. USB Camera and Driver / Email sending ?
    By sky11 in forum WL-500g Q&A
    Replies: 5
    Last Post: 06-08-2005, 19:52
  2. open jpeg files from alert email in linux
    By xlephant in forum WL-500g Q&A
    Replies: 2
    Last Post: 10-07-2004, 13:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •