Re: [Exim] Re: Exim rejecting email routed from ISP

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Cam Ellison
Datum:  
To: exim-users
Betreff: Re: [Exim] Re: Exim rejecting email routed from ISP
Thanks for this, James. I'll try the last one, and see how it goes.
I've taken what you have verbatim, and set up a cron script to run it
hourly.

I'll keep you posted.

* James Harr (james@???) wrote:
<snip>
> # Perhaps even one less file
> new_ip=`ifconfig <dev> | grep "inet addr:" | cut -b21-35 | cut "-d " -f1`
> old_ip=`cat /etc/hosts | grep -v "^#" | grep "foo.bar.com" | cut "-d " -f1`
> cp /etc/hosts /tmp/hosts
> cat /tmp/hosts | sed "s/$old_ip/$new_ip/" > /etc/hosts
> rm /tmp/hosts
>
>
> You could do it in perl to. If you do, make sure you create like a .bak
> file also (incase your program crashes). Then you read the file line by
> line [eg: while ( <FILE_DESC> ) { $_ is the line of text } ]. And use a
> combo of perl's grep() and split() to rewrite the file. Make sure to see
> the perldoc pages on grep() because it's a boolean return.
>
> Wow. I need a life... hehe
>

Me too.

Cam

--
Cam Ellison Ph.D. R.Psych.
From Roberts Creek on B.C.'s incomparable Sunshine Coast
cam@???
camellison@???
cam@???