Page 1 of 3 123 LastLast
Results 1 to 15 of 34

Thread: Email from router

  1. #1

    Email from router

    How do I email from my router? I have Olegs firmware version 1.9.2.7-5a installed on my router. In earlier releases (1.7.x I believe it was) sendmail was installed but I cannot find it any more. What happened to sendmail? Is there another email client available?

  2. #2
    Try mini_sendmail.
    B.

  3. #3

    Or try with esmtp..

    ..or you could try with esmtp.

    esmtp can be installed using ipkg :

    Code:
    ipkg install esmtp
    You should place a config ( esmtprc ) file in your /opt/etc directory :

    Code:
    hostname = smtp.isp.com:25
    username = "user"
    password = "password"
    where smtp.isp.com should be your ISP smtp server.
    User + password are only important if your ISP smtp server requires this.

    now you can use /opt/sbin/sendmail as you would normally use sendmail on your localhost.
    macsat
    http://www.macsat.com - Tutorials and information on using ASUS WL-500G and family.

  4. #4
    some mail servers with TTL might require adding "starttls required" into the esmtprc

  5. #5
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    16
    Quote Originally Posted by macsat
    ..or you could try with esmtp.
    I've installed according your tutorial. Installation fine, but when I try to send something like:

    Code:
    $ echo "Test Message" | sendmail user@domain.com -f user@domain.com
    I do not get prompt back. When I try to exit with Ctrl-Z get an error message:

    Code:
    [1] + CPU time limit exceeded    echo "Test Message" | ...
    Tryed to remove and install again. Doesn't help.

    Could anybody help?
    Thanks.

  6. #6
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    16
    Quote Originally Posted by kiewer
    When I try to exit with Ctrl-Z get an error message:

    Code:
    [1] + CPU time limit exceeded    echo "Test Message" | ...
    Tryed to remove and install again. Doesn't help.

    Could anybody help?
    Thanks.
    May be it is normal behavior on pressing Ctrl-Z (stop job), but nevertheless esmtp doesn't work.

  7. #7
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    16
    Now tryed with port 587 instead of port 465 and there is some update on my problem with esmtp and gmail.com (google) account:

    with /opt/etc/esmtprc (doesn't matter whether starttls = enabled or required):

    Code:
    hostname = smtp.gmail.com:587
    
    username = "xxxxxxx.x@gmail.com"
    password = "xxxxxxx"
    starttls = enabled
    result:

    Code:
    $ echo "Test Message" | /opt/sbin/sendmail  xxxxxxxx.x@gmail.com
    Invalid peer certificate (error 20)
    0 (null)
    xxxxxxxx.x@gmail.com: 0 (null)
    and with following /opt/etc/esmtprc:

    Code:
    hostname = smtp.gmail.com:587
    
    identity = "xxx@xxxxx.xxx"
            username = "xxxxxxx.x@gmail.com"
            password = "xxxxxx"
            starttls = enabled
    result:

    Code:
    $ echo "Test Message" | /opt/sbin/sendmail  xxxxxxxx.x@gmail.com
    0 (null)
    xxxxxxxx.x@gmail.com: 0 (null)
    and no emails arrive to google.

    I've also found in Internet an advice to use stunnel especially for getting working esmtp with google account, but may be there is a more simple solution?
    Last edited by kiewer; 18-09-2005 at 09:52.

  8. #8
    Quote Originally Posted by kiewer
    I've installed according your tutorial. Installation fine, but when I try to send something like:

    Code:
    $ echo "Test Message" | sendmail user@domain.com -f user@domain.com
    I do not get prompt back. When I try to exit with Ctrl-Z get an error message:

    Code:
    [1] + CPU time limit exceeded    echo "Test Message" | ...
    Tryed to remove and install again. Doesn't help.

    Could anybody help?
    Thanks.
    Exactly same problem as you described. Do you have solved it?

  9. #9
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    There is no need to install any package for sending mail. There is utility in Oleg firmware called mini_sendmail which can send simple mail messages.

    Code:
    usage:  mini_sendmail [-f<name>] [-t] [-s<server>] [-T<timeout>] [-v] [address ...]
    Last edited by oleo; 18-04-2006 at 08:35.

  10. #10
    Quote Originally Posted by oleo
    There is no need to install any package for sending mail. There is utility in Oleg firmware called mini_sendmail which can send simple mail messages.

    Code:
    usage:  mini_sendmail [-f<name>] [-t] [-s<server>] [-T<timeout>] [-v] [address ...]
    Great! I will try it.

  11. #11
    Quote Originally Posted by oleo
    There is no need to install any package for sending mail. There is utility in Oleg firmware called mini_sendmail which can send simple mail messages.

    Code:
    usage:  mini_sendmail [-f<name>] [-t] [-s<server>] [-T<timeout>] [-v] [address ...]
    Tried it. Working perfectly, but I dont know how to set the subject, sender name and recipients addresses...

    Code:
    echo "huhu" | mini_sendmail -fmyrouter -smysmtpserver.com address@domain.com
    ...sends the e-mail with blank subject, sender is address@domain.com and recipients are undisclosed-recipients:;

    What to do???

  12. #12

    What are the parameters for mini_sendmail?

    Quote Originally Posted by likeapear
    Tried it. Working perfectly, but I dont know how to set the subject, sender name and recipients addresses...

    Code:
    echo "huhu" | mini_sendmail -fmyrouter -smysmtpserver.com address@domain.com
    ...sends the e-mail with blank subject, sender is address@domain.com and recipients are undisclosed-recipients:;

    What to do???
    What sre the arguments? What is myrouter and waht is mysmtpserver?
    Does that mean you have to have an email server/smtp server installed on the router?
    If so, how does it send webcam alerts then whithout the WAN connected?

  13. #13
    Join Date
    Jun 2004
    Location
    Delft, The Netherlands
    Posts
    62
    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.

  14. #14
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    -f option is used when talking to SMTP server. It should be a valid username to bypass antispam and other filters.

    If no -f arguments are given admin@hostname is used and this is not a valid domain for most SMTP servers.


    mini_sendmail(8) mini_sendmail(8)



    NAME
    mini_sendmail - accept email on behalf of real sendmail

    SYNOPSIS
    mini_sendmail [-f<name>] [-t] [-s<server>] [-T<timeout>] [-v] address
    ...

    DESCRIPTION
    With no flags, mini_sendmail reads its standard input up to an end-of-
    file and sends a copy of the message found there to all of the
    addresses listed.

    The message is sent by connecting to a local SMTP server. This means
    mini_sendmail can be used to send email from inside a chroot(2) area.

    -f Set the name of the "from" person (i.e. the sender of the mail).

    -t Read message for recipients. To:, Cc:, and Bcc: lines will be
    scanned for recipient addresses. The Bcc: line will be deleted
    before transmission.

    -s Specify the the SMTP server to use. Without this it uses local-
    host.

    -T Specify timeout - defaults to one minute.

    -v Verbose mode - show the conversation with the SMTP server.

    SEE ALSO
    sendmail(8)

    AUTHOR
    Copyright &#169; 1999 by Jef Poskanzer <jef@acme.com>. All rights reserved.



    12 July 2001 mini_sendmail(8)

  15. #15

    Thumbs up Got it

    Thanx for the reply. I got it finally working. Though I am trying to send myself email when router restarts that means I set the destination email address and the email address after the -f option to the same (my own address).
    When I get the message from my mail account and view it in my mail client the "Message from" field is empty. But I guess that is done by the mail server as it (as I suppose) does this automatically for mails that are sent from and to the same address.

    Thanx for your help and for explaining the parameters

Page 1 of 3 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, 20: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, 14: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
  •