Email can be the most daunting part of cutting Google and Microsoft cloud service costs. Leverage a persistent agent to make self hosting email easy.

Figure 1 of 6 from Retiring Gmail and Outlook from your small business
A local A.I agent can earn its keep out of the box by making Google Workspace and Microsoft 365 redundant.

If you are interested to start using A.I agents in your business, there are some immediate costs that you can quickly eliminate that will more than cover the new cost of the A.I inference.

An easy target is zombie Microsoft and Google subscriptions. Thanks to their per user/per email pricing, we often get stuck with more costs than we should when employees move on or projects finish.

Email can be the hardest part about shutting down those old subscriptions. It might be the point of contact for a valued customer, or the login for a critical service.

Why Now?

Last year hosting your own email server was not worth the effort to setup and maintain.
This year, every small business owner can afford to run an A.I agent that doubles as a software engineer and an IT administrator.
With a tech team that never sleeps, hosting your own email server is no longer out of reach.

Your agent can set up an email server for you, migrate your data from the cloud, and schedule periodic security and maintenance in minutes.

Why Local?

If you are going to run a persistent A.I agent to perform tasks like sales or bookkeeping in your business, you will need to have a old machine or a small cloud instance running 24/7 to support your new A.I employee.
Hosting an email server is a natural value add at no additional cost.

The price of A.I has come down so much in 2026 that it’s now possible that the Microsoft and Google SaaS savings can greatly exceed the A.I running costs. A.I can help your bottom line on something simple before you even start pointing the agents towards your real headaches.

If the below DIY guide gets too technical don’t despair, there are emerging local A.I service businesses like my own peristyle.ai that can set it up quickly for you.

Figure 2 of 6 from Retiring Gmail and Outlook from your small business

Email Server and Client

You could ask your agent to install a battle tested email system like Postfix and webmail client like RoundCube, and you will be up and running before your finish a coffee.

There will come a time when you are so comfortable working with your A.I agents, they are checking, filtering, and sending emails more than you.
At this point it’s handy to have an A.I first email server, that your agents can easily interact with and search semantically for you. (by meaning rather than keywords)

For this reason I built and use the open source py_pg_email server and a simple webmail interface py_pg_client.
(Py for Python , Pg for PostgreSQL, the language and the database used to build them)

Included in the server repository is a thorough skill for your agent to check, send and receive emails.

Figure 3 of 6 from Retiring Gmail and Outlook from your small business
Your agent doesn’t need it but having a webmail interface is nice!

You can use my open source projects as a template and customize them as you like with your agent.

The static IP problem

More businesses and people would be hosting emails servers themselves if it wasn’t for the static IP problem.

A static IP is like having your permanent address on the internet. Your Internet Service Provider (ISP) will give you one if you ask nicely, and with it, sending and receive emails is very simple. The problem is that a static IP allows an attacker to take down your server along with the internet connection for your building or street.

To get around this you need an outbound and inbound relay. There are many providers for this, I recommend Cloudflare for inbound emails and SMTP2GO.com for outbound — they both offer free tiers that will be plenty for most small businesses.
The trick is to set up API key access for your agents and let them take care of the rest.
Your agent will talk you through what is needed for API key setup.

Figure 4 of 6 from Retiring Gmail and Outlook from your small business

For SMTP2GO there is one final verified senders button you have to click, your agent can’t currently do that via API.

Handling email relay around a dynamic IP is about a 20min job with agent assistance, and that time is mostly setting up the API access so the agent can do the job and then maintain it.

Figure 5 of 6 from Retiring Gmail and Outlook from your small business
A.I can take the madness out of email routing

It is a headache, but once set up, your agents will be able to maintain the relays for you autonomously.

Once you are all set up and emails are getting through, prompt your persistent agent to set a reminder for themselves to check for updates and security vulnerabilities periodically, and you will be doing better in terms of reliability and security than most enterprises have been for the past 25 years.

Final Note

Every small business can afford a competent A.I tech team that can do all sorts of wonderful things.
One of the most simple is hosting email, but it is also one of the most satisfying to finally cancel those big tech subscriptions that have trapped us for years.
Next in the series will be how an A.I book-keeper and my open source A.I first accounting software can let you cancel your Quickbooks subscription.

Figure 6 of 6 from Retiring Gmail and Outlook from your small business