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 ;)
Cheers,