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.
This sounds like a job for expect. Expect a telent session, then send over the text file.
Srdjan