DD-WRT sendmail

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
sinfjb
DD-WRT Novice


Joined: 05 Mar 2010
Posts: 21
Location: Montreal

PostPosted: Fri Mar 05, 2010 2:28    Post subject: DD-WRT sendmail Reply with quote
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
Sponsor
yzy-oui-fi
DD-WRT Guru


Joined: 03 Mar 2009
Posts: 2826
Location: France

PostPosted: Fri Mar 05, 2010 3:04    Post subject: Reply with quote
I did not noticed that sendmail is include in the firmware...are you sure logs are mailled with this feature?
_________________
DD-WRT WDS MESH + DASHBOARD (fr), DD-WRT network setting tool (tools.yzy-oui-fi.com), Wifi Business and IT guy After hours, My Blog, Free DD-WRT VPN Community(www.wrt-pptp-ww.com), DD-WRT pré-réglés pour réseau outdoor(hotspot.yzy-oui-fi.com), Nouveau Forum DD-WRT francophone
sinfjb
DD-WRT Novice


Joined: 05 Mar 2010
Posts: 21
Location: Montreal

PostPosted: Fri Mar 05, 2010 3:19    Post subject: DD-WRT sendmail Reply with quote
Hi,

When I login via SSH putty there is a sendmail program

in /usr/sbin

I'm using build 13525

Thanks

Jacques
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 12310
Location: N41 55.327 W88 03.986

PostPosted: Fri Mar 05, 2010 3:27    Post subject: Reply with quote
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] Shocked
sinfjb
DD-WRT Novice


Joined: 05 Mar 2010
Posts: 21
Location: Montreal

PostPosted: Fri Mar 05, 2010 3:40    Post subject: DD-WRT sendmail Reply with quote
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
sinfjb
DD-WRT Novice


Joined: 05 Mar 2010
Posts: 21
Location: Montreal

PostPosted: Fri Mar 05, 2010 3:52    Post subject: DD-WRT sendmail Reply with quote
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
yzy-oui-fi
DD-WRT Guru


Joined: 03 Mar 2009
Posts: 2826
Location: France

PostPosted: Fri Mar 05, 2010 13:24    Post subject: Reply with quote
Yo could use "nvram show" command to look for the varaibles you need.

for example if you set myname@isp.com in the log field then you could use

nvram show|grep myname@isp.com

then you could use the man to see the correct syntax:

http://www.sendmail.org/support

_________________
DD-WRT WDS MESH + DASHBOARD (fr), DD-WRT network setting tool (tools.yzy-oui-fi.com), Wifi Business and IT guy After hours, My Blog, Free DD-WRT VPN Community(www.wrt-pptp-ww.com), DD-WRT pré-réglés pour réseau outdoor(hotspot.yzy-oui-fi.com), Nouveau Forum DD-WRT francophone
sinfjb
DD-WRT Novice


Joined: 05 Mar 2010
Posts: 21
Location: Montreal

PostPosted: Fri Mar 05, 2010 16:58    Post subject: DD-WRT sendmail Reply with quote
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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum