On 09-Oct-07 15:24:10, Srdjan Todorovic wrote:
On 09/10/2007, Tim Green timothy.j.green@gmail.com wrote:
On 10/9/07, Ted Harding ted.harding@nessie.mcc.ac.uk wrote:
I can do a mock-up of the entire message, including the MIME headers and separators, the body, and the base64-encoded attachment, by simply mailing it to myself locally. Since I store messages in MH mailboxes, each message is a separate text file.
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!
This is sounding more like a job for netcat, also known as nc. Or an SMTP agent with a more patient connect timeout period.
That is not in my control!
This sounds like a job for expect. Expect a telent session, then send over the text file.
Srdjan
Now that could be promising! I knew (but had forgotten) about expect (It's what used to do my dial-up, in the back-office of kppp).
I'll have to study it, and experiment "locally" -- as I recall you have to be pretty careful to plan it right, or things can fall over badly.
The last thing I want to do is to poke sticks into wasps' nests at the remote site, by engaging in automated fumble-prone SMTP dialogues with their servers!
Best wishes, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) ted.harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 09-Oct-07 Time: 17:13:22 ------------------------------ XFMail ------------------------------