From: hugh@kink.PhaedraV.On.Ca (Hugh D. Gamble)
Newsgroups: alt.sys.amiga.uucp
Subject: Re: Using the Amiga as a slave mail system
Date: Wed, 11 Nov 1992 19:41:11 EST
Summary: No slavery for Amigas! 
Organization: Phaedra V

In article <9211052307.AA0044y@bpc.UUCP>, bpc!bernie@uunet.UU.NET writes:

> 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
            ^^^^^^^^^^^^
By "real account" do you mean a shell login?

> 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.

Elm is not a "mail system". Elm, whether you run it on an Amiga
running AmigaOS or on a machine (including an Amiga) running UNIX, is
a "user interface" to whatever mailer is in place.

If you are running some version of Berkely or SysVR3 UNIX, your mailer
is probably something called sendmail. You may have a mailer called
Smail instead or in addition to sendmail. If you are running AmigaUUCP
on your Amiga, and using the mailer that comes with it, it is also
called sendmail, but has no relation to the UNIX mailer called
sendmail.

> 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

That is exactly what you get for free, automatically if you run UUCP
or dialup IP on your Amiga.

> 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].

You can dial in to your Amiga just as well. What are the other
reasons?

> I'd appreciate any advice/suggestions you folks might have for how
> to get things set up properly.  I think I have the downloading

Run UUCP or dialup IP on your Amiga and you can do everything from
there. AmigaOS is just as "real" as UNIX, VM, or VMS. If you are going
to be logged on to your Amiga sometimes, and logged on to other
machines at other times and you don't want to have to log into your
Amiga to read your mail, you can have your mail forwarded to the other
computers as well. If you want to reply to mail from the other
machines as well as reading it there, make sure that your headers are
set to point to the machine that you want other peoples' replies to go
to (the one that is doing the forwarding).

> 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

It's a lot simpler to store them all in a single incoming mailbox (i.e
leave it the way it already is), then you have only one file to
download. If you're using elm, keep old mail in a recieved folder so
you don't have to copy it all the time.

> '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

A list of messages, one after another, the same as on UNIX.

> 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>].

What kind of UNIX system is this? What kind of mailer is making the
mailbox?

> 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

Mailboxes do "break", from time to time, if you edit them by hand, for
example, but why should ASCII be more fragile than some format that
needs fussy conrol characters in all the right places or it gets
confused? There are mail systems for some operating systems that do
that, but *they* are fragile.

> 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.

Which is exactly what rmail, sendmail, or anythign  :-) would do for you,
if you let it. In fact, if your mail is ending up in uuspool: it's
already trying to. It would be a lot less work than doing everything by
hand, or writing your own poor mans mail system.

> 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,

You could fake that. If your Amiga can't run mail itself (no modem for
e.g.) so you can't have your mail get to the other machine, just tell
your Amiga it *is* the other machine. Then when you carry your mail to
work on a floppy disk, you can pipe the messages straight to the
mailer there using the existing headers. You have to make sure the
mailer doesn't add an extra set. In fact, if you compose the mail on
your Amiga just use emacs (no point using elm just to have it put on
headers you're only going to strip off again) and just send them to
the mailer on the other machine. It will add all the right headers for
you.

> leave the elm/sendmail link just as it is [so the mail ends up in uuspool:

That's silly.

> 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.

That's a lot of work that you don't need to do.

> 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 buy you anything?

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

You don't need to go to a lot of trouble, nothing is that hard.
My first recommendation is to just run UUCP or dialup IP on your
Amiga, and everything will work automatically. As a second choice, you
can take a copy of your mailbox to your Amiga if you want to read mail
there, and just make up text files for your replies. Copy your replies
to a computer running a mailer and let it make all the right headers.

Either way you don't have to write a line of code. The only difference
is that with the second technique you have to do all the copying back
and forth by hand instead of just letting the mail transport (UUCP or
IP) do it for you.

Why not start by talking to the sysadmin at the other site about the
best way to set this up? He/she will be the person who knows what
they've got and how to do it best.



 -- 
# Hugh D. Gamble  UUCP: hugh@kink.UUCP  Domain: hugh@kink.PhaedraV.On.Ca     %
# AMIX: HGAMBLE  bix: hgamble  voice: +1 416 267 6159                        %
#                                                                            %
#                      CONSPICUOUS SILENCE HERE                              %