On 13/06/11 21:38, leaf-user-requ...@lists.sourceforge.net wrote:
***snip***
> 
> Message: 1
> Date: Thu, 09 Jun 2011 22:50:55 +0200
> From: Bodo Meissner <b...@bodo-m.de>
> Subject: [leaf-user] dyndns and logging problems (was: sending a mail
>       from a  script)
> To: leaf-user@lists.sourceforge.net
> Message-ID: <4df1322f.5010...@bodo-m.de>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Am 09.06.2011 19:24, schrieb bob:
> 
>> I am running LEAF_Bering uclibc3.0 and have a problem with dyndns.
>> It seems that very,very occasionally, after Telekom changes the ip
>> address, ezipupdate is failing.
> 
> Hello Bob,
> 
> I cannot help you with sending mails from your leaf system, but I have other 
> suggestions.
> 
> I created the package dyndnsup.lrp and I'm using it at least since 2006 
> without noticing any problem. (The oldest file in the current package on 
> leaf.sourceforge.net has been modified 2006-04-12)
> Of course I don't know if it would be more reliable than ez-ipupdate in your 
> case.
> It is a simple shell script that is installed as 
> /etc/ppp/ip-up.d/dyndnsupdate and uses wget to do the updates at dyndns and 
> no-ip. (This means it depends on ppp and wget packages.)
> 
>> It always does this when I am at work, so I am unable to connect back to
>> investigate (I call my wife to perform an 'ultimate reset' (unplug WRAP
>> box & reconnect because I need to stay vpn connected for e-mails) which
>> then destroys all the evidence.
> 
> I use both dyndns and no-ip and my script uses two separate wget calls to do 
> the updates. So if one of these fails I might still have the other DNS entry.
> 
> For logging I use remote syslog to a different server running a normal linux 
> system. So I might have some evidence there if anything fails on my router. 
> (But this remote syslog is not very reliable for unknown reason.)
> 
> 
> Bodo
> 

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

Message: 2
Date: Fri, 10 Jun 2011 08:27:23 +0200
From: Erich Titl <erich.t...@think.ch>
Subject: Re: [leaf-user] sending a mail from a script
To: leaf-user@lists.sourceforge.net
Message-ID: <4df1b94b.4050...@think.ch>
Content-Type: text/plain; charset="iso-8859-1"

Hi BOb

at 09.06.2011 19:24, bob wrote:
>> Hi,
>>
>> I am running LEAF_Bering uclibc3.0 and have a problem with dyndns.
>> It seems that very,very occasionally, after Telekom changes the ip
>> address, ezipupdate is failing.
>> It always does this when I am at work, so I am unable to connect back to
>> investigate (I call my wife to perform an 'ultimate reset' (unplug WRAP
>> box & reconnect because I need to stay vpn connected for e-mails) which
>> then destroys all the evidence.
>> I decided to write a script to be executed when the ip changes, that
>> would compare the value in /etc/ez-ipup with that of the external
>> interface and send me a mail if they do not agree. The Box is internet
>> connected OK, just the dyndns is not updated.

Happens to me too, sometimes the dynamic services change their update
server and I do not allow just any outgoing http connection.

Bot back to the original question...
Have you tried to just launch the `mail`command on your leaf box. On
mine I found that there were a number a syntactical errors, so it would
not run, easy to change though.

- source on line 6 is bogus, just comment it out and insert a `.` where
it is used

- hostname -f is not recognized in my busybox version, remove the -f

therse errors show up, because my POSIXness.conf file is incompletely
configured, YMMV.

This is the output from the mail command issued without parameters

demo-guardian# /usr/sbin/mail
Usage: mail options to[,...]
Options: [-s subject] [-c cc[,...]] [-b bcc[,...]]
         [-a attachment[,...]] [-d domain] [-h smptserver]

Mail settings are in /etc/POSIXness.conf
-a attach text file(s)
-d specify from FQDN, overriding local domain
-h specify SMTP server, overriding the MAIL_SERVER setting
-v verbose

cheers

Erich

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3409 bytes
Desc: S/MIME Cryptographic Signature

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

Message: 3
Date: Fri, 10 Jun 2011 10:31:18 +0200
From: Erich Titl <erich.t...@think.ch>
Subject: Re: [leaf-user] sending a mail from a script
To: leaf-user@lists.sourceforge.net
Message-ID: <4df1d656.6010...@think.ch>
Content-Type: text/plain; charset="iso-8859-1"

Hi Bob

at 09.06.2011 19:24, bob wrote:
>> Hi,
>>
>> I am running LEAF_Bering uclibc3.0 and have a problem with dyndns.
>> It seems that very,very occasionally, after Telekom changes the ip
>> address, ezipupdate is failing.
>> It always does this when I am at work, so I am unable to connect back to
>> investigate (I call my wife to perform an 'ultimate reset' (unplug WRAP
>> box & reconnect because I need to stay vpn connected for e-mails) which
>> then destroys all the evidence.
>> I decided to write a script to be executed when the ip changes, that
>> would compare the value in /etc/ez-ipup with that of the external
>> interface and send me a mail if they do not agree. The Box is internet
>> connected OK, just the dyndns is not updated.

A follow up with the corrected mail script.... I am running 3.x too

demo-guardian# mail -s foo -h luna.think.ch i...@think.ch
foobar
Error: Unknown response.
  DATA
  4: 550 5.1.1 <i...@think.ch>... User unknown
Aborting due to connection error
  Killing child processes: 9944 9945

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

demo-guardian# mail -s foo -h luna.think.ch erich.t...@think.ch
foobar
Error: Unknown response.
  DATA
  4: 451 4.7.1 Greylisting in action, please come back later
Aborting due to connection error
  Killing child processes: 10051 10052

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

This is normal behaviour, although if you use greylisting like me then
you need to use another MTA

cheers

Erich

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3409 bytes
Desc: S/MIME Cryptographic Signature

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

Message: 4
Date: Sat, 11 Jun 2011 12:41:54 +0200
From: bob <b...@vknobloch.de>
Subject: Re: [leaf-user] sending a mail from a script
To: leaf-user@lists.sourceforge.net
Message-ID: <4df34672.7060...@vknobloch.de>
Content-Type: text/plain; charset=ISO-8859-1

Am Donnerstag, 9. Juni 2011, um 20:35:39 schrieb Charles Steinkuehler:
>>> On 6/9/2011 12:24 PM, bob wrote:
***snip***
Indeed, it is still the script, but it's broken for me also.
I already opened ticket in Trac to replace it busybox sendmail.

kp

OK KP, I will wait until the new stuff is there. I assume this will only
be in uClibC 4 ? So it's time to update :-)

In the meantime, I'm trying another approach. Does any one know where
the external IP obtained by pppoe is stored? If I can SCP this from
another box, I can compare it with the ez-ipupdate cache and try to trap
the problem.

Thanks,

Bob




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

Message: 5
Date: Sat, 11 Jun 2011 17:11:37 +0200
From: Erich Titl <erich.t...@think.ch>
Subject: Re: [leaf-user] sending a mail from a script
To: leaf-user@lists.sourceforge.net
Message-ID: <4df385a9.4020...@think.ch>
Content-Type: text/plain; charset=ISO-8859-1

Hi

on 11.06.2011 12:41, bob wrote:
>> Am Donnerstag, 9. Juni 2011, um 20:35:39 schrieb Charles Steinkuehler:
>>>> On 6/9/2011 12:24 PM, bob wrote:
...
>>>>
>>>> Given the error, I suspect it's still a script and either  something has
>>>> gotten messed up and you're the lucky finder of a bug or you may need to
>>>> setup the configuration file in /etc.
>> Indeed, it is still the script, but it's broken for me also.
>> I already opened ticket in Trac to replace it busybox sendmail.

Sendmail, at least the way I understand it, is not a replacement for the
mail command, but a MTA. This may be different in busybox.

To fix the mail command in Bering is _trivial_ and I already gave the
details.

>>
>> kp
>>
>> OK KP, I will wait until the new stuff is there. I assume this will only
>> be in uClibC 4 ? So it's time to update :-)

You could, but IMHO it is also time to fix the script, which is really easy.

>>
>> In the meantime, I'm trying another approach. Does any one know where
>> the external IP obtained by pppoe is stored? If I can SCP this from
>> another box, I can compare it with the ez-ipupdate cache and try to trap
>> the problem.

ip addr sh dev ppp0 | grep inet | sed -e "s/inet//; s/peer.*$//; s/^ *//"

or get your external address with wget http://checkip.dyndns.com/

cheers

Erich



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

Message: 6
Date: Mon, 13 Jun 2011 12:21:17 -0700
From: "Doug Sampson" <do...@dawnsign.com>
Subject: Re: [leaf-user] sending a mail from a script
To: "Erich Titl" <erich.t...@think.ch>,
        <leaf-user@lists.sourceforge.net>
Message-ID:
        <d358eef1f9124d44b25b0ed225c8fde6070...@hydra.dawnsign.com>
Content-Type: text/plain;       charset="us-ascii"

>> - source on line 6 is bogus, just comment it out and insert a `.`
>> where it is used
>>
I'm not sure exactly which line is the sixth line you are referring
here. Is it the "CR='.' line? When counting lines, are the first three
commented lines at the beginning of the file counted? Empty lines also?

Please elaborate. I would love to use the mail command!

~Doug



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

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

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

_______________________________________________
leaf-user mailing list
leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user


End of leaf-user Digest, Vol 57, Issue 2
****************************************
Thanks Erich,
I edited the mail script as you advised and it works fine now.

Doug,

The /usr/sbin/mail script was:

#!/bin/sh
#
#GPL2 -- Dave Cinege <dcin...@psychosis.com>
#

source () { . $@ ; }
qt () { "$@" >/dev/null 2>&1 ; }
eecho () { echo "$@" >/dev/null >&2 ; }
prog=${0##*/}

OIFS=$IFS
CR=' '
LF='
'

MASTCONF="/etc/POSIXness.conf"
[ -f "$MASTCONF" ] && source $MASTCONF


And is now:

#!/bin/sh
#
#GPL2 -- Dave Cinege <dcin...@psychosis.com>
#

# source () { . $@ ; }
qt () { "$@" >/dev/null 2>&1 ; }
eecho () { echo "$@" >/dev/null >&2 ; }
prog=${0##*/}

OIFS=$IFS
CR='
'
LF='
'

MASTCONF="/etc/POSIXness.conf"
[ -f "$MASTCONF" ] && . $MASTCONF

- Now to write the script I wanted :-)

Cheers all,

Bob



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
------------------------------------------------------------------------
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/

Reply via email to