From: bpc!bernie@uunet.UU.NET
Subject: Using the Amiga as a slave mail system
Source-Info:  From (or Sender) name not authenticated.
Newsgroups: alt.sys.amiga.uucp

Circumstances are pushing me to change my mail hookup some: what I'll
have is a real account on an internet-connected system running some real
Unix mail system or another.  On my Amiga I use elm to handle my
mail, although I'd consider switching to one of the other Amiga mail
systems if it made my life easier.

The idea is that I want to dial into the system, extract my new mail,
download it to the amiga, and disconnect.  Then I'd cram it into an 
Amiga mail system read/reply/etc on the Amiga, then do the other half:
somehow batch up the outgoing mail, dial in, upload, and post all the
outgoing mail.  My mail should all look exactly as if it was all done
on the host system --- I don't want the to-Amiga step to show up in any
way.  [one key reason for this is so that when I'm away from home
I can still do my email by dialing into the host system and using
it directly].

I'd appreciate any advice/suggestions you folks might have for how
to get things set up properly.  I think I have the downloading
knocked: I can get the incoming mail separated into one-message-per-file,
and then it should be an easy matter to zoo the mess up, download it,
unzoo it, and then brute force just concatenate everything that arrived
onto the end of a suitable mailbox on the amiga, and then if I just type
'elm' it'll all fly.  The one slight hangup is that I'm not exactly
sure about the format of an Amiga mailbox --- I looked through the man
pages and I didn't see any documentation on what the 'message separator'
is [I think that on the Unix system it is <cr><five control-As><cr>].
It looks like it is just a plain text line with 'From ....' and a bunch
of info that I don't know if it is mandatory or optional, but using
plain text seems awfully fragile.  The point is that since I know that
everything at hand is incomgin mail for *me*, I don't need to mess with
rmail or sendmail or anythign: I can just put it in my mailbox directly.

Outgoing mail seems to be a much bigger problem: I can use elm to create
the outgoing mail, and there's no trick in finding it in the uuspool:
directory, but sendmail has done some stuff ot it that seems not perfect
for my needs: It has a local From: line, whereas I want the mail to have
a from line that reflects the 'real' orginating system [the Host].  Also,
the outgoing addresses are all in '!' format, and I'm sure that my host
system will want '@' format.  Here's what I'm thinking:

leave the elm/sendmail link just as it is [so the mail ends up in uuspool:
looking like it is waiting for a uucp out-transfer].  Then write a little
Arexx hack to find all the mail, change the From line to be the right
thing for the host system, delete the "received by Amiga uucp" header line,
and unwrap the email addresses in the X file so they are '@' ized.
then I can make a self-mailing file:
  #!/bin/sh
  
  /usr/lib/sendmail <addressesfromXfile> <<\EOF
  <put fixed body of message here>
  EOF

I can actually concatenate ALL of the outgoing mail into a single file
of self-mailing segments, then dial in, xmodem the file up, and simply
"sh outgoing.mail".

Does this make any sense?  Will it work?  Is there a simpler way?

Thanks!
  /Bernie\
Newsgroups: alt.sys.amiga.uucp