Kopermail

Chapter 12

The gateway

When your company only trusts its own PCs.

Some companies only let you sign in to Microsoft 365 from their own PCs. Your own laptop is then refused, or it keeps asking for a second step. With a gateway, the sign-in happens on a PC the company does accept.

Only for Microsoft 365. Gmail, imap and pop3 accounts never use the gateway. If you can sign in fine already, skip this chapter.

How it works

You run a small program, kopermail-gateway, on a computer that your company trusts. That can be a company Windows PC, or a virtual machine on the company network.

Kopermail stays on your own desktop. It drives the browser on the gateway from a distance, over an encrypted connection with a user name and a password.

  • The browser with your company session runs on the gateway computer, not on yours.
  • That session never ends up on your own PC.
  • The gateway passes mail through but does not store it, and does not log mail text.

The gateway does not get around a security policy. It uses a computer your company already trusts. Follow the rules of your company, and ask IT when in doubt.

Set up the gateway

On Windows, the easy way

Start kopermail-gateway.exe. The first start opens a setup window that asks who may connect, the port, and a user and password. At the end it shows the values for Kopermail, with a copy button.

Windows may warn the first time, because the file is not signed. Click More info, then Run anyway. The setup also gives you a command to open the port in the Windows firewall. Run that once in PowerShell as administrator.

Give the gateway its own Windows account without admin rights. Whoever has the gateway password controls the browser on that PC.

In a terminal, on any system

On the company computer:

  1. Download the gateway for that computer from the download section.

  2. Put it in a fixed place, for example C:\Tools\kopermail-gateway.exe.

  3. Open a terminal there and run:

    kopermail-gateway init --listen 192.168.122.10:9443
    

    Use the address of that computer. The command shows a fingerprint. Write it down, you need it in a moment.

  4. Make a user for yourself. It asks for a password twice:

    kopermail-gateway user add yourname
    
  5. Start it:

    kopermail-gateway
    

    A tray icon shows that it runs. To start it at every login, run kopermail-gateway autostart install once.

Connect Kopermail to it

  1. On your own computer, open Settings > Gateways.
  2. Fill in the address, the fingerprint, your user name and your password.
  3. Click Test connection.
  4. Switch on the accounts that need the gateway.

When such an account has to sign in again, the sign-in window opens on the gateway computer, and you sign in there. You can add up to five gateways, for example one per customer.

See what goes through

The same settings page also shows the traffic: how many connections are open, how much goes in and out, and a graph of the last minutes, day or month.

The gateway statistics
The gateway page. Only amounts are counted, never what is in the mail.

One gateway can serve more people. Each person, and each of their accounts, gets a browser profile of its own there.