Notes on Popgate
----------------

Popgate is a "mail transport agent" for Pegasus Mail.  Pegasus is a native
Novell Netware application, and internally supports Netware's mail handling
methods.  To deal with Internet mail protocols (SMTP and POP) instead,
Pegasus requires an external program called a "mail transport agent."  The
default Internet mail transport agent for Pegasus is Pmpop, but Pmpop does
not work for some people because it is incompatible with their ISPs' POP or
SMTP server software.  Popgate is an alternative for such people.

You might try Popgate if you can receive, but not send, mail with Pegasus,
or vice versa, or if you can use Minuet or POPmail but not Pegasus.  If
Pmpop works for sending but not receiving, or vice versa, you can continue
to use Pmpop for the one it works for and try Popgate for the other; Marc
Williams has used Popgate for sending, Pmpop for receiving.  Popgate has a
15-second shareware delay in it, so if one-half of Pmpop is working, you
might want to keep that half.

I will assume in the following that you have followed my instructions for
installing Pegasus Mail and Pmpop and found that Pmpop doesn't work, so you
should try Pmpop first or at least install it to establish a common frame of
reference.  Popgate runs from inside Pegasus, just like Pmpop.

Popgate is designed for use with Pegasus Mail v2.x, and the installation
instructions that came with it are useless for v3.31.  Follow these
instructions instead.  The installation is somewhat involved, so be careful.

To install Popgate, decompress it into your Pegasus Mail directory:

   E:\INTERNET\PMAIL331> pkunzip ..\popgt10d

It will ask if you want to overwrite WATTCP.CFG.  Do *not* do so (say "n"). 
The WATTCP.CFG you created for Pmpop will work fine for Popgate.

You will need to patch POPGATE.EXE with Debug to get it to work with Pegasus
v3.31; do so as follows.  First rename POPGATE.EXE to POPGATE.TMP:

   E:\INTERNET\PMAIL331> ren popgate.exe popgate.tmp

Load POPGATE.TMP into Debug:

   E:\INTERNET\PMAIL331> debug popgate.tmp

You get Debug's "-" prompt.  Enter the following commands (hit <enter> after
each line).

   e da19 43 4e 4d
   w
   q

The Debug session looks like this:

   E:\INTERNET\PMAIL331> debug popgate.tmp
   -e da19 43 4e 4d
   -w
   Writing ED7A bytes
   -q
   E:\INTERNET\PMAIL331>

Now rename POPGATE.TMP back to POPGATE.EXE:

   E:\INTERNET\PMAIL331> ren popgate.tmp popgate.exe

The patch causes incoming mails to be named *.CNM (as Pegasus expects)
rather than *.POP (as Popgate would normally name them).

Edit your AUTOEXEC.BAT file and add the following lines:

   SET POP.CFG=E:\INTERNET\PMAIL331
   SET EMAIL=tvdog@oldskool.org

(Change the first line to match the directory where you installed Pegasus
Mail, and change the second line to your email address.)  Reboot to let the
new AUTOEXEC.BAT take effect.

Next run POPCONFI.EXE to complete the setup for Popgate:

   E:\INTERNET\PMAIL331> popconfi

You will be asked for your "POPmail account".  Set this to your POP
username, followed by "@", followed by your POP server name.  Your POP
username is generally the part of your email address before the "@".  For
example, my email address is tvdog@buckeyeweb.com (my real one, email to
oldskool.org is forwarded), and my POP server is mail.buckeyeweb.com.  I set
POPmail account to "tvdog@mail.buckeyeweb.com".

Change "Ask Password Each Time?" to N.  For "Account Password", enter your
POP password.  Be careful typing it since it will not echo.  For "Path for
retrieved msgs", give the full pathname of the directory where you installed
Pegasus, in my example, "E:\INTERNET\PMAIL331".

For "SMTP Server", enter your SMTP server name.  For "SMTP Return Path",
give your email address, for me, "tvdog@buckeyeweb.com".

"SMTP Hello ID" is something you will have to guess at.  With my old
provider, I used to give my full machine name.  Mark Williams gives his POP
userid.  You might also try the part of your email address after the "@", or
the part before the "@", or your full email address.  Then again, it might
not matter at all (not every SMTP server uses HELO protocol).  If you can
reach someone knowledgeable in your ISP's tech support department, they
might be able to tell you what to put here.

For "Path for outgoing msgs", put in the full pathname of the Pegasus
directory again.  Hit <enter>.  It says, "Press ENTER to Accept, any other
key to Edit."  Hit <enter> again.

If you want to use Popgate for *sending* mail, you should now run
PCONFIG.EXE to set up Pegasus for Popgate (if you want to continue to use
Pmpop for sending, you should skip this part):

   E:\INTERNET\PMAIL331> pconfig

Select "Configuring Pegasus Mail/DOS", then select "Manage user-defined
gateways".  A box labelled "Defined Gateways:" pops up.  If you followed my
instructions for installing Pegasus Mail and Pmpop, you should have one
gateway defined, "POP".  Hit <enter> to edit the gateway definition.

The "User Gateway Definition" screen pops up.  Change "Filename format" to
"~d~d.SMT".  I set "Reply address format" to this:

   ~%EMAIL%

Marc Williams set it to this (which is probably better):

   "~p" <~%EMAIL%>

Change "Simple message headers?" to "Simple headers".  Leave the rest of the
stuff alone.  Hit <down arrow> until a box pops up that says, "Accept this
data?" Hit Y.

You go back to the "Defined Gateways:" box.  Hit <ctrl>-<enter> to save the
modified gateway definition.  Back in the main configuration screen, select
"Exit, saving settings".

At this point, POPGATE.EXE and/or SMTPGATE.EXE can be run external to
Pegasus Mail, i.e., from the DOS command line.  However, if you try to use
the "Get new POP3 mail" or "Send all messages" menu items in Pmail, it will
still try to run Pmpop instead.  You need to modify the menus in Pegasus
Mail.  To do so, first extract RESCOM.EXE from RESOURCE.ZIP:

   E:\INTERNET\PMAIL331> pkunzip resource.zip rescom.exe

Now edit file PM-MENU.R.  If you want to use Popgate for *receiving* mail,
change this line (do not change this if you want to continue to use Pmpop
for receiving):

   "pmpop -3~w -v2 -g > nul"

To:

   "popgate"

A little further down, if you want to use Popgate for *sending* mail, change
this line (do not change this if you want to continue to use Pmpop for
sending):

   "pmpop -4~h\\*.msg -N\"~p\" -s > nul"

To:

   "smtpgate"

(Change both lines to use Popgate for both.)  Save PM-MENU.R, and recompile
the Pegasus menus:

   E:\INTERNET\PMAIL331> rescom pm-menu.r

You will get this warning:

   Warning pm-menu.r 143: menu header declares fewer options than exist.

Ignore the warning.

Now you should be all set.  When you select the "Get new mail by POP3" menu
item in Pegasus, POPGATE will pop up, and when you select the "Send all
messages" item, SMTPGATE will pop up (depending on whether you configured
one or both).  If anything goes wrong, you will typically get a popup error
message.  That message may help you to change the settings in POPCONFI.EXE
to get Popgate working.