Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-14-2004, 05:32 PM   #1
Registered: Mar 2003
Posts: 36

Rep: Reputation: 16
Need a script to update a file dynamically from a URL

Have a quick question. I need to write a script that reads a list of data from a URL then writes that information to a file on our mail server. The reason I need this is to dynamically update our relay list so our internet customers can relay thru our mail server. This updates continually, and instead of changing our relay list when ever a customer complains of not being able to send mail I need a script that does it for me. Any ideas on how I should go about doing this? For example:

URL List contains:
and so on

I need everything in this URL list to be inserted into relay-domains dynamically.

Please help, I have a short deadline on this because the relay server we are currently using is being taken down.

Thanks in advance.

Last edited by Savahn; 07-14-2004 at 05:35 PM.
Old 07-14-2004, 06:05 PM   #2
Registered: Jun 2004
Posts: 129

Rep: Reputation: 15
maybe you could use wget? If you need something more complexe you should look into something like Perl's WWW::Mechanize.
Old 07-14-2004, 06:23 PM   #3
Registered: Mar 2003
Posts: 36

Original Poster
Rep: Reputation: 16
I think I may have it. What I have done is use wget to fetch the file from the URL. From there I cat the contents of local-relays (our internal network ip's) and the file I fetched from the url into relay-domains. Hopefully it will work as planned.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 05:19 AM
New to C++ help with simple script Fredstar Programming 9 08-08-2005 12:09 PM
Help on simple script granny Programming 2 02-11-2004 05:02 PM
Simple Script fiod Linux - General 2 09-08-2003 04:03 PM
Simple C Shell script is not so simple elconde Programming 2 09-17-2001 12:53 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration