Author
Message
sinfjb DD-WRT Novice Joined: 05 Mar 2010 Posts: 21 Location: Montreal
Posted: Fri Mar 05, 2010 2:28 Post subject: DD-WRT sendmail
Hi,
Can someone show give me a sample script of sendmail.
I cannot find any info of the command line parameters of sendmail
Thanks
Jacques
Back to top
Sponsor
yzy-oui-fi DD-WRT Guru Joined: 03 Mar 2009 Posts: 2826 Location: France
Back to top
sinfjb DD-WRT Novice Joined: 05 Mar 2010 Posts: 21 Location: Montreal
Posted: Fri Mar 05, 2010 3:19 Post subject: DD-WRT sendmail
Hi,
When I login via SSH putty there is a sendmail program
in /usr/sbin
I'm using build 13525
Thanks
Jacques
Back to top
barryware DD-WRT Guru Joined: 26 Jan 2008 Posts: 12310 Location: N41 55.327 W88 03.986
Posted: Fri Mar 05, 2010 3:27 Post subject:
Not sure cuz I have not tested it in quite a few builds.. I did not work for me cuz my isp needs a special port for the smtp server and last I tested, specifing a port was not an option.
Anyway.. the way it works.. if you max ports or connections hits a limit that you set, the router will send an e-mail to you (or specified) and warn you.
So... send mail is in the firmware. _________________ [MODERATOR DELETED]
Back to top
sinfjb DD-WRT Novice Joined: 05 Mar 2010 Posts: 21 Location: Montreal
Posted: Fri Mar 05, 2010 3:40 Post subject: DD-WRT sendmail
Hi,
Maybe /usr/sbin/sendmail is used via the menu
Security - Connection Warning Notifier
It would be nice to use /usr/sbin/sendmail
via a script.
Jacques
Back to top
sinfjb DD-WRT Novice Joined: 05 Mar 2010 Posts: 21 Location: Montreal
Posted: Fri Mar 05, 2010 3:52 Post subject: DD-WRT sendmail
Hi,
I configure Connection Warning Notifier
with connection limit at "1" and it works
and I got a Email stating
"ip 192.168.1.148 has 4 open connections4 open connections on port 80"
Now can sendmail be use in a script to send email
that would be very very nice...
Jacques
Back to top
yzy-oui-fi DD-WRT Guru Joined: 03 Mar 2009 Posts: 2826 Location: France
Back to top
sinfjb DD-WRT Novice Joined: 05 Mar 2010 Posts: 21 Location: Montreal
Posted: Fri Mar 05, 2010 16:58 Post subject: DD-WRT sendmail
Hi,
This is a sample script to send a email-message from
DD-WRT
Thanks et Merci
Jacques
#!/bin/sh
SMTP="relay.testing.com"
FROM="me@testing.com"
FROM_NAME="First last name"
DOMAIN="testing.com"
USER=""
PASSWORD=""
SUBJECT="TEST 1"
MESSAGE="Test number 1"
TO="me@testing.com"
/usr/sbin/sendmail -S"$SMTP" -f"$FROM" -F"$FROM_NAME" -d"$DOMAIN" -u"$USER" -p"$PASSWORD" -s"$SUBJECT" -m"$MESSAGE" $TO
exit 0
Back to top