Try mini_sendmail.
B.
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?
Try mini_sendmail.
B.
..or you could try with esmtp.
esmtp can be installed using ipkg :
You should place a config ( esmtprc ) file in your /opt/etc directory :Code:ipkg install esmtp
where smtp.isp.com should be your ISP smtp server.Code:hostname = smtp.isp.com:25 username = "user" password = "password"
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.
some mail servers with TTL might require adding "starttls required" into the esmtprc
I've installed according your tutorial. Installation fine, but when I try to send something like:Originally Posted by macsat
I do not get prompt back. When I try to exit with Ctrl-Z get an error message:Code:$ echo "Test Message" | sendmail user@domain.com -f user@domain.com
Tryed to remove and install again. Doesn't help.Code:[1] + CPU time limit exceeded echo "Test Message" | ...
Could anybody help?
Thanks.
May be it is normal behavior on pressing Ctrl-Z (stop job), but nevertheless esmtp doesn't work.Originally Posted by kiewer
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):
result:Code:hostname = smtp.gmail.com:587 username = "xxxxxxx.x@gmail.com" password = "xxxxxxx" starttls = enabled
and with following /opt/etc/esmtprc:Code:$ echo "Test Message" | /opt/sbin/sendmail xxxxxxxx.x@gmail.com Invalid peer certificate (error 20) 0 (null) xxxxxxxx.x@gmail.com: 0 (null)
result:Code:hostname = smtp.gmail.com:587 identity = "xxx@xxxxx.xxx" username = "xxxxxxx.x@gmail.com" password = "xxxxxx" starttls = enabled
and no emails arrive to google.Code:$ echo "Test Message" | /opt/sbin/sendmail xxxxxxxx.x@gmail.com 0 (null) xxxxxxxx.x@gmail.com: 0 (null)
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 08:52.
Exactly same problem as you described. Do you have solved it?Originally Posted by kiewer
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 07:35.
Great! I will try it.Originally Posted by oleo
Tried it. Working perfectly, but I dont know how to set the subject, sender name and recipients addresses...Originally Posted by oleo
...sends the e-mail with blank subject, sender is address@domain.com and recipients are undisclosed-recipients:;Code:echo "huhu" | mini_sendmail -fmyrouter -smysmtpserver.com address@domain.com
What to do???
What sre the arguments? What is myrouter and waht is mysmtpserver?Originally Posted by likeapear
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?
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.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
-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 © 1999 by Jef Poskanzer <jef@acme.com>. All rights reserved.
12 July 2001 mini_sendmail(8)
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