On 09-Oct-07 15:48:25, Brett Parker wrote:
On Tue, Oct 09, 2007 at 04:04:49PM +0100, Ted Harding wrote:
So all I would need to do is copy that file, edit out unwanted headers and modify others, and then 'cat' the edited copy down the line after the 'data' command in SMTP.
Or that would be the case, if only I could find out how to 'cat it down the line' while still on that telnet connection!
(Perhaps one can see why ssh wouldn't work iin this case ... :))
Why not open the socket in your favourite programming language and parse the responses etc... it should be relatively easy to knock up something that does this in either python or perl...
Heck, this being pure telnet, you might even be able to just use expect to do it...
Something like the attached script should give you an idea (OK - so there's a bug in the attached script... but hey ;)
Looks neat! I'll give it a try -- though there's summat weird garbage in there that I'll have to clean out ... :)
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) ted.harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 09-Oct-07 Time: 20:24:30 ------------------------------ XFMail ------------------------------