Troubleshooting (7)


Email errors[edit]


To follow this guide, you'll need:

  • AIBO software that was bundled with your ERS-7
  • Windows xp or later, or Wine on Linux.
  • A Linux server (preferably Debian or Ubuntu) on your local network

I cannot stress this enough: the server needs to be on your local network, otherwise you risk sending your emails unencrypted over the internet. You could probably use a VPN to a remote server, but I'm not going to cover that setup. An account with an email provider that supports SMTP and POP3 connections (for example, Gmail)

Step 1: Getting Your Account Ready[edit]

Initially I was going to start with instructions on setting up the proxy services, but making sure your existing mail account will work in the first place is a bit more important. If you're using Gmail, I can already confirm that it will work, and I'll be using it as an example in this guide. But if you're using a different provider, you'll need to make sure it allows the following:

  • Checking for mail via POP3
  • Sending mail via SMTP
  • Login from "insecure" clients (in other words, the ability to use app-specific passwords while 2FA is enabled)

If you're not using Gmail, you'll unfortunately have to look for instructions on enabling these things on your own. If you are using Gmail, then follow along.

Generating an app password for Gmail[edit]

If you don't have two-factor authentication enabled on your Google account, all you need to do is visit this page to enable logging in from insecure clients. This isn't really recommended though; I strongly suggest looking up how to enable 2FA on your account first. If you already have 2FA enabled though, you'll need to head to your Google account's security settings and click the "App Passwords" button. On this page, select "Mail" on the "Select app" dropdown, select "Other" on the "Select device" dropdown, and enter something like "AIBO" for the name. Click "Generate". You'll be presented with a password that can be used for ERS-7 to log into your account; copy this password somewhere else first, as this is the only time you'll be able to see it.

Enabling POP3 for Gmail[edit]

Once this is done, head over to Gmail. Click the gear icon in the top right corner, then "See all settings". Go to the "Forwarding and POP/IMAP" tab. Here we'll be able to configure how Gmail will behave when accessed via ERS-7's software. If your account has a lot of mail in it, it might be a good idea to select "Enable POP for mail that arrives from now on", as I don't know what kinds of limits PostPet has when it comes to large amounts of mail. But if you keep your account relatively clean, you can select "Enable POP for all mail". There's also an option to choose what will happen with your mail when it is accessed via POP. I strongly recommend "keep Gmail's copy in the inbox".

And with that out of the way, your Gmail account is (almost) ready to be used with your AIBO!

Step 2: Setting up the Proxies[edit]

If AIBO can only connect to mail servers with no security, then we'll need to use something that can take AIBO's connection as an input and pass it along to a email provider with the proper security. That's where a proxy comes in. In our case, we'll use two different proxies: one to handle SMTP connections, and one to handle POP3.

SMTP Proxy[edit]

Let's start with the SMTP proxy. We'll be using emailrelay for this. Download its package from this page, using the .deb if you're on Debian/Ubuntu, the .rpm on Fedora, or compile it from source via the .tar.gz. In my case, I used the .deb, and installed it on my server via

sudo dpkg -i emailrelay_2.2_amd64.deb

If you're on Fedora (or worse, need to compile the proxy from source), you're on your own! After emailrelay is installed, we'll need to configure a few things. First, emailrelay will already be running; we'll need to stop it, so use sudo service emailrelay stop. Next, we'll edit emailrelay's config file with

sudo nano /etc/emailrelay.conf

Go to the bottom of the file and add these lines, replacing the as-proxy and client-auth values accordingly:

client-auth /home/dobkun/secret

If you aren't using Gmail, replace with the server and port your provider uses for SMTP. Then there's also the client-auth setting, which tells emailrelay where to find your login information. For this example, I placed it in my home folder with the filename secret. The contents of that file should look something like this:

client plain [email protected] YourPassword

Of course, replacing "[email protected]" with your own email address, and "YourPassword" with the app password you generated earlier (or your actual password if you don't have 2FA). All that's left is to start up emailrelay via

sudo service emailrelay start

, and the SMTP proxy is ready to go!

POP Proxy[edit]

One proxy down, one to go. For POP, we'll be using xinetd. This is already included in the repositories for many Linux distributions, so if you're on Debian/Ubuntu,

sudo apt install --no-install-recommends xinetd openssl

is all you need. On other distributions, the package names could be a bit different. Now, we'll need to configure xinetd to handle our POP connection; to do this, create a file at /etc/xinetd.d/pop2pops with the following contents:

# Description:
# A service tunneling POP3 requests to via TLS, making
# it a POP3S connection. Purpose is to allow old email clients not supporting
# modern TLS to mail servers requiring it.
service pop2pops
  type            = UNLISTED
  flags           = NORETRY
  socket_type     = stream
  protocol        = tcp
  wait            = no
  user            = nobody
  instances       = 10
  server          = /usr/bin/openssl
  server_args     = s_client -connect -quiet -verify_quiet
  port            = 110
#  log_type        = FILE /var/log/pop2pops.log
#  log_on_success  = PID HOST USERID DURATION
#  log_on_failure  = HOST USERID

Again, if you aren't using Gmail, replace with the server and port your provider uses for POP. Restart xinetd with sudo service xinetd restart, and we're all done setting up the proxies! Now, on to AIBO.

Step 3: Setting up mail on AIBO[edit]

Simply put the address of your server into the SMTP and POP server fields, the part of your email address before the "@" into the POP account field, and the generated app password (or your actual password if not using 2FA on Gmail) into the password field. TA-DA! Now you can receive mail on your ERS-7!