Send email on connection


WA2ZPX <WA2ZPX@...>
 

Is anyone running a program to email them upon a connection, running CentOs 4.8? I used to have a simple script running in my custom_on script that worked. It appears that in the 4.8 Irlp release mailx or sendmail is not installed. I have read through the Google searchs and unfortunitly some of the input and comments about configuring them are above my understanding. Anyone have a simple way, or a step by step to accomplish this? I can get around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130


John
 

Rich,

I had the Twitter feed operational until the upgrade, I found that useful.
I was working on the upgrade and became sidetracked. Thank you for the
question on mail, which is an operating system question, but offers the
control op responsibility. These are a requirement in my opinion. Guess I
don't have an answer, but support your question, thanks Rich. In RH7.3 I
also had mail operational, have not tried it on CentOS.



John KB4YFK - nodes 4943 and 8068, Virginia, USA.



From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of WA2ZPX
Sent: Sunday, January 02, 2011 10:47 AM
To: irlp@yahoogroups.com
Subject: [irlp] Send email on connection





Is anyone running a program to email them upon a connection, running CentOs
4.8? I used to have a simple script running in my custom_on script that
worked. It appears that in the 4.8 Irlp release mailx or sendmail is not
installed. I have read through the Google searchs and unfortunitly some of
the input and comments about configuring them are above my understanding.
Anyone have a simple way, or a step by step to accomplish this? I can get
around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130


John Lorenc
 

You may want to have a look at ssmtp as a means to send e-mail messages from
your node.

http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with
-ssmtp/

John/VA3XJL

-----Original Message-----
From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of WA2ZPX
Sent: January 2, 2011 10:47
To: irlp@yahoogroups.com
Subject: [irlp] Send email on connection

Is anyone running a program to email them upon a connection, running CentOs
4.8? I used to have a simple script running in my custom_on script that
worked. It appears that in the 4.8 Irlp release mailx or sendmail is not
installed. I have read through the Google searchs and unfortunitly some of
the input and comments about configuring them are above my understanding.
Anyone have a simple way, or a step by step to accomplish this? I can get
around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130



------------------------------------

--- IRLP-Owners YahooGroups List ---Yahoo! Groups Links


Rich Ball <WA2ZPX@...>
 

John,



Thanks for the suggestion. I tried downloading sSMTP. After figuring out a
good link for downloading, I was able to download, and start install, but I
have some dependency issues to work through. Looks like a good work around
once I work through the issues.



Regards,



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of John
Lorenc (VA3XJL)
Sent: Sunday, January 02, 2011 8:57 PM
To: irlp@yahoogroups.com
Subject: RE: [irlp] Send email on connection





You may want to have a look at ssmtp as a means to send e-mail messages from
your node.

http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with
-ssmtp/

John/VA3XJL

-----Original Message-----
From: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
[mailto:irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com> ] On Behalf Of
WA2ZPX
Sent: January 2, 2011 10:47
To: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
Subject: [irlp] Send email on connection

Is anyone running a program to email them upon a connection, running CentOs
4.8? I used to have a simple script running in my custom_on script that
worked. It appears that in the 4.8 Irlp release mailx or sendmail is not
installed. I have read through the Google searchs and unfortunitly some of
the input and comments about configuring them are above my understanding.
Anyone have a simple way, or a step by step to accomplish this? I can get
around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130

------------------------------------

--- IRLP-Owners YahooGroups List ---Yahoo! Groups Links


William Stillwell - KI4SWY <wkstill@...>
 

Here is a very good SendEmail perl script I use, its very lightweight.



http://freshmeat.net/projects/sendemail/



I use it on my asterisk fax server that handles about 5000 faxes a week.







From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of Rich
Ball
Sent: Monday, January 03, 2011 8:36 AM
To: irlp@yahoogroups.com
Subject: RE: [irlp] Send email on connection





John,

Thanks for the suggestion. I tried downloading sSMTP. After figuring out a
good link for downloading, I was able to download, and start install, but I
have some dependency issues to work through. Looks like a good work around
once I work through the issues.

Regards,

Rich

_____

From: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
[mailto:irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com> ] On Behalf Of
John
Lorenc (VA3XJL)
Sent: Sunday, January 02, 2011 8:57 PM
To: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
Subject: RE: [irlp] Send email on connection

You may want to have a look at ssmtp as a means to send e-mail messages from
your node.

http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with
-ssmtp/

John/VA3XJL

-----Original Message-----
From: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
<mailto:irlp%40yahoogroups.com>
[mailto:irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
<mailto:irlp%40yahoogroups.com> ] On Behalf Of
WA2ZPX
Sent: January 2, 2011 10:47
To: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
<mailto:irlp%40yahoogroups.com>
Subject: [irlp] Send email on connection

Is anyone running a program to email them upon a connection, running CentOs
4.8? I used to have a simple script running in my custom_on script that
worked. It appears that in the 4.8 Irlp release mailx or sendmail is not
installed. I have read through the Google searchs and unfortunitly some of
the input and comments about configuring them are above my understanding.
Anyone have a simple way, or a step by step to accomplish this? I can get
around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130

------------------------------------

--- IRLP-Owners YahooGroups List ---Yahoo! Groups Links


David Cameron - IRLP
 

The process is really easy... here is a sample script that emails me when a ping fails. It will work on ANY node, embedded or otherwise.

#!/bin/bash

#This script starts a ping test on a cron job, logs the result,
#and emails when there are higher than normal losses.

MAX_LOSS=10
ALERT_EMAIL="ping-alert@irlp.net"

RCVD=`ping -c 100 -q -i 0.1 test.irlp.net | grep received &#92;
| cut -d"," -f2 | cut -d" " -f2`
LOSS=`expr $RCVD - 100`
DATE=`date +'%x %X'`

echo $DATE PACKET LOSS = ${LOSS}% >> /home/irlp/log/test-ping

if [ $LOSS -gt $MAX_LOSS ] ; then
$NETCAT mail.irlp.net 25 << EOF >/dev/null
HELO IRLP-node
MAIL FROM: pingtest@irlp.net
RCPT TO: sales@irlp.net
DATA
Subject:--ALERT-- Ping test loss = $LOSS

At $DATE, packet loss is $LOSS
.
QUIT
EOF
fi

Replace "mail.irlp.net" with your ISP's mail server. You may also have to add a line or two into the headers - depends on your ISP's mail server.

This is a simple script that works great for me without having to install anything extra onto your node. It also gets around the "mail from a dynamic IP" anti-spam measure, as it uses your ISP's mail server to send the mail.

Dave Cameron
VE7LTD

--- In irlp@yahoogroups.com, "WA2ZPX" <WA2ZPX@...> wrote:

Is anyone running a program to email them upon a connection, running CentOs 4.8? I used to have a simple script running in my custom_on script that worked. It appears that in the 4.8 Irlp release mailx or sendmail is not installed. I have read through the Google searchs and unfortunitly some of the input and comments about configuring them are above my understanding. Anyone have a simple way, or a step by step to accomplish this? I can get around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130


William Stillwell - KI4SWY <wkstill@...>
 

Doesn't work so well if your isp requires ESMTP w/Authentication on Port 587



Which most ISP(s) are moving towards these days. , and only allowing MX to
MX Traffic on port 25 , ie, if your IRLP box is not a mx server, or have a
ptr record, it gets counted as possible spam.



From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of ve7ltd
Sent: Monday, January 03, 2011 10:29 AM
To: irlp@yahoogroups.com
Subject: [irlp] Re: Send email on connection





The process is really easy... here is a sample script that emails me when a
ping fails. It will work on ANY node, embedded or otherwise.

#!/bin/bash

#This script starts a ping test on a cron job, logs the result,
#and emails when there are higher than normal losses.

MAX_LOSS=10
ALERT_EMAIL="ping-alert@irlp.net <mailto:ping-alert%40irlp.net> "

RCVD=`ping -c 100 -q -i 0.1 test.irlp.net | grep received &#92;
| cut -d"," -f2 | cut -d" " -f2`
LOSS=`expr $RCVD - 100`
DATE=`date +'%x %X'`

echo $DATE PACKET LOSS = ${LOSS}% >> /home/irlp/log/test-ping

if [ $LOSS -gt $MAX_LOSS ] ; then
$NETCAT mail.irlp.net 25 << EOF >/dev/null
HELO IRLP-node
MAIL FROM: pingtest@irlp.net <mailto:pingtest%40irlp.net>
RCPT TO: sales@irlp.net <mailto:sales%40irlp.net>
DATA
Subject:--ALERT-- Ping test loss = $LOSS

At $DATE, packet loss is $LOSS
.
QUIT
EOF
fi

Replace "mail.irlp.net" with your ISP's mail server. You may also have to
add a line or two into the headers - depends on your ISP's mail server.

This is a simple script that works great for me without having to install
anything extra onto your node. It also gets around the "mail from a dynamic
IP" anti-spam measure, as it uses your ISP's mail server to send the mail.

Dave Cameron
VE7LTD

--- In irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com> , "WA2ZPX"
<WA2ZPX@...> wrote:

Is anyone running a program to email them upon a connection, running
CentOs 4.8? I used to have a simple script running in my custom_on script
that worked. It appears that in the 4.8 Irlp release mailx or sendmail is
not installed. I have read through the Google searchs and unfortunitly some
of the input and comments about configuring them are above my understanding.
Anyone have a simple way, or a step by step to accomplish this? I can get
around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130


WD5M David M.
 

To install sendmail, try running "yum install sendmail".

David
WD5M

On Sun, Jan 2, 2011 at 9:46 AM, WA2ZPX <WA2ZPX@hvc.rr.com> wrote:

Is anyone running a program to email them upon a connection, running CentOs
4.8? I used to have a simple script running in my custom_on script that
worked. It appears that in the 4.8 Irlp release mailx or sendmail is not
installed. I have read through the Google searchs and unfortunitly some of
the input and comments about configuring them are above my understanding.
Anyone have a simple way, or a step by step to accomplish this? I can get
around Linux and the Irlp box pretty well.

Regards,

Rich
Node4130



------------------------------------

--- IRLP-Owners YahooGroups List ---Yahoo! Groups Links




Dave K9DC
 

Actually I thought sendmail was already installed in the standard distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M


Rich Ball <WA2ZPX@...>
 

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$ I
tried installing send mail using yum but had difficulty configuring the CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M


WD5M David M.
 

You may also need to install mailx.

yum install mailx

Regards,
David
WD5M

On Mon, Jan 3, 2011 at 11:59 AM, Rich Ball <WA2ZPX@hvc.rr.com> wrote:

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$ I
tried installing send mail using yum but had difficulty configuring the CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C
uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M




Rich Ball <WA2ZPX@...>
 

I did that Dave.. I couldn't get the mail out of the box which equated to
configuration issues. I tried working through them with all kind of google
searches. Again, the real issue is that I just don't understand some of the
terminology, or how the mail server needed to be configured (not being a
programmer or that technically astute). Trying to learn and figure it out,
but sometimes there comes a point that frustration sets in, and you need to
find a simpler approach before the simpleton (me) head explodes.



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of David
McAnally
Sent: Monday, January 03, 2011 1:06 PM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Send email on connection





You may also need to install mailx.

yum install mailx

Regards,
David
WD5M

On Mon, Jan 3, 2011 at 11:59 AM, Rich Ball <WA2ZPX@hvc.rr.com
<mailto:WA2ZPX%40hvc.rr.com> > wrote:

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the
custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$ I
tried installing send mail using yum but had difficulty configuring the CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C
uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
[mailto:irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com> ] On Behalf Of
Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M




David Cameron - IRLP
 

The problem with using sendmail is if it is not set up to relay through a mail server that is a mail exchanger, it likely will not be accepted by the receiving party.

Dave Cameron

--- In irlp@yahoogroups.com, "Rich Ball" <WA2ZPX@...> wrote:

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$ I
tried installing send mail using yum but had difficulty configuring the CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M






Gerard Hickey <hickey@...>
 

That is pretty much true for any mail transfer agent. But then I would have to ask why anyone would want to run sendmail when much easier to configure and more capable MTAs like postfix are available. Install postfix and you will be much happier.

On Jan 3, 2011, at 12:29 PM, ve7ltd wrote:

The problem with using sendmail is if it is not set up to relay through a mail server that is a mail exchanger, it likely will not be accepted by the receiving party.

Dave Cameron

--- In irlp@yahoogroups.com, "Rich Ball" <WA2ZPX@...> wrote:

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$ I
tried installing send mail using yum but had difficulty configuring the CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M




[Non-text portions of this message have been removed]
--
Gerard Hickey / WTF
hickey@kinetic-compute.com
425-395-4554


WD5M David M.
 

Yep, every ISP seems to do this differently. Some let your client deliver
direct via DNS MX records. Others block port 25 and force you to use an ISP
or other relay bottleneck server. The relay host line in sendmail.mc for
this looks like...

define(`SMART_HOST',`mail.charter.net')

I've also subscribed to www.dyndns.com for mail relay services like this

define(`SMART_HOST',`outbound.mailhop.org')

I don't remember all the gory details now, but I had to figure out how to
configure authentication for the relay connection. I think this following
link was one of the methods I used. The node I setup still has that
authenticated relay configuration, but I've turned off most of the email
scripts I had used. That was a RH9 version of IRLP. Too long ago to remember
now.

http://www.sendmail.org/~ca/email/auth.html#smtpclient

David
WD5M

On Mon, Jan 3, 2011 at 2:29 PM, ve7ltd <dcameron@irlp.net> wrote:

The problem with using sendmail is if it is not set up to relay through a
mail server that is a mail exchanger, it likely will not be accepted by the
receiving party.

Dave Cameron

--- In irlp@yahoogroups.com, "Rich Ball" <WA2ZPX@...> wrote:

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the
custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$
I
tried installing send mail using yum but had difficulty configuring the
CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C
uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of
Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M


William Stillwell - KI4SWY <wkstill@...>
 

Hence why you just use the sendemail perl script..



No need to fuss w/smarthost ..



But if you insist, I wrote this for d-star which should apply to any
centos/sendmail setup.



http://www.florida-dstar.info/linux-server-tips/configuring-sendmail-to-use-
isp-smtp-for-relaying







From: irlp@yahoogroups.com [mailto:irlp@yahoogroups.com] On Behalf Of David
McAnally
Sent: Monday, January 03, 2011 4:42 PM
To: irlp@yahoogroups.com
Subject: Re: [irlp] Re: Send email on connection





Yep, every ISP seems to do this differently. Some let your client deliver
direct via DNS MX records. Others block port 25 and force you to use an ISP
or other relay bottleneck server. The relay host line in sendmail.mc for
this looks like...

define(`SMART_HOST',`mail.charter.net')

I've also subscribed to www.dyndns.com for mail relay services like this

define(`SMART_HOST',`outbound.mailhop.org')

I don't remember all the gory details now, but I had to figure out how to
configure authentication for the relay connection. I think this following
link was one of the methods I used. The node I setup still has that
authenticated relay configuration, but I've turned off most of the email
scripts I had used. That was a RH9 version of IRLP. Too long ago to remember
now.

http://www.sendmail.org/~ca/email/auth.html#smtpclient

David
WD5M

On Mon, Jan 3, 2011 at 2:29 PM, ve7ltd <dcameron@irlp.net
<mailto:dcameron%40irlp.net> > wrote:

The problem with using sendmail is if it is not set up to relay through a
mail server that is a mail exchanger, it likely will not be accepted by
the
receiving party.

Dave Cameron

--- In irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com> , "Rich Ball"
<WA2ZPX@...> wrote:

Dave,



It was on previous releases i.e. 7.3. I used a simple line in the
custom_on
script .mail -s "Node 4130 Connected to $1" (my email address) < /dev/$
I
tried installing send mail using yum but had difficulty configuring the
CF
file. As I say.. Some of the configuration stuff is beyond my current
capabilities. I'm going to try the playing with the script that Dave C
uses
and see if I can get that to work.



Thanks all..



Rich



_____

From: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
[mailto:irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com> ] On Behalf Of
Dave
Gingrich
Sent: Monday, January 03, 2011 11:09 AM
To: irlp@yahoogroups.com <mailto:irlp%40yahoogroups.com>
Subject: Re: [irlp] Send email on connection





Actually I thought sendmail was already installed in the standard
distribution. Set up for localhost only however.

rpm -q sendmail

It is on my nodes, but I might have added it. Don't remember.
-k9dc

On Jan 3, 2011, at 10:53 AM, David McAnally wrote:

To install sendmail, try running "yum install sendmail".

David
WD5M